-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entity Relations #236
Open
DasLixou
wants to merge
19
commits into
kaosat-dev:main
Choose a base branch
from
DasLixou:entity-relations-main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Entity Relations #236
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
Ok, much of the unsafe code is gone now, should be much easier to read :D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alternative to #188
Closes #187
This makes all

Entity
fields in blender selectable to objects, which translate to gltf nodes, so mesh selecting currently isn't possible yet.On the bevy side, it uses a fake

Entity
overwrite with custom deserialization, which parses the name and overthread_local
statics searches for the real entity id and replaces itself with that.A previous attempt was to change the
dyn Reflect
tree, which currently isn't possible (bevyengine/bevy#14850) but could clean up a lot of stuff in the future.One downside this approach currently has, is that I can only check whether an entity is a gltf node or mesh, which can share the same names, with
GltfExtra
andGltfMeshExtra
, so when you want to select an object, it must at least have one component, otherwise it won't be able to find it.On the blender side, it also fixes some code with values not having defaults, which with entities is now possible, and sets the default for boolean from
True
toFalse
.I haven't tested it yet, but this should also make joints from
avian
possible to declare in blender.Testing
I did some basic things including the example, but external more extensive tests appreciated!
Having a reference in a collection which is instantiated multiple times also works correctly.