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

    msg if new material selected?

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 392 Views
    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 Offline
      Helper
      last edited by

      On 05/08/2017 at 03:42, xxxxxxxx wrote:

      hi there,

      does anybody know if it is possible to get a message
      if a material was selected in the material manager?

      if possible i'd like to catch it in Command(self, id, msg)
      in a CommandData plugin

      but i m open to any ideas on how get this "event"
      best!

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

        On 07/08/2017 at 02:33, xxxxxxxx wrote:

        Hi,

        depending on your CommandData implementation you have two options.

        a) If it's a simple CommandData with no dialogs attached, you don't need any event or message at all. You can simply use GetActiveMaterial(), store it's return value somewhere and compare it on the next execution of the command.

        b) A CommandData with an asynchronous dialog. Here you can override CoreMessage() in your GeDialog and listen to EVMSG_MATERIALSELECTION.

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

          On 08/08/2017 at 22:50, xxxxxxxx wrote:

          Originally posted by xxxxxxxx

          b) A CommandData with an asynchronous dialog. Here you can override CoreMessage() in your GeDialog and listen to EVMSG_MATERIALSELECTION.

          thanks for hinting me to the right place! works!

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