Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Commit

Permalink
Simple Rig: 2.0 #163 Fix issue with autoskinning when convert to shif…
Browse files Browse the repository at this point in the history
…ter rig if the input element doesn't support skinning
  • Loading branch information
miquelcampos committed May 30, 2018
1 parent 8eceacb commit 08586f8
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions scripts/mgear/maya/simpleRig/simpleRigTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,6 @@ def convert_to_shifter_rig():
skinning automatic base on driven attr
"""


simple_rig_root = _get_simple_rig_root()
if simple_rig_root:
guide, configDict = convert_to_shifter_guide()
Expand Down Expand Up @@ -937,12 +936,16 @@ def convert_to_shifter_rig():
driven = pm.ls(d)
jnt = pm.ls(c.replace("ctl", "0_jnt"))
if driven and jnt:
pm.skinCluster(jnt[0],
driven[0],
tsb=True,
nw=2,
n='{}_skinCluster'.format(d))
# pm.parent(driven, rig.model)
try:
pm.skinCluster(jnt[0],
driven[0],
tsb=True,
nw=2,
n='{}_skinCluster'.format(d))
except RuntimeError:
pm.displayWarning("Automatic skinning, can't be "
"created for"
" {}. Skipped.".format(d))

curve.update_curve_from_data(ctl_conf["ctl_shapes"])
else:
Expand Down Expand Up @@ -1137,6 +1140,7 @@ def _consolidate_pivot_position(ctl):
pm.displayWarning("The control: {} Is NOT in"
" Edit pivot Mode".format(ctl.name()))


@utils.one_undo
def _delete_rig():
"""Delete the rig
Expand Down

0 comments on commit 08586f8

Please sign in to comment.