Browse files

Updating docstring for playblast extraction plug-in

  • Loading branch information...
mottosso committed Oct 8, 2014
1 parent df65d4c commit 9f23d47204998e70b16805aa23974ed95af50c6c
Showing with 40 additions and 7 deletions.
  1. +40 −7 napoleon/plugins/
@@ -9,14 +9,33 @@
class ExtractNapoleonReview(napoleon.plugin.Extractor):
"""Extract as image-sequence (png)"""
"""Extract as image-sequence (png)
startFrame (float): Start frame of output
endFrame (float): End frame of output
width (int): Width of output in pixels
height (int): Height of output in pixels
format (str): Which format to use for the given filename,
defaults to "qt"
compression (str): Which compression to use with the given
format, defaults to "h264"
offScreen (bool): Capture off-screen
maintainAspectRatio (bool): Whether or not to modify height for width
in order to preserve the current aspect ratio.
show (str): Space-separated list of which node-types to show,
e.g. "nurbsCurves polymeshes"
families = ["",
hosts = ["maya"]
version = (0, 1, 0)
requires = (1, 0, 9)
representation = 'review'
def process_instance(self, instance):
"""Extract capture per camera"""
@@ -33,9 +52,10 @@ def process_instance(self, instance):
start_frame ='startFrame') or current_min_time
end_frame ='endFrame') or current_max_time
format ='format') or 'image'
compression ='compression') or 'png'
off_screen ='offScreen') or False
format ='format') or 'qt'
compression ='compression') or 'h264'
off_screen ='offScreen', False)
maintain_aspect_ratio ='maintainAspectRatio', True)
# Get cameras in instance
cameras = [c for c in instance if cmds.nodeType(c) == 'camera']
@@ -47,17 +67,29 @@ def process_instance(self, instance):
# Set viewport settings
view_opts = napoleon.maya.capture.ViewportOptions()
view_opts.polymeshes = True
view_opts.nurbsSurfaces = True
view_opts.displayAppearance = "smoothShaded"
if 'show' in
for nodetype in'show').split():
if hasattr(view_opts, nodetype):
setattr(view_opts, nodetype, True)
self.log.warning("Specified node-type in 'show' not "
"recognised: %s" % nodetype)
view_opts.polymeshes = True
view_opts.nurbsSurfaces = True
cam_opts = napoleon.maya.capture.CameraOptions()
with self.temp_dir() as temp_dir:
for camera in cameras:
# Ensure name of camera is valid
camera = pyblish.api.format_filename(camera)
temp_file = os.path.join(temp_dir, camera)
temp_file = os.path.join(temp_dir,
# self.representation,'family'),
if format == 'image':
# Append sub-directory for image-sequence
@@ -74,6 +106,7 @@ def process_instance(self, instance):

0 comments on commit 9f23d47

Please sign in to comment.