Skip to content

Commit

Permalink
rename ui selection to selectino_str
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyAJohnston committed Jun 17, 2024
1 parent cb3dbec commit 1b5e836
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion molecularnodes/io/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class TrajectorySelectionItem(bpy.types.PropertyGroup):
default="custom_selection",
)

selection: StringProperty( # type: ignore
selection_str: StringProperty( # type: ignore
name="Selection String",
description="String that provides a selection through MDAnalysis",
default="name CA",
Expand Down
9 changes: 3 additions & 6 deletions molecularnodes/io/parse/mda.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,9 @@ def _update_selections(self):
# if the same selection string, test to see if updating. If not updating
# then move on - if updating then call the set selection method to update
# the selection on the mesh
if selection.selection_str != sel.selection:
# if the selection string has changed, we need to delete the old selection
# and thus the old atom group, and create a new atom selection and
# AtomGroup
if selection.selection_str != sel.selection_str:
selection.change_selection(
selection_str=sel.selection,
selection_str=sel.selection_str,
updating=sel.updating,
periodic=sel.periodic,
)
Expand All @@ -124,7 +121,7 @@ def _update_selections(self):
# if the selection doesn't exist for the universe, create a new one
self.add_selection(
name=sel.name,
selection_str=sel.selection,
selection_str=sel.selection_str,
updating=sel.updating,
periodic=sel.periodic,
)
Expand Down
2 changes: 1 addition & 1 deletion molecularnodes/ui/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def panel_custom_selections(layout, context):
row.prop(item, "name")
row.prop(item, "updating")
row.prop(item, "periodic")
col.prop(item, "selection")
col.prop(item, "selection_str")


def panel_object(layout, context):
Expand Down

0 comments on commit 1b5e836

Please sign in to comment.