remove random seed param from unaffected stitch types (#2251)

pull/2260/head
Kaalleen 2023-05-01 12:03:06 +02:00 zatwierdzone przez GitHub
rodzic 76af7ffcf2
commit 2542f124eb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 33 dodań i 16 usunięć

Wyświetl plik

@ -356,22 +356,6 @@ class EmbroideryElement(object):
def stop_after(self):
return self.get_boolean_param('stop_after', False)
@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
def path(self):
# A CSP is a "cubic superpath".

Wyświetl plik

@ -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):

Wyświetl plik

@ -429,6 +429,22 @@ class SatinColumn(EmbroideryElement):
def zigzag_underlay_max_stitch_length(self):
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):