Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hello, I'm trying to set the RDATA_PATH of the active RenderData, but it's not working. It prints the correct path and sets all of the other data, but it doesn't set the File... path in the Render Settings dialog. Am I missing anything? Thank you!
RDATA_PATH
import c4d,os from c4d import storage def main(doc): activeRenderData = doc.GetActiveRenderData() rd = activeRenderData.GetData() rd[c4d.RDATA_XRES] = 2048 rd[c4d.RDATA_YRES] = 1080 rd[c4d.RDATA_FORMAT] = c4d.FILTER_MOVIE rd[c4d.RDATA_LOCKRATIO] = True docName = doc.GetDocumentName() fileName, ext = os.path.splitext(docName) fileName = "%s.mp4"%fileName fileName = os.path.join(storage.GeGetC4DPath(c4d.C4D_PATH_DESKTOP),fileName) rd[c4d.RDATA_PATH] = fileName print(rd[c4d.RDATA_PATH]) doc.GetActiveRenderData().SetData(rd) c4d.EventAdd() if __name__=='__main__': main(doc)
I found success using the BaseContainer.SetFilename method instead of using the = assignment operator.
=
rd.SetFilename(c4d.RDATA_PATH, str(fileName))
Hi @blastframe as demonstrated in tokensystem_render_r17.py you should always operate on the BaseContainer.
Cheers, Maxime.