Message 1 of 1
Maya Python UI , Layout issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am currently trying to build a window for configuring the import settings.
Following is my code (please ignore the callback function)
def createUI(pWindowTitle,pBrowseCallback): windowID = 'FaceMocapID' if cmds.window(windowID,exists=True): cmds.deleteUI(windowID) cmds.window(windowID,title=pWindowTitle,resizeToFitChildren=True, sizeable=False) cmds.rowColumnLayout(numberOfColumns = 2, columnWidth= [ (1,150),(2,400)] , columnAttach=(1, 'right', 0) ) cmds.text(label = "Mocap Data File:") filepath = cmds.textField() cmds.separator(h=10,style='none') cmds.button(label='Browse', command = pBrowseCallback) cmds.separator(h=10,style='none') cmds.checkBox(label="Translation",value = False) cmds.separator(h=10,style='none') cmds.checkBox(label="Rotation",value = False) cmds.separator(h=10,style='none') cmds.checkBox(label="Blend Shapes",value = True) cmds.text(label = "Start Key:") startframe = cmds.intField(value=cmds.playbackOptions(q=True, minTime=True)) cmds.text(label = "Transform Node:") filepath = cmds.textField() cmds.text(label = "Blendshape Node:") filepath = cmds.textField() cmds.setParent("..") cmds.rowColumnLayout(numberOfColumns = 2, columnWidth= [ (1,50),(2,50)] , columnAttach=(1, 'left', 0)) cmds.button(label='Import', command = pBrowseCallback) cmds.button(label='Cancel', command = pBrowseCallback) cmds.setParent("..") cmds.showWindow() def browseFile(): print "browse file" createUI("Face Mocap Importer ( •_•) || (•_• ) ",browseFile)
The issue is, that I am not able to terminate the first, row-column layout, due to which the second layout is inserted in one of the columns, instead of covering the whole span of the window.
This is something I am trying to achieve (please refer image).
More additional queries (Not important, optional**)
- The window has resizeToFitChildren = True, but the height is not adjusted as per the children, due to which there is a lot of void space at the bottom of the Window.
- How to add borders and bifurcating lines to layouts as shown in ref. image.