Managing render settings and getting list of expected output files.
-
Hi everyone,
Consider me a newbie, so these might be stupid beginner questions but I'm hoping all of you can point me into the right direction. My Cinema4D knowledge is rather limited but I'm looking to get more knowledge on how to manage render settings from Cinema4D with Python.
I need to query each file that would be written out if a render completes. E.g. each render pass, render take, camera, etc. that would get written out to a separate file on disk, including knowing their colorspace. In my case, knowing what a render on Deadline would spit out at the end.
I assume that'd essentially be just all 'enabled' takes and the output filenames specified with the tokens. Does Cinema4D provide any good API to get access to this? How renderer-specific are those save filepaths? e.g. does the same logic share between Redshift and other renderers, or would it quickly become e.g. renderer specific?For example I think I can do:
import c4d import redshift doc = c4d.documents.GetActiveDocument() renderdata = doc.GetActiveRenderData() # Get the Redshift videoPost and render settings vprs = redshift.FindAddVideoPost(renderdata, redshift.VPrsrenderer) existing_aovs = redshift.RendererGetAOVs(vpRS)
But I'd essentially be writing logic that seems related to Redshift alone, and I'd need to then write similar code for each renderer down the line. E.g. each redshift AOV can have color processing enabled/disabled on its own in Redshift. So getting the colorspace of the AOV images for example would easily get very specific to Redshift too? Any ideas?
Just to compare, the USD API for example has "Render Products" with "Render Vars" logic that is all shared between each renderer, and thus from the USD data alone I can detect all the output files that would be written. Preferably I can get to similar single API from a C4D scene alone.
What I need:
- I need to know the expected output files that would be rendered from the current scene. What's the best way to get that?
- How do I query the takes that would be rendered?
- Preferably I can also set the render output filepath in a managed way in the pipeline too.
- Get the output colorspace of each image.
Preferably all of this, without actually needing render things - so I can validate certain outputs in advance, etc.
Just adding these links for my own future reference: