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

    How to get the attributes of rsramp node in c++?

    Cinema 4D SDK
    c++ 2025
    2
    3
    284
    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.
    • F
      freeze
      last edited by

      I want to get the value of the knots' color,interpolation,knot position and bias position of a rsramp node .It seems that it is a special data type that I can not get it like "GetOrDefaultmaxon::Float64()".

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @freeze
        last edited by

        Welcome to the Maxon developers forum and its community, it is great to have you with us!

        Getting Started

        Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.

        • Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.
        • Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.
        • Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.

        It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: Asking Questions.

        About your First Question

        You get these parameters just as any others. Please show us the code you have, as I am not going to write here a complex node example from scratch. The ramp itself is just a variadic port, and each knot in the ramp is then a port bundle of type com.redshift3d.redshift4c4d.portbundle.gradient.

        6c249a37-cd2c-4bc5-81ab-37d651b2620b-image.png
        d74bed8c-10b5-4f5d-9551-4876fb75b374-image.png

        So, the node path for the input port of the knot position of the 0ths node would be:

        // This node path goes from the root of the true node, i.e., the RS Ramp node itself.
        const String path = "<com.redshift3d.redshift4c4d.nodes.core.rsramp.ramp/_0/position"_s;
        

        Please note that there is absolutely no guarantee that each variadic port does gives its 0th child the ID "_0" and its n-th child the ID "_n-1". I just happen to know that this will be the case for a default RS Ramp node. In practice you will always have to get all children of the varidiadic port, and then select the desired child by index in that list.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        F 1 Reply Last reply Reply Quote 0
        • F
          freeze @ferdinand
          last edited by

          @ferdinand
          Thank you for the answer! The problem is solved after I try to find the child of the port according to your answer.

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