Blender_bevy_components_wor.../tools/gltf_auto_export
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
..
README.md feat(): Blueprints, crates, enhanced Blender tooling & more (#5) 2023-09-28 14:10:45 +02:00
__init__.py feat(): Blueprints, crates, enhanced Blender tooling & more (#5) 2023-09-28 14:10:45 +02:00
gltf_auto_export.py feat(): Blueprints, crates, enhanced Blender tooling & more (#5) 2023-09-28 14:10:45 +02:00
old.py feat(): Blueprints, crates, enhanced Blender tooling & more (#5) 2023-09-28 14:10:45 +02:00

README.md

gltf_auto_export

For convenience I also added this Blender addon that

  • automatically exports your level/world from Blender to gltf whenever you save your Blend file.
  • it also supports automatical exports of used collections as Gltf blueprints & more !

Installation:

  • in Blender go to edit => preferences => install

blender addon install

  • choose the path where gltf_auto_export/gltf_auto_export.py is stored

blender addon install

Usage:

Basics

  • before it can automatically save to gltf, you need to configure it
  • go to file => export => gltf auto export

blender addon use

  • set the autoexport parameters : output path, name of your main scene etc in the auto export panel

blender addon use3

  • and your standard gltf export parameters in the gltf panel

blender addon use2

  • click on "apply settings"
  • now next time you save your blend file you will get an automatically exported gltf file (or more than one, depending on your settings, see below)

Blueprints

You can enable this option to automatically replace all the collection instances inside your main scene with blueprints

  • whenever you change your main scene (or your library scene , if that option is enabled), all your collection instances

    • will be replaced with empties (this will not be visible to you)
    • those empties will have additional custom properties / components : BlueprintName & SpawnHere
    • your main scene/ level will be exported to a much more trimmed down gltf file (see next point)
    • all the original collections (that you used to create the instances) will be exported as seperate gltf files into the "library" folder
  • this means you will have

    • one small main gltf file (your level/world)
    • as many gltf files as you have used collections in the main scene , in the library path you specified : for the included advanced example's assets, it looks something like this:

    library

    the .blend file that they are generated from can be found here

Process

This is the internal logic of the export process with blueprints

process

ie this is an example scene...

and what actually gets exported for the main scene/world/level

all collections instances replaced with empties, and all those collections exported to gltf files as seen above

TODO:

  • add ability to have multiple main & library scenes
  • detect which objects have been changed to only re-export those

License

This tool, all its code, contents & assets is Dual-licensed under either of