Commit Graph

17 Commits

Author SHA1 Message Date
GitGhillie 572a2b89a6
chore(CI): Add lint CI (#100)
* Add lint CI
* Clippy allow complex types, warn on some others
* bevy_gltf_blueprints use workspace lints
* Update toolchain for workspace wide lints
* Use workspace lints on the other crates as well
2024-01-19 22:23:47 +01:00
Mark Moissette 5429bf4779
feat(Save & load): new crate bevy_gltf_save_load + lots of upgrades & improvements (#95)
* feat(bevy_gltf_save_load): saving & loading implemented
   * created new crate for save & load features, uses & filters out blueprints for efficient loading
   * saving & loading, even with dynamically spawned nested hierarchies works 
   * component filter , resource filter & save path root are configurable
   * for saving: added removal & cleanup logic for children component with children
  that have been filtered out: ie no more invalid children getting stored in the save files !
   * added sending of event once saving is done

* feat(examples/save-load): example for the new crate
   * loading level static & dynamic data as blueprints
   * added a bit of ui when entering saving & loading states & cleanup when exiting

* feat(bevy_gltf_blueprints): significant rewrite of how the crate works
     * simplified spawning process, no more spawning children containing blueprints etc
     * simplified post process : instead of copying original entity  into blueprint root
      we now copy blueprint root data (components & children) into the original entity ! fixes #96 
     * much simpler code wise
     * solves issue with needing to register components that we only use on the bevy side (not gltf)
    since we are not copying the bevy data into the blueprints data
     * added **copyComponents** helper to copy components from one entity to another, excluding existing
     components on the target entity, & some bells & whistles
     * **Name** is now optional when spawning a blueprint: closes #97 
     * **Transform** is now optional when spawning a blueprint: closes #98 
     * removed transform from bundle (BREAKING change)
     * added (optional)  **NoInBlueprint** component to have finer control over whether to inject the **InBlueprint** component inside spawned blueprint entities
     * added (optional) **Library**  component, so we can override library path when we want
     * added (optional) **AddToGameWorld** component for convenience   to automatically add entities to the game world, if there is one

* chore(bevy_gltf_components): removed verbose output, cleaned it up a bit

* feat(tools/auto_export): added option to split out "dynamic" objects in main scenes
   * ie if a collection instance (or its original collection) has a "dynamic" (aka mutable, saveable etc)
     flag it can get exported to a seperate gltf file (essentially acting like an "initial save")
   * the rest of the levels (the "static" data) is exported without the dynamic objects and
     can be reused with save files !
2024-01-10 14:49:29 +01:00
Mark Moissette d7574a104d
feat(wasm): added working examples for bevy_gltf_components & bevy_gltf_blueprints (#90)
closes #88
2024-01-02 14:03:29 +01:00
Mark Moissette af94e49976
feat(Gltf auto export): multiple blend files workflow, combine modes, bugfixes and more ! (#83)
* feat(multiple blend files): added example of multi blend file workflow
* feat(tools/auto_export): 
 * added collection_instances_combine_mode superseeds  & replaces "export nested blueprints", with a lot more flexibilty
 * added preferences & ui settings
 * added (optional) use of marked assets as replacement for "autoExport" collection flag
 * added correct cleaning up of temporary sub_collections
* feat(tools/auto_export): change detection added for material changes
* feat(tools/auto_export): blueprints now also use the "combine" settings for nested collections
*  feat(tools/auto_export): added correct cleanup of data when removing hollow scenes, so that there is no orphan data left behind
* feat(tools/auto_export): changes to nested collections are now triggering change detection of root
 (exportable collections)
* feat(tools/auto_export):  now actually useful tracebacks using traceback.format_exc()
* various minor fixes, cleanups & UI description improvements
* docs(README): updated & fleshed out docs

* closes #87 
* closes #86
* closes #85 
* closes #79 
* closes #61 
* closes #68 
* closes #41
2024-01-01 22:35:21 +01:00
Mark Moissette 6047959b3f
feat(nested_blueprints): added support for nested blueprints both in bevy_gltf_blueprints & in gltf_auto_export (#65)
* feat(bevy_gltf_blueprints): 
  * added support for nested blueprints
  * added example/test for nested blueprints with multiple levels of nesting
* feat(tools/gltf_auto_export): 
  * implemented functionality to export nested blueprints/collection instances
  * added add prefs to control nested blueprints export
  * experiments with nested blueprints merge modes
  * when exporting of nested blueprints is disabled, will not scan for nested blueprints
and thus no export them
* docs(): updated docs & added images for nested blueprints support
2023-12-22 00:37:52 +01:00
Mark Moissette 0aead0853c
feat(scene components) : added scene components to control ambient, bloom etc from Blender(#76)
* feat(tools):  scene component injection & export
 - ambient light, shadowmap resolution, bloom intensity, ambient occlusion are now directly settable from scene components that are injected automatically in the scene 
 - relaxed requirements for changes(aka when to export gltf) for main scenes,
so that render , background etc changes also trigger a save
 - added scene components examples
 - added additional proxies &  handling for camera & lights
 - in relevant cases, made sure that entity specific components are not overridden by scene components
 - added option to toggle scene level exports of params/ components
 - ambient colour/ intensity is now also set as background/clear colour
  - updated docs
2023-12-17 15:31:25 +01:00
Mark Moissette e1aa510457
feat(materials): Materials libraries tooling & bevy code for material/texture reuse (#71)
* updates both gltf_auto_export & bevy_gltf_blueprints to avoid duplicating common materials across blueprints
* feat(tools/gltf_auto_export): added materials library export !
 * export all materials in use by blueprints to a separate temporary scene with cubes (for now)
   with the materials assigned
 * injecting MaterialInfo components to each blueprint above with Material name + library name
 * generated gltf is named based on the project/blend file, so multiple blend file projects
   can each have their own material libraries
 * added preferences & ui & handling to be able to toggle material library exports
* feat(bevy_gltf_blueprints): added support for materials library!
 * material injection (toggleable via the plugin configuration)
 * added example
 * added materials library + texture files + updated assets
 * added physics debug toggling
* updated documentation
* closes #63
2023-12-12 13:21:53 +01:00
Mark Moissette 76f6a45fc4
feat(examples): added basics of multi-level example (#46)
* added basic assets & logic for scene switching upon reaching a trigger zone ! Works !
 * added toggling of physics debug
 * added handling of nested colliders for LevelTransitions
 * fix/ addition for point light intensity scaling & shadows
 * closes #40
2023-11-14 13:24:59 +01:00
Mark Moissette 66a3d71fe1
feat(examples): added basic_xpbd_physics example (#45)
* feat(examples): added basic_xpbd_physics example
 * adapted code from rapier physics
 * updated blend file & exported gltf files
 * changes & tweaks to cargo files so the examples are scanned as they should be
 * various minor tweaks
2023-11-13 16:16:31 +01:00
Mark Moissette 32d01eb48f
refactor(examples): restructure examples (#44)
* refactor(examples): moved examples into more logic folders & changed to allow for per example dependencies
* chore(): updated docs, added docs, updated deps , cargo files etc
2023-11-13 14:36:42 +01:00
Mark Moissette c4e83655f3
chore(bevy_gltf_components): Update to Bevy 0.12 (#32)
* chore(bevy_gltf_components): updated code for bevy_main/ v0.12
* refactor(examples): cleanups & tweaks
* added compatibility tables
2023-11-11 22:58:00 +01:00
Mark Moissette 4afa0f5d7d
feat(Animation): added code & example for animation support (#33)
* feat(animation): added example & boilerplate
  * moved animations specific code to a different module
  * added multiple robots & foxes
  * added example of controlling animation based on distance from the player
  * removed obsolete files
  * added information about animation to READMEs
  * updated dependencies

closes #26
2023-11-01 12:44:37 +01:00
Mark Moissette 0cd7d5d53b
chore(): minor tweaks (#8)
* relaxed bevy version requirements to work with all v0.11.xx versions & the dependency between blueprints & components crate
* bevy_gltf_blueprints: added a more clear warning message for the random timing/ no children in scene issue
* docs(crates): modified the install instruction to be patch version agnostic
2023-09-29 12:59:07 +02:00
Mark Moissette 528e13a250
feat(): Blueprints, crates, enhanced Blender tooling & more (#5)
* feat(bevy_gltf_components):
	* create crate 
	* added SystemSet (GltfComponentsSet) to run process_loaded_scenes (where components are injected)
	in a specific systemset & allow ordering other systems relative to it

* feat(bevy_gltf_blueprints): 
	* created crate
	* made the blueprint library path configurable
	* added BluePrintBundle helper
	* added SystemSet (GltfBlueprintsSet) for better system ordering
	* integrated into advanced demo

* feat(tools-blender-auto-export): 
	* renamed blender tool to gltf_auto_export
   	* rewritten auto_export
	* added blueprint / prefab support
		* creates scene with empties with BlueprintName components in the scene
		* export of the main scene now exports this scene instead of real main scene
		* changes collection stand in names in original scene & sets them back after export
			to have correctly named collection instance exports
		* also added an additional 'SpawnHere' component to not conflate BlueprintNames & spawning requests
   		* toggling & blueprint library output parameters added
   		* added correct handling/ restoring of saved selection when using blueprints

* feat(examples): 
	* added advanced example
	* general example renamed to "basic", and cleaned up

* feat(various): a lot of experiments with saving & loading etc

* chore(assets): updated blend & generated assets

* fix(examples-advanced): disabling hot reloading as it messes up scenes in experiments with save & loading

* docs(): 
	* added & fleshing out docs for the various crates & main README
	* added process doc image & tweaks to README
 	* added missing licence info where relevant
 	* fixed broken links
 	* clarified some aspects
 	* added updated screenshots where relevant
 	* added tweaks & improvements etc
2023-09-28 14:10:45 +02:00
Mark Moissette 1417d5f389
refactor(): restructured code to turn the process_gltf (core) part into a crate (#1)
* refactor(): restructured code to turn the process_gltf (core) part into a crate
 * changed process_gltf into a lib/crate basics
 * changed current demo setup into an example that is importing the new crate
 * updated imports in the crate side
 * updated dependencies
 * cleanups
 * added more clear information about preUpdate vs setup
 * improved README/ added use as crate examples
2023-08-02 01:45:57 +02:00
kaosat.dev a2b4025e95 refactor(gltf_to_components): removed dependency on serde-json , & overhauled code accordinly 2023-07-27 22:22:04 +02:00
kaosat.dev 64ec564b02 chore(): added all boilerplate
* switch to ron for components inside Blender
 * related experiments & cleanups
 * total overhaul & cleanup of physics proxies handling
 * a lot of cleanups
2023-07-25 22:58:23 +02:00