kopia lustrzana https://github.com/inkstitch/inkstitch
remove random seed param from unaffected stitch types (#2251)
rodzic
76af7ffcf2
commit
2542f124eb
|
|
@ -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".
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue