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

    Notify CommandData Plugin from a PreferenceData Plugin

    Cinema 4D SDK
    2023 python
    3
    4
    710
    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.
    • V
      ViVace_
      last edited by ViVace_

      Hello,

      I have a CommandData Plugin which can have preferences. These preferences are implented in a PreferenceData Plugin. How would I notify the CommandData Plugin that the preferences have changed? I can't get the CommandData Instance from inside the PreferenceData, so I assume that I need to use the message system but when using GePluginMessage() from inside the PreferenceData Plugin I do not receive anything in PluginMessage() inside of the CommandData Plugin.

      Is there something I am missing or do I need to use another message system? Thank you in advance.

      1 Reply Last reply Reply Quote 0
      • C4DSC
        C4DS
        last edited by

        I ma not familiar with PreferenceData, but maybe the following might help you:
        https://developers.maxon.net/forum/topic/13379/send-message-to-commanddata

        In short: you let the PreferenceData call your CommandData's ExecuteSubID via a specific unique ID (similarly obtained from plugincafe as a pluginID).
        The CommandData knows if that specific subID is called that it should react to a change of preferences.

        Not the most elegant solution, and maybe there are ways to do this directly from PreferenceData, but as said I am not familiar with it.

        1 Reply Last reply Reply Quote 0
        • V
          ViVace_
          last edited by

          Thank you very much, I do not know why I didn't find this post but this works perfectly 🙂 I find this to be a quite elegant solution compared to the different things I tried with the message system which didn't even work out in the end.

          1 Reply Last reply Reply Quote 1
          • ManuelM
            Manuel
            last edited by

            hi,

            well, if it works.

            Cheers,
            Manuel

            MAXON SDK Specialist

            MAXON Registered Developer

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