You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Selection class has attributes such as selection_str which are stored on the class / object, but are then also represented inside of Blender on the SelectionItem object. Currently some work has to be done to keep the two in sync.
The same approach which is now down for object names, should be done with these as well, where the representation inside of Blender are the 'Single Source of Truth' and the when accessing / setting inside of python / API, they just interact with the actual SelectionItems themselves.
traj.add_selection('protein', name='sel_1')
traj.selections['sel_1'].selection_str# this should just lookup the value from within Blender rather than store it inside of the classtraj.selections['sel_1'].selection_str='name CA') # update the value inside of Blender and not store it anywhere inside of the class
Potential porblems are an infinite loop where updating the properties inside of Blender updates the class, which updates the property which updates the class. Solution will be to have a secondary hidden set method on the class that can be used for updating when the property is updated, but doesn't then trigger everything again.
The text was updated successfully, but these errors were encountered:
Currently the
Selection
class has attributes such asselection_str
which are stored on the class / object, but are then also represented inside of Blender on theSelectionItem
object. Currently some work has to be done to keep the two in sync.The same approach which is now down for object names, should be done with these as well, where the representation inside of Blender are the 'Single Source of Truth' and the when accessing / setting inside of python / API, they just interact with the actual
SelectionItem
s themselves.Potential porblems are an infinite loop where updating the properties inside of Blender updates the class, which updates the property which updates the class. Solution will be to have a secondary hidden set method on the class that can be used for updating when the property is updated, but doesn't then trigger everything again.
The text was updated successfully, but these errors were encountered: