Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006

    Python UI not displaying correctly

    I am currently viewing the Developing Modular Rigging Systems with Python and just finished lesson 9 however I am having issues with the script when I run it the UI isnt coming in full length and it's cropping the buttons I have can anyone help me please?

    The code is

    import maya.cmds as cmds

    import System.utils as utils

    class Blueprint_UI:
    def __init__(self):
    # Store UI elements in a dictionary
    self.UIElements = {}

    if cmds.window("blueprint_UI_window", exists=True):

    windowWidth = 400
    windowHeight = 598

    self.UIElements["window"] = cmds.window("blueprint_UI_window", width=windowWidth, height=windowHeight, title="Blueprint Module UI", sizeable=False)

    self.UIElements["topLevelColumn"] = cmds.columnLayout(adjustableColumn=True, columnAlign="center")

    # Setup tabs
    tabHeight = 500
    self.UIElements["tabs"] = cmds.tabLayout(height=tabHeight, innerMarginWidth=5, innerMarginHeight=5)

    tabWidth = cmds.tabLayout(self.UIElements["tabs"], q=True, width=True)
    self.scrollWidth = tabWidth - 40

    self.initialiseModuleTab(tabHeight, tabWidth)

    cmds.tabLayout(self.UIElements["tabs"], edit=True, tabLabelIndex=([1, "Modules"]))

    # Display window
    cmds.showWindow( self.UIElements["window"] )

    def initialiseModuleTab(self, tabHeight, tabWidth):
    scrollHeight = tabHeight # temp value

    self.UIElements["moduleColumn"] = cmds.columnLayout(adj=True, rs=3)

    self.UIElements["moduleFrameLayout"] = cmds.frameLayout(height=scrollHeight, collapsable=False, borderVisible=False, labelVisible=False)

    self.UIElements["moduleList_Scroll"] = cmds.scrollLayout(hst=0)

    self.UIElements["moduleList_column"] = cmds.columnLayout(columnWidth = self.scrollWidth, adj=True, rs=2)

    # First separator

    for module in utils.findAllModules("Modules/Blueprint"):


    def createModuleInstallButton(self, module):
    mod = __import__("Blueprint."+module, {}, {}, [module])

    title = mod.TITLE
    description = mod.DESCRIPTION
    icon = mod.ICON

    # Create UI
    buttonSize = 43
    row = cmds.rowLayout(numberOfColumns=2, columnWidth=([1, buttonSize]), adjustableColumn=2, columnAttach=([1, "both", 0],[2, "both", 5]) )

    self.UIElements["module_button_"+module] = cmds.symbolButton(width=buttonSize, height=buttonSize, image=icon)

    textColumn = cmds.columnLayout(columnAlign="center")
    cmds.text(align="center", width=self.scrollWidth - buttonSize - 16, label=title)

    cmds.scrollField(text=description, editable=False, width=self.scrollWidth - buttonSize - 16, wordWrap=True)

  2. #2
    Join Date
    May 2006
    I fixed the issue~

  3. #3
    Join Date
    Mar 2013
    you can fin help just here :

    so 21 to 24 there's a lot of informations about displaying this UI correctly. The problem is that in maya 2011 they switched to QT interface and it doesn't handle commands like before. I had to made the few updates page 21 to 24 and i had also to change the order of some parts of the code to display it correctly. ( sorry for my very bad english, not my native langage^^).
    Last edited by neurodrive; 04-21-2013 at 07:04 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts