示例#1
0
文件: imports.py 项目: dzkdev/mcedit2
 def updateTransform(self):
     if self.rotation == (0, 0, 0) and self.scale == (0, 0, 0):
         self.transformedDim = None
     else:
         selectionDim = SelectionTransform(self.sourceDim, self.selection)
         self.transformedDim = DimensionTransform(selectionDim,
                                                  self.rotateAnchor,
                                                  *self.rotation)
示例#2
0
    def updateTransform(self):
        if self.rotation == (0, 0, 0) and self.scale == (0, 0, 0):
            self.transformedDim = None
            self.transformOffset = Vector(0, 0, 0)
        else:
            selectionDim = SelectionTransform(self.sourceDim, self.selection)
            self.transformedDim = DimensionTransform(selectionDim, self.rotateAnchor, *self.rotation)
            self.transformOffset = self.transformedDim.bounds.origin - self.selection.origin

        self.updateImportPos()
示例#3
0
def test_selection_transform(schematic_world):
    pytest.skip()

    selection = BoundingBox((10, 10, 10), (100, 100, 100))
    sch_dim = schematic_world.getDimension()
    sch_dim_transformed = SelectionTransform(sch_dim, selection)
    try:
        from mcedit2.worldview.schematic_worldview import displaySchematic
    except ImportError:
        log.warn("mcedit2 not available, not displaying result")
    else:
        displaySchematic(sch_dim_transformed)