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 get Button IDs?

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 313 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 17/11/2012 at 17:19, xxxxxxxx wrote:

      Say for example I want to press the 'Exchange with Proxy' button (which seems to have no command listed for it) on a whole bunch of Xref objects in the scene via code, how do I figure out the ID of those buttons? I wish the script log/console would give some information when these buttons are pressed but I get nothing.

      How do others figure this out?

      For example I have an example code here written by Bret Bays but I have no idea how he found the ID for the button needed to make it work as I can't just drag the button into the command line like I can with other parameters and fields to see the ID.

        
      def main() :  
        WeightTool_ID=1019499  
        WeightTool=c4d.plugins.FindPlugin(WeightTool_ID, c4d.PLUGINTYPE_TOOL)  
        c4d.CallButton(WeightTool,c4d.ID_CA_WEIGHT_TOOL_APPLY_SELECTED)  
        c4d.EventAdd()  
      

      This is complicated I guess by the fact that the Xref is an object rather than a tool..stumped here in any case, so any ideas appreciated.

      Cheers,
      Brian

      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 17/11/2012 at 18:23, xxxxxxxx wrote:

          
        c4d.CallButton(op,c4d.ID_CA_XREF_SWAP)   
        c4d.EventAdd()   
        

        I guessed from the oxref.h file 🙂

        Cheers
        Lennart

        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 17/11/2012 at 18:55, xxxxxxxx wrote:

          Thanks Lennart, where did you find that file (oxref.h) ?

          I guess a script to switch multiple Xrefs at once would have to select each in turn and press that button.. unless there's a simpler way I'm not thinking of, anyway this gives me a start on it, appreciate it.

          Cheers,
          Brian

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