mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Fix context menu entries
Fixes Asana Issue 12
This commit is contained in:
parent
ae71c309ac
commit
f6fc819009
1 changed files with 15 additions and 13 deletions
|
@ -7,6 +7,7 @@ from UM.Scene.Camera import Camera
|
||||||
from UM.Scene.Platform import Platform
|
from UM.Scene.Platform import Platform
|
||||||
from UM.Math.Vector import Vector
|
from UM.Math.Vector import Vector
|
||||||
from UM.Math.Matrix import Matrix
|
from UM.Math.Matrix import Matrix
|
||||||
|
from UM.Math.Quaternion import Quaternion
|
||||||
from UM.Resources import Resources
|
from UM.Resources import Resources
|
||||||
from UM.Scene.ToolHandle import ToolHandle
|
from UM.Scene.ToolHandle import ToolHandle
|
||||||
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
|
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
|
||||||
|
@ -215,9 +216,7 @@ class CuraApplication(QtApplication):
|
||||||
node = self.getController().getScene().findObject(object_id)
|
node = self.getController().getScene().findObject(object_id)
|
||||||
|
|
||||||
if node:
|
if node:
|
||||||
transform = node.getLocalTransformation()
|
op = SetTransformOperation(node, Vector())
|
||||||
transform.setTranslation(Vector(0, 0, 0))
|
|
||||||
op = SetTransformOperation(node, transform)
|
|
||||||
op.push()
|
op.push()
|
||||||
|
|
||||||
## Delete all mesh data on the scene.
|
## Delete all mesh data on the scene.
|
||||||
|
@ -250,9 +249,7 @@ class CuraApplication(QtApplication):
|
||||||
op = GroupedOperation()
|
op = GroupedOperation()
|
||||||
|
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
transform = node.getLocalTransformation()
|
op.addOperation(SetTransformOperation(node, Vector()))
|
||||||
transform.setTranslation(Vector(0, 0, 0))
|
|
||||||
op.addOperation(SetTransformOperation(node, transform))
|
|
||||||
|
|
||||||
op.push()
|
op.push()
|
||||||
|
|
||||||
|
@ -269,8 +266,7 @@ class CuraApplication(QtApplication):
|
||||||
op = GroupedOperation()
|
op = GroupedOperation()
|
||||||
|
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
transform = Matrix()
|
op.addOperation(SetTransformOperation(node, Vector(), Quaternion(), Vector(1, 1, 1)))
|
||||||
op.addOperation(SetTransformOperation(node, transform))
|
|
||||||
|
|
||||||
op.push()
|
op.push()
|
||||||
|
|
||||||
|
@ -284,12 +280,18 @@ class CuraApplication(QtApplication):
|
||||||
|
|
||||||
nodes.append(node)
|
nodes.append(node)
|
||||||
|
|
||||||
if nodes:
|
if not nodes:
|
||||||
file_name = node.getMeshData().getFileName()
|
return
|
||||||
|
|
||||||
job = ReadMeshJob(file_name)
|
for node in nodes:
|
||||||
job.finished.connect(lambda j: node.setMeshData(j.getResult()))
|
if not node.getMeshData():
|
||||||
job.start()
|
continue
|
||||||
|
|
||||||
|
file_name = node.getMeshData().getFileName()
|
||||||
|
if file_name:
|
||||||
|
job = ReadMeshJob(file_name)
|
||||||
|
job.finished.connect(lambda j: node.setMeshData(j.getResult()))
|
||||||
|
job.start()
|
||||||
|
|
||||||
## Get logging data of the backend engine
|
## Get logging data of the backend engine
|
||||||
# \returns \type{string} Logging data
|
# \returns \type{string} Logging data
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue