Hello PluginCafe
I found a weird bug in c4d.OBJECT_GENERATOR plugins.
I tried to make the Matrix generator a child of the 'output' object which is a spline.
At first glance, everything works correctly, but problems appear as soon as you try to change the coordinates.
It works correctly if I'm making them a child of a null object or changing hierarchy in different ways but if I need to accomplish this task the way I want, it simply goes crazy
import c4d
class test(c4d.plugins.ObjectData):
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
indexView = c4d.BaseObject(1018545)
indexView.InsertUnder(output)
indexView[c4d.ID_MG_MOTIONGENERATOR_MODE] = 0
indexView[c4d.MG_OBJECT_LINK] = output
return output
if __name__ == "__main__":
c4d.plugins.RegisterObjectPlugin(id = 1000004,str = "Test",g = test,description = "",info = c4d.OBJECT_GENERATOR|c4d.OBJECT_INPUT,icon = None)