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

    Buttons ids

    Cinema 4D SDK
    python
    2
    2
    742
    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.
    • R
      Rage
      last edited by

      Hi all,

      For the python function CallButton I have to pass the id of the button I want to call. Nice, where do I find the ids for the buttons? I can't see any information/indication on the python documentation

      Best,
      Niccolò

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

        Hello,

        there's no real list where you can find easily those IDs.

        @m_adam came with this idea :
        open the Script log (menu script > script log) and click the button you want to call.
        in the console you will see something like

         c4d.CallButton(tool(), c4d.MDATA_NEWTRANSFORM)
        

        so you know that the ID is c4d.MDATA_NEWTRANSFORM

        Another place to look for, is the folder ressource/modules where you can find the files .res that build the ui. (using your OS search function will help a lot) Openning those file you will find the information

        BUTTON MDATA_NEWTRANSFORM	{ FIT_H; }
        

        and you can maybe open the file with the same name with the extention .h where you will find the id

        MDATA_NEWTRANSFORM							= 701,   // Button
        

        Other than that, there are the enums on the documentation like this page but it's not really "user friendly"

        Let me know.

        Cheers
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

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