Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    Send message from NodeData to iCustomGui.

    SDK Help
    0
    2
    359
    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.
    • H
      Helper
      last edited by

      On 11/09/2017 at 07:03, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R18 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hello.

      I have an iCustomGui in a ShaderData plugin.
      Pressing a button in the shader data causes the custom gui to add more parameters in its UI.
      I do that in custom gui's SetData method between LayoutFlushGroup(...) and LayoutChanged(...).
      Nevertheless, SetData doesn't seem the correct place for the "layout reset" code.
      Everytime I add a parameter (E.g. AddStaticText), it appears duplicated.
      I would add this code in the CreateLayout method, but it is called only once at initialization.

      Is there a way to send a message from a NodeData plugin to any of its iCustomGuis ?
      That way everytime I have to update the custom gui from Node Data, I can send a message to it.

      Thank you.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 12/09/2017 at 02:22, xxxxxxxx wrote:

        Hello,

        typically a NodeData based plugin has no business of sending messages to custom GUI elements. A NodeData based plugin stores parameters that may be displayed in the GUI using a custom GUI. So in your NodeData plugin you can set the value of the parameter displayed with that GUI element.

        Another idea would be to modify the parameter description. You can store additional data in that description that defines how the custom GUI should look like (see this thread).

        Another option is to listen to core messages. A custom GUI is based on GeDialog so it should be possible to listen to core messages sent with SpecialEventAdd() in GeDialog::CoreMessage() (see Core Messages Manual).

        And finally, if you want that your custom GUI to react to a button why not simply add this button to that custom GUI itself? The buttons to control the Layer Shader are part of the layer shader GUI.

        best wishes,
        Sebastian

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