mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 08:17:49 -06:00
Simplify the objects model further
CUA-6283
This commit is contained in:
parent
71d156b175
commit
502eea4d26
1 changed files with 4 additions and 5 deletions
|
@ -84,19 +84,18 @@ class ObjectsModel(ListModel):
|
||||||
group_name_prefix = group_name_template.split("#")[0]
|
group_name_prefix = group_name_template.split("#")[0]
|
||||||
|
|
||||||
for node in DepthFirstIterator(Application.getInstance().getController().getScene().getRoot()): # type: ignore
|
for node in DepthFirstIterator(Application.getInstance().getController().getScene().getRoot()): # type: ignore
|
||||||
if (not node.getMeshData() and not node.callDecoration("getLayerData")) and not node.callDecoration("isGroup"):
|
is_group = bool(node.callDecoration("isGroup"))
|
||||||
|
if not node.callDecoration("isSliceable") and not is_group:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
parent = node.getParent()
|
parent = node.getParent()
|
||||||
if parent and parent.callDecoration("isGroup"):
|
if parent and parent.callDecoration("isGroup"):
|
||||||
continue # Grouped nodes don't need resetting as their parent (the group) is resetted)
|
continue # Grouped nodes don't need resetting as their parent (the group) is resetted)
|
||||||
if not node.callDecoration("isSliceable") and not node.callDecoration("isGroup"):
|
|
||||||
continue
|
|
||||||
node_build_plate_number = node.callDecoration("getBuildPlateNumber")
|
node_build_plate_number = node.callDecoration("getBuildPlateNumber")
|
||||||
if filter_current_build_plate and node_build_plate_number != active_build_plate_number:
|
if filter_current_build_plate and node_build_plate_number != active_build_plate_number:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
is_group = bool(node.callDecoration("isGroup"))
|
|
||||||
force_rename = False
|
force_rename = False
|
||||||
if not is_group:
|
if not is_group:
|
||||||
# Handle names for individual nodes
|
# Handle names for individual nodes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue