Ah, super! thank you.
A
Latest posts made by arjo
-
Xpresso python tag issue
This script in the xpresso python tag works fine in Cinema 4D R19 but it doesn't work in higher versions. When I click on compile it says "no errors". The script should write spline data that I use in a range mapper node. But when I connect the output ports to the range mapper spline input port both the python and the range mapper turn yellow. Does anybody have an idea why this works in older versions of Cinema 4D but not in 2025?
import c4d import math def main(): global steps #number of steps global stepsize #size of each step global skidstep #spline data for range mapper global returnstep #spline data for range mapper points = steps * 2 Xstep = 1 / points Ystep = 1 / steps points = points + 1 skidstep = c4d.SplineData() skidstep.MakePointBuffer(points) returnstep = c4d.SplineData() returnstep.MakePointBuffer(points) X = 0 Ya = 0 Yb = 1 step = 0 while step < points: vec_A = c4d.Vector(X, Ya, 0) vec_B = c4d.Vector(X, Yb, 0) skidstep.SetKnot(step, vec_A) returnstep.SetKnot(step, vec_B) X = X + Xstep step = step + 1 if step % 2 != 0: Ya = Ya + Ystep Yb = 0 else: Yb = 1
-
RE: Child render setting does not inhertit from parent
Hi,
I stumbled upon the same problem. The script from bonsak didn't solve the problem for me.
But thanks to a tip I found a working solution.
It is possible to make a parent-child setup. But you have to change the values in the parent settings after creating the child settings.import c4d from c4d import gui import redshift def main(): #Create main render setting rd = c4d.documents.RenderData() rd.SetName('render_group') rd[c4d.RDATA_RENDERENGINE] = redshift.VPrsrenderer rd_red = redshift.FindAddVideoPost(rd, redshift.VPrsrenderer) doc.InsertRenderData(rd) #Create child render setting child_setting = c4d.documents.RenderData() child_setting.SetName('child setting') child_setting[c4d.RDATA_RENDERENGINE] = redshift.VPrsrenderer doc.InsertRenderData(child_setting , rd) redshift.FindAddVideoPost(child_setting, redshift.VPrsrenderer) doc.InsertRenderData(child_setting , rd) #Change main render settings rd[c4d.RDATA_XRES] = 1920.0 rd[c4d.RDATA_YRES] = 1080.0 rd[c4d.RDATA_FRAMERATE] = 25.0 rd[c4d.RDATA_FORMAT] = 1023671 #PNG rd[c4d.RDATA_FORMATDEPTH] = 1 #depth 16bit #Change Redshift post effect rd_red[c4d.REDSHIFT_RENDERER_ENABLE_AUTOMATIC_SAMPLING] = 0 rd_red[c4d.REDSHIFT_RENDERER_UNIFIED_MIN_SAMPLES] = 32 rd_red[c4d.REDSHIFT_RENDERER_UNIFIED_MAX_SAMPLES] = 256 rd_red[c4d.REDSHIFT_RENDERER_MOTION_BLUR_ENABLED] = 1 rd_red[c4d.REDSHIFT_RENDERER_COLOR_MANAGEMENT_OCIO_VIEW] = 'Un-tone-mapped' if __name__=='__main__': main()