Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. arjo
    A
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 4
    • Best 0
    • Controversial 0
    • Groups 0

    arjo

    @arjo

    0
    Reputation
    2
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    arjo Unfollow Follow

    Latest posts made by arjo

    • RE: Xpresso python tag issue

      Ah, super! thank you.

      posted in Cinema 4D SDK
      A
      arjo
    • RE: Xpresso python tag issue

      @ferdinand skidding.c4d

      posted in Cinema 4D SDK
      A
      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
      
      
      
      
      posted in Cinema 4D SDK 2025 python
      A
      arjo
    • 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()
      
      posted in Cinema 4D SDK
      A
      arjo