Skip to content

Instantly share code, notes, and snippets.

@Onefabis
Created April 13, 2018 15:14
Show Gist options
  • Save Onefabis/a73c15e0687faa0aa222da3d443b5857 to your computer and use it in GitHub Desktop.
Save Onefabis/a73c15e0687faa0aa222da3d443b5857 to your computer and use it in GitHub Desktop.
Playblast Icrement
playblastPath = mc.optionVar( q='playblastFile')
if len(playblastPath.rsplit('/',1))==1:
playblastPath = mc.workspace( q=1, dir=1 ) + playblastPath
clNum = playblastPath.rsplit('/',1)[-1].rsplit('_',1)
if len(clNum)==1:
playblastPath = playblastPath + '_' + str(1).zfill(4)
else:
playblastPath = playblastPath.rsplit('/',1)[0] + '/' +clNum[0] + '_' + str(int(clNum[-1])+1).zfill(4)
mc.optionVar( sv=('playblastFile',playblastPath))
mel.eval('performPlayblast 3;')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment