Created
November 10, 2019 16:33
-
-
Save Roumenov/6993ad82183f30a0f71eb484cef27dfa to your computer and use it in GitHub Desktop.
playing with how maya builds windows, layouts, and controls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
def primitiveWindow(name = 'primitiveWindow'): | |
if pm.window(name, query=True, exists=True): | |
pm.deleteUI(name) | |
pm.window(name) | |
pm.showWindow(name) | |
mainColumn = pm.columnLayout() | |
radioFrame = pm.frameLayout(label='choose radio') | |
pm.rowLayout(numberOfColumns=3, parent=radioFrame) | |
pm.radioCollection('objectCreationType') | |
for x in range(3):# populates the current parent layout until it's full | |
pm.radioButton(label='radio%s' % x, parent=radioFrame) | |
pm.setParent(mainColumn) | |
frame = pm.frameLayout('sliders') | |
pm.floatSlider() | |
pm.intSlider() | |
pm.intField('objectCount', value=3) | |
primitiveWindow(name = 'primitiveWindow') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment