Transform import positions using 3x3 matrix to skip tuple resize
This commit is contained in:
parent
8edd6c8efe
commit
db44717935
@ -236,7 +236,7 @@ class CloneTool(EditorTool):
|
|||||||
rotations = baseRotations
|
rotations = baseRotations
|
||||||
|
|
||||||
matrix = transform.rotationMatrix((0, 0, 0), *rotations)
|
matrix = transform.rotationMatrix((0, 0, 0), *rotations)
|
||||||
matrix = numpy.linalg.inv(matrix)
|
matrix = numpy.linalg.inv(matrix)[:3, :3]
|
||||||
|
|
||||||
if offsetPoint is None:
|
if offsetPoint is None:
|
||||||
offsetPoint = self.mainPendingClone.basePosition
|
offsetPoint = self.mainPendingClone.basePosition
|
||||||
@ -250,9 +250,8 @@ class CloneTool(EditorTool):
|
|||||||
rotations = [a+b for a,b in zip(rotations, baseRotations)]
|
rotations = [a+b for a,b in zip(rotations, baseRotations)]
|
||||||
if rotateOffsets:
|
if rotateOffsets:
|
||||||
# Convert to 4-element column and back
|
# Convert to 4-element column and back
|
||||||
offset = tuple(offset) + (0, )
|
offset = (offset * matrix).T
|
||||||
offset = offset * matrix
|
offset = tuple(float(x) for x in offset)
|
||||||
offset = tuple(offset.T)[:3]
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def mainPendingClone(self):
|
def mainPendingClone(self):
|
||||||
|
Reference in New Issue
Block a user