Blender_bevy_components_workflow icon indicating copy to clipboard operation
Blender_bevy_components_workflow copied to clipboard

Add support for references between entities.

Open andriyDev opened this issue 1 year ago • 2 comments

Fixes #187.

The issue has more context on the idea behind this PR.

andriyDev avatar May 25 '24 08:05 andriyDev

I am leaving a TODO for the docs, examples and tests. I will get around to that soon.

For a short walkthrough of what this looks like in practice, users just have to:

  1. Add the GltfRefMapPlugin.
  2. Implement FromGltfRef for each type.
  3. Add the GltfRefPlugin<T> for each type.

bevy_registry_export can export the registry to Blender which will include:

  • GltfRefTarget - Holds a string that can be used to identify this entity.
  • GltfRef<T> for each T - Holds a string that can be used to pick which entity should be associated with T on this entity.

andriyDev avatar May 25 '24 08:05 andriyDev

I realized I should be using the SceneInstance component to determine where Gltf roots are, hence the force push.

andriyDev avatar May 26 '24 02:05 andriyDev