Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyAJohnston committed Nov 1, 2024
1 parent ac45ef8 commit 620c642
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions molecularnodes/blender/bpyd/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ def named_attribute(self, name: str, evaluate: bool = False) -> np.ndarray:
"""
return attr.named_attribute(self.object, name=name, evaluate=evaluate)

def set_boolean(self, array: np.ndarray, name: str) -> None:
self.store_named_attribute(array, name=name, atype=AttributeTypes.BOOLEAN)

def evaluate(self):
obj = self.object
obj.update_tag()
Expand Down
2 changes: 1 addition & 1 deletion molecularnodes/entities/trajectory/trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def add_selection_from_atomgroup(self, atomgroup: mda.AtomGroup, name: str = "")

def apply_selection(self, selection: Selection):
"Set the boolean attribute for this selection on the mesh of the object"
self.set_boolean(name=selection.name, boolean=selection.to_mask())
self.set_boolean(selection.to_mask(), name=selection.name)

@property
def subframes(self):
Expand Down

0 comments on commit 620c642

Please sign in to comment.