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

    How to catch Preferences editing

    Cinema 4D SDK
    python r23 r21
    2
    3
    302
    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.
    • mikeudinM
      mikeudin
      last edited by

      Hello folks!
      I need that my main Command plugin dialog react on some edits in Cinema 4D Preferences.
      How it possible to track? Watching with Timer or maybe there is some CoreMessage() trick?
      thank you!

      Checkout my python tutorials, plugins, scripts, xpresso presets and more
      https://mikeudin.net

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

        Hi @mikeudin,

        looking at the implementation of the node that is internally attached to the preferences dialog, I have to confirm what the public documentation implicitly states - that there is no message being broadcasted. The next best solution would be probably to cache the preferences yourself and then regularly compare that cache against the live settings via GetWorldContainerInstance and a MessageData with a timer for example.

        This of course will come with considerable overhead, but I do not see any other solution right now.

        edit: Instead of using a timer, you could also listen for EVMSG_CHANGE in your dialogs CoreMessage, slightly reducing the overhead. This will work because the preferences are a represented as a node and edits will then be reflected by such core message.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

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

          Hi,

          without further feedback, we will consider this thread as solved by Wednesday and flag it accordingly.

          Cheers,
          Ferdinand

          MAXON SDK Specialist
          developers.maxon.net

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