Skip to content

Instantly share code, notes, and snippets.

@yamadaaaaaaa
Created October 18, 2021 04:29
Show Gist options
  • Select an option

  • Save yamadaaaaaaa/a1eae18fd5cb9ae6bcd24c9e3f47d0c7 to your computer and use it in GitHub Desktop.

Select an option

Save yamadaaaaaaa/a1eae18fd5cb9ae6bcd24c9e3f47d0c7 to your computer and use it in GitHub Desktop.
maya_import_rendersettings.py
import maya.app.renderSetup.model.renderSetup as renderSetup
import json
def import_rendersettings(path_file, option=renderSetup.DECODE_AND_MERGE):
with open(path_file, 'r') as file:
renderSetup.instance().decode({'renderSetup':{'renderLayers':json.load(file)}}, renderSetup.DECODE_AND_OVERWRITE, None)
# 下記パスを出したとこに変更すれば読めます
import_rendersettings(r'D:\test.json')
# Render LayerをExportSelectedで出力した場合のインポートスクリプト
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment