Skip to content

Instantly share code, notes, and snippets.

@SatishGodaPearl
Created February 1, 2019 08:05
Show Gist options
  • Save SatishGodaPearl/b0cdd71b5a9acd42a05ec207769cefa3 to your computer and use it in GitHub Desktop.
Save SatishGodaPearl/b0cdd71b5a9acd42a05ec207769cefa3 to your computer and use it in GitHub Desktop.
Maya Playblast
import pymel.core as pm
import sgtk
engine = sgtk.platform.current_engine()
pearlmaya = sgtk.platform.framework.load_framework(engine, engine.get_env(), 'tk-framework-pearl-maya_v0.x.x')
mayasession = pearlmaya.import_module('mayasession')
ctxWork = mayasession.MayaAssetWork()
ctxWork.initialize(pm.sceneName(), engine.tank)
mayareview = pearlmaya.import_module('mayareview')
pbOptions = mayareview.playblast.PlayblastOptions.get_default_options()
playblast = mayareview.playblast.Playblast(pm.sceneName().parent, 1, pbOptions)
playblast.playblast(ctxWork.assetName, ctxWork.version)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment