Skip to content

Instantly share code, notes, and snippets.

@gregtemp
Created June 16, 2014 18:55
Show Gist options
  • Save gregtemp/8d0969fb2649e4c8eef7 to your computer and use it in GitHub Desktop.
Save gregtemp/8d0969fb2649e4c8eef7 to your computer and use it in GitHub Desktop.
UI Mock up - Maya mel python
import maya.cmds as cmds
class FlckUi():
def __init__(self):
flckUi = 'flckUi'
if cmds.window(flckUi, exists=True):
cmds.deleteUI(flckUi)
flckUi = cmds.window(flckUi, t='FLCK', tb=True, rtf=True)
form = cmds.columnLayout(adjustableColumn=True)
cmds.separator(h=10, style="none")
cmds.text(label="Amount of Particles")
cmds.intSliderGrp(field=True, minValue=0, maxValue=200, value=100)
cmds.separator(h=10, style="none")
cmds.text(label="Flock Width")
cmds.intSliderGrp(field=True, minValue=0, maxValue=200, value=10)
cmds.separator(h=10, style="none")
cmds.text(label="Individual Perception Angle")
cmds.floatSliderGrp(field=True, minValue=0.0, maxValue=360.0, value=225)
cmds.separator(h=10, style="none")
cmds.text(label="Align Weight")
cmds.floatSliderGrp(field=True, minValue=0.0, maxValue=2.0, value=1.0)
cmds.separator(h=10, style="none")
cmds.text(label="Cohesion Weight")
cmds.floatSliderGrp(field=True, minValue=0.0, maxValue=2.0, value=1.0)
cmds.separator(h=10, style="none")
cmds.text(label="Separation Weight")
cmds.floatSliderGrp(field=True, minValue=0.0, maxValue=2.0, value=1.0)
cmds.separator(h=10, style="none")
bBuild = cmds.button('Build')
bRandomize = cmds.button('Randomize')
cmds.separator(h=20, style="none")
bChangeGoal = cmds.button('Assign Goal')
bChangeGoal = cmds.button('Instancer (Replacement)')
cmds.showWindow(flckUi)
cmds.window(flckUi, edit=True, widthHeight=(400,400))
flckUserInt = FlckUi()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment