Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
appwiki:deadline [2019/04/25 02:51]
ying [Get Submission Info]
appwiki:deadline [2019/04/26 03:07] (current)
ying [Get Submission Info]
Line 66: Line 66:
 </​code>​ </​code>​
   * other maya info <code python>   * other maya info <code python>
-renderer = cmds.getAttr('​defaultRenderGlobals.currentRenderer'​)+# current renderer 
 +renderer = cmds.getAttr('​defaultRenderGlobals.currentRenderer'​) # arnold 
 +# current render layer 
 +currentRenderLayer = cmds.editRenderLayerGlobals(q=1,​ currentRenderLayer=1) 
 +# render animation?​ 
 +render_animation = cmds.getAttr("​defaultRenderGlobals.animation"​) # true 
 + 
 +# Get frame list 1-3 style 
 +frameList = str( int(cmds.currentTime(q=1)) ) 
 +if render_animation:​ 
 +    fromFrame = int( cmds.getAttr('​defaultRenderGlobals.startFrame'​) ) 
 +    toFrame = int( cmds.getAttr('​defaultRenderGlobals.endFrame'​) ) 
 +    byFrame = int( cmds.getAttr('​defaultRenderGlobals.byFrameStep'​) ) 
 +     
 +    frameList = fromFrame 
 +    if fromFrame != toFrame: 
 +        frameList = "​{0}-{1}"​.format(frameList,​ toFrame) 
 +        if byFrame > 1: 
 +            frameList = "​{0}x{1}"​.format(frameList,​ byFrame)
 </​code>​ </​code>​