本文整理汇总了Python中maya.cmds.intSliderGrp函数的典型用法代码示例。如果您正苦于以下问题:Python intSliderGrp函数的具体用法?Python intSliderGrp怎么用?Python intSliderGrp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了intSliderGrp函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: 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))
开发者ID:B-Rich,项目名称:zenphoton,代码行数:27,代码来源:export_hqz_maya25.py
示例2: randomize
def randomize(args):
'''
Randomizes the hue, saturation and value for both the start
and the end of the colour range.
args: Dummy argument needed to satisfy the command interface.
On exit: Random values for hue, saturation and value have been
picked for both the start and the end of the colour range. The
canvases and the sliders have been updated accordingly.
'''
rhue1 = random.randint(0,360)
rsaturation1 = random.uniform(0,1)
rvalue1 = random.uniform(0,1)
rhue2 = random.randint(0,360)
rsaturation2 = random.uniform(0,1)
rvalue2 = random.uniform(0,1)
cmds.intSliderGrp("hue1", edit = True, value = rhue1)
cmds.floatSliderGrp("saturation1", edit = True, value = rsaturation1)
cmds.floatSliderGrp("value1", edit = True, value = rvalue1)
cmds.canvas("hueCanvas1", edit = True, hsvValue = (rhue1,1,1))
cmds.canvas("saturationCanvas1", edit = True, hsvValue = (rhue1, rsaturation1,1))
cmds.canvas("valueCanvas1", edit = True, hsvValue = (rhue1, rsaturation1,rvalue1))
cmds.intSliderGrp("hue2", edit = True, value = rhue2)
cmds.floatSliderGrp("saturation2", edit = True, value = rsaturation2)
cmds.floatSliderGrp("value2", edit = True, value = rvalue2)
cmds.canvas("hueCanvas2", edit = True, hsvValue = (rhue2,1,1))
cmds.canvas("saturationCanvas2", edit = True, hsvValue = (rhue2, rsaturation2,1))
cmds.canvas("valueCanvas2", edit = True, hsvValue = (rhue2, rsaturation2,rvalue2))
开发者ID:hcbsundberg,项目名称:City_Generator,代码行数:28,代码来源:cityGui.py
示例3: myCube
def myCube():
myCubeWidth = mc.intSliderGrp( cubW, q=True, v=True )
myCubeHigth = mc.intSliderGrp( cubH, q=True, v=True )
myCubeDepth = mc.intSliderGrp( cubD, q=True, v=True )
# ch stands for construction history
finalCube = mc.polyCube( w=myCubeWidth, h=myCubeHigth, d=myCubeDepth, n="myCube#", ch=False )
mc.move( 0,myCubeHigth/2.0,0, finalCube, relative=True )
开发者ID:arpisab,项目名称:Maya,代码行数:7,代码来源:07_makeWindowInterface_SliderField.py
示例4: generate
def generate(cls, *args):
components = []
width = cmds.intSliderGrp(cls.get_prefix() + Labels["width_label"], query=True, value=True)
height = cmds.intSliderGrp(cls.get_prefix() + Labels["height_label"], query=True, value=True)
depth = cmds.intSliderGrp(cls.get_prefix() + Labels["depth_label"], query=True, value=True)
rgb = cmds.colorSliderGrp(cls.get_prefix() + Labels["color_label"], query=True, rgbValue=True)
block_width = width * Constants["block_width_unit"]
block_height = height * Constants["block_height_unit"]
block_depth = depth * Constants["block_depth_unit"]
#stubs
for x in range(0, width):
for z in range(0, depth):
stub = cmds.polyCylinder(name=get_unique_name(cls.get_prefix(), "Stub"), radius=Constants["stub_radius"], height = Constants["stub_height"])
components.append(stub[0])
cmds.move(Constants["block_width_unit"] * x + half(Constants["block_width_unit"]), half(Constants["block_height_unit"]) * height + half(Constants["stub_height"]), Constants["block_depth_unit"] * z + half(Constants["block_depth_unit"]), stub[0])
cube = cmds.polyCube(name=get_unique_name(cls.get_prefix(), "block"), width=block_width, height=block_height, depth=block_depth)
components.append(cube[0])
cmds.move(half(width * Constants["block_width_unit"]), 0, half(depth * Constants["block_depth_unit"]), cube)
if components.count > 1:
final = cmds.polyUnite(components, name=get_unique_name(cls.get_prefix(), ""))
else:
final = components[0]
shader = cmds.shadingNode('blinn', asShader=True, name=get_unique_name(cls.get_prefix(),"mat"))
cmds.setAttr(shader + ".color", rgb[0],rgb[1],rgb[2], type='double3')
cmds.select(final[0], r=True)
cmds.hyperShade(assign=shader)
开发者ID:JakeCataford,项目名称:3dcg-tutorials,代码行数:30,代码来源:LegoBuilder.py
示例5: __init__
def __init__(self) :
# get the currently selected objects and make sure we have only one object
selected = OM.MSelectionList()
OM.MGlobal.getActiveSelectionList(selected)
self.selectedObjects = []
selected.getSelectionStrings(self.selectedObjects)
if len(self.selectedObjects) == 0 :
cmds.confirmDialog( title='No objects Selected', message='Select a Mesh Object', button=['Ok'], defaultButton='Ok', cancelButton='Ok', dismissString='Ok' )
elif len(self.selectedObjects) > 1 :
cmds.confirmDialog( title='Select One Object', message='Only One Mesh mat be exported at a time', button=['Ok'], defaultButton='Ok', cancelButton='Ok', dismissString='Ok' )
# now we have the correct criteria we can proceed with the export
else :
# get the start and end values for our UI sliders
anim=OMA.MAnimControl()
minTime=anim.minTime()
maxTime=anim.maxTime()
self.m_start=int(minTime.value())
self.m_end=int(maxTime.value())
# now we create a window ready to populate the components
self.m_window = cmds.window( title='NCCA Pointbake Export' )
# create a layout
cmds.columnLayout()
# create two sliders for start and end we also attach methods to be called when the slider
# changes
self.m_startSlider=cmds.intSliderGrp( changeCommand=self.startChanged,field=True, label='Start Frame', minValue=self.m_start, maxValue=self.m_end, fieldMinValue=self.m_start, fieldMaxValue=self.m_end, value=self.m_start )
self.m_endSlider=cmds.intSliderGrp( changeCommand=self.endChanged ,field=True, label='End Frame', minValue=self.m_start, maxValue=self.m_end, fieldMinValue=self.m_end, fieldMaxValue=self.m_end, value=self.m_end )
# create a button and add the method called when pressed
cmds.button( label='Export', command=self.export )
# finally show the window
cmds.showWindow( self.m_window )
开发者ID:NCCA,项目名称:NGL6Demos,代码行数:30,代码来源:NCCAPointBakeMayaExport.py
示例6: 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)
开发者ID:docwhite,项目名称:LSystemsMaya,代码行数:25,代码来源:gui.py
示例7: 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)
开发者ID:bennymuller,项目名称:glTools,代码行数:26,代码来源:straightenVerts.py
示例8: unfoldBand_window
def unfoldBand_window():
"""
This definition creates the 'Unfold Band' main window.
"""
cmds.windowPref(enableAll=False)
if (cmds.window("unfoldBand_window", exists=True)):
cmds.deleteUI("unfoldBand_window")
cmds.window("unfoldBand_window",
title="Unfold Band",
width=384)
spacing = 5
cmds.columnLayout(adjustableColumn=True, rowSpacing=spacing)
cmds.separator(height=10, style="singleDash")
cmds.intSliderGrp("divisions_intSliderGrp", label="Divisions", field=True, minValue=0, maxValue=10, fieldMinValue=0, fieldMaxValue=65535, value=2)
cmds.separator(style="single")
cmds.columnLayout(columnOffset=("left", 140))
cmds.checkBox("keepConstructionHistory_checkBox", label="Keep Construction History", v=True)
cmds.setParent(topLevel=True)
cmds.separator(height=10, style="singleDash")
cmds.button("unfoldBand_button", label="Unfold Band!", command=unfoldBand_button_OnClicked)
cmds.showWindow("unfoldBand_window")
cmds.windowPref(enableAll=True)
开发者ID:elanifegnirf,项目名称:Snippets,代码行数:35,代码来源:unfoldBand.py
示例9: update
def update(*args) :
# blindly update the settings and prepare everything other than the main loop itself
distribution=cmds.intSliderGrp('distribution', q=True, value=True)
samples=cmds.intSliderGrp('samples', q=True, value=True)
budChance=cmds.floatSliderGrp('budChance', q=True, value=True)
branchChance=cmds.floatSliderGrp('branchChance', q=True, value=True)
leafChance=cmds.floatSliderGrp('leafChance', q=True, value=True)
minStep=cmds.floatSliderGrp('minStep', q=True, value=True)
maxStep=cmds.floatSliderGrp('maxStep', q=True, value=True)
steps=cmds.intSliderGrp('steps', q=True, value=True)
quadratic=cmds.checkBoxGrp('quadratic', q=True, v1=True)
branchThick=cmds.floatSliderGrp('branchThick', q=True, value=True)
leafSize=cmds.floatSliderGrp('leafSize', q=True, value=True)
cmds.setAttr('fabricVegetation.distribution', distribution)
cmds.setAttr('fabricVegetation.samples', samples)
cmds.setAttr('fabricVegetation.budChance', budChance)
cmds.setAttr('fabricVegetation.branchChance', branchChance)
cmds.setAttr('fabricVegetation.leafChance', leafChance)
cmds.setAttr('fabricVegetation.minStep', minStep)
cmds.setAttr('fabricVegetation.maxStep', maxStep)
cmds.setAttr('fabricVegetation.steps', steps)
cmds.setAttr('fabricVegetation.quadratic', quadratic)
cmds.setAttr('fabricVegetation.branchThick', branchThick)
cmds.setAttr('fabricVegetation.leafSize', leafSize)
开发者ID:bungnoid,项目名称:FabricVegetation,代码行数:27,代码来源:FabricVegetation.py
示例10: 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)
开发者ID:bennymuller,项目名称:glTools,代码行数:26,代码来源:straightenVerts.py
示例11: bulge_button
def bulge_button( self, *args ):
if( cmds.objExists( "ZBend" ) ):
cmds.confirmDialog( title="Error", message="First delete the bulge history on the previously\ndeformed object before bulging another.", button="Okie Dokie" )
return 0
latestSelection = cmds.ls( selection=True )
if( len( latestSelection ) == 0 ):
return 0
if( len( latestSelection ) == 1 ):
self.relatives = cmds.listRelatives( children=True )
if( len(self.relatives) == 1 ):
self.bbox = cmds.exactWorldBoundingBox( latestSelection )
cmds.nonLinear( type='bend', curvature=cmds.intSliderGrp( "x_bulge_slider", value=True, query=True ) )
cmds.rename( "XBend" )
cmds.move((self.bbox[0] + self.bbox[3])/2, self.bbox[1], (self.bbox[2] + self.bbox[5])/2, "XBend", rpr=True )
cmds.setAttr( "XBend.rotateZ", -90 )
cmds.select( latestSelection )
cmds.nonLinear( type='bend', curvature=cmds.intSliderGrp( "z_bulge_slider", value=True, query=True ) )
cmds.rename( "ZBend" )
cmds.move((self.bbox[0] + self.bbox[3])/2, self.bbox[1], (self.bbox[2] + self.bbox[5])/2, "ZBend", rpr=True )
cmds.setAttr( "ZBend.rotateZ", -90 )
cmds.setAttr( "ZBend.rotateX", 90 )
cmds.connectControl( "x_bulge_slider", "bend1.curvature" )
cmds.connectControl( "z_bulge_slider", "bend2.curvature" )
cmds.select( latestSelection )
开发者ID:cwilmot,项目名称:maya-bulge-deformer-tool,代码行数:30,代码来源:MayaBulgeTool.py
示例12: windowUI
def windowUI(*args):
if cmds.window("windowUI", exists=True):
cmds.deleteUI("windowUI")
cmds.window("windowUI", title="Bedazzler", resizeToFitChildren = True, sizeable = False)
# base object layout
cmds.frameLayout(label = "General", collapsable=False, mw=5, mh=5)
cmds.rowColumnLayout(nc=3, cal=[(1,"right")], cw=[(1,80),(2,200),(3,95)])
cmds.text(l="Base Object: ")
cmds.textField("baseObject")
cmds.button("baseObjectButton", l="Select", c=selectBaseObjectButton)
cmds.setParent("..")
cmds.separator(h=10, st='in')
# # info button
# cmds.button("infoButton", l="INFO", w=75, al="center", c=infoButton)
# reset button
cmds.button("resetButton", l="Reset Values", w=75, al="center", c=windowUI)
# size
cmds.rowColumnLayout(w=380)
cmds.floatSliderGrp("size", l="Gem Size: ", v=.25, min=0.001, max=1.0, f=True,w=370,pre=3)
# padding
cmds.rowColumnLayout(w=380)
cmds.floatSliderGrp("padding", l="Spacing: ", v=0, min=0.0, max=1.0, f=True,w=370,pre=3)
cmds.rowColumnLayout(w=380)
cmds.floatSliderGrp("overlap", l="Overlap Tolerance: ", v=0, min=0.0, max=1.0, f=True,w=370,pre=3)
cmds.separator(h=10, st='in')
#smoothe
cmds.rowColumnLayout(w=380)
cmds.floatSliderGrp("smoothe", l="Smooth mesh: ", v=0, min=0.0, max=1.0, f=True,w=370,pre=3)
# reduce mesh
cmds.rowColumnLayout(w=380)
cmds.intSliderGrp("meshReduce", l="% to reduce mesh: ", v=0, min=0, max=100, f=True,w=370)
#shade
cmds.checkBox("shaderCheckBox", l='Include shader', value=False)
# # text
# cmds.text(l='\nINFO\n', w=370, ww=True)
# cmds.text(l='The algorithm works best on objects with planar quads that are not too small in any one dimension.\n', w=370, al = 'left', ww=True)
# cmds.text(l='If your mesh has a lot of fine geometry, it is recommended that you use a poly-reduced mesh using the slider above. This will not modify your original geometry.', w=370, al = 'left', ww=True)
cmds.separator(h=10, st='in')
# bedazzle button
cmds.button("bedazzleButton", l="~*~BEDAZZLE~*~", w=370, h = 40, al="center", bgc=[0.14,0.94,0.86], c=bedazzleButton)
cmds.showWindow("windowUI")
开发者ID:ahamburger,项目名称:bedazzler,代码行数:59,代码来源:gui.py
示例13: byNumSpansCmd
def byNumSpansCmd(self, *args ):
value = cmds.checkBox( self._byNumSpans, q=1, v=1 )
if value:
cmds.intSliderGrp( self._outerNumCurve, e=1, en=0 )
else:
cmds.intSliderGrp( self._outerNumCurve, e=1, en=1 )
开发者ID:jonntd,项目名称:mayadev-1,代码行数:8,代码来源:volume.py
示例14: main
def main(self, *args):
'''
This method will be the main function of the tool letting the
user generate random values for the color set 2.
'''
selected_obj = cmds.ls(selection=True)
#Warning message for no selection
if not selected_obj:
cmds.confirmDialog(
title="Error Message",
message="No objects selected. Must select one object!",
button="Accept"
)
return False
color_sets = cmds.polyColorSet(query=True, allColorSets=True)
#Warning message for no current color sets
if not color_sets:
cmds.confirmDialog(
title="Error Message",
message="Must create color set two!",
button="Accept"
)
return False
#If statement generates random values based on the users input for Minimum and Maximum sliders
if "colorSet2" in color_sets:
for index in xrange(cmds.polyEvaluate(selected_obj[0], vertex=True)):
#slider values
min_value = cmds.intSliderGrp("minimum", query=True, value=True)
max_value = cmds.intSliderGrp("maximum", query=True, value=True)
generate_value = rand.randint(min_value, max_value)
color_value = generate_value/100.00
color_set = cmds.polyColorPerVertex(
"{object}.vtx[{number}]".format(object=selected_obj[0], number=index),
rgb=( color_value, color_value, color_value)
)
#Error Message if colorSet2 does not exist
else:
cmds.confirmDialog(
title="Error Message",
message="Must create color set two!",
button="Accept"
)
return False
开发者ID:firstPeterParker,项目名称:mlRig,代码行数:58,代码来源:colorSetScript.py
示例15: brickHeightToggle
def brickHeightToggle():
flatBrick = cmds.checkBox('flatBrickCheck', query = True, value = True)
if( flatBrick == True ):
cmds.intSliderGrp( 'brickHeight', edit = True, value = 1, enable = False)
cmds.radioButtonGrp( 'brickHoleOptions', edit = True, select = 3, enable = False)
elif( flatBrick == False ):
cmds.intSliderGrp( 'brickHeight', edit = True, enable = True )
cmds.radioButtonGrp( 'brickHoleOptions', edit = True, enable = True)
开发者ID:stephonatron,项目名称:LegoTechnicGenerator,代码行数:9,代码来源:LegoTechnicGenerator.py
示例16: tf_buttonCmd
def tf_buttonCmd():
#set the selection type for the selectedJoint array to joint only...
selectedJoint = cmds.ls(selection=True, type='joint')
#if we've selected any joints
if len(selectedJoint) > 0:
#do all of this stuff...
colorIndex = cmds.colorIndexSliderGrp( colorSlider, query = True, value = True)
dummySizeW = cmds.intSliderGrp(sizeSliderW, query = True, value = True)
dummySizeD = cmds.intSliderGrp(sizeSliderD, query = True, value = True)
subdivs = cmds.radioButtonGrp(dummyRadio, query= True, sl= True)
#check if we have the prefix enabled
if cmds.checkBox(lockPrefixText, query= True, value = True) == 1 :
prefix = cmds.textField(dummyPrefix, query = True, tx= True)
else:
prefix = ""
#check if we have the suffix text enabled
if cmds.checkBox(lockSuffixText, query= True, value = True) == 1 :
suffix = cmds.textField(dummySuffix, query = True, tx= True)
else:
suffix = ""
allDisplayLayers = cmds.ls(type = 'displayLayer')
dummyLayer = 'DummyLayer'
#check if we have the DummyLayer
doLayer = tf_findDupeLayer(dummyLayer,allDisplayLayers)
#if not... make it
if doLayer == 0:
tf_createLayer(dummyLayer, colorIndex)
#if they want joint and all children
if cmds.radioButtonGrp( jointRadio, query=True, sl=True ) == 1 :
allDescendants_SA = tf_listChain( selectedJoint )
#do the dummy on the root joint
tf_doTheDummy( selectedJoint[0], colorIndex, dummySizeW, dummySizeD, subdivs, prefix, suffix)
#now iterate through the whole joint chain
for eachJoint in allDescendants_SA:
tf_doTheDummy( eachJoint, colorIndex, dummySizeW, dummySizeD, subdivs, prefix, suffix)
#if they want selected joint
if cmds.radioButtonGrp( jointRadio, query=True, sl=True ) == 2:
tf_doTheDummy( selectedJoint[0], colorIndex, dummySizeW, dummySizeD, subdivs, prefix, suffix)
#if we don't have any selected joints... return warning to console
else:
cmds.warning("Select joint(s) then press 'Create'")
开发者ID:Mayagician,项目名称:tf_dummyCharacter,代码行数:55,代码来源:tf_dummyCharacter.py
示例17: actionBtnCmd
def actionBtnCmd(self, intSliderGrp1, intSliderGrp2, checkbox1, *args):
multipleFilters = "Maya Files (*.ma *.mb);;Maya ASCII (*.ma);;Maya Binary (*.mb)"
outputFile = cmds.fileDialog2(fileFilter=multipleFilters,
fileMode=0,
dialogStyle=2,
caption="Save Output File As")[0]
gridSpacing = cmds.intSliderGrp(intSliderGrp1, query=True, value=True)
gridWidth = cmds.intSliderGrp(intSliderGrp2, query=True, value=True)
createInstructions = cmds.checkBox(checkbox1, query=True, value=True)
cmds.deleteUI(self.window, window=True)
exporter = bamboo.exporter.Exporter(gridSpacing, gridWidth, createInstructions)
exporter.export(outputFile)
开发者ID:rich-nguyen,项目名称:bamboo-workshop,代码行数:13,代码来源:ui.py
示例18: changeMinHeight
def changeMinHeight(args):
'''
Changes the minimum house height if it is larger than the maximum house height.
args: Dummy argument needed to satisfy the command interface.
On exit: If the value of "minHeight" was larger than the value of
"maxHeight", "minHeight" has been changed to have the same value
as "maxHeight".
'''
minHeight = cmds.intSliderGrp("minHeight", query = True, value = True)
maxHeight = cmds.intSliderGrp("maxHeight", query = True, value = True)
if minHeight > maxHeight:
cmds.intSliderGrp("minHeight", edit = True, value = maxHeight)
开发者ID:hcbsundberg,项目名称:City_Generator,代码行数:13,代码来源:cityGui.py
示例19: changeMinWidth
def changeMinWidth(args):
'''
Changes the minimum house width so that it is at least 10 units smaller
than the maximum house height.
args: Dummy argument needed to satisfy the command interface.
On exit: If the value of "minWidth" was less than ten units smaller than
the value of "maxWidth", "minWidth" has been changed to be ten
units smalle than "maxWidth"
'''
minWidth = cmds.intSliderGrp("minWidth", query = True, value = True)
maxWidth = cmds.intSliderGrp("maxWidth", query = True, value = True)
if minWidth > (maxWidth - 10):
cmds.intSliderGrp("minWidth", edit = True, value = maxWidth - 10)
开发者ID:hcbsundberg,项目名称:City_Generator,代码行数:14,代码来源:cityGui.py
示例20: keyDown
def keyDown(*args):
selected = cmds.ls(sl=1, dag=1)
if not selected:
cmds.error("Please select an animatable object")
return
distance = cmds.intSliderGrp('distance', query=True, value=True)
key_rate = cmds.intSliderGrp('key_rate', query=True, value=True)
currentTime = cmds.currentTime(query=True)
cmds.currentTime(currentTime + key_rate, edit=True)
cmds.move(0, 0, distance, r=True)
cmds.setKeyframe()
开发者ID:andy-walker,项目名称:pacman-3d,代码行数:14,代码来源:pacTools.py
注:本文中的maya.cmds.intSliderGrp函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论