daily pastebin goal
84%
SHARE
TWEET

midas recache

yaotungyu Feb 13th, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sys
  2. import os
  3. import sf_pipe_test as sf
  4. sys.path.append('G:/Pipeline/pipeline/maya/scripts/alembic_cache_utils')
  5. import cache_utils
  6. import assets
  7. from groom_tools import groom_io
  8.  
  9. target = 'Midas'
  10. logSubject = 'midas_hair_recache'
  11.  
  12. for sh in shots:
  13.     sf.openLatestAnimPub(shot_code=sh)
  14.     sf.asset_parse()
  15.     sf.loadAllRef()
  16.     from creature_workshop import bridge_troll
  17.     reload(bridge_troll)
  18.     bridge_troll.delete_all_cache_nodes()
  19.     bridge_troll.create_n_caches()
  20.     thumbPath = sf.shotThumbnail()
  21.     sf.scene_init_for_sfn()
  22.     sf.preroll_it()
  23.     sf.hwRenderGlobals(0,vp2=1)
  24.     x = sf.courteous_playblast(hair=1)
  25.     sf.hwRenderGlobals(0)
  26.     sf.uploadVersion(x,thumbPath,msg='Recached '+target+' Yeti')
  27.     allAssets = assets.all()
  28.     for y in allAssets:
  29.         if y.name==target:
  30.             cache_utils.crate_cache(to_cache=y,user_attrs=['frameNumber'])
  31.             max=cmds.playbackOptions(q=1,max=1)
  32.             cmds.playbackOptions(aet=max+5,max=max+5,e=1)
  33.             sf.importNamedYeti([y.name])
  34.             groom_io.lgt_yeti_cache(y)
  35.             bridge_troll.delete_all_cache_nodes()
  36.             sf.removeAllYetis()
  37.     cmds.sysFile('Y:/KNG/assets/gen_elems/ShotFinalTools/sf_pipe/logs/'+target+logSubject,md=1)
  38.     file = open('Y:/KNG/assets/gen_elems/ShotFinalTools/sf_pipe/logs/'+target+logSubject+'/'+os.environ['TT_ENTNAME']+'_batchLog.txt','w')
  39.     file.write('cache '+target)
  40.     file.write(cmds.file(q=1,exn=1))
  41.     file.close()
RAW Paste Data
Top