Pages

Friday 23 August 2019

Maya - get FramesPerSecond setting by script

Here is small script snippet to get Maya settinsg for Frames Per Second playback settings. This is actually not straightforward.

Here is example how to get this in python:

import maya.cmds as mc

framesRateInSecondStr = mc.currentUnit( q = True, time = True )
    framesRateInSecondOptions = { 'game':15, 'film':24, 'pal':25, 'ntsc':30, 'show':48, 'palf':50, 'ntscf':60 }
    if 'fps' in framesRateInSecondStr:
       
        fpsStr = framesRateInSecondStr.replace( 'fps', '' )
        framesRateInSecond = float( fpsStr )
       
    else:
       
        framesRateInSecond = framesRateInSecondOptions[framesRateInSecondStr]



1 comment:

palarabinovitz said...

Wynn casino review & ratings - JetVegas.com
For example, 강릉 출장마사지 Wynn Resorts offers the highest standard of gaming 광양 출장안마 for its Casino 구미 출장안마 games 양주 출장마사지 offer great casino promotions, while there's no 안양 출장마사지 limit to