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

    Python Generator - Accessing Contour Spline

    Cinema 4D SDK
    python
    2
    3
    451
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      moGRR
      last edited by

      Hi all.

      I'd like to be able to have a python generator that creates a field object with a custom preset for it's contour spline for remapping

      I've used [c4d.FIELD_CONTOUR_MODE] = 4 to set the Contour Mode to Curve.

      I also have [c4d.FIELD_CONTOUR_SPLINE] for accessing the contour spline, I'm just not sure how I can go about setting it to a preset. Any help is massively appreciated.

      Many thanks,
      Jamie
      www.moGRR.co.uk

      1 Reply Last reply Reply Quote 0
      • P
        PluginStudent
        last edited by

        I don't know if you can apply a spline preset using code, but the parameter c4d.FIELD_CONTOUR_SPLINE stores a SplineData object, which you can edit as you like.

        1 Reply Last reply Reply Quote 1
        • M
          moGRR
          last edited by

          Thanks again @PluginStudent for helping me so quickly.

          That was enough information to help me find the .MakeUserSpline function that allows me to do exactly what I'm after:

          MakeUserSpline('sin(x * PI)', 5)
          

          More info here for anyone looking.

          Cheers,
          Jamie

          1 Reply Last reply Reply Quote 0
          • First post
            Last post