DCC Utils

This library offers a series of classes to abstract the most common features available in Digital Content Creation tools.

It supports Blender, Maya and Houdini. Find below, specifications of already implemented functions. If you think that something is missing, feel free to submit a Pull Request and add it.

Installation

Install the library via Pip:

pip install dccutils

Usage

Then in your code (let’s say you are working in Blender):

from dccutils.blender import BlenderContext

dcc_software_manager = BlenderContext()
print(dcc_software_manager.list_cameras())

Specifications

class dccutils.software.SoftwareContext[source]
get_available_renderers()[source]

Return a list of renderers or of render nodes, depending on the context.

get_cameras()[source]

Return a list of tuple representing the cameras. Each tuple contains a camera object and its name.

get_current_color_space(**kwargs)[source]

Return the current color space.

static get_current_project_path()[source]

Get current project path

static get_dcc_name()[source]

Get DCC name

static get_dcc_version()[source]

Get DCC version

get_extensions(is_video)[source]

Return a list of tuple representing the extensions. Each tuple contains an extension object and its name.

pop_state()[source]

A function to set back the old state (global variables) of the software.

push_state()[source]

A function to save the current state (global variables) of the software.

set_camera(camera, **kwargs)[source]

Set the camera

set_current_color_space(color_space, **kwargs)[source]

Set the current color space.

take_render_animation(renderer, output_path, container, use_colorspace=True)[source]

Take a rendered animation

take_render_screenshot(renderer, output_path, extension, use_colorspace=True)[source]

Take a rendered screenshot

take_viewport_animation(output_path, container)[source]

Take a viewport animation

take_viewport_screenshot(output_path, extension)[source]

Take a viewport screenshot