Import only the render settings from json using python
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to use python to import render settings data from the render_setup json generated by using the "Export All" option in Maya's render setup window. The api documentation recommends the following function to import the data into a scene:
import maya.app.renderSetup.model.renderSetup as renderSetup import json def importFile(filename): with open(filename, "r") as file: renderSetup.instance().decode(json.load(file), renderSetup.DECODE_AND_OVERWRITE, None)
While this works perfectly well, I need some additional control to only import the sceneSettings category from the json, and not everything. The problem I am encountering is that there is very limited information available on selective imports and how I can modify the function to suit my needs. I am also aware of the "export scene render settings" option in the render setup window, however for the purposes of the pipeline I wish tobe able to use the render_setup json for all situations.
Any help would be appreciated,
Thanks,
Craig