On 20/10/2017 at 10:45, xxxxxxxx wrote:
Here a small test, but it does not bring me what I want.
def GetVirtualObjects(self, op, hierarchyhelp) :
if (op.GetDown() and op.GetDown().GetNext()) : #2 objects?
res = op.GetAndCheckHierarchyClone(hierarchyhelp, op.GetDown(), c4d.HIERARCHYCLONEFLAGS_0, True)
object = res['clone'] #only one is returned?
dirty = res['dirty']
if dirty:
objA = op.GetDown()
objB = objA.GetNext()
#Connect and delete
obj = utils.SendModelingCommand(command=c4d.MCOMMAND_JOIN, list=[objA, objB])
if not obj:
print "Error MCOMMAND_JOIN"
return None
return obj[0] #result of Connect&Delete
else:
return None
else:
return None
I see a result sometimes, when I drag one of the children.
But see them twice.
I only want to see the result, but still able to edit the children. Just like the Bool object does.
Also, I only use the GetAndCheckHierarchyClone() to see if it dirty.
I do not see how I can all the cloned children.
I receive only one clone.
Here how I register the plugin.
pluginstr = "Test object plugin"
okyn = plugins.RegisterObjectPlugin(id=PLUGIN_ID, str=pluginstr,
g=TESTOBJECTPLUGIN,
description="testobjectplugin", icon=icon,
info=c4d.OBJECT_GENERATOR | c4d.OBJECT_INPUT)