当前位置: 首页>>代码示例>>Python>>正文


Python AddSceneNodeOperation.push方法代码示例

本文整理汇总了Python中UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation.push方法的典型用法代码示例。如果您正苦于以下问题:Python AddSceneNodeOperation.push方法的具体用法?Python AddSceneNodeOperation.push怎么用?Python AddSceneNodeOperation.push使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation的用法示例。


在下文中一共展示了AddSceneNodeOperation.push方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _onFileLoaded

# 需要导入模块: from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation [as 别名]
# 或者: from UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation import push [as 别名]
    def _onFileLoaded(self, job):
        node = job.getResult()
        if node != None:
            node.setSelectable(True)
            node.setName(os.path.basename(job.getFileName()))

            op = AddSceneNodeOperation(node, self.getController().getScene().getRoot())
            op.push()
开发者ID:kelvinfang,项目名称:Cura,代码行数:10,代码来源:CuraApplication.py

示例2: _readMeshFinished

# 需要导入模块: from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation [as 别名]
# 或者: from UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation import push [as 别名]
    def _readMeshFinished(self, job):
        node = job.getResult()
        if node != None:  
            node.setSelectable(True)
            node.setName(os.path.basename(job.getFileName()))

            op = AddSceneNodeOperation(node, self._scene.getRoot())
            op.push()

            self._scene.sceneChanged.emit(node)
开发者ID:Kiddo3D,项目名称:Uranium,代码行数:12,代码来源:MeshFileHandlerProxy.py

示例3: _readMeshFinished

# 需要导入模块: from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation [as 别名]
# 或者: from UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation import push [as 别名]
 def _readMeshFinished(self, job):
     nodes = job.getResult()
     for node in nodes:
         node.setSelectable(True)
         node.setName(os.path.basename(job.getFileName()))
         # We need to prevent circular dependency, so do some just in time importing.
         from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation
         op = AddSceneNodeOperation(node, self._application.getController().getScene().getRoot())
         op.push()
         self._application.getController().getScene().sceneChanged.emit(node)
开发者ID:Ultimaker,项目名称:Uranium,代码行数:12,代码来源:MeshFileHandler.py

示例4: _onFileLoaded

# 需要导入模块: from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation [as 别名]
# 或者: from UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation import push [as 别名]
    def _onFileLoaded(self, job):
        node = job.getResult()
        if node != None:
            self.setJobName(os.path.basename(job.getFileName()))
            node.setSelectable(True)
            node.setName(os.path.basename(job.getFileName()))
            op = AddSceneNodeOperation(node, self.getController().getScene().getRoot())
            op.push()

            self.getController().getScene().sceneChanged.emit(node) #Force scene change.
开发者ID:hippich,项目名称:Cura,代码行数:12,代码来源:CuraApplication.py

示例5: _readWorkspaceFinished

# 需要导入模块: from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation [as 别名]
# 或者: from UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation import push [as 别名]
    def _readWorkspaceFinished(self, job):
        # Add the loaded nodes to the scene.
        nodes = job.getResult()
        if nodes is not None:  # Job was not a failure.
            # Delete all old nodes.
            self._application.deleteAll()

            # Add the loaded nodes to the scene.
            nodes = job.getResult()
            for node in nodes:
                # We need to prevent circular dependency, so do some just in time importing.
                from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation
                op = AddSceneNodeOperation(node, self._application.getController().getScene().getRoot())
                op.push()
                self._application.getController().getScene().sceneChanged.emit(node)
开发者ID:senttech,项目名称:Uranium,代码行数:17,代码来源:WorkspaceFileHandler.py

示例6: _readMeshFinished

# 需要导入模块: from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation [as 别名]
# 或者: from UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation import push [as 别名]
    def _readMeshFinished(self, job):
        mesh = job.getResult()
        if mesh != None:
            if mesh.getType() is MeshType.pointcloud:  #Depending on the type we need a different node (as pointclouds are rendered differently)
                node = PointCloudNode()
            else:
                node = SceneNode()

            node.setSelectable(True)
            node.setMeshData(mesh)
            node.setName(os.path.basename(job.getFileName()))

            op = AddSceneNodeOperation(node, self._scene.getRoot())
            op.push()

            self._scene.sceneChanged.emit(node)
开发者ID:derekhe,项目名称:Uranium,代码行数:18,代码来源:MeshFileHandlerProxy.py


注:本文中的UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation.push方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。