Closed tokejepsen closed 5 years ago
@tokejepsen just on thing
The tool assume that the controllers_grp is always name "rig_controllersgrp" but the prefix "rig" is indeed the name you set in the rig name setting
Maybe not the best solution but here is how I search for the group (cough cough... Maya set :P )
import pymel.core as pm
rig_models = [item for item in pm.ls(transforms=True) if item.hasAttr("is_rig")]
for g in rig_models[0].rigGroups.inputs():
if g.name().endswith("controllers_grp"):
ct_grp = g
break
print g
# with cmds is a little faster
import pymel.core as pm
import maya.cmds as cm
rig_models = [item for item in cm.ls(transforms=True) if cm.attributeQuery("is_rig", node=item, exists=True)]
for g in pm.PyNode(rig_models[0]).rigGroups.inputs():
if g.name().endswith("controllers_grp"):
ct_grp = g
break
print g
The tool assume that the controllers_grp is always name "rig_controllersgrp" but the prefix "rig" is indeed the name you set in the rig name setting
Didn't think about that. Thanks :)
Updated the PR.
that was fast!
that was fast!
Well you gave me the solution :)
Related forum thread: http://forum.mgear-framework.com/t/control-mirror-tool/531