[Prefabs] Modifier implementation #5#597
Open
EulalieCoevoet wants to merge 1 commit intosofa-framework:25_04_work_on_new_prefabsfrom
Open
[Prefabs] Modifier implementation #5#597EulalieCoevoet wants to merge 1 commit intosofa-framework:25_04_work_on_new_prefabsfrom
EulalieCoevoet wants to merge 1 commit intosofa-framework:25_04_work_on_new_prefabsfrom
Conversation
This file contains hidden or 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
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.
Proposition:
Introduce the
createmethod to instantiate aNode,Entity,EntityModifierorComponent(?) without adding it to the scene graph.Thus to apply an
EntityModifierto entities, we need to first create it and then call theapplymethod.Adding an
EntityModifierwith the methodaddshould raise an error.In case of a
EntityModifier:create: instantiate the object and store itscreatorapply: add the modifier to the scene graph, increator\Modifiers, and in or near the modified entities depending on the modifications applied. And apply the method modifier.Exemple:
See examples/stlib/EulalieScene.py.
In this PR:
createmethodBaseEntityModifier,SingleEntityModifier, andFixingModifierParametersaddSimulationSettingsand the methods to register the required solvers.dataclasses: class parameters instead of changing the signature of the__init__methodEntitya rigid cubegetParametersin the entities class as I feel like we don't use it and it can be confusing to have different implementations of the same thing. Meaning, I prefer to always do: