LumaPictures / pymel

Python in Maya Done Right
Other
478 stars 130 forks source link

EulerRotation.copy() discards rotation order #458

Open kimonmatara opened 1 year ago

kimonmatara commented 1 year ago

Assigning to .order on instances of EulerRotation is a functional way to, for example, change the solutions yielded by the asMatrix() method. It's therefore a functionally significant attribute, and I would have expected it to persist after a copy() operation:

import pymel.core as p
originalRotation = p.datatypes.EulerRotation([0, 1, 2])
originalRotation.order = 'ZXY'
print(originalRotation.order)
# 'ZXY'

rotationCopy = originalRotation.copy()
print(rotationCopy.order)
# 'XYZ'