capture v0.1.0¶
Playblasting with independent viewport, camera and display options.
Example¶
With a regular Maya playblast, playblasting is dependent on the size of your panel and provides no options for specifying what to include or exclude, such as meshes or curves. Maya Capture isolates a capture into an independent panel in which settings may be applied without affecting your current scene or workspace.
from capture import capture
capture()
# Capture multiple cameras
capture('Camera1')
capture('Camera2')
capture('Camera3')
# Capture with custom resolution
capture(width=400, height=200)
# Launch capture with custom viewport settings
view_opts = ViewportOptions()
view_opts.grid = False
view_opts.polymeshes = True
view_opts.displayAppearance = "wireframe"
cam_opts = CameraOptions()
cam_opts.displayResolution = True
capture('myCamera', 800, 600,
.. viewport_options=view_opts,
.. camera_options=cam_opts)
API¶
capture¶
- capture.capture(camera=None, width=None, height=None, filename=None, start_frame=None, end_frame=None, format='qt', compression='h264', off_screen=False, viewer=True, isolate=None, maintain_aspect_ratio=True, camera_options=None, viewport_options=None)[source]¶
Playblast in an independent panel
Parameters: - camera (str, optional) – Name of camera, defaults to “persp”
- width (int, optional) – Width of output in pixels
- height (int, optional) – Height of output in pixels
- filename (str, optional) – Name of output file. If none is specified, no files are saved.
- start_frame (float, optional) – Defaults to current start frame.
- end_frame (float, optional) – Defaults to current end frame.
- format (str, optional) – Name of format, defaults to “qt”.
- compression (str, optional) – Name of compression, defaults to “h264”
- off_screen (bool, optional) – Whether or not to playblast off screen
- viewer (bool, optional) – Display results in native player
- isolate (list) – List of nodes to isolate upon capturing
- maintain_aspect_ratio (bool, optional) – Modify height in order to maintain aspect ratio.
- camera_options (CameraOptions, optional) – Supplied camera options, using CameraOptions
- viewport_options (ViewportOptions, optional) – Supplied viewport options, using ViewportOptions
Example
>>> # Launch default capture >>> capture() >>> # Launch capture with custom viewport settings >>> view_opts = ViewportOptions() >>> view_opts.grid = False >>> view_opts.polymeshes = True >>> view_opts.displayAppearance = "wireframe" >>> cam_opts = CameraOptions() >>> cam_opts.displayResolution = True >>> capture('myCamera', 800, 600, ... viewport_options=view_opts, ... camera_options=cam_opts)
ViewportOptions¶
- class capture.ViewportOptions[source]¶
Viewport options for capture()
- cameras = False¶
- deformers = False¶
- dimensions = False¶
- displayAppearance = 'smoothShaded'¶
- dynamicConstraints = False¶
- dynamics = False¶
- fluids = False¶
- follicles = False¶
- grid = False¶
- hairSystems = False¶
- handles = False¶
- ikHandles = False¶
- joints = False¶
- lights = False¶
- locators = False¶
- manipulators = False¶
- nCloths = False¶
- nParticles = False¶
- nRigids = False¶
- nurbsCurves = False¶
- nurbsSurfaces = False¶
- pivots = False¶
- polymeshes = False¶
- strokes = False¶
- subdivSurfaces = False¶
- textures = False¶
- useDefaultMaterial = False¶
- wireframeOnShaded = False¶