Component is the new controller#606
Open
bakpaul wants to merge 5 commits intosofa-framework:masterfrom
Open
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.
While working on prefabs we have a new type of python object that is to be stored in the graph, so it needs to inherit from BaseComponent somehow. The dirty way to do this was to inherit from Controller which doesn't make sens as it is not meant to be actively doing something.
At first I only wanted to make a python class named Component until I realized that it was meaningless without an ability to override handleEvent. Looking at that I realized that BaseContoller is nothing more than a BaseObject. So merging both makes sense.
This PR keeps the old Controller implementation, just replaced the name to Component and added both to the python bindings. Therefore, such as in the actual core of SOFA, we have controllers and components which are basically the same but named differently