本文整理汇总了Python中maya.cmds.floatSliderGrp函数的典型用法代码示例。如果您正苦于以下问题:Python floatSliderGrp函数的具体用法?Python floatSliderGrp怎么用?Python floatSliderGrp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了floatSliderGrp函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: defaultButtonPush
def defaultButtonPush(args):
'''
Calls the procedure cityGenerator.city(...) with the user specified
arguments.
args: Dummy argument needed to satisfy the command interface.
On exit: The cityGenerator.city(...) procedure has been called with
the arguments specified by the user.
'''
Name_ = cmds.textField("cityName", query = True, text = True)
if Name_ == "":
Name_ = "Helsinki"
cityWidth = cmds.intSliderGrp("cityWidth", query = True, value = True)
cityDepth = cmds.intSliderGrp("cityDepth", query = True, value = True)
minHeight = cmds.intSliderGrp("minHeight", query = True, value = True)
maxHeight = cmds.intSliderGrp("maxHeight", query = True, value = True)
minWidth = cmds.intSliderGrp("minWidth", query = True, value = True)
maxWidth = cmds.intSliderGrp("maxWidth", query = True, value = True)
windows = cmds.checkBoxGrp("features", query = True, v1 = True)
booleans = cmds.checkBoxGrp("features", query = True, v2 = True)
deformers = cmds.checkBoxGrp("features", query = True, v3 = True)
dayTime = cmds.checkBoxGrp("time", query = True, v1=True)
glow = cmds.checkBoxGrp("time", query = True, v3=True)
environment = cmds.colorSliderGrp("environment", query = True, rgbValue = True)
colourRangeStart = (cmds.intSliderGrp("hue1", query = True, value = True),
cmds.floatSliderGrp("saturation1", query = True, value = True),
cmds.floatSliderGrp("value1", query = True, value = True))
colourRangeEnd = (cmds.intSliderGrp("hue2", query = True, value = True),
cmds.floatSliderGrp("saturation2", query = True, value = True),
cmds.floatSliderGrp("value2", query = True, value = True))
cityGenerator.city(Name_, (cityWidth,cityDepth),(minHeight,maxHeight),
(minWidth,maxWidth), windows, booleans, deformers, dayTime, glow, environment,(colourRangeStart,colourRangeEnd))
示例2: init
def init(self):
window = c.window(title='WeatherViz',widthHeight=(400,600));
#form = c.formLayout(numberOfDivisions=100);
c.rowColumnLayout(numberOfColumns=1);
c.checkBoxGrp('weatherPanel', label='Weather');
c.checkBox('snowCheck', label='Snow', onc=self.snow.init, ofc=self.snow.remove, p='weatherPanel');
c.checkBox('rainCheck', label='Rain', onc=self.rain.init, ofc=self.rain.remove, p='weatherPanel');
c.checkBox('windCheck', label='Wind', onc=self.wind.init, ofc=self.wind.remove, p='weatherPanel');
c.button('collButton', label='Add collision', c=self.addCollision);
#s1 = c.floatSliderGrp('snowTurb',label='Snow turbulence', field=True, value=5, dc=self.slider_drag_callback, min=0, max=10);
c.floatSliderGrp('snowIntens',label='Snow Intencity', field=True, value=200, dc=self.slider_drag_callback, min=0, max=1000, en=False);
c.floatSliderGrp('rainIntens',label='Rain Intencity', field=True, value=200, dc=self.slider_drag_callback, min=0, max=1000, en=False);
c.floatSliderGrp('snowTurbSlider',label='Turbulence', field=True, value=1, dc=self.slider_drag_callback, min=0, max=100, en=False);
c.floatSliderGrp('airMSlider',label='Wind Magnitude', field=True, value=30, dc=self.slider_drag_callback, min=0, max=100, en=False);
c.floatSliderGrp('airMxdSlider',label='Wind Distance', field=True, value=20, dc=self.slider_drag_callback, min=0, max=100, en=False);
#c.formLayout(form, edit=True, attachPosition=[(s1, 'top', 20, 1)]);
#c.formLayout(form, edit=True, attachPosition=[(s2, 'top', 20, 1)]);
c.textField("WeatherViz_HDR_Path_textField", cc=_WeatherViz_HDR_Path_textField__changeCommand)
c.button("WeatherViz_HDR_Path_button", label="...", al="center", command=_WeatherViz_HDR_Path_button__command)
WeatherViz_HDR_Path = c.optionVar(q="WeatherViz_HDR_Path")
if WeatherViz_HDR_Path:
c.textField("WeatherViz_HDR_Path_textField", edit=True, text=WeatherViz_HDR_Path)
c.showWindow(window);
c.windowPref(enableAll=True)
示例3: createGeometryButtonAction
def createGeometryButtonAction(*pArgs):
""" Queries all the fields related to the geometry interpretation and calls the procedure. """
pAngle = cmds.floatSliderGrp( "angle", q=True, v=True )
pStep = cmds.floatSliderGrp( "length", q=True, v=True )
pRad = cmds.floatSliderGrp( "radius", q=True, v=True )
subDivs = cmds.intSliderGrp( "cylSubdivs", q=True, v=True )
length_atenuation = cmds.intSliderGrp( "length_atenuation", q=True, v=True )
radius_atenuation = cmds.intSliderGrp( "radius_atenuation", q=True, v=True )
turtleSpeed = cmds.floatSliderGrp( "turtleSpeed", q=True, v=True)
rgb_blossom = cmds.colorSliderGrp( "rgb_blossomField", q=True, rgb=True )
rgb_leaf = cmds.colorSliderGrp( "rgb_leafField", q=True, rgb=True )
rgb_branch = cmds.colorSliderGrp( "rgb_branchField", q=True, rgb=True )
if pAngle == 0 or pStep == 0 or pRad == 0 or subDivs == 0 or LStringVar == '':
cmds.textField('warningsTextField', edit=True, tx='Please, revise all the fields again')
else:
import globalVar
reload(globalVar)
globalVar.plantNumber += 1
cmds.textField('warningsTextField', edit=True, tx='None.')
createBranchShader(rgb_branch)
createLeafShader(rgb_leaf)
createBlossomShader(rgb_blossom)
createGeometry(LStringVar, pRad, pStep, pAngle, subDivs, length_atenuation/100.0, radius_atenuation/100.0,
turtleSpeed, rgb_branch, rgb_leaf, rgb_blossom)
示例4: prefPut
def prefPut(self):
cmds.checkBox(self.c2, e=True, v=self.prefs['BkRmvCon'])
cmds.checkBox(self.c3, e=True, v=self.prefs['BkTmRng'])
cmds.checkBox(self.c4, e=True, v=self.prefs['BkAllFrms'])
cmds.checkBox(self.c7, e=True, v=self.prefs['LocTrns'])
cmds.checkBox(self.c8, e=True, v=self.prefs['LocRot'])
cmds.checkBox(self.c12, e=True, v=self.prefs['LocAllFrms'])
cmds.checkBox(self.c17, e=True, v=self.prefs['PrntRgPosOnly'])
cmds.checkBox(self.c15, e=True, v=self.prefs['AimRgNegAim'])
cmds.radioButtonGrp(self.aimGrp, e=True, select=self.prefs['AimRgAim'])
cmds.checkBox(self.c16, e=True, v=self.prefs['AimRgNegUp'])
cmds.radioButtonGrp(self.upGrp, e=True, select=self.prefs['AimRgUp'])
cmds.checkBox(self.c18, e=True, v=self.prefs['PvtRgNegAim'])
cmds.radioButtonGrp(self.aimPivotGrp, e=True, select=self.prefs['PvtRgAim'])
cmds.checkBox(self.c19, e=True, v=self.prefs['PvtRgNegUp'])
cmds.radioButtonGrp(self.upPivotGrp, e=True, select=self.prefs['PvtRgUp'])
cmds.checkBox(self.c21, e=True, v=self.prefs['PvtRgMstr'])
cmds.radioButtonGrp(self.masterGrp, e=True, select=self.prefs['PvtRgMstrSl'])
cmds.radioButtonGrp(self.masterGrp, e=True, en=self.prefs['PvtRgMstrEnbl'])
cmds.checkBox(self.c22, e=True, v=self.prefs['PvtRgAutoDstnc'])
cmds.floatSliderGrp(self.sl1, e=True, v=self.prefs['PvtRgDstnc'])
cmds.floatSliderGrp(self.sl1, e=True, en=self.prefs['PvtRgDstncEnbl'])
cmds.checkBox(self.c21, e=True, v=self.prefs['LcAllFrms'])
cmds.checkBox(self.c5, e=True, v=self.prefs['PlcCon'])
cmds.radioButtonGrp(self.conGrp, e=True, select=self.prefs['PlcConTo'])
cmds.radioButtonGrp(self.conGrp, e=True, en=self.prefs['PlcConToEnbl'])
cmds.checkBox(self.c13, e=True, v=self.prefs['PlcMtchKys'])
cmds.checkBox(self.c9, e=True, v=self.prefs['ConOffst'])
cmds.checkBox(self.c10, e=True, v=self.prefs['ConTrns'])
cmds.checkBox(self.c11, e=True, v=self.prefs['ConRot'])
cmds.intField(self.actionField1, e=True, v=self.prefs['DstKys'])
cmds.checkBox(self.c14, e=True, v=self.prefs['DstKysDstrct'])
cmds.floatFieldGrp(self.floatGroup1, e=True, v=self.prefs['ObjctSpaceOffst'])
示例5: activateBlendshapes_window
def activateBlendshapes_window():
"""
This definition creates the 'Activate Blendshapes' main window.
"""
cmds.windowPref(enableAll=False)
if (cmds.window("activateBlendshapes_window", exists=True)):
cmds.deleteUI("activateBlendshapes_window")
cmds.window("activateBlendshapes_window",
title="Activate Blendshapes",
width=320)
spacing = 5
cmds.columnLayout(adjustableColumn=True, rowSpacing=spacing)
cmds.separator(height=10, style="singleDash")
cmds.floatSliderGrp("weight_floatSliderGrp", label="Weight", field=True, minValue=0, maxValue=1, fieldMinValue=0, fieldMaxValue=1, sliderStep=0.01, value=0, changeCommand=weight_floatSliderGrp_OnValueChanged, dragCommand=weight_floatSliderGrp_OnValueChanged)
cmds.separator(height=10, style="singleDash")
cmds.showWindow("activateBlendshapes_window")
cmds.windowPref(enableAll=True)
示例6: evenEdgeSpacingUI
def evenEdgeSpacingUI():
"""
Even Edge Spacing UI
"""
# Window
window = 'evenEdgeSpacingUI'
if cmds.window(window, q=True, ex=1): cmds.deleteUI(window)
window = cmds.window(window, t='Even Edge Spacing', s=True)
# Layout
CL = cmds.columnLayout()
# UI Elements
cmds.intSliderGrp('evenEdgeSpacing_smoothISG', label='Smooth', field=True, minValue=0, maxValue=20, fieldMinValue=0,
fieldMaxValue=100, value=4)
cmds.floatSliderGrp('evenEdgeSpacing_influenceFSG', label='Influence', field=True, minValue=0.0, maxValue=1.0,
fieldMinValue=0.0, fieldMaxValue=1.0, value=1.0)
cmds.checkBoxGrp('evenEdgeSpacing_snapToOrigCBG', label='Maintain Shape', numberOfCheckBoxes=1,
v1=False) # columnWidth2=[100,165]
cmds.checkBoxGrp('evenEdgeSpacing_deleteHistoryCBG', label='Delete History', numberOfCheckBoxes=1, v1=False)
cmds.button('evenEdgeSpacingB', l='Even Edge Spacing', w=390,
c='glTools.model.straightenVerts.evenEdgeSpacingFromUI()')
# Show Window
cmds.window(window, e=True, wh=[392, 99])
cmds.showWindow(window)
示例7: accept
def accept(self, *args):
numAnts = int(cmds.intFieldGrp("numAnts",query=True,value=True)[0])
startFrame = int(cmds.intFieldGrp("startFrame",query=True,value=True)[0])
endFrame = int(cmds.intFieldGrp("endFrame",query=True,value=True)[0])
curves = cmds.textScrollList("curves",q=True,ai=True)
if curves == None:
curves = ["curve1"]
isFlat = cmds.checkBox("isFlat", query = True, value = True)
vel = cmds.floatSliderGrp("Velocity", query=True, value=True)
load = cmds.floatSliderGrp("load", query=True, value=True)
ground = cmds.textFieldButtonGrp("groundObj",q=True,text=True)
if ground == None:
ground = "nurbsPlane1"
numCurves = len(curves)
if (numAnts > 1) and (numAnts != numCurves):
cmds.warning("the number of ants and curves must be the same")
return 0
else:
if (numAnts > 1):
self.duplicateAnts(numAnts-1)
for ind in range(numAnts):
arcLen = cmds.arclen(curves[ind])
# rebuiltCurve = cmds.rebuildCurve(curves[ind], kr=1)[0]
ct.walking(ind+1, startFrame, endFrame, curves[ind], ground, vel, load, isFlat)
示例8: __init__
def __init__(self):
self.name = "pythant"
self.title = "Pythant"
#creates the ui window, replacing any existing ui windows
if (cmds.window(self.name, q=1, exists=1)):
cmds.deleteUI(self.name)
self.window = cmds.window(self.name, title=self.title)
self.form = cmds.columnLayout(adjustableColumn=True, columnAlign="center", rowSpacing=10)
cmds.intFieldGrp("numAnts", label="Number of ants:", value1=1, cal=[1,"left"])
cmds.intFieldGrp("startFrame", label="Start frame:", value1=1, nf=1,cal=[1,"left"])
cmds.intFieldGrp("endFrame", label="End frame:",nf=1,value1=50,cal=[1,"left"])
cmds.text( label="Select the curves:",align="left")
cmds.textScrollList("curves",numberOfRows=3,allowMultiSelection=True,h=100)
cmds.button(label="OK",w=20, align="left",c=self.getCurves)
cmds.textFieldButtonGrp("groundObj", label="Select the Ground:",buttonLabel='OK', bc=self.getGround,cal=[1,"left"])
cmds.checkBox("isFlat",label="Is this a flat ground",value=1)
cmds.floatSliderGrp("Velocity",field=True, label="Velocity (mm/s):",min=1, max=40,value=20, cal=[1,"left"])
#cmds.floatSliderGrp("strideFreq",field=True, label="Stride Frequency:",min=1, max=10,value=5, cal=[1,"left"])
cmds.floatSliderGrp("load",field=True, label="Load (mg):",min=0, max=4,value=0, cal=[1,"left"])
# cmds.textFieldButtonGrp("force", label="External Force", buttonLabel='OK', bc = self.getForce, cal=[1, "left"])
cmds.text( label='The external force is setup with a directional light named forceVector.')
cmds.text( label='The force magnitude (N) is specified with the custom attribute "Force Magnitude".')
cmds.text(label='The lighting direction is the force direction.')
cmds.button(label='Run', w=100, c=self.accept)
cmds.button(label='Reset', w=100, c=self.reset)
cmds.showWindow(self.window)
cmds.window(self.window, edit = True, widthHeight=(415, 580))
示例9: bdMainWindow
def bdMainWindow():
bdWin = "CreateSkeleton"
if cmds.window(bdWin,q=True,ex=True):
cmds.deleteUI(bdWin)
cmds.window(bdWin,title = "Create Skeleton")
cmds.scrollLayout(horizontalScrollBarThickness=16)
bdMainCL = cmds.columnLayout(columnAttach=("both",5),rowSpacing=10,columnWidth=320)
#GUIDES CREATION
bdFL1 = cmds.frameLayout(label="Template Guides",bs="etchedOut",w=300,mw=5,cll=1,p=bdMainCL)
bdCL1= cmds.columnLayout(rs=5,adj=1,p=bdFL1)
#Character Name
cmds.textFieldGrp("bdChName",l="Character Name",tx="")
#Number of Fingers/Toes
#cmds.intSliderGrp("bdFingersNumber",label="Number of Fingers",field=True,minValue=1,maxValue=5,fieldMinValue=1,fieldMaxValue=5,value=4,cw3=(100,30,10),dc=bdSetFingersNumber)
#cmds.checkBoxGrp("bdHasThumb",numberOfCheckBoxes=1, label='Thumb?')
#cmds.intSliderGrp("bdToesNumber",label="Number of Toes",field=True,minValue=1,maxValue=5,fieldMinValue=1,fieldMaxValue=5,value=4,cw3=(100,30,10),dc=bdSetToesNumber)
cmds.button(l="Import Template",c=bdImportTemplate)
#Character Scale Slider
cmds.floatSliderGrp("bdScaleSlider",en=0,label="Guide scale",field=True,minValue=1,maxValue=100,fieldMinValue=1,fieldMaxValue=100,value=1,cw3=(70,30,10),dc=bdScaleGuides)
#Character Mirror
cmds.rowColumnLayout(nc=2,cw=[(1,138),(2,138)],p=bdCL1);
cmds.button(l="Mirror left << ",al="right",c = functools.partial(bdMirrorGuide,"left"))
cmds.button(l=">> Mirror right",al="left",c = functools.partial(bdMirrorGuide,"right"));
#END GUIDES CREATION
#JOINTS CREATION
bdFL2 = cmds.frameLayout(label="Create Joints",bs="etchedOut",w=300,mw=5,cll=1,p=bdMainCL)
bdCL2 = cmds.columnLayout(rs=5,adj=1,p=bdFL2)
cmds.button(l="Create Joints",c =bdCreateSkeleton)
#floatSliderGrp -en 0 -label "THUMB Orient" -field true -minValue 0 -maxValue 180 -fieldMinValue 1 -fieldMaxValue 100 -value 0 -cw3 80 40 10 -dc bdJointOrientX bdJointXSlider;
#END JOINTS CREATION
cmds.showWindow(bdWin)
示例10: stretchyIkSplineFromUI
def stretchyIkSplineFromUI(close=False):
'''
'''
# Window
window = 'stretchyIkSplineUI'
if not mc.window(window,q=True,ex=1): raise UIError('StretchyIkSpline UI does not exist!!')
# Get UI data
ik = mc.textFieldButtonGrp('stretchyIkSplineTFB',q=True,text=True)
pre = mc.textFieldGrp('stretchyIkSplinePrefixTFG',q=True,text=True)
scaleAxis = str.lower(str(mc.optionMenuGrp('stretchyIkSplineAxisOMG',q=True,v=True)))
scaleAttr = mc.textFieldButtonGrp('stretchyIkSplineScaleAttrTFB',q=True,text=True)
blendCtrl = mc.textFieldButtonGrp('stretchyIkSplineBlendCtrlTFB',q=True,text=True)
blendAttr = mc.textFieldGrp('stretchyIkSplineBlendAttrTFG',q=True,text=True)
method = mc.optionMenuGrp('stretchyIkSplineMethodOMG',q=True,sl=True)-1
minPercent = mc.floatSliderGrp('stretchyIkSplineMinPFSG',q=True,v=True)
maxPercent = mc.floatSliderGrp('stretchyIkSplineMaxPFSG',q=True,v=True)
# Execute command
if method: # Parametric
glTools.builder.stretchyIkSpline_parametric.StretchyIkSpline_parametric().build(ikHandle=ik,scaleAttr=scaleAttr,blendControl=blendCtrl,blendAttr=blendAttr,scaleAxis=scaleAxis,minPercent=minPercent,maxPercent=maxPercent,prefix=pre)
else: # Arc Length
glTools.builder.stretchyIkSpline_arcLength.StretchyIkSpline_arcLength().build(ikHandle=ik,scaleAttr=scaleAttr,blendControl=blendCtrl,blendAttr=blendAttr,scaleAxis=scaleAxis,prefix=pre)
# Cleanup
if close: mc.deleteUI(window)
示例11: ruMainWindow
def ruMainWindow():
ruWin = "riggUtils"
if mc.window(ruWin,q=True,ex=True):
mc.deleteUI(ruWin)
mc.window(ruWin,title = "Rigging Utilities")
mc.scrollLayout(horizontalScrollBarThickness=16)
ruMainColumn = mc.columnLayout(columnAttach=("both",5),rowSpacing=10,columnWidth=320)
mc.frameLayout(label="General",bs="etchedOut",w=300,mw=5,cll=1)
mc.button(label='Show Axis',command='mc.toggle(state=True, localAxis=True)')
mc.button(label='Hide Axis',command='mc.toggle(state=False, localAxis=True)')
mc.frameLayout(label="Non T-Pose joint placer",bs="etchedOut",w=300,mw=5,cll=1,p=ruMainColumn)
mc.columnLayout(rs=5,adj=1)
mc.button(l="Create Helper Locator",c =ruCreateLocator)
mc.button(l="Create Joint on Helper Locator",c =ruCreateJointLocator)
mc.floatSliderGrp("ruJointRadius",en=1,label="Joint Radius",field=True,minValue=0,maxValue=5,fieldMinValue=0,fieldMaxValue=5,value=0.5,cw3=(70,30,10),dc=ruJointRadius)
mc.frameLayout(label="Fingers Utils",bs="etchedOut",w=300,mw=5,cll=1,p=ruMainColumn)
mc.columnLayout(rs=5,adj=1)
mc.floatSliderGrp("ruJointOrientation",en=1,label="Finger Orient",field=True,minValue=0,maxValue=5,fieldMinValue=0,fieldMaxValue=5,value=0.5,cw3=(70,30,10),dc=ruOrientJoint)
mc.frameLayout(label="Finger Renaming",bs="etchedOut",w=300,mw=5,cll=1)
mc.optionMenu('ruFinger',l='Choose finger')
mc.menuItem(l='Thumb')
mc.menuItem(l='Index')
mc.menuItem(l='Middle')
mc.menuItem(l='Ring')
mc.menuItem(l='Pinky')
mc.textFieldButtonGrp( label='Template string', text='', buttonLabel='Rename', bc=ruRenameFinger, cw3=[120,70,70],ct3=['left','left','left'],co3=[2,2,2] )
mc.showWindow(ruWin)
示例12: smoothEdgeLineUI
def smoothEdgeLineUI():
"""
Smooth Edge Line UI
"""
# Window
window = 'smoothEdgesUI'
if cmds.window(window, q=True, ex=1): cmds.deleteUI(window)
window = cmds.window(window, t='Smooth Edge Line', s=True)
# Layout
CL = cmds.columnLayout()
# UI Elements
cmds.intSliderGrp('smoothEdges_smoothISG', label='Smooth', field=True, minValue=1, maxValue=20, fieldMinValue=1,
fieldMaxValue=100, value=4)
cmds.floatSliderGrp('smoothEdges_falloffFSG', label='Falloff Distance', field=True, precision=3, minValue=0.0,
maxValue=10.0, fieldMinValue=0.0, fieldMaxValue=100.0, value=0.01)
cmds.checkBoxGrp('smoothEdges_edgeSpacingCBG', label='Maintain Edge Spacing', numberOfCheckBoxes=1, v1=False)
cmds.checkBoxGrp('smoothEdges_snapToOrigCBG', label='Maintain Shape', numberOfCheckBoxes=1,
v1=False) # columnWidth2=[100,165]
cmds.checkBoxGrp('smoothEdges_deleteHistoryCBG', label='Delete History', numberOfCheckBoxes=1, v1=False)
cmds.button('smoothEdgesB', l='Smooth', w=390, c='glTools.model.straightenVerts.smoothEdgeLineFromUI()')
# Show Window
cmds.window(window, e=True, wh=[392, 115])
cmds.showWindow(window)
示例13: setEditMode
def setEditMode(self, topJoint, endJoint, curveEdit=True ):
self.dragOn = False
endJoint = cmds.ls( endJoint, l=1 )[0]
jntChildren = cmds.listRelatives( topJoint, c=1, ad=1, f=1 )
jntChildren.append( topJoint )
jntChildren.reverse()
if not endJoint in jntChildren:
cmds.frameLayout( WinA_Global.frame, e=1, en=0 )
cmds.floatSliderGrp( WinA_Global.slider_joint, e=1, v=0 )
return False
index = jntChildren.index( endJoint )
self.jntH = jntChildren[:index+1]
self.numPoints = len( self.jntH )
cmds.intField( WinA_Global.num_original, e=1, v=self.numPoints )
cmds.floatSliderGrp( WinA_Global.slider_joint, e=1, v=0 )
self.editCurveByPosition()
self.setGlobalValue( self.getGlobalValue() )
return True
示例14: get_ui_values
def get_ui_values():
global engine_path, folder, file_name, export_batch, resolution_x, resolution_y, exposure, gamma, \
ray_number, time, seed, export_animation, start_frame, end_frame, export_normals, invert_normals, check_Z, materials
engine_path = cmds.textFieldButtonGrp(engine_field, query=True, text=True)
folder = cmds.textFieldButtonGrp(directory_field, query=True, text=True)
file_name = cmds.textFieldGrp(file_field, query=True, text=True)
export_batch = cmds.checkBoxGrp(batch_field, query=True, value1=True)
resolution_x = cmds.intFieldGrp(resolution_field, query=True, value1=True)
resolution_y = cmds.intFieldGrp(resolution_field, query=True, value2=True)
exposure = cmds.floatSliderGrp(exposure_field, query=True, value=True)
gamma = cmds.floatSliderGrp(gamma_field, query=True, value = True)
ray_number = cmds.intSliderGrp(rays_field, query=True, value=True)
seed = cmds.intSliderGrp(seed_field, query=True, value=True)
time = cmds.intSliderGrp(time_field, query=True, value=True)
export_animation = cmds.checkBoxGrp(animation_field, query=True, value1=True)
start_frame = cmds.intFieldGrp(frame_range_field, query=True, value1=True)
end_frame = cmds.intFieldGrp(frame_range_field, query=True, value2=True)
export_normals = cmds.checkBoxGrp(normals_export_field, query=True, value1=True)
invert_normals = cmds.checkBoxGrp(normals_invert_field, query=True, value1=True)
check_Z = cmds.checkBoxGrp(check_Z_field, query = True, value1=True)
materials = []
for mat in range(5):
materials.append(cmds.floatFieldGrp(eval('material_%i_field' % (mat)), query=True, value=True))
示例15: csMainWindow
def csMainWindow():
csWin = "CreateSkeleton"
if mc.window(csWin,q=True,ex=True):
mc.deleteUI(csWin)
mc.window(csWin,title = "Create Skeleton")
mc.scrollLayout(horizontalScrollBarThickness=16)
csMainCL = mc.columnLayout(columnAttach=("both",5),rowSpacing=10,columnWidth=320)
#GUIDES CREATION
csFL1 = mc.frameLayout(label="Create Guides",bs="etchedOut",w=300,mw=5,cll=1,p=csMainCL)
csCL1= mc.columnLayout(rs=5,adj=1,p=csFL1)
#Character Name
mc.textFieldGrp("csChName",l="Character Name",tx="")
#Number of Fingers/Toes
#mc.intSliderGrp("csFingersNumber",label="Number of Fingers",field=True,minValue=1,maxValue=5,fieldMinValue=1,fieldMaxValue=5,value=4,cw3=(100,30,10),dc=csSetFingersNumber)
#mc.checkBoxGrp("csHasThumb",numberOfCheckBoxes=1, label='Thumb?')
#mc.intSliderGrp("csToesNumber",label="Number of Toes",field=True,minValue=1,maxValue=5,fieldMinValue=1,fieldMaxValue=5,value=4,cw3=(100,30,10),dc=csSetToesNumber)
mc.button(l="Create Guides",c=csCreateGuides)
#Character Scale Slider
mc.floatSliderGrp("csScaleSlider",en=0,label="Guide scale",field=True,minValue=1,maxValue=100,fieldMinValue=1,fieldMaxValue=100,value=1,cw3=(70,30,10),dc=csScaleGuides)
#Character Mirror
mc.rowColumnLayout(nc=2,cw=[(1,138),(2,138)],p=csCL1);
mc.button(l="Mirror left << ",al="right",c = functools.partial(csMirrorGuide,"left"))
mc.button(l=">> Mirror right",al="left",c = functools.partial(csMirrorGuide,"right"));
#END GUIDES CREATION
#JOINTS CREATION
csFL2 = mc.frameLayout(label="Create Joints",bs="etchedOut",w=300,mw=5,cll=1,p=csMainCL)
csCL2 = mc.columnLayout(rs=5,adj=1,p=csFL2)
mc.button(l="Create Joints",c =csCreateJoints)
#floatSliderGrp -en 0 -label "THUMB Orient" -field true -minValue 0 -maxValue 180 -fieldMinValue 1 -fieldMaxValue 100 -value 0 -cw3 80 40 10 -dc csJointOrientX csJointXSlider;
#END JOINTS CREATION
mc.showWindow(csWin)