Hello, I'm trying to get the rotation values of clones but having some trouble with negative rotations. It looks like the code is working as expected for positive values, but if a clone is rotated to a negative value, the MatrixToHPB spits out a positive value.
import c4d
from c4d.modules import mograph as mo
def main():
#Starting object has a rotation value of H = -30 degrees
Export_Manager = doc.SearchObject("Export_Manager")
Obj_1 = Export_Manager[c4d.ID_USERDATA, 9]
MoData = mo.GeGetMoData(Obj_1)
marr = MoData.GetArray(c4d.MODATA_MATRIX)
#Matrix is showing negative values Matrix(v1: (0.866, 0, -0.5); v2: (0, 1, 0); v3: (0.5, 0, 0.866); off: (0, 0, 0))
print marr[0]
#Conversion shows positive values Vector(5.76, 0, 0)
print c4d.utils.MatrixToHPB(marr[0])
if __name__=='__main__':
main()
Thanks!