Hi, i've been searching for this code everywhere and can't get to it..
I'm importing from Rhino a parametric design worked in Grasshopper as .obj for animation purposes but since imported models doesn't import the axis information i'm trying to doing it by coding with python reaching for exporting a csv file with the plane vector information out of grasshopper and put it into each object in c4d.
I'm stuck in the tedious part of just moving the axis and leave the object intact, apparently in c4d python this doesn't work, first you have to move the entire object with his axis in desired place and then reverse the object points to the initial place. I can move object (axis) with this simple code:
op.SetMg(matrixWanted)
but how can i move the object points backwards to the original place considering that the changed matrix involved not just position but also the rotation.
I've tried this great threads:
https://developers.maxon.net/forum/topic/11788/move-object-axis-problem-in-python
https://developers.maxon.net/forum/topic/11705/beginner-how-to-set-axis-to-the-bottom-of-a-cube-by-python
I've tried learning something in the Matrix Fundamentals:
https://developers.maxon.net/docs/py/2023_2/manuals/data_algorithms/classic_api/matrix.html#matrix-fundamental
but everything seams to be explained if you have an HPB rotation instead of xyz vectors.
Maybe there's a simpler code for this like freezing the object while moving the axis or something, anyway, does someone have a solution?
Regards!