Skip to content

Commit 761dde9

Browse files
authored
Merge pull request #576 from timothyliu3d/5.1.0-add-drawNewComponent-return
Add return value to `shifter.guide.Rig().drawNewComponent()`.
2 parents 8da112e + 58b2ea2 commit 761dde9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

release/scripts/mgear/shifter/guide.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,9 @@ def drawNewComponent(self, parent, comp_type, showUI=True):
804804
parent (dagNode): Parent of this new component guide.
805805
compType (str): Type of component to add.
806806
807+
Returns:
808+
True if the component guide instance was created, False or None if not.
809+
807810
"""
808811
comp_guide = self.getComponentGuide(comp_type)
809812

@@ -841,7 +844,7 @@ def drawNewComponent(self, parent, comp_type, showUI=True):
841844

842845
parent_root = parent_root.getParent()
843846

844-
comp_guide.drawFromUI(parent, showUI)
847+
return comp_guide.drawFromUI(parent, showUI)
845848

846849
def drawUpdate(self, oldRoot, parent=None):
847850

0 commit comments

Comments
 (0)