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
    • Recent
    • Tags
    • Users
    • Login

    Accessing Menu Items Dialogs [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 312 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 28/10/2014 at 14:47, xxxxxxxx wrote:

      I've been messing with scripts, but not so much plugins.. so this is where I am a tad confused.

      How would I access a menu item's dialog?

      Example.
      I would like to access Mesh->Commands->Reset Scale options dialog.
      Now I would not necessarily need to open said dialog, just make sure certain things are checked.
      A macro, if you will.

      I've located the properties of the dialog in   resource\res\dialogs\r_resetaxis.res

      However, I have no idea how to use that to execute it those commands.

      Any ideas?

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

        On 29/10/2014 at 02:37, xxxxxxxx wrote:

        Hello,

        you cannot edit this dialog or set it's values. But you can execute a special modeling command using SendModelingCommand()[URL-REMOVED]:

          
          settings = c4d.BaseContainer()                   
          settings[c4d.MDATA_RESETSYSTEM_COMPENSATE] = True  
          settings[c4d.MDATA_RESETSYSTEM_RECURSIVE] = True       
          
          utils.SendModelingCommand(command = c4d.MCOMMAND_RESETSYSTEM,  
                                      list = [op],  
                                      bc = settings,  
                                      doc = doc)  
        

        best wishes,
        Sebastian


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

          On 29/10/2014 at 11:22, xxxxxxxx wrote:

          Thank you so much for your quick response!

          So that format can be applied to any dialog box, correct? ( Well, any command listed in the SDK )
          If this is the case, you have just opened up a world of options for me!

          This is going to be fantastic!

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

            On 30/10/2014 at 02:32, xxxxxxxx wrote:

            Hello,

            SendModellingCommand has nothing to do with dialogs. It simply calls a command with the given settings (these settings are typically presented in a dialog but this function may not necessarily interfere with that).

            You can use CallCommand[URL-REMOVED] to execute every command that is registered in Cinema (also plugin commands).

            best wishes,
            Sebastian


            [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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