• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python cmds.timeControl函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中maya.cmds.timeControl函数的典型用法代码示例。如果您正苦于以下问题:Python timeControl函数的具体用法?Python timeControl怎么用?Python timeControl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了timeControl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: _getStartAndEnd

def _getStartAndEnd():
    
    gPlayBackSlider = mm.eval('$temp=$gPlayBackSlider')
    if mc.timeControl(gPlayBackSlider, query=True, rangeVisible=True):
        start, end = mc.timeControl(gPlayBackSlider, query=True, rangeArray=True)
        return start, end-1
    return None, None
开发者ID:GuidoPollini,项目名称:MuTools,代码行数:7,代码来源:ml_copyAnim.py


示例2: plot

def plot():
	curves = mc.keyframe(q=1, sl=1, name=1)
	if type(curves).__name__ != 'NoneType':
		for curve in curves:
			indexes = mc.keyframe(curve, q=1, sl=1, iv=1)
			if len(indexes) != 1:
				startTime = int(mc.keyframe(curve, q=1, tc=1, index=tuple([indexes[0]]))[0])
				endTime = int(mc.keyframe(curve, q=1, tc=1, index=tuple([indexes[1]]))[0])
				mc.selectKey(cl=1)
				for point in range(startTime, endTime):
					mc.setKeyframe(curve, insert=1, time=point)
					mc.selectKey(curve, time=( (startTime+0.01), (endTime-0.01) ), add=1, k=1)
			else:
				mc.warning('Only one keyframe is selected for the curve ' + curve + '.')
	else:
		sels = mc.ls(sl=1)
		if sels:
			timeSlider = mm.eval('$tmp = $gPlayBackSlider')
			if mc.timeControl(timeSlider, q=1, rv=1) == 1:
				startTime = int(mc.timeControl(timeSlider, q=1, ra=1)[0])
				endTime = int(mc.timeControl(timeSlider, q=1, ra=1)[1])
			else:
				startTime = int(mc.playbackOptions(q=1, min=1))
				endTime = int(mc.playbackOptions(q=1, max=1))

			curves = mc.keyframe(q=1, name=1)
			for curve in curves:
				for point in range(startTime, endTime):
					mc.setKeyframe(curve, insert=1, time=point)
					mc.selectKey(curve, time=( (startTime+0.01), (endTime-0.01) ), add=1, k=1)
		else:
			mc.warning('Nothing is selected.')
开发者ID:atsbomb,项目名称:bombKey,代码行数:32,代码来源:bombKey.py


示例3: load

def load():
    '''loads animation environment'''
    print "loading animation environment presets..."
    #set autoKey
    cmds.autoKeyframe( state=True )
    #set 24fps and playback on all viewports
    cmds.playbackOptions(ps=1.0, v='all')
    #set unlimited undo's
    cmds.undoInfo( state=True, infinity=True )
    #set manipulator sizes
    if lib.checkAboveVersion(2014):
        cmds.manipOptions( r=False, hs=55, ls=4, sph=1 )
    else:
        cmds.manipOptions( r=False, hs=55, ls=4 )
    #set framerate visibility
    mel.eval("setFrameRateVisibility(1);")
    #gimbal rotation
    cmds.manipRotateContext('Rotate', e=True, mode=2)
    #world translation
    cmds.manipMoveContext('Move', e=True, mode=2)
    #time slider height
    aPlayBackSliderPython = mel.eval('$tmpVar=$gPlayBackSlider')
    cmds.timeControl(aPlayBackSliderPython, h=45, e=True);
    #special tick color
    cmds.displayRGBColor("timeSliderTickDrawSpecial", 1,0.5,0)

    #check if hotkeys have been set
    if (cmds.hotkey( 't', ctl=True, query=True, name = True)== 'CharacterAnimationEditorNameCommand'):
        print "Hotkeys have been previously loaded"
    else:
        setHotkeys('default')

    print "ENVIRONMENT SET\n", #the comma forces output on the status line
开发者ID:studiocoop,项目名称:maya-coop,代码行数:33,代码来源:animEnvironment.py


示例4: setActive

 def setActive(self):
     '''
     Set sound node as active on the timeSlider
     '''
     if self.isLoaded:
         gPlayBackSlider = mel.eval("string $temp=$gPlayBackSlider")
         cmds.timeControl(gPlayBackSlider, e=True, ds=1, sound=self.audioNode)
开发者ID:satishgoda,项目名称:Red9_StudioPack,代码行数:7,代码来源:Red9_Audio.py


示例5: doPlayblast

    def doPlayblast(self, camera):
        
        G.TU_movie              = None
        G.TU_audioFile          = None
        G.TU_audioOffsetSec     = None        
        winName                 = 'playblastWindow'
        overscan                = cmds.getAttr("%s.overscan"%camera)   
        audioTrack              = cmds.timeControl(G.playBackSliderPython, query=True, sound=True)
        rangeVisible            = cmds.timeControl(G.playBackSliderPython, query=True, rangeVisible=True )  
        widthHeight             = utilMod.getRenderResolution()  
        
        if cmds.window(winName, query=True, exists=True): cmds.deleteUI(winName)
        
        window                  = cmds.window(winName, widthHeight=widthHeight)
        form                    = cmds.formLayout()
        editor                  = cmds.modelEditor()
        column                  = cmds.columnLayout('true')
        
        cmds.formLayout( form, edit=True, attachForm=[(column, 'top', 0), (column, 'left', 0), (editor, 'top', 0), (editor, 'bottom', 0), (editor, 'right', 0)], attachNone=[(column, 'bottom'), (column, 'right')], attachControl=(editor, 'left', 0, column))
        cmds.modelEditor(editor, edit=True, camera=camera, activeView=True)
        cmds.showWindow( window )
        cmds.window( winName, edit=True, topLeftCorner=(0, 0), widthHeight=[200,200])        
        utilMod.cameraViewMode(editor)        
        cmds.setAttr("%s.overscan"%camera, 1)
        
        
        if rangeVisible:
            range = animMod.getTimelineRange(float=False)
            rFrom   = range[0]
            rTo     = range[1]-1
        else:
            rFrom = cmds.playbackOptions(query=True, minTime=True)
            rTo   = cmds.playbackOptions(query=True, maxTime=True)
        

        if G.currentStudio == None:
            G.TU_movie = cmds.playblast(format="qt", sound=audioTrack, startTime=rFrom ,endTime=rTo , viewer=1, showOrnaments=0, offScreen=True, fp=4, percent=50, compression="png", quality=70, widthHeight=widthHeight, clearCache=True)
            
        else:
            
            fps             = mel.eval("currentTimeUnitToFPS") 
            if audioTrack:
                G.TU_audioFile      = cmds.sound(audioTrack, query=True, file=True)
                audioOffset         = cmds.sound(audioTrack, query=True, offset=True)
                G.TU_audioOffsetSec = str((rFrom - audioOffset)/-fps)
                
            movieName       = cmds.playblast(format="image", startTime=rFrom ,endTime=rTo , viewer=0, showOrnaments=0, offScreen=True, fp=4, percent=50, compression="jpg", quality=70, widthHeight=widthHeight, clearCache=True)
            if movieName: 
                G.TU_movie           = "%s.%s-%s#.jpg"%(movieName.split(".")[0], int(rFrom), int(rTo))
                if audioTrack:  G.TU_audioOffsetSec = audioOffset
                self.playMovie(G.TU_movie, G.TU_audioFile, G.TU_audioOffsetSec)
            
        if cmds.window(winName, query=True, exists=True): cmds.deleteUI(winName)
        
        cmds.setAttr("%s.overscan"%camera, overscan)
        
        if not G.TU_movie: return
        save = aToolsMod.getUserPref("saveAfterPlayblasting", default=True)
        if save and not rangeVisible: cmds.file(save=True)
开发者ID:Italic-,项目名称:maya-prefs,代码行数:59,代码来源:tUtilities.py


示例6: restoreSettings

    def restoreSettings(self):
        '''
        restore all UI settings
        '''
        cmds.autoKeyframe(state=self.dataStore['autoKey'])

        # timeline management
        cmds.currentTime(self.dataStore['currentTime'])
        cmds.playbackOptions(min=self.dataStore['minTime'])
        cmds.playbackOptions(max=self.dataStore['maxTime'])
        cmds.playbackOptions(ast=self.dataStore['startTime'])
        cmds.playbackOptions(aet=self.dataStore['endTime'])
        cmds.playbackOptions(ps=self.dataStore['playSpeed'])
        cmds.playbackOptions(loop=self.dataStore['playLoop'])

        # unit management
        cmds.currentUnit(time=self.dataStore['timeUnit'])
        cmds.currentUnit(linear=self.dataStore['sceneUnits'])
        if not cmds.upAxis(axis=True, q=True) == self.dataStore['upAxis']:
            cmds.upAxis(axis=self.dataStore['upAxis'])

        log.debug('Restored PlayBack / Timeline setup')

        # viewport colors
        cmds.displayPref(displayGradient=self.dataStore['displayGradient'])
        cmds.displayRGBColor(resetToSaved=True)

        # objects colors
        cmds.displayColor("curve", self.dataStore['curvecolor'], dormant=True)

        # panel management
        for panel, data in self.dataStore['panelStore'].items():
            try:
                cmdString = data['settings'].replace('$editorName', panel)
                mel.eval(cmdString)
                log.debug("Restored Panel Settings Data >> %s" % panel)
                mel.eval('lookThroughModelPanel("%s","%s")' % (data['activeCam'], panel))
                log.debug("Restored Panel Active Camera Data >> %s >> cam : %s" % (panel, data['activeCam']))
            except:
                log.debug("Failed to fully Restore ActiveCamera Data >> %s >> cam : %s" % (panel, data['activeCam']))

        # camera management
        for cam, settings in self.dataStore['cameraTransforms'].items():
            try:
                cmds.setAttr('%s.translate' % cam, settings[0][0][0], settings[0][0][1], settings[0][0][2])
                cmds.setAttr('%s.rotate' % cam, settings[1][0][0], settings[1][0][1], settings[1][0][2])
                cmds.setAttr('%s.scale' % cam, settings[2][0][0], settings[2][0][1], settings[2][0][2])
                log.debug('Restored Default Camera Transform Data : % s' % cam)
            except:
                log.debug("Failed to fully Restore Default Camera Transform Data : % s" % cam)

        # sound management
        if self.dataStore['displaySound']:
            cmds.timeControl(self.gPlayBackSlider, e=True, ds=1, sound=self.dataStore['activeSound'])
            log.debug('Restored Audio setup')
        else:
            cmds.timeControl(self.gPlayBackSlider, e=True, ds=0)
        log.debug('Scene Restored fully')
        return True
开发者ID:markj3d,项目名称:Red9_StudioPack,代码行数:59,代码来源:Red9_General.py


示例7: getPlaybackRange

def getPlaybackRange():
	'''
	returns a 2-tuple of startTime, endTime.  The values are taken from the visible playback unless there is a time selection.
	If there is a time selection, then its range is returned instead
	'''
	if cmd.timeControl( 'timeControl1', q=True, rv=True ):  #NOTE: timeControl1 is the name of maya's default, global timeControl widget...
		return cmd.timeControl( 'timeControl1', q=True, range=True )

	return int( cmd.playbackOptions( q=True, min=True ) ), int( cmd.playbackOptions( q=True, max=True ) )
开发者ID:zethwillie,项目名称:zbw_python_tools,代码行数:9,代码来源:animClip.py


示例8: _getStartAndEnd

def _getStartAndEnd():
    '''
    Only return start and end if frame range is highlighted. Otherwise use all available animation.
    '''

    gPlayBackSlider = mm.eval('$temp=$gPlayBackSlider')
    if mc.timeControl(gPlayBackSlider, query=True, rangeVisible=True):
        start, end = mc.timeControl(gPlayBackSlider, query=True, rangeArray=True)
        return start, end-1
    return None, None
开发者ID:liudger,项目名称:ml_tools,代码行数:10,代码来源:ml_copyAnim.py


示例9: pin_control

def pin_control():
    # Rigging Dojo: 2016 v.2
    aPlayBackSliderPython = mel.eval('$tmpVar=$gPlayBackSlider')
    selection = cmds.ls(sl=True)
    selectionActive = cmds.timeControl(aPlayBackSliderPython, query=True, rangeVisible=True)
    selectedRange = cmds.timeControl(aPlayBackSliderPython, query=True, rangeArray=True)
    frameRange = range(*map(int, selectedRange))
    zeroStartKey = cmds.setKeyframe(selection, time=(selectedRange[0] - 1), id=True)  # zero the frames to base layer adjust as needed
    startTime = cmds.currentTime(selectedRange[0])  # makesure pose is from the start of the selection
    keyRange = cmds.setKeyframe(selection, time=frameRange)  # Set all the keys at the same time
    zeroEndKey = cmds.setKeyframe(selection, time=(selectedRange[1] + 1), id=True)  # zero the frames to base layer adjust as needed
开发者ID:Italic-,项目名称:maya-scripts,代码行数:11,代码来源:ita_snippet_collection.py


示例10: storeSettings

    def storeSettings(self):
        '''
        main work function, store all UI settings
        '''
        self.dataStore['autoKey'] = cmds.autoKeyframe(query=True, state=True)

        # timeline management
        self.dataStore['currentTime'] = cmds.currentTime(q=True)
        self.dataStore['minTime'] = cmds.playbackOptions(q=True, min=True)
        self.dataStore['maxTime'] = cmds.playbackOptions(q=True, max=True)
        self.dataStore['startTime'] = cmds.playbackOptions(q=True, ast=True)
        self.dataStore['endTime'] = cmds.playbackOptions(q=True, aet=True)
        self.dataStore['playSpeed'] = cmds.playbackOptions(query=True, playbackSpeed=True)
        self.dataStore['playLoop'] = cmds.playbackOptions(query=True, loop=True)

        # unit management
        self.dataStore['timeUnit'] = cmds.currentUnit(q=True, fullName=True, time=True)
        self.dataStore['sceneUnits'] = cmds.currentUnit(q=True, fullName=True, linear=True)
        self.dataStore['upAxis'] = cmds.upAxis(q=True, axis=True)

        # viewport colors
        self.dataStore['displayGradient'] = cmds.displayPref(q=True, displayGradient=True)

        # objects colors
        self.dataStore['curvecolor'] = cmds.displayColor("curve", q=True, dormant=True)

        # panel management
        self.dataStore['panelStore'] = {}
        for panel in ['modelPanel1', 'modelPanel2', 'modelPanel3', 'modelPanel4']:
            if not cmds.modelPanel(panel, q=True, exists=True):
                continue
            self.dataStore['panelStore'][panel] = {}
            self.dataStore['panelStore'][panel]['settings'] = cmds.modelEditor(panel, q=True, sts=True)
            activeCam = cmds.modelPanel(panel, q=True, camera=True)
            if not cmds.nodeType(activeCam) == 'camera':
                activeCam = cmds.listRelatives(activeCam, f=True)[0]
            self.dataStore['panelStore'][panel]['activeCam'] = activeCam

        # camera management
        # TODO : store the camera field of view etc also
        self.dataStore['cameraTransforms'] = {}
        for cam in ['persp', 'top', 'side', 'front']:
            try:
                self.dataStore['cameraTransforms'][cam] = [cmds.getAttr('%s.translate' % cam),
                                                     cmds.getAttr('%s.rotate' % cam),
                                                     cmds.getAttr('%s.scale' % cam)]
            except:
                log.debug("Camera doesn't exists : %s" % cam)

        # sound management
        self.dataStore['activeSound'] = cmds.timeControl(self.gPlayBackSlider, q=True, s=1)
        self.dataStore['displaySound'] = cmds.timeControl(self.gPlayBackSlider, q=True, ds=1)
开发者ID:markj3d,项目名称:Red9_StudioPack,代码行数:52,代码来源:Red9_General.py


示例11: _getTime

def _getTime(type):
	timeSlider = mm.eval('$tmp = $gPlayBackSlider')

	if type == 'playbackMin':
		return mc.playbackOptions(q=1, min=1)
	elif type == 'playbackMax':
		return mc.playbackOptions(q=1, max=1)
	elif type == 'rangeSelected':
		return mc.timeControl(timeSlider, q=1, rv=1)
	elif type == 'rangeMin':
		return mc.timeControl(timeSlider, q=1, ra=1)[0]
	elif type == 'rangeMax':
		return mc.timeControl(timeSlider, q=1, ra=1)[1]
开发者ID:atsbomb,项目名称:bombKey,代码行数:13,代码来源:bombKey.py


示例12: scrubbingUndo

def scrubbingUndo(onOff):

    G.playBackSliderPython = G.playBackSliderPython or mel.eval('$aTools_playBackSliderPython=$gPlayBackSlider')
    pc = "from maya import cmds;"
    rc = "from maya import cmds;"
    
    if not onOff:
        pc += "cmds.undoInfo(stateWithoutFlush=False); "
        rc += "cmds.undoInfo(stateWithoutFlush=True); "
    
    pc += "cmds.timeControl('%s',edit=True,beginScrub=True)"%G.playBackSliderPython
    rc += "cmds.timeControl('%s',edit=True,endScrub=True)"%G.playBackSliderPython
    
    cmds.timeControl( G.playBackSliderPython, edit=True, pressCommand=pc, releaseCommand=rc)    
开发者ID:Italic-,项目名称:maya-prefs,代码行数:14,代码来源:commandsMod.py


示例13: openFile

def openFile():
   """
   Function to open a new wav file into the scene. 
   
   Creates a new Maya sound node and changes the timeslider to use the audio for playback while scrubbing.
   
   Prepares the wav file for reading audio data.
   
   Adjusts the UI to display the current audio parameters and progress bar for the new track.
   """
   global wavFile, params, frames
   
   #open file dialog
   fileNameList = cmds.fileDialog2(cap="Choose Audio File...", ff="*.wav", fm=4, ds=2, okc="Open")
   
   #convert result from dialog box to a useable string
   fileName = str(fileNameList[0])   
   
   #load the file name into the info text area in the UI
   cmds.text('currentAudioPath', edit=True, label="Currently Loaded: "+fileName)
   
   #delete any existing audio nodes
   if(cmds.objExists('audio')):
      cmds.select('audio')
      cmds.delete()
   
   #create a new sound node
   cmds.sound(f=fileName, n="audio")
   
   #set the 'audio' node to be the audio for the timeline.
   #--------- code from documentation starts here ------------#
   gPlayBackSlider = mel.eval( '$tmpVar=$gPlayBackSlider' )
   cmds.timeControl( gPlayBackSlider, edit=True, sound='audio', displaySound=True)
   #--------- code from documentation ends here -------------#
   
   #set the playback range to the range of the audio
   cmds.playbackOptions(min=0, aet=(cmds.getAttr('audio.duration')), max=(cmds.getAttr('audio.duration')))
   
   #------- set up the stream -------#
   wavFile = wave.open(fileName)   
   params = wavFile.getparams()   
   frames = wavFile.readframes(params[3])
   
   #update the info text with the audio parameters.
   cmds.text('currentParams', edit=True, label=str(params))
   
   #set the max of the progress bar to the number of audio frames in the selected track
   cmds.progressBar('progress', edit=True, maxValue = params[3])
   
   print "Result: ",fileName, "has been loaded."
开发者ID:pmatev,项目名称:NCCA_audio_driven_keys,代码行数:50,代码来源:audio_keys.py


示例14: updateFrameRange

 def updateFrameRange(self, all=False):
     
     rangeVisible            = cmds.timeControl(G.playBackSliderPython, query=True, rangeVisible=True )
     
     if not rangeVisible or all:
         range = [cmds.playbackOptions(query=True, minTime=True), cmds.playbackOptions(query=True, maxTime=True)+1]
     else:            
         range = cmds.timeControl(G.playBackSliderPython, query=True, rangeArray=True)
         #range[1] -= 1            
             
     self.firstFrame         = range[0]
     self.lastFrame          = range[1]-1
     
     self.updateSortedRange()
     self.updateCameraMatrices()
开发者ID:Italic-,项目名称:maya-prefs,代码行数:15,代码来源:motionTrail.py


示例15: parse_active_scene

def parse_active_scene():
    """Parse active scene for arguments for capture()

    *Resolution taken from render settings.

    """

    time_control = mel.eval("$gPlayBackSlider = $gPlayBackSlider")

    return {
        "start_frame": cmds.playbackOptions(minTime=True, query=True),
        "end_frame": cmds.playbackOptions(maxTime=True, query=True),
        "width": cmds.getAttr("defaultResolution.width"),
        "height": cmds.getAttr("defaultResolution.height"),
        "compression": cmds.optionVar(query="playblastCompression"),
        "filename": (cmds.optionVar(query="playblastFile")
                     if cmds.optionVar(query="playblastSaveToFile") else None),
        "format": cmds.optionVar(query="playblastFormat"),
        "off_screen": (True if cmds.optionVar(query="playblastOffscreen")
                       else False),
        "show_ornaments": (True if cmds.optionVar(query="playblastShowOrnaments")
                       else False),
        "quality": cmds.optionVar(query="playblastQuality"),
        "sound": cmds.timeControl(time_control, q=True, sound=True) or None
    }
开发者ID:Bumpybox,项目名称:pyblish-bumpybox,代码行数:25,代码来源:capture.py


示例16: setTimelineRange

 def setTimelineRange(self, range=None, *args):  
        
     rangeVisible            = cmds.timeControl( G.playBackSliderPython, query=True, rangeVisible=True )
     
     if not rangeVisible and not range:
         range = [cmds.playbackOptions(query=True, minTime=True), cmds.playbackOptions(query=True, maxTime=True)+1]
     
     if range or rangeVisible:
   
         if not range: range = animMod.getTimelineRange(float=False)
         rFrom   = range[0]
         rTo     = range[1]-1
         
         cmds.playbackOptions(minTime=rFrom, maxTime=rTo)
         
         
         if self.getTimelineRanges() != None: 
             ranges = eval(self.getTimelineRanges()) 
         else: 
             ranges = []
         if not range in ranges:
             ranges.append(range)     
             aToolsMod.saveInfoWithScene(STORE_NODE, RANGE_ATTR, ranges) 
             
     
     utilMod.deselectTimelineRange()
开发者ID:Italic-,项目名称:maya-prefs,代码行数:26,代码来源:tUtilities.py


示例17: qeury_active_sound_node

def qeury_active_sound_node():
    aPlayBackSliderPython = mel.eval('$tmpVar=$gPlayBackSlider')
    sound = cmds.timeControl(aPlayBackSliderPython, q=1, s=1)
    if sound:
        return sound
    else:
        return None
开发者ID:liorbenhorin,项目名称:pipeline,代码行数:7,代码来源:maya_warpper.py


示例18: blast

def blast(*args):
    """Playblast and settings. Change to your liking."""
    fileNameLong = cmds.file(query=True, sceneName=True, shortName=True)

    if fileNameLong == "":
        fileNameLong = "untitled"
    else:
        fileNameLong = cmds.file(query=True, sceneName=True, shortName=True)

    fileNameShort = fileNameLong.split(".")

    TimeRange = mel.eval('$tmpVar=$gPlayBackSlider')
    SoundNode = cmds.timeControl(TimeRange, query=True, sound=True)

    # Disable 2D Pan & Zoom in current viewport
    activepanel = cmds.getPanel(withFocus=True)
    cam = cmds.modelEditor(activepanel, query=True, camera=True)
    # camShape = cmds.listRelatives(cam, shapes=True)[0]
    cmds.setAttr(cam + '.panZoomEnabled', False)

    if cmds.ls(renderResolutions=True):
        ResX = cmds.getAttr("defaultResolution.width")
        ResY = cmds.getAttr("defaultResolution.height")

        cmds.playblast(
            filename=("movies/" + fileNameShort[0] + ".mov"),
            forceOverwrite=True, format="qt", compression="png",
            offScreen=True, width=ResX, height=ResY, quality=100,
            percent=100, sound=SoundNode
        )
    else:
        cmds.error("No resolution data in file. \
                    Please set resolution and save.")
开发者ID:Italic-,项目名称:maya-prefs,代码行数:33,代码来源:ita_DefaultCameraChecker.py


示例19: frameRange

def frameRange(start=None, end=None):
    '''
    Returns the frame range based on the highlighted timeslider,
    or otherwise the playback range.
    '''
    
    if not start and not end:
        gPlayBackSlider = mm.eval('$temp=$gPlayBackSlider')
        if mc.timeControl(gPlayBackSlider, query=True, rangeVisible=True):
            frameRange = mc.timeControl(gPlayBackSlider, query=True, rangeArray=True)
            return frameRange
        else:
            start = mc.playbackOptions(query=True, min=True)
            end = mc.playbackOptions(query=True, max=True)
    
    return start,end
开发者ID:Bumpybox,项目名称:Tapp,代码行数:16,代码来源:ml_utilities.py


示例20: channelbox_command_syncTimeline

def channelbox_command_syncTimeline(box, menuItem, key, *args):
    with sysCmd.Undo(0):
        state = channelBox_Checkbox_Update(box, key, menuItem)
        playback_slider = mel.eval("$tmpVar=$gPlayBackSlider")  # gets timeslider name
        if state:
            cmds.timeControl(playback_slider, e=1, showKeys=box.channelbox)
            cmds.timeControl(playback_slider, e=1, showKeysCombined=1)
        else:
            cmds.timeControl(playback_slider, e=1, showKeysCombined=0)
            cmds.timeControl(playback_slider, e=1, showKeys="active")
开发者ID:Vaei,项目名称:ModularChannelBox,代码行数:10,代码来源:jtChannelBox_Commands_Default.py



注:本文中的maya.cmds.timeControl函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python cmds.timerX函数代码示例发布时间:2022-05-27
下一篇:
Python cmds.textScrollList函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap