Hello,
Is it possible that a Dynamics Body Tag added to GVO object can be assigned to all the child virtual objects. like on Fracture Object with Explode Segments mode.
a code example and screenshot below:
import c4d, os
from c4d import bitmaps, plugins
class Object(plugins.ObjectData):
def GetVirtualObjects(self, op, hh):
dirty = op.CheckCache(hh) or op.IsDirty(c4d.DIRTY_MATRIX | c4d.DIRTY_DATA)
if not dirty:
return op.GetCache(hh)
cloner = c4d.BaseObject(1018544)
if cloner is None:
return c4d.BaseObject(c4d.Onull)
cube = c4d.BaseObject(c4d.Ocube)
if cube is None:
return c4d.BaseObject(c4d.Onull)
cube[c4d.PRIM_CUBE_LEN] = c4d.Vector(20.0, 20.0, 20.0)
cube.InsertUnder(cloner)
return cloner
if __name__ == "__main__":
icon = bitmaps.BaseBitmap()
icon.InitWith(os.path.join("res", "icons", "icon.tif"))
plugins.RegisterObjectPlugin(1078197, 'Object', Object, 'Object', c4d.OBJECT_GENERATOR, icon)
Thanks.