Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1


Set mass and fatness for all rigids in hierarchy of current selection 10 months 2 weeks ago #599

  • admin
  • admin's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Posts: 178
  • Thank you received: 22
When you have 50 Carbon chain links, as in this tutorial,
you want to use a script to get their mass and fatness.

Use this python script in Maya to set mass and fatness for all Carbon Rigid "bodies" in hierarchy of current selection.
Sets fatness on Carbon Shapes and mass on Carbon Rigids.

import maya.cmds as cmds
selection =, hierarchy=True)
selectedHierarchy =
nodes =, type='CarbonShape')
for node in nodes:
    cmds.setAttr(node + '.doubleSided', 0)
    cmds.setAttr(node + '.innerFatness', 0.15)
    cmds.setAttr(node + '.outerFatness', 0.01)
nodes =, type='CarbonRigid')
for node in nodes:
    cmds.setAttr(node + '.mass', 0.001)

Please Log in or Create an account to join the conversation.

Last edit: by admin.
  • Page:
  • 1
Time to create page: 0.072 seconds