Skip to content

Instantly share code, notes, and snippets.

@davidas13
Last active July 11, 2020 03:33
Show Gist options
  • Select an option

  • Save davidas13/8a71d1725f872ae671a9ec41a49f5858 to your computer and use it in GitHub Desktop.

Select an option

Save davidas13/8a71d1725f872ae671a9ec41a49f5858 to your computer and use it in GitHub Desktop.

Render Setup Module:

import maya.app.renderSetup.model.override as override
import maya.app.renderSetup.model.selector as selector
import maya.app.renderSetup.model.collection as collection
import maya.app.renderSetup.model.renderLayer as renderLayer
import maya.app.renderSetup.model.renderSetup as renderSetup

Export & Import Render Setup:

import maya.app.renderSetup.model.renderSetup as renderSetup

import json

def importRenderSetup(filename):
    with open(filename, "r") as file:
        renderSetup.instance().decode(json.load(file), renderSetup.DECODE_AND_OVERWRITE, None)

def exportRenderSetup(filename, note = None):
    with open(filename, "w+") as file:
        json.dump(renderSetup.instance().encode(note), fp=file, indent=2, sort_keys=True)

Reference Links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment