Skip to content

Component is the new controller#606

Open
bakpaul wants to merge 5 commits intosofa-framework:masterfrom
bakpaul:26_04_introduce_component_binding
Open

Component is the new controller#606
bakpaul wants to merge 5 commits intosofa-framework:masterfrom
bakpaul:26_04_introduce_component_binding

Conversation

@bakpaul
Copy link
Copy Markdown
Contributor

@bakpaul bakpaul commented Apr 9, 2026

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant