Unintended tabLayout interaction with tabLabelIndex?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
When I run this script to create a UI for my autorig, "limbTypeRadioCollectionRowLayout"(created at line 16) gets parented to "Fingers" tab of "moduleListTabLayout", which is not intended since I parented it to "limbFormLayout" before and attached the radioCollection to it too at line 22. The thing is, if the tabLabelIndex parameter is removed completely (so the automatic order is changed), altough the radioCollection appears correctly at "Limb" tab now, the order at which the tabs are displayed is not the one I want (since the automatic ordering seems to be alphabetic).
Is this possibily a bug or am I not getting something here?
Thanks in advance!
import maya.cmds as cmd
if cmd.window("mirandaAutorig", query=True, exists=True):
cmd.deleteUI("mirandaAutorig")
#==Window and Layouts==#
cmd.window("mirandaAutorig", title="MirandaAutorig", w=520, h=850, sizeable=False)
baseScrollLayout = cmd.scrollLayout(verticalScrollBarThickness=16, childResizable=True)
moduleListFrameLayout = cmd.frameLayout(label="Modules", parent=baseScrollLayout, collapsable=True, collapse=False, w=500)
moduleListTabLayout = cmd.tabLayout(parent=moduleListFrameLayout, innerMarginWidth=5, innerMarginHeight=5, w=500, h=500)
fingersFormLayout = cmd.formLayout(numberOfDivisions=100, parent=moduleListTabLayout, w=500, h=500)
limbFormLayout = cmd.formLayout(numberOfDivisions=100, parent=moduleListTabLayout, w=500, h=500)
#==limbFormLayout Options and Buttons==#
limbTypeRadioCollectionRowLayout = cmd.rowLayout(parent=limbFormLayout)
limbTypeRadioCollection = cmd.radioCollection()
limbTypeRadioOptionSimple = cmd.radioButton(label="Simple", collection=limbTypeRadioCollection, parent=limbTypeRadioCollectionRowLayout)
#==limbFormLayout Form Layout Editting==#
cmd.formLayout(limbFormLayout, edit=True,
attachForm=[(limbTypeRadioCollectionRowLayout, "top",5), (limbTypeRadioCollectionRowLayout, "left", 5)],
attachControl=[]
)
toolsListFrameLayout = cmd.frameLayout(label="Tools", parent=baseScrollLayout, collapsable=True, collapse=False, w=500)
toolsListTabLayout = cmd.tabLayout(parent=toolsListFrameLayout, innerMarginWidth=5, innerMarginHeight=5, w=500, h=500)
orientToolFormLayout = cmd.formLayout(numberOfDivisions=100, parent=toolsListTabLayout, w=500, h=500)
cmd.tabLayout(toolsListTabLayout, edit=True, tabLabel=((orientToolFormLayout, "Orient Joints")))
cmd.tabLayout(moduleListTabLayout, edit=True, tabLabel=((limbFormLayout, "Limb"),(fingersFormLayout, "Fingers")),
tabLabelIndex=((1, "Limb"),(2, "Fingers")))
cmd.showWindow("mirandaAutorig")