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

    Button event on ObjectPlugin

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 290 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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 05/05/2012 at 13:05, xxxxxxxx wrote:

      Cinema4d version:  13
      Platform: Windows
      Language: Python
      -----------------
      Hi everyone!
      I have a simple question.
      This is my "menu" of the plugin I'm writing (is an ObjectPlugin).

      I want to write some code when the button "Save" is pressed but in SDK documentations I can't find any function to do that!

      Anyone know which is the code to get the button pressed event?

      Thanks a lot!

      (InputEvent() or InputState() of gui class doesn't work because this is a Object plugin and the button is not in a dialog form)

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 06/05/2012 at 02:44, xxxxxxxx wrote:

        Hi, in this case the c4d.MSG_DESCRIPTION_COMMAND message is triggered in "Message".
        To get the ID of your button call:

        if type == c4d.MSG_DESCRIPTION_COMMAND:
            if data["id"][0].id == THE_BUTTON_ID:
                print "Hello World!"
        return True
        

        Cheers, Sebastian

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 06/05/2012 at 03:19, xxxxxxxx wrote:

          @s_rath: But renderking is right, there doesn't seem to be this kind of information in the SDK. I had
          a hard time figuring that one out back then. Please add it to the SDK.

          -Niklas

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