Hi @merkvilson,
Actually, the issue came from inserting the matrix as a child of the cached spline. The cached spline gets a rotation of X then you apply again the rotation of the generator, which make X+X rotation.
In order to avoid that, return one null with both object.
def GetVirtualObjects(self, op, hh):
if not op.GetDown(): return None
gch = op.GetAndCheckHierarchyClone(hh, op.GetDown(), c4d.HIERARCHYCLONEFLAGS_ASIS, False)
output = gch["clone"]
gchDirty = gch["dirty"]
if not gchDirty: return output
null = c4d.BaseObject(c4d.Onull)
indexView = c4d.BaseObject(1018545)
output.InsertUnder(null)
indexView.InsertUnder(null)
indexView[c4d.ID_MG_MOTIONGENERATOR_MODE] = 0
indexView[c4d.MG_OBJECT_LINK] = output
return null
If you have any questions, please let me know.
Cheers,
Maxime