summaryrefslogtreecommitdiff
path: root/lib/elements/satin_column.py
diff options
context:
space:
mode:
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