Skip to content

Commit

Permalink
Shifter: Adding def duplicate_multi(sym, *args) function to allow mul…
Browse files Browse the repository at this point in the history
…ti selection duplicate components
  • Loading branch information
miquelcampos committed Apr 28, 2024
1 parent ff1ac1c commit 6703446
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions release/scripts/mgear/shifter/guide_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,27 @@ def duplicate(sym, *args):
)


def duplicate_multi(sym, *args):
"""Duplicate a multiple component by drawing a new one and setting the same
properties values
Args:
sym (bool): If True, will create a symmetrical component
*args: None
"""
oSel = pm.selected()
if oSel:
for root in oSel:
guide = shifter.guide.Rig()
guide.duplicate(root, sym)
else:
mgear.log(
"Select one or more component root to edit properties",
mgear.sev_error,
)


def build_from_selection(*args):
"""Build rig from current selection
Expand Down

0 comments on commit 6703446

Please sign in to comment.