Merge pull request #18899 from Roy-043/Draft-props_changed_placement_only-should-ignore-material-props
Draft: props_changed_placement_only should ignore material props
This commit is contained in:
@@ -183,8 +183,9 @@ class DraftObject(object):
|
||||
delattr(self, "props_changed")
|
||||
|
||||
def props_changed_placement_only(self, obj=None):
|
||||
"""Return `True` if the self.props_changed list, after removing `Shape`
|
||||
and `_LinkTouched` items, only contains `Placement` items.
|
||||
"""Return `True` if the self.props_changed list, after removing
|
||||
`_LinkTouched`, `Shape`, `Density`, `Volume` and `Mass` items,
|
||||
only contains `Placement` items.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
@@ -205,10 +206,9 @@ class DraftObject(object):
|
||||
return False
|
||||
|
||||
props = set(self.props_changed)
|
||||
if "Shape" in props:
|
||||
props.remove("Shape")
|
||||
if "_LinkTouched" in props:
|
||||
props.remove("_LinkTouched")
|
||||
for prop in ("_LinkTouched", "Shape", "Density", "Volume", "Mass"):
|
||||
if prop in props:
|
||||
props.remove(prop)
|
||||
return props == {"Placement"}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user