Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import maya.cmds as cmds
- import os
- from os import listdir
- def UI(*args):
- if cmds.window("Test", exists = True):
- cmds.deleteUI("Test")
- mainwindow = cmds.window("Test", t="Test Window", sizeable = 1)
- cmds.scrollLayout('srcoll', p = "Test")
- cmds.rowColumnLayout("ColLayout", p = "Test", nc = 3)#I imagine the "nc" command is probably useless here, I am just leaving it for testing purposes
- cmds.showWindow("Test")
- customPath = "C:Users$username$Desktop"
- customPathItems = listdir(customPath)
- def popUI(*args):
- for item in customPathItems:
- if item.endswith("_icon.png"):
- cmds.iconTextButton(l = item, p = "ColLayout", i = customPath + "/" + item, w = 128, h = 128)
- def buildUI(*args):
- UI()
- popUI()
- buildUI()
Add Comment
Please, Sign In to add comment