PDA

View Full Version : Py newbie set render settings problem


Jops
10-14-2010, 05:43 PM
Hello there,
trying to find my way into python.
gladly found out how to read out the render settings but am not able to write them.
Please tell me what I am doing wrong.

here is the code:
import c4d
from c4d import gui, documents

def main():
doc = documents.GetActiveDocument()
rs = doc.GetActiveRenderData()
print rs[c4d.RDATA_YRES_VIRTUAL]
rs[c4d.RDATA_YRES_VIRTUAL] = 400.0
print rs[c4d.RDATA_YRES_VIRTUAL]

if __name__=='__main__':
main()

Thanks,
Jops

donelgreeko
10-14-2010, 07:26 PM
Hi Jops,

the width and height is calculated on the fly due to the ratio so just use [c4d.RDATA_YRES] instead of [c4d.RDATA_YRES_VIRTUAL] and call c4d.EventAdd() to send an update.

Cheers, donelgreeko

Jops
10-14-2010, 09:40 PM
Hi donelgreeko,

thanks a lot for your reply.
its quite hard to get in there with little scripting experience :)

will check it out next week.

all the best
Jops

CGTalk Moderation
10-14-2010, 09:40 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.