From 2542f124eb4e741687ebc7e0d69b27e2291310c6 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Mon, 1 May 2023 12:03:06 +0200 Subject: remove random seed param from unaffected stitch types (#2251) --- lib/elements/fill_stitch.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/elements/fill_stitch.py') diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py index b310ce47..ec115ce7 100644 --- a/lib/elements/fill_stitch.py +++ b/lib/elements/fill_stitch.py @@ -479,6 +479,23 @@ class FillStitch(EmbroideryElement): def underlay_underpath(self): return self.get_boolean_param('underlay_underpath', True) + @property + @param('random_seed', + _('Random seed'), + tooltip=_('Use a specific seed for randomized attributes. Uses the element ID if empty.'), + select_items=[('fill_method', 'meander_fill')], + 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 paths(self): -- cgit v1.2.3