Skip to content

Commit

Permalink
fix: rename _mapping to _mapping as Blender does not allow StringProp…
Browse files Browse the repository at this point in the history
…erty to start with _
  • Loading branch information
vasarhelyi committed Jul 11, 2023
1 parent e6bf4eb commit 1d94747
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/sbstudio/plugin/model/storyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class StoryboardEntry(PropertyGroup):
# mapping is stored as a string so we don't need to maintain a separate
# Blender collection as it would not be efficient

_mapping = StringProperty(
mapping = StringProperty(
name="Mapping",
description=(
"Mapping where the i-th element is the index of the drone that "
Expand Down Expand Up @@ -308,7 +308,7 @@ def get_mapping(self) -> Optional[List[int]]:
"""Returns the mapping of the markers in the storyboard entry to drone
indices, or ``None`` if there is no mapping yet.
"""
encoded_mapping = self._mapping.strip()
encoded_mapping = self.mapping.strip()
if (
not encoded_mapping
or len(encoded_mapping) < 2
Expand Down Expand Up @@ -343,9 +343,9 @@ def update_mapping(self, mapping: Optional[List[int]]) -> None:
unmapped. You can also pass ``None`` to clear the entire mapping.
"""
if mapping is None:
self._mapping = ""
self.mapping = ""
else:
self._mapping = json.dumps(mapping)
self.mapping = json.dumps(mapping)


class Storyboard(PropertyGroup, ListMixin):
Expand Down

0 comments on commit 1d94747

Please sign in to comment.