def optionsWindow():
	"""This function creates an options window for inserting parents above all items in the selection list."""
	# create the main interface
	if cmds.window(kInsertOptionsWindow, q=True, ex=True):
		cmds.deleteUI(kInsertOptionsWindow)
	mainWindow = cmds.window(kInsertOptionsWindow, title='%s Options' % kToolName, menuBar=True, wh=(545,350))
	
	# build the menu bar
	cmds.menu(label='Help')
	amui.helpMenuItem(kToolName, __file__)
	amui.aboutMenuItem(kToolName, kVersionNumber, kVersionDate)
	
	mainForm = cmds.formLayout(nd=100)
	
	# build the section to get information about the new parents
	if_prefixName = cmds.textFieldGrp(text='', label='Prefix of New Parents:')
	if_suffixName = cmds.textFieldGrp(text='_xForm', label='Suffix of New Parents:')
	if_locatorScale = cmds.floatSliderGrp(v=1.0, min=0.0, max=10.0, fmn=0.0, fmx=100.0, label='Parent Locator Scale:', field=True)
	
	# position the input fields for the new parents
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_prefixName, 'left', 30), (if_prefixName, 'top', 5)], attachNone=[(if_prefixName, 'right'), (if_prefixName, 'bottom')])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_suffixName, 'left', 30)], attachNone=[(if_suffixName, 'right'), (if_suffixName, 'bottom')], attachControl=[(if_suffixName, 'top', 5, if_prefixName)])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_locatorScale, 'left', 30)], attachNone=[(if_locatorScale, 'right'), (if_locatorScale, 'bottom')], attachControl=[(if_locatorScale, 'top', 5, if_suffixName)])
	
	# create the buttons to execute the script
	cmd_create='amTools.rigging.insertParents.doOptions (\"%s\", \"%s\", \"%s\")' % (if_prefixName, if_suffixName, if_locatorScale)
	amui.threeButtonLayout(mainForm, mainWindow, cmd_create)
	
	cmds.showWindow(mainWindow)
def optionsWindow():
	"""This function creates an options window for the am_shoulderConstraint command. 
	When executing it, first select the shoulder to which you are constraining, then 
	add the object to be constrained to your selection."""
	# create the main interface
	if cmds.window(kConstraintOptionsWindow, q=True, ex=True):
		cmds.deleteUI(kConstraintOptionsWindow)
	mainWindow = cmds.window(kConstraintOptionsWindow, title='%s Options'%kToolName, menuBar=True, wh=(545,350))
	
	# build the menu bar
	cmds.menu(label='Help')
	amui.helpMenuItem(kToolName, __file__)
	amui.aboutMenuItem(kToolName, kVersionNumber, kVersionDate)
	
	mainForm = cmds.formLayout(nd=100)
	
	# build the section to get information for the shoulder constraint
	mainFrame = cmds.formLayout(nd=100)
	
	# attempt to guess what the spine is if there is a selection when the GUI is created
	spineText = 'CenterSpine'
	sel = cmds.ls(sl=True, l=True, type='transform')
	if sel and len(sel) > 0: # BUG: in Maya 8.5, a selection of length 0 returns None rather than an empty list
		try:
			collar = cmds.listRelatives(sel[0], p=True, f=True) # the shoulder should be the first object in the selection list
			spine = cmds.listRelatives(collar[0], p=True, f=True)
			spineText = spine[0]
		except: pass
	
	if_spine = cmds.textFieldGrp(label='Spine Object:', tx=spineText)
	if_raisedAngleOffset = cmds.floatSliderGrp(v=45, min=0, max=90, fmn=-180, fmx=180, label='Raised Angle Offset:', field=True)
	if_shoulderAimAxis = cmds.floatFieldGrp(v1=1, v2=0, v3=0, nf=3, pre=4, label='Shoulder Aim Axis:')
	if_shoulderFrontAxis = cmds.floatFieldGrp(v1=0, v2=0, v3=1, nf=3, pre=4, label='Shoulder Front Axis:')
	if_spineAimAxis = cmds.floatFieldGrp(v1=1, v2=0, v3=0, nf=3, pre=4, label='Spine Aim Axis:')
	if_spineFrontAxis = cmds.floatFieldGrp(v1=0, v2=0, v3=1, nf=3, pre=4, label='Spine Front Axis:')
	
	# position the input fields for the shoulder constraint
	cmds.formLayout(mainFrame, edit=True, attachForm=[(if_spine, 'left', 30), (if_spine, 'top', 5)], attachNone=[(if_spine, 'right'), (if_spine, 'bottom')])
	cmds.formLayout(mainFrame, edit=True, attachForm=[(if_raisedAngleOffset, 'left', 30)], attachNone=[(if_raisedAngleOffset, 'right'), (if_raisedAngleOffset, 'bottom')], attachControl=[(if_raisedAngleOffset, 'top', 5, if_spine)])
	cmds.formLayout(mainFrame, edit=True, attachForm=[(if_shoulderAimAxis, 'left', 30)], attachNone=[(if_shoulderAimAxis, 'right'), (if_shoulderAimAxis, 'bottom')], attachControl=[(if_shoulderAimAxis, 'top', 5, if_raisedAngleOffset)])
	cmds.formLayout(mainFrame, edit=True, attachForm=[(if_shoulderFrontAxis, 'left', 30)], attachNone=[(if_shoulderFrontAxis, 'right'), (if_shoulderFrontAxis, 'bottom')], attachControl=[(if_shoulderFrontAxis, 'top', 5, if_shoulderAimAxis)])
	cmds.formLayout(mainFrame, edit=True, attachForm=[(if_spineAimAxis, 'left', 30)], attachNone=[(if_spineAimAxis, 'right'), (if_spineAimAxis, 'bottom')], attachControl=[(if_spineAimAxis, 'top', 5, if_shoulderFrontAxis)])
	cmds.formLayout(mainFrame, edit=True, attachForm=[(if_spineFrontAxis, 'left', 30)], attachNone=[(if_spineFrontAxis, 'right'), (if_spineFrontAxis, 'bottom')], attachControl=[(if_spineFrontAxis, 'top', 5, if_spineAimAxis)])
	
	cmds.setParent('..') # go up to mainFrame
	
	# create the buttons to execute the script
	cmd_create='amTools.rigging.shoulderConstraint.doOptions ("%s", "%s", "%s", "%s", "%s", "%s")'%(
		if_spine, 
		if_raisedAngleOffset, 
		if_shoulderAimAxis, 
		if_shoulderFrontAxis, 
		if_spineAimAxis, 
		if_spineFrontAxis)
	utils.ui.threeButtonLayout(mainForm, mainWindow, cmd_create)
	
	cmds.showWindow(mainWindow)
def optionsWindow():
	"""This function creates an options window for the am_hipConstraint command. 
	When executing it, first select the hip to which you are constraining, then 
	add the object to be constrained to your selection."""
	# create the main interface
	if cmds.window(kConstraintOptionsWindow, q=True, ex=True):
		cmds.deleteUI(kConstraintOptionsWindow)
	mainWindow = cmds.window(kConstraintOptionsWindow, title='%s Options' % kToolName, menuBar=True, wh=(545,350))
	
	# build the menu bar
	cmds.menu(label='Help')
	amui.helpMenuItem(kToolName, __file__)
	amui.aboutMenuItem(kToolName, kVersionNumber, kVersionDate)
	
	mainForm = cmds.formLayout(nd=100)
	
	# build the section to get information for the hip constraint
	mainFrame = cmds.formLayout(nd=100)
	
	# attempt to guess what the pelvis is if there is a selection when the GUI is created
	pelvisText = 'CenterRoot'
	sel = cmds.ls(sl=True, l=True, type='transform')
	if sel and len(sel) > 0: # BUG: in Maya 8.5, a selection of length 0 returns None rather than an empty list
		try:
			pelvis = cmds.listRelatives(sel[0], p=True, f=True) # the hip should be the first object in the selection list
			pelvisText = pelvis[0]
		except: pass
	
	if_pelvis = cmds.textFieldGrp(label='Pelvis Object:', tx=pelvisText)
	if_hipAimAxis = cmds.floatFieldGrp(v1=1, v2=0, v3=0, nf=3, pre=4, label='Hip Aim Axis:')
	if_hipFrontAxis = cmds.floatFieldGrp(v1=0, v2=0, v3=1, nf=3, pre=4, label='Hip Front Axis:')
	if_pelvisAimAxis = cmds.floatFieldGrp(v1=0, v2=1, v3=0, nf=3, pre=4, label='Pelvis Aim Axis:')
	if_pelvisFrontAxis = cmds.floatFieldGrp(v1=0, v2=0, v3=1, nf=3, pre=4, label='Pelvis Front Axis:')
	
	# position the input fields for the hip constraint
	cmds.formLayout(mainFrame, edit=True, attachForm=[(if_pelvis, 'left', 30), (if_pelvis, 'top', 5)], attachNone=[(if_pelvis, 'right'), (if_pelvis, 'bottom')])
	cmds.formLayout(mainFrame, edit=True, attachForm=[(if_hipAimAxis, 'left', 30)], attachNone=[(if_hipAimAxis, 'right'), (if_hipAimAxis, 'bottom')], attachControl=[(if_hipAimAxis, 'top', 5, if_pelvis)])
	cmds.formLayout(mainFrame, edit=True, attachForm=[(if_hipFrontAxis, 'left', 30)], attachNone=[(if_hipFrontAxis, 'right'), (if_hipFrontAxis, 'bottom')], attachControl=[(if_hipFrontAxis, 'top', 5, if_hipAimAxis)])
	cmds.formLayout(mainFrame, edit=True, attachForm=[(if_pelvisAimAxis, 'left', 30)], attachNone=[(if_pelvisAimAxis, 'right'), (if_pelvisAimAxis, 'bottom')], attachControl=[(if_pelvisAimAxis, 'top', 5, if_hipFrontAxis)])
	cmds.formLayout(mainFrame, edit=True, attachForm=[(if_pelvisFrontAxis, 'left', 30)], attachNone=[(if_pelvisFrontAxis, 'right'), (if_pelvisFrontAxis, 'bottom')], attachControl=[(if_pelvisFrontAxis, 'top', 5, if_pelvisAimAxis)])
	
	cmds.setParent('..') # go up to mainFrame
	
	# create the buttons to execute the hcript
	cmd_create='amTools.rigging.hipConstraint.doOptions (\"%s\", \"%s\", \"%s\", \"%s\", \"%s\")' % (
		if_pelvis, 
		if_hipAimAxis, 
		if_hipFrontAxis, 
		if_pelvisAimAxis, 
		if_pelvisFrontAxis)
	utils.ui.threeButtonLayout(mainForm, mainWindow, cmd_create)
	
	cmds.showWindow(mainWindow)
def optionsWindow():
	"""This function creates an options window for creating the forearm twist
	structure. When executing it, select the wrists in the arms you are setting
	up, then press Create or Apply."""
	# create the main interface
	if cmds.window(kSetupOptionsWindow, q=True, ex=True):
		cmds.deleteUI(kSetupOptionsWindow)
	mainWindow = cmds.window(kSetupOptionsWindow, title='%s Options'%kToolName, menuBar=True, wh=(545,350))
	
	# build the menu bar
	cmds.menu(label='Help')
	amui.helpMenuItem(kToolName, __file__)
	amui.aboutMenuItem(kToolName, kVersionNumber, kVersionDate)
	
	mainForm = cmds.formLayout(nd=100)
	
	# build the section to get information about the new twist joints
	if_suffixName = cmds.textFieldGrp(text='_Twist', label='Suffix of New Twist Joints:')
	if_numberTwistJoints = cmds.intSliderGrp(v=3, min=1, max=10, fmn=1, fmx=100, label='Number of Twist Joints:', field=True)
	
	# position the input fields for the twist joints
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_suffixName, 'left', 30), (if_suffixName, 'top', 5)], attachNone=[(if_suffixName, 'right'), (if_suffixName, 'bottom')])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_numberTwistJoints, 'left', 30)], attachNone=[(if_numberTwistJoints, 'right'), (if_numberTwistJoints, 'bottom')], attachControl=[(if_numberTwistJoints, 'top', 5, if_suffixName)])
	
	# build the section to get information for the aim constraint
	constraintFrame = eval('cmds.frameLayout(collapsable=True, label="Aim Constraint Options:" %s)'%amui.__frameAlignCenter__)
	constraintForm = cmds.formLayout(nd=100)
	
	if_elbowAimAxis = cmds.floatFieldGrp(v1=1, v2=0, v3=0, nf=3, pre=4, label='Elbow Aim Axis:')
	if_elbowFrontAxis = cmds.floatFieldGrp(v1=0, v2=0, v3=1, nf=3, pre=4, label='Elbow Front Axis:')
	if_handFrontAxis = cmds.floatFieldGrp(v1=0, v2=0, v3=1, nf=3, pre=4, label='Hand Front Axis:')
	
	# position the input fields for the aim constraint
	cmds.formLayout(constraintForm, edit=True, attachForm=[(if_elbowAimAxis, 'left', 30), (if_elbowAimAxis, 'top', 5)], attachNone=[(if_elbowAimAxis, 'right'), (if_elbowAimAxis, 'bottom')])
	cmds.formLayout(constraintForm, edit=True, attachForm=[(if_elbowFrontAxis, 'left', 30)], attachNone=[(if_elbowFrontAxis, 'right'), (if_elbowFrontAxis, 'bottom')], attachControl=[(if_elbowFrontAxis, 'top', 5, if_elbowAimAxis)])
	cmds.formLayout(constraintForm, edit=True, attachForm=[(if_handFrontAxis, 'left', 30)], attachNone=[(if_handFrontAxis, 'right'), (if_handFrontAxis, 'bottom')], attachControl=[(if_handFrontAxis, 'top', 5, if_elbowFrontAxis)])
	
	cmds.setParent('..') # go up to constraintForm
	cmds.setParent('..') # go up to mainForm
	
	# position the frame for the aim constraint
	cmds.formLayout(mainForm, edit=True, attachPosition=[(constraintFrame, 'left', -1, 0), (constraintFrame, 'right', -1, 100)], attachControl=[(constraintFrame, 'top', 5, if_numberTwistJoints)], attachNone=[(constraintFrame, 'bottom')])
	
	# create the buttons to execute the script
	cmd_create='amTools.rigging.forearmSetup.doOptions ("%s", "%s", "%s", "%s", "%s")'%(
		if_suffixName, 
		if_numberTwistJoints, 
		if_elbowAimAxis, 
		if_elbowFrontAxis, 
		if_handFrontAxis)
	utils.ui.threeButtonLayout(mainForm, mainWindow, cmd_create)
	
	cmds.showWindow(mainWindow)
def optionsWindow():
	"""This function creates an options window for making ribbons along selected hair curves."""
	# create the main interface
	if cmds.window(kExposeTransformOptionsWindow, q=True, ex=True):
		cmds.deleteUI(kExposeTransformOptionsWindow)
	mainWindow = cmds.window(kExposeTransformOptionsWindow, title='%s Options'%kToolName, menuBar=True, wh=(545,350))
	
	# build the menu bar
	cmds.menu(label='Help')
	amui.helpMenuItem(kToolName, __file__)
	amui.aboutMenuItem(kToolName, kVersionNumber, kVersionDate)
	
	mainForm = cmds.formLayout(nd=100)
	
	# build the section to get information about the new expose transform node
	if_referenceObject = cmds.textFieldGrp(label='Reference Object:')
	if_rotateOrder = cmds.optionMenuGrp(label='Output Rotate Order:')
	cmds.menuItem(label='xyz')
	cmds.menuItem(label='yzx')
	cmds.menuItem(label='zxy')
	cmds.menuItem(label='xzy')
	cmds.menuItem(label='yxz')
	cmds.menuItem(label='zyx')
	if_axis = cmds.floatFieldGrp(v1=0, v2=0, v3=1, nf=3, pre=4, label='Axis on Object:')
	if_referenceAxis = cmds.floatFieldGrp(v1=0, v2=0, v3=1, nf=3, pre=4, label='Axis on Reference:')
	if_normalizeAxes = cmds.checkBoxGrp(v1=1, label='Normalize Axes:')
	
	# position the input fields for the new parents
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_referenceObject, 'left', 30), (if_referenceObject, 'top', 5)], attachNone=[(if_referenceObject, 'right'), (if_referenceObject, 'bottom')])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_rotateOrder, 'left', 30)], attachNone=[(if_rotateOrder, 'right'), (if_rotateOrder, 'bottom')], attachControl=[(if_rotateOrder, 'top', 5, if_referenceObject)])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_axis, 'left', 30)], attachNone=[(if_axis, 'right'), (if_axis, 'bottom')], attachControl=[(if_axis, 'top', 5, if_rotateOrder)])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_referenceAxis, 'left', 30)], attachNone=[(if_referenceAxis, 'right'), (if_referenceAxis, 'bottom')], attachControl=[(if_referenceAxis, 'top', 5, if_axis)])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_normalizeAxes, 'left', 30)], attachNone=[(if_normalizeAxes, 'right'), (if_normalizeAxes, 'bottom')], attachControl=[(if_normalizeAxes, 'top', 5, if_referenceAxis)])
	
	# create the buttons to execute the script
	cmd_create = 'amTools.rigging.exposeTransform.doOptions ("%s", "%s", "%s", "%s", "%s")'%(if_referenceObject, if_rotateOrder, if_axis, if_referenceAxis, if_normalizeAxes)
	amui.threeButtonLayout(mainForm, mainWindow, cmd_create)
	
	cmds.showWindow(mainWindow)
def optionsWindow():
	"""This function creates an options window for creating the shoulder twist
	structure. When executing it, select the elbows in the arms you are setting
	up, then press Create or Apply."""
	# create the main interface
	if cmds.window(kSetupOptionsWindow, q=True, ex=True):
		cmds.deleteUI(kSetupOptionsWindow)
	mainWindow = cmds.window(kSetupOptionsWindow, title='%s Options'%kToolName, menuBar=True, wh=(545,350))
	
	# build the menu bar
	cmds.menu(label='Help')
	amui.helpMenuItem(kToolName, __file__)
	amui.aboutMenuItem(kToolName, kVersionNumber, kVersionDate)
	
	mainForm = cmds.formLayout(nd=100)
	
	# build the section to get information about the new twist joints
	if_suffixName = cmds.textFieldGrp(text='_Twist', label='Suffix of New Twist Joints:')
	if_numberTwistJoints = cmds.intSliderGrp(v=3, min=1, max=10, fmn=1, fmx=100, label='Number of Twist Joints:', field=True)
	
	# position the input fields for the twist joints
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_suffixName, 'left', 30), (if_suffixName, 'top', 5)], attachNone=[(if_suffixName, 'right'), (if_suffixName, 'bottom')])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_numberTwistJoints, 'left', 30)], attachNone=[(if_numberTwistJoints, 'right'), (if_numberTwistJoints, 'bottom')], attachControl=[(if_numberTwistJoints, 'top', 5, if_suffixName)])
	
	# build the section to get information for the shoulder constraint
	constraintFrame = eval('cmds.frameLayout(collapsable=True, label="Shoulder Constraint Options:" %s)'%(amui.__frameAlignCenter__))
	constraintForm = cmds.formLayout(nd=100)
	
	# attempt to guess what the spine is if there is a selection when the GUI is created
	spineText = 'CenterSpine'
	sel = cmds.ls(sl=True, l=True, type='transform')
	if sel and len(sel) > 0: # BUG: in Maya 8.5, a selection of length 0 returns None rather than an empty list
		try:
			shoulder = cmds.listRelatives(sel[0], p=True, f=True) # just use the first elbow in the selection
			collar = cmds.listRelatives(shoulder[0], p=True, f=True)
			spine = cmds.listRelatives(collar[0], p=True, f=True)
			spineText = spine[0]
		except: pass
		
	if_spine = cmds.textFieldGrp(label='Spine Object:', tx=spineText)
	if_raisedAngleOffset = cmds.floatSliderGrp(v=45, min=0, max=90, fmn=-180, fmx=180, label='Raised Angle Offset:', field=True)
	if_shoulderAimAxis = cmds.floatFieldGrp(v1=1, v2=0, v3=0, nf=3, pre=4, label='Shoulder Aim Axis:')
	if_shoulderFrontAxis = cmds.floatFieldGrp(v1=0, v2=0, v3=1, nf=3, pre=4, label='Shoulder Front Axis:')
	if_spineAimAxis = cmds.floatFieldGrp(v1=1, v2=0, v3=0, nf=3, pre=4, label='Spine Aim Axis:')
	if_spineFrontAxis = cmds.floatFieldGrp(v1=0, v2=0, v3=1, nf=3, pre=4, label='Spine Front Axis:')
	
	# position the input fields for the shoulder constraint
	cmds.formLayout(constraintForm, edit=True, attachForm=[(if_spine, 'left', 30), (if_spine, 'top', 5)], attachNone=[(if_spine, 'right'), (if_spine, 'bottom')])
	cmds.formLayout(constraintForm, edit=True, attachForm=[(if_raisedAngleOffset, 'left', 30)], attachNone=[(if_raisedAngleOffset, 'right'), (if_raisedAngleOffset, 'bottom')], attachControl=[(if_raisedAngleOffset, 'top', 5, if_spine)])
	cmds.formLayout(constraintForm, edit=True, attachForm=[(if_shoulderAimAxis, 'left', 30)], attachNone=[(if_shoulderAimAxis, 'right'), (if_shoulderAimAxis, 'bottom')], attachControl=[(if_shoulderAimAxis, 'top', 5, if_raisedAngleOffset)])
	cmds.formLayout(constraintForm, edit=True, attachForm=[(if_shoulderFrontAxis, 'left', 30)], attachNone=[(if_shoulderFrontAxis, 'right'), (if_shoulderFrontAxis, 'bottom')], attachControl=[(if_shoulderFrontAxis, 'top', 5, if_shoulderAimAxis)])
	cmds.formLayout(constraintForm, edit=True, attachForm=[(if_spineAimAxis, 'left', 30)], attachNone=[(if_spineAimAxis, 'right'), (if_spineAimAxis, 'bottom')], attachControl=[(if_spineAimAxis, 'top', 5, if_shoulderFrontAxis)])
	cmds.formLayout(constraintForm, edit=True, attachForm=[(if_spineFrontAxis, 'left', 30)], attachNone=[(if_spineFrontAxis, 'right'), (if_spineFrontAxis, 'bottom')], attachControl=[(if_spineFrontAxis, 'top', 5, if_spineAimAxis)])
	
	cmds.setParent('..') # go up to constraintForm
	cmds.setParent('..') # go up to mainForm
	
	# position the frame for the shoulder constraint
	cmds.formLayout(mainForm, edit=True, attachPosition=[(constraintFrame, 'left', -1, 0), (constraintFrame, 'right', -1, 100)], attachControl=[(constraintFrame, 'top', 5, if_numberTwistJoints)], attachNone=[(constraintFrame, 'bottom')])
	
	# create the buttons to execute the script
	cmd_create='amTools.rigging.shoulderSetup.doOptions ("%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s")'%(
		if_suffixName, 
		if_numberTwistJoints, 
		if_spine, 
		if_raisedAngleOffset, 
		if_shoulderAimAxis, 
		if_shoulderFrontAxis, 
		if_spineAimAxis, 
		if_spineFrontAxis)
	utils.ui.threeButtonLayout(mainForm, mainWindow, cmd_create)
	
	cmds.showWindow(mainWindow)
def optionsWindow():
    """This function creates an options window for creating the forearm twist
	structure. When executing it, select the wrists in the arms you are setting
	up, then press Create or Apply."""
    # create the main interface
    if cmds.window(kSetupOptionsWindow, q=True, ex=True):
        cmds.deleteUI(kSetupOptionsWindow)
    mainWindow = cmds.window(kSetupOptionsWindow,
                             title='%s Options' % kToolName,
                             menuBar=True,
                             wh=(545, 350))

    # build the menu bar
    cmds.menu(label='Help')
    amui.helpMenuItem(kToolName, __file__)
    amui.aboutMenuItem(kToolName, kVersionNumber, kVersionDate)

    mainForm = cmds.formLayout(nd=100)

    # build the section to get information about the new twist joints
    if_suffixName = cmds.textFieldGrp(text='_Twist',
                                      label='Suffix of New Twist Joints:')
    if_numberTwistJoints = cmds.intSliderGrp(v=3,
                                             min=1,
                                             max=10,
                                             fmn=1,
                                             fmx=100,
                                             label='Number of Twist Joints:',
                                             field=True)

    # position the input fields for the twist joints
    cmds.formLayout(mainForm,
                    edit=True,
                    attachForm=[(if_suffixName, 'left', 30),
                                (if_suffixName, 'top', 5)],
                    attachNone=[(if_suffixName, 'right'),
                                (if_suffixName, 'bottom')])
    cmds.formLayout(mainForm,
                    edit=True,
                    attachForm=[(if_numberTwistJoints, 'left', 30)],
                    attachNone=[(if_numberTwistJoints, 'right'),
                                (if_numberTwistJoints, 'bottom')],
                    attachControl=[(if_numberTwistJoints, 'top', 5,
                                    if_suffixName)])

    # build the section to get information for the aim constraint
    constraintFrame = eval(
        'cmds.frameLayout(collapsable=True, label="Aim Constraint Options:" %s)'
        % amui.__frameAlignCenter__)
    constraintForm = cmds.formLayout(nd=100)

    if_elbowAimAxis = cmds.floatFieldGrp(v1=1,
                                         v2=0,
                                         v3=0,
                                         nf=3,
                                         pre=4,
                                         label='Elbow Aim Axis:')
    if_elbowFrontAxis = cmds.floatFieldGrp(v1=0,
                                           v2=0,
                                           v3=1,
                                           nf=3,
                                           pre=4,
                                           label='Elbow Front Axis:')
    if_handFrontAxis = cmds.floatFieldGrp(v1=0,
                                          v2=0,
                                          v3=1,
                                          nf=3,
                                          pre=4,
                                          label='Hand Front Axis:')

    # position the input fields for the aim constraint
    cmds.formLayout(constraintForm,
                    edit=True,
                    attachForm=[(if_elbowAimAxis, 'left', 30),
                                (if_elbowAimAxis, 'top', 5)],
                    attachNone=[(if_elbowAimAxis, 'right'),
                                (if_elbowAimAxis, 'bottom')])
    cmds.formLayout(constraintForm,
                    edit=True,
                    attachForm=[(if_elbowFrontAxis, 'left', 30)],
                    attachNone=[(if_elbowFrontAxis, 'right'),
                                (if_elbowFrontAxis, 'bottom')],
                    attachControl=[(if_elbowFrontAxis, 'top', 5,
                                    if_elbowAimAxis)])
    cmds.formLayout(constraintForm,
                    edit=True,
                    attachForm=[(if_handFrontAxis, 'left', 30)],
                    attachNone=[(if_handFrontAxis, 'right'),
                                (if_handFrontAxis, 'bottom')],
                    attachControl=[(if_handFrontAxis, 'top', 5,
                                    if_elbowFrontAxis)])

    cmds.setParent('..')  # go up to constraintForm
    cmds.setParent('..')  # go up to mainForm

    # position the frame for the aim constraint
    cmds.formLayout(mainForm,
                    edit=True,
                    attachPosition=[(constraintFrame, 'left', -1, 0),
                                    (constraintFrame, 'right', -1, 100)],
                    attachControl=[(constraintFrame, 'top', 5,
                                    if_numberTwistJoints)],
                    attachNone=[(constraintFrame, 'bottom')])

    # create the buttons to execute the script
    cmd_create = 'amTools.rigging.forearmSetup.doOptions ("%s", "%s", "%s", "%s", "%s")' % (
        if_suffixName, if_numberTwistJoints, if_elbowAimAxis,
        if_elbowFrontAxis, if_handFrontAxis)
    utils.ui.threeButtonLayout(mainForm, mainWindow, cmd_create)

    cmds.showWindow(mainWindow)
Example #8
0
def optionsWindow():
    """This function creates an options window for the am_hipConstraint command. 
	When executing it, first select the hip to which you are constraining, then 
	add the object to be constrained to your selection."""
    # create the main interface
    if cmds.window(kConstraintOptionsWindow, q=True, ex=True):
        cmds.deleteUI(kConstraintOptionsWindow)
    mainWindow = cmds.window(kConstraintOptionsWindow,
                             title='%s Options' % kToolName,
                             menuBar=True,
                             wh=(545, 350))

    # build the menu bar
    cmds.menu(label='Help')
    amui.helpMenuItem(kToolName, __file__)
    amui.aboutMenuItem(kToolName, kVersionNumber, kVersionDate)

    mainForm = cmds.formLayout(nd=100)

    # build the section to get information for the hip constraint
    mainFrame = cmds.formLayout(nd=100)

    # attempt to guess what the pelvis is if there is a selection when the GUI is created
    pelvisText = 'CenterRoot'
    sel = cmds.ls(sl=True, l=True, type='transform')
    if sel and len(
            sel
    ) > 0:  # BUG: in Maya 8.5, a selection of length 0 returns None rather than an empty list
        try:
            pelvis = cmds.listRelatives(
                sel[0], p=True, f=True
            )  # the hip should be the first object in the selection list
            pelvisText = pelvis[0]
        except:
            pass

    if_pelvis = cmds.textFieldGrp(label='Pelvis Object:', tx=pelvisText)
    if_hipAimAxis = cmds.floatFieldGrp(v1=1,
                                       v2=0,
                                       v3=0,
                                       nf=3,
                                       pre=4,
                                       label='Hip Aim Axis:')
    if_hipFrontAxis = cmds.floatFieldGrp(v1=0,
                                         v2=0,
                                         v3=1,
                                         nf=3,
                                         pre=4,
                                         label='Hip Front Axis:')
    if_pelvisAimAxis = cmds.floatFieldGrp(v1=0,
                                          v2=1,
                                          v3=0,
                                          nf=3,
                                          pre=4,
                                          label='Pelvis Aim Axis:')
    if_pelvisFrontAxis = cmds.floatFieldGrp(v1=0,
                                            v2=0,
                                            v3=1,
                                            nf=3,
                                            pre=4,
                                            label='Pelvis Front Axis:')

    # position the input fields for the hip constraint
    cmds.formLayout(mainFrame,
                    edit=True,
                    attachForm=[(if_pelvis, 'left', 30),
                                (if_pelvis, 'top', 5)],
                    attachNone=[(if_pelvis, 'right'), (if_pelvis, 'bottom')])
    cmds.formLayout(mainFrame,
                    edit=True,
                    attachForm=[(if_hipAimAxis, 'left', 30)],
                    attachNone=[(if_hipAimAxis, 'right'),
                                (if_hipAimAxis, 'bottom')],
                    attachControl=[(if_hipAimAxis, 'top', 5, if_pelvis)])
    cmds.formLayout(mainFrame,
                    edit=True,
                    attachForm=[(if_hipFrontAxis, 'left', 30)],
                    attachNone=[(if_hipFrontAxis, 'right'),
                                (if_hipFrontAxis, 'bottom')],
                    attachControl=[(if_hipFrontAxis, 'top', 5, if_hipAimAxis)])
    cmds.formLayout(mainFrame,
                    edit=True,
                    attachForm=[(if_pelvisAimAxis, 'left', 30)],
                    attachNone=[(if_pelvisAimAxis, 'right'),
                                (if_pelvisAimAxis, 'bottom')],
                    attachControl=[(if_pelvisAimAxis, 'top', 5,
                                    if_hipFrontAxis)])
    cmds.formLayout(mainFrame,
                    edit=True,
                    attachForm=[(if_pelvisFrontAxis, 'left', 30)],
                    attachNone=[(if_pelvisFrontAxis, 'right'),
                                (if_pelvisFrontAxis, 'bottom')],
                    attachControl=[(if_pelvisFrontAxis, 'top', 5,
                                    if_pelvisAimAxis)])

    cmds.setParent('..')  # go up to mainFrame

    # create the buttons to execute the hcript
    cmd_create = 'amTools.rigging.hipConstraint.doOptions (\"%s\", \"%s\", \"%s\", \"%s\", \"%s\")' % (
        if_pelvis, if_hipAimAxis, if_hipFrontAxis, if_pelvisAimAxis,
        if_pelvisFrontAxis)
    utils.ui.threeButtonLayout(mainForm, mainWindow, cmd_create)

    cmds.showWindow(mainWindow)
Example #9
0
def optionsWindow():
    """This function creates an options window for making ribbons along selected hair curves."""
    # create the main interface
    if cmds.window(kMakeRibbonsOptionsWindow, q=True, ex=True):
        cmds.deleteUI(kMakeRibbonsOptionsWindow)
    mainWindow = cmds.window(kMakeRibbonsOptionsWindow,
                             title='%s Options' % kToolName,
                             menuBar=True,
                             wh=(545, 465))

    # build the menu bar
    cmds.menu(label='Help')
    amui.helpMenuItem(kToolName, __file__)
    amui.aboutMenuItem(kToolName, kVersionNumber, kVersionDate)

    mainForm = cmds.formLayout(nd=100)

    # build the section to get information about the new ribbons
    if_width = cmds.floatSliderGrp(v=3.0,
                                   min=0.0,
                                   max=100,
                                   fmn=0.0,
                                   fmx=100,
                                   label='Width:',
                                   field=True)
    if_divisionsType = cmds.radioButtonGrp(
        label='Compute Divisions:',
        labelArray2=['Statically', 'Dynamically'],
        numberOfRadioButtons=2,
        select=2)
    if_divisions = cmds.intSliderGrp(v=1,
                                     min=1,
                                     max=100,
                                     fmn=0,
                                     fmx=100,
                                     label='Divisions:',
                                     field=True,
                                     en=False)
    if_divisionsPerUnit = cmds.floatSliderGrp(v=0.5,
                                              min=0.0,
                                              max=10.0,
                                              fmn=0.0,
                                              fmx=100,
                                              label='Divisions per Unit:',
                                              field=True)
    cmds.radioButtonGrp(
        if_divisionsType,
        e=True,
        cc=('amTools.modeling.makeRibbons.doRadioDivisions("%s", "%s", "%s")' %
            (if_divisionsType, if_divisions, if_divisionsPerUnit)))
    if_taper = cmds.floatSliderGrp(v=1.0,
                                   min=0.0,
                                   max=15.0,
                                   fmn=0.0,
                                   fmx=15.0,
                                   label='Taper:',
                                   field=True)
    if_frontTwist = cmds.floatSliderGrp(v=0.0,
                                        min=-180.0,
                                        max=180.0,
                                        fmn=-360.0,
                                        fmx=360.0,
                                        label='Front Twist:',
                                        field=True)
    if_lengthTwist = cmds.floatSliderGrp(v=0.0,
                                         min=-180.0,
                                         max=180.0,
                                         fmn=-180.0,
                                         fmx=180.0,
                                         label='Length Twist:',
                                         field=True)
    if_upVector = cmds.floatFieldGrp(v1=0,
                                     v2=1,
                                     v3=0,
                                     nf=3,
                                     pre=4,
                                     label='Base Up Vector:')

    # position the input fields for the new parents
    cmds.formLayout(mainForm,
                    edit=True,
                    attachForm=[(if_width, 'left', 30), (if_width, 'top', 5)],
                    attachNone=[(if_width, 'right'), (if_width, 'bottom')])
    cmds.formLayout(mainForm,
                    edit=True,
                    attachForm=[(if_divisionsType, 'left', 30)],
                    attachNone=[(if_divisionsType, 'right'),
                                (if_divisionsType, 'bottom')],
                    attachControl=[(if_divisionsType, 'top', 5, if_width)])
    cmds.formLayout(mainForm,
                    edit=True,
                    attachForm=[(if_divisions, 'left', 30)],
                    attachNone=[(if_divisions, 'right'),
                                (if_divisions, 'bottom')],
                    attachControl=[(if_divisions, 'top', 5, if_divisionsType)])
    cmds.formLayout(mainForm,
                    edit=True,
                    attachForm=[(if_divisionsPerUnit, 'left', 30)],
                    attachNone=[(if_divisionsPerUnit, 'right'),
                                (if_divisionsPerUnit, 'bottom')],
                    attachControl=[(if_divisionsPerUnit, 'top', 5,
                                    if_divisions)])
    cmds.formLayout(mainForm,
                    edit=True,
                    attachForm=[(if_taper, 'left', 30)],
                    attachNone=[(if_taper, 'right'), (if_taper, 'bottom')],
                    attachControl=[(if_taper, 'top', 5, if_divisionsPerUnit)])
    cmds.formLayout(mainForm,
                    edit=True,
                    attachForm=[(if_frontTwist, 'left', 30)],
                    attachNone=[(if_frontTwist, 'right'),
                                (if_frontTwist, 'bottom')],
                    attachControl=[(if_frontTwist, 'top', 5, if_taper)])
    cmds.formLayout(mainForm,
                    edit=True,
                    attachForm=[(if_lengthTwist, 'left', 30)],
                    attachNone=[(if_lengthTwist, 'right'),
                                (if_lengthTwist, 'bottom')],
                    attachControl=[(if_lengthTwist, 'top', 5, if_frontTwist)])
    cmds.formLayout(mainForm,
                    edit=True,
                    attachForm=[(if_upVector, 'left', 30)],
                    attachNone=[(if_upVector, 'right'),
                                (if_upVector, 'bottom')],
                    attachControl=[(if_upVector, 'top', 5, if_lengthTwist)])

    # build the section to get information for the uv generation options
    uvFrame = eval(
        'cmds.frameLayout(collapsable=True, label="UV Generation Options:" %s)'
        % amui.__frameAlignCenter__)
    uvForm = cmds.formLayout(nd=100)

    if_uvScale = cmds.floatSliderGrp(v=1.0,
                                     min=0.0,
                                     max=1.0,
                                     fmn=-1.0,
                                     fmx=1.0,
                                     label='UV Scale:',
                                     field=True,
                                     en=False)
    if_uvScaleType = cmds.radioButtonGrp(
        label='UV Normalization:',
        labelArray3=['None', 'Longest', 'Shortest'],
        numberOfRadioButtons=3,
        select=2)
    cmds.radioButtonGrp(
        if_uvScaleType,
        e=True,
        cc=('amTools.modeling.makeRibbons.doRadioUVs("%s", "%s")' %
            (if_uvScaleType, if_uvScale)))
    if_uvPinLocation = cmds.radioButtonGrp(label='Pin UVs:',
                                           labelArray2=['Top', 'Bottom'],
                                           numberOfRadioButtons=2,
                                           select=2)

    # position the input fields for the uv generation options
    cmds.formLayout(uvForm,
                    edit=True,
                    attachForm=[(if_uvScale, 'left', 30),
                                (if_uvScale, 'top', 5)],
                    attachNone=[(if_uvScale, 'right'), (if_uvScale, 'bottom')])
    cmds.formLayout(uvForm,
                    edit=True,
                    attachForm=[(if_uvScaleType, 'left', 30)],
                    attachNone=[(if_uvScaleType, 'right'),
                                (if_uvScaleType, 'bottom')],
                    attachControl=[(if_uvScaleType, 'top', 5, if_uvScale)])
    cmds.formLayout(uvForm,
                    edit=True,
                    attachForm=[(if_uvPinLocation, 'left', 30)],
                    attachNone=[(if_uvPinLocation, 'right'),
                                (if_uvPinLocation, 'bottom')],
                    attachControl=[(if_uvPinLocation, 'top', 5, if_uvScaleType)
                                   ])

    cmds.setParent('..')  # Go up to uvForm
    cmds.setParent('..')  # Go up to mainForm

    # position the frame for the uv generation options
    cmds.formLayout(mainForm,
                    edit=True,
                    attachPosition=[(uvFrame, 'left', -1, 0),
                                    (uvFrame, 'right', -1, 100)],
                    attachControl=[(uvFrame, 'top', 5, if_upVector)],
                    attachNone=[(uvFrame, 'bottom')])

    # create the buttons to execute the script
    cmd_create = 'amTools.modeling.makeRibbons.doOptions ("%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s")' % (
        if_width, if_divisionsType, if_divisions, if_divisionsPerUnit,
        if_taper, if_frontTwist, if_lengthTwist, if_upVector, if_uvScale,
        if_uvScaleType, if_uvPinLocation)
    amui.threeButtonLayout(mainForm, mainWindow, cmd_create)

    cmds.showWindow(mainWindow)
def optionsWindow():
    """This function creates an options window for creating the shoulder twist
	structure. When executing it, select the elbows in the arms you are setting
	up, then press Create or Apply."""
    # create the main interface
    if cmds.window(kSetupOptionsWindow, q=True, ex=True):
        cmds.deleteUI(kSetupOptionsWindow)
    mainWindow = cmds.window(kSetupOptionsWindow,
                             title='%s Options' % kToolName,
                             menuBar=True,
                             wh=(545, 350))

    # build the menu bar
    cmds.menu(label='Help')
    amui.helpMenuItem(kToolName, __file__)
    amui.aboutMenuItem(kToolName, kVersionNumber, kVersionDate)

    mainForm = cmds.formLayout(nd=100)

    # build the section to get information about the new twist joints
    if_suffixName = cmds.textFieldGrp(text='_Twist',
                                      label='Suffix of New Twist Joints:')
    if_numberTwistJoints = cmds.intSliderGrp(v=3,
                                             min=1,
                                             max=10,
                                             fmn=1,
                                             fmx=100,
                                             label='Number of Twist Joints:',
                                             field=True)

    # position the input fields for the twist joints
    cmds.formLayout(mainForm,
                    edit=True,
                    attachForm=[(if_suffixName, 'left', 30),
                                (if_suffixName, 'top', 5)],
                    attachNone=[(if_suffixName, 'right'),
                                (if_suffixName, 'bottom')])
    cmds.formLayout(mainForm,
                    edit=True,
                    attachForm=[(if_numberTwistJoints, 'left', 30)],
                    attachNone=[(if_numberTwistJoints, 'right'),
                                (if_numberTwistJoints, 'bottom')],
                    attachControl=[(if_numberTwistJoints, 'top', 5,
                                    if_suffixName)])

    # build the section to get information for the shoulder constraint
    constraintFrame = eval(
        'cmds.frameLayout(collapsable=True, label="Shoulder Constraint Options:" %s)'
        % (amui.__frameAlignCenter__))
    constraintForm = cmds.formLayout(nd=100)

    # attempt to guess what the spine is if there is a selection when the GUI is created
    spineText = 'CenterSpine'
    sel = cmds.ls(sl=True, l=True, type='transform')
    if sel and len(
            sel
    ) > 0:  # BUG: in Maya 8.5, a selection of length 0 returns None rather than an empty list
        try:
            shoulder = cmds.listRelatives(
                sel[0], p=True,
                f=True)  # just use the first elbow in the selection
            collar = cmds.listRelatives(shoulder[0], p=True, f=True)
            spine = cmds.listRelatives(collar[0], p=True, f=True)
            spineText = spine[0]
        except:
            pass

    if_spine = cmds.textFieldGrp(label='Spine Object:', tx=spineText)
    if_raisedAngleOffset = cmds.floatSliderGrp(v=45,
                                               min=0,
                                               max=90,
                                               fmn=-180,
                                               fmx=180,
                                               label='Raised Angle Offset:',
                                               field=True)
    if_shoulderAimAxis = cmds.floatFieldGrp(v1=1,
                                            v2=0,
                                            v3=0,
                                            nf=3,
                                            pre=4,
                                            label='Shoulder Aim Axis:')
    if_shoulderFrontAxis = cmds.floatFieldGrp(v1=0,
                                              v2=0,
                                              v3=1,
                                              nf=3,
                                              pre=4,
                                              label='Shoulder Front Axis:')
    if_spineAimAxis = cmds.floatFieldGrp(v1=1,
                                         v2=0,
                                         v3=0,
                                         nf=3,
                                         pre=4,
                                         label='Spine Aim Axis:')
    if_spineFrontAxis = cmds.floatFieldGrp(v1=0,
                                           v2=0,
                                           v3=1,
                                           nf=3,
                                           pre=4,
                                           label='Spine Front Axis:')

    # position the input fields for the shoulder constraint
    cmds.formLayout(constraintForm,
                    edit=True,
                    attachForm=[(if_spine, 'left', 30), (if_spine, 'top', 5)],
                    attachNone=[(if_spine, 'right'), (if_spine, 'bottom')])
    cmds.formLayout(constraintForm,
                    edit=True,
                    attachForm=[(if_raisedAngleOffset, 'left', 30)],
                    attachNone=[(if_raisedAngleOffset, 'right'),
                                (if_raisedAngleOffset, 'bottom')],
                    attachControl=[(if_raisedAngleOffset, 'top', 5, if_spine)])
    cmds.formLayout(constraintForm,
                    edit=True,
                    attachForm=[(if_shoulderAimAxis, 'left', 30)],
                    attachNone=[(if_shoulderAimAxis, 'right'),
                                (if_shoulderAimAxis, 'bottom')],
                    attachControl=[(if_shoulderAimAxis, 'top', 5,
                                    if_raisedAngleOffset)])
    cmds.formLayout(constraintForm,
                    edit=True,
                    attachForm=[(if_shoulderFrontAxis, 'left', 30)],
                    attachNone=[(if_shoulderFrontAxis, 'right'),
                                (if_shoulderFrontAxis, 'bottom')],
                    attachControl=[(if_shoulderFrontAxis, 'top', 5,
                                    if_shoulderAimAxis)])
    cmds.formLayout(constraintForm,
                    edit=True,
                    attachForm=[(if_spineAimAxis, 'left', 30)],
                    attachNone=[(if_spineAimAxis, 'right'),
                                (if_spineAimAxis, 'bottom')],
                    attachControl=[(if_spineAimAxis, 'top', 5,
                                    if_shoulderFrontAxis)])
    cmds.formLayout(constraintForm,
                    edit=True,
                    attachForm=[(if_spineFrontAxis, 'left', 30)],
                    attachNone=[(if_spineFrontAxis, 'right'),
                                (if_spineFrontAxis, 'bottom')],
                    attachControl=[(if_spineFrontAxis, 'top', 5,
                                    if_spineAimAxis)])

    cmds.setParent('..')  # go up to constraintForm
    cmds.setParent('..')  # go up to mainForm

    # position the frame for the shoulder constraint
    cmds.formLayout(mainForm,
                    edit=True,
                    attachPosition=[(constraintFrame, 'left', -1, 0),
                                    (constraintFrame, 'right', -1, 100)],
                    attachControl=[(constraintFrame, 'top', 5,
                                    if_numberTwistJoints)],
                    attachNone=[(constraintFrame, 'bottom')])

    # create the buttons to execute the script
    cmd_create = 'amTools.rigging.shoulderSetup.doOptions ("%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s")' % (
        if_suffixName, if_numberTwistJoints, if_spine, if_raisedAngleOffset,
        if_shoulderAimAxis, if_shoulderFrontAxis, if_spineAimAxis,
        if_spineFrontAxis)
    utils.ui.threeButtonLayout(mainForm, mainWindow, cmd_create)

    cmds.showWindow(mainWindow)
def optionsWindow():
	"""This function creates an options window for making ribbons along selected hair curves."""
	# create the main interface
	if cmds.window(kMakeRibbonsOptionsWindow, q=True, ex=True):
		cmds.deleteUI(kMakeRibbonsOptionsWindow)
	mainWindow = cmds.window(kMakeRibbonsOptionsWindow, title='%s Options'%kToolName, menuBar=True, wh=(545,465))
	
	# build the menu bar
	cmds.menu(label='Help')
	amui.helpMenuItem(kToolName, __file__)
	amui.aboutMenuItem(kToolName, kVersionNumber, kVersionDate)
	
	mainForm = cmds.formLayout(nd=100)
	
	# build the section to get information about the new ribbons
	if_width = cmds.floatSliderGrp(v=3.0, min=0.0, max=100, fmn=0.0, fmx=100, label='Width:', field=True)
	if_divisionsType = cmds.radioButtonGrp(label='Compute Divisions:', labelArray2=['Statically', 'Dynamically'], numberOfRadioButtons=2, select=2)
	if_divisions = cmds.intSliderGrp(v=1, min=1, max=100, fmn=0, fmx=100, label='Divisions:', field=True, en=False)
	if_divisionsPerUnit = cmds.floatSliderGrp(v=0.5, min=0.0, max=10.0, fmn=0.0, fmx=100, label='Divisions per Unit:', field=True)
	cmds.radioButtonGrp(if_divisionsType, e=True, 
		cc=('amTools.modeling.makeRibbons.doRadioDivisions("%s", "%s", "%s")'%(if_divisionsType, if_divisions, if_divisionsPerUnit)))
	if_taper = cmds.floatSliderGrp(v=1.0, min=0.0, max=15.0, fmn=0.0, fmx=15.0, label='Taper:', field=True)
	if_frontTwist = cmds.floatSliderGrp(v=0.0, min=-180.0, max=180.0, fmn=-360.0, fmx=360.0, label='Front Twist:', field=True)
	if_lengthTwist = cmds.floatSliderGrp(v=0.0, min=-180.0, max=180.0, fmn=-180.0, fmx=180.0, label='Length Twist:', field=True)
	if_upVector = cmds.floatFieldGrp(v1=0, v2=1, v3=0, nf=3, pre=4, label='Base Up Vector:')
	
	# position the input fields for the new parents
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_width, 'left', 30), (if_width, 'top', 5)], attachNone=[(if_width, 'right'), (if_width, 'bottom')])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_divisionsType, 'left', 30)], attachNone=[(if_divisionsType, 'right'), (if_divisionsType, 'bottom')], attachControl=[(if_divisionsType, 'top', 5, if_width)])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_divisions, 'left', 30)], attachNone=[(if_divisions, 'right'), (if_divisions, 'bottom')], attachControl=[(if_divisions, 'top', 5, if_divisionsType)])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_divisionsPerUnit, 'left', 30)], attachNone=[(if_divisionsPerUnit, 'right'), (if_divisionsPerUnit, 'bottom')], attachControl=[(if_divisionsPerUnit, 'top', 5, if_divisions)])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_taper, 'left', 30)], attachNone=[(if_taper, 'right'), (if_taper, 'bottom')], attachControl=[(if_taper, 'top', 5, if_divisionsPerUnit)])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_frontTwist, 'left', 30)], attachNone=[(if_frontTwist, 'right'), (if_frontTwist, 'bottom')], attachControl=[(if_frontTwist, 'top', 5, if_taper)])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_lengthTwist, 'left', 30)], attachNone=[(if_lengthTwist, 'right'), (if_lengthTwist, 'bottom')], attachControl=[(if_lengthTwist, 'top', 5, if_frontTwist)])
	cmds.formLayout(mainForm, edit=True, attachForm=[(if_upVector, 'left', 30)], attachNone=[(if_upVector, 'right'), (if_upVector, 'bottom')], attachControl=[(if_upVector, 'top', 5, if_lengthTwist)])
	
	# build the section to get information for the uv generation options
	uvFrame = eval('cmds.frameLayout(collapsable=True, label="UV Generation Options:" %s)'%amui.__frameAlignCenter__)
	uvForm = cmds.formLayout(nd=100)
	
	if_uvScale = cmds.floatSliderGrp(v=1.0, min=0.0, max=1.0, fmn=-1.0, fmx=1.0, label='UV Scale:', field=True, en=False)
	if_uvScaleType = cmds.radioButtonGrp(label='UV Normalization:', labelArray3=['None', 'Longest', 'Shortest'], numberOfRadioButtons=3, select=2)
	cmds.radioButtonGrp(if_uvScaleType, e=True, cc=('amTools.modeling.makeRibbons.doRadioUVs("%s", "%s")'%(if_uvScaleType, if_uvScale)))
	if_uvPinLocation = cmds.radioButtonGrp(label='Pin UVs:', labelArray2=['Top', 'Bottom'], numberOfRadioButtons=2, select=2)
	
	# position the input fields for the uv generation options
	cmds.formLayout(uvForm, edit=True, attachForm=[(if_uvScale, 'left', 30), (if_uvScale, 'top', 5)], attachNone=[(if_uvScale, 'right'), (if_uvScale, 'bottom')])
	cmds.formLayout(uvForm, edit=True, attachForm=[(if_uvScaleType, 'left', 30)], attachNone=[(if_uvScaleType, 'right'), (if_uvScaleType, 'bottom')], attachControl=[(if_uvScaleType, 'top', 5, if_uvScale)])
	cmds.formLayout(uvForm, edit=True, attachForm=[(if_uvPinLocation, 'left', 30)], attachNone=[(if_uvPinLocation, 'right'), (if_uvPinLocation, 'bottom')], attachControl=[(if_uvPinLocation, 'top', 5, if_uvScaleType)])
	
	cmds.setParent('..') # Go up to uvForm
	cmds.setParent('..') # Go up to mainForm
	
	# position the frame for the uv generation options
	cmds.formLayout(mainForm, edit=True, attachPosition=[(uvFrame, 'left', -1, 0), (uvFrame, 'right', -1, 100)], attachControl=[(uvFrame, 'top', 5, if_upVector)], attachNone=[(uvFrame, 'bottom')])
	
	# create the buttons to execute the script
	cmd_create = 'amTools.modeling.makeRibbons.doOptions ("%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s", "%s")'%(if_width, if_divisionsType, if_divisions, if_divisionsPerUnit, if_taper, if_frontTwist, if_lengthTwist, if_upVector, if_uvScale, if_uvScaleType, if_uvPinLocation)
	amui.threeButtonLayout(mainForm, mainWindow, cmd_create)
	
	cmds.showWindow(mainWindow)