Hi.
I saw this topic.
I want to do something similar in Maya.
How can I assign markers to multiple root joints at once when they’re selected?
Hi.
I saw this topic.
I want to do something similar in Maya.
How can I assign markers to multiple root joints at once when they’re selected?
The process would be very similar, here’s the Maya-version of that script.
Usage
You can select a second root afterwards and hit G to repeat the last command for quick and efficient assignment.
# Get the current selection, which should be a single root Bone
from ragdoll.vendor import cmdx
from ragdoll import interactive as ri
selection = cmdx.selection()
root = selection[0]
# Walk the hierarchy to find every child
chain = []
def walk(root):
chain.append(str(root))
for root in root.children():
walk(root)
# In case of 2+ children, only walk the first child
break
walk(root)
# Call on the default Assign Markers operator
cmds.select(chain)
ri.assign_and_connect()
Thank you! It worked!