summaryrefslogtreecommitdiff
path: root/lib/elements/satin_column.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2023-05-01 12:03:06 +0200
committerGitHub <noreply@github.com>2023-05-01 12:03:06 +0200
commit2542f124eb4e741687ebc7e0d69b27e2291310c6 (patch)
tree1bfa54fd6ed249994400baa82f6fdaee1f71a25a /lib/elements/satin_column.py
parent76af7ffcf29b7b604693117af6e8766ee6977a34 (diff)
remove random seed param from unaffected stitch types (#2251)
Diffstat (limited to 'lib/elements/satin_column.py')
-rw-r--r--lib/elements/satin_column.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/elements/satin_column.py b/lib/elements/satin_column.py
index dafc9c6b..0cc33203 100644
--- a/lib/elements/satin_column.py
+++ b/lib/elements/satin_column.py
@@ -430,6 +430,22 @@ class SatinColumn(EmbroideryElement):
return self.get_float_param("zigzag_underlay_max_stitch_length_mm") or None
@property
+ @param('random_seed',
+ _('Random seed'),
+ tooltip=_('Use a specific seed for randomized attributes. Uses the element ID if empty.'),
+ type='random_seed',
+ default='',
+ sort_index=100)
+ @cache
+ def random_seed(self) -> str:
+ seed = self.get_param('random_seed', '')
+ if not seed:
+ seed = self.node.get_id() or ''
+ # TODO(#1696): When inplementing grouped clones, join this with the IDs of any shadow roots,
+ # letting each instance without a specified seed get a different default.
+ return seed
+
+ @property
@cache
def shape(self):
# This isn't used for satins at all, but other parts of the code