Hi,
I'm trying to mirror a joint chain using the built-in Mirror Tool. I want the return for the function to be the mirrored joint. For instance, if I selected the joint chain thigh_L_jnt
, I want the return/result of the function to be thigh_R_jnt
. Currently, it returns nothing.
Is there a way around this?
You can see the code here:
def mirror(objList):
for idx, obj in enumerate(objList):
if idx == 0:
doc.SetActiveObject(obj, mode=c4d.SELECTION_NEW)
else:
doc.SetActiveObject(obj, mode=c4d.SELECTION_ADD)
toolID = 1019953 # Mirror Tool ID
c4d.CallCommand(toolID)
tool = c4d.plugins.FindPlugin(toolID, c4d.PLUGINTYPE_TOOL)
tool[c4d.ID_CA_MIRROR_TOOL_AXIS] = 4 # XZ
tool[c4d.ID_CA_MIRROR_TOOL_REPLACE] = '_L_'
tool[c4d.ID_CA_MIRROR_TOOL_WITH] = '_R_'
result = c4d.CallButton(tool, c4d.ID_CA_MIRROR_TOOL)
return result # this returns nothing.