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
    • Register
    • Login

    Access GradientCustomGui in NodeData::GetDDescription

    Cinema 4D SDK
    c++ sdk
    2
    4
    531
    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.
    • D
      Deyan
      last edited by Deyan

      I am trying to apply changes to a plugin description based on the currently selected knot in a gradient parameter. It seems that the currently active knot can be retrieved from the GradientCustomGui::GetActiveKnot(..) function. The question is how to access the GradientCustomGui instance when the gradient is not created in a custom dialog.
      One way I considered was implementing a CustomGuiData, in which the gradient will be allocated in the iCustomGui::CreateLayout() implementation for the GUI, but then again this custom GUI will not be accessible in the NodeData::GetDDescription(..) implementation. Which leaves the only option to implement the functionality in the custom GUI itself, but that makes the data management much more complicated, so I am searching for the least complex option.
      Am I missing something that would allow the access to the GradientCustomGui instance in the node itself?

      Cheers and Happy New Year,
      Deyan

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi, @Deyan just to let you know I'm working on it.
        Like you, I think for the moment is to define your own CustomGui and CustomDataTypeClass to be able to use in resources files. But I will try to come with an example within the day or tomorrow 🙂

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • M
          m_adam
          last edited by m_adam

          Ok after more research the only workaround possible I found is to extend the CustomGui to handle it as you suggested.

          Since data are only stored on the CustomGui there is no real way to pass the data back to the description, since there is no CustomGui when data are accessed via description.

          Cheers,
          Maxime.

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

          1 Reply Last reply Reply Quote 0
          • D
            Deyan
            last edited by

            Hi, @m_adam, thanks for the effort. I suspected it will not be possible without a custom GUI/data implementation - I guess I will go with this approach.

            Cheers,
            Deyan

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