mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-22 20:00:53 +00:00
2ae8351e0f
* fundamental rewrite of a lot of aspects of the exporter, for cleaner code & to solve a number of issues * set export_separate_dynamic_and_static_objects default to FALSE, as it is an edge use case * added central tracker class, to track the post save & depsgraph changes * auto_export is now more operator centric, with functional undo * now storing add-on configuration at the blend file level (bpy.data.texts) * found source of export issues ! mismatch between context.scene & context.window.scene (the last we can set, the other not) * overhauled & cleaned up materials handling to avoid context issues & reliance on bpy.ops * huge restructure of how temporary scenes are created & cleaned up * added support for exports in edit_mode * updated examples * a lot more * fixes #103 * fixes #112 * fixes #113 * fixes #114 * fixes #115 * fixes #116 |
||
---|---|---|
.. | ||
assets | ||
src | ||
Cargo.toml | ||
README.md |
Basic bevy_gltf_components demo
Running this example
cargo run --features bevy/dynamic_linking
Additional notes
- You usually define either the Components directly or use
Proxy components
that get replaced in Bevy systems with the actual Components that you want (usually when for some reason, ie external crates with unregistered components etc) you cannot use the components directly.
Included are the following modules / tools
process_gltf
the most important module: this is the one extractingcomponent
information from the gltf filesinsert_dependant_component
a small utility to automatically inject components that are dependant on an other component for example an Entity with a Player component should also always have a ShouldBeWithPlayer component you get a warning if you use this though, as I consider this to be stop-gap solution (usually you should have either a bundle, or directly define all needed components)camera
an example post process/replace proxies plugin, for Camera that also adds CameraTracking functions (to enable a camera to follow an object, ie the player)lighting
an other example post process/replace proxies plugin for lighting, that toggles shadows, lighting config, etc so that things look closer to the original Blender dataphysics
an other example post process/replace proxies plugin for physics, that add Rapier Colliders, Rigidbodies etc . Most of these do not need proxies these days, as the most Rapier components are in the Registry & can be used directly
Feel free to use as you want, rip it appart, use any/all parts that you need !
This tooling and workflow has enabled me to go from a blank Bevy + Blender setup to a working barebones level in very little time (30 minutes or so ?) ! You can then add your own components & systems for your own gameplay very easilly
Information
- the Bevy/ Rust code is here
- the Blender file is here
- I added bevy_editor_pls as a dependency for convenience so you can inspect your level/components