mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Make magic value into funtion (max face-id).
part of CURA-6745
This commit is contained in:
parent
5b48e13337
commit
503a24f7a1
2 changed files with 3 additions and 3 deletions
|
@ -85,7 +85,7 @@ class CuraActions(QObject):
|
||||||
|
|
||||||
original_node, face_id = selected_face
|
original_node, face_id = selected_face
|
||||||
meshdata = original_node.getMeshDataTransformed()
|
meshdata = original_node.getMeshDataTransformed()
|
||||||
if not meshdata or face_id < 0 or face_id > 0x10001:
|
if not meshdata or face_id < 0 or face_id > Selection.endFaceSelectionId():
|
||||||
return
|
return
|
||||||
|
|
||||||
rotation_point, face_normal = meshdata.getFacePlane(face_id)
|
rotation_point, face_normal = meshdata.getFacePlane(face_id)
|
||||||
|
|
|
@ -140,9 +140,9 @@ class SolidView(View):
|
||||||
1.0
|
1.0
|
||||||
]
|
]
|
||||||
|
|
||||||
# Color the currently selected face-id, 0x10001 is certain to be greater than the largest ID.
|
# Color the currently selected face-id.
|
||||||
face = Selection.getSelectedFace()
|
face = Selection.getSelectedFace()
|
||||||
uniforms["selected_face"] = 0x10001 if not face or node != face[0] else face[1]
|
uniforms["selected_face"] = Selection.endFaceSelectionId() if not face or node != face[0] else face[1]
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue