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

    Execute a plugin attached in the layout

    SDK Help
    0
    6
    546
    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
      Helper
      last edited by

      On 23/05/2014 at 04:47, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   15 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hello,

      I made a CommandPlugin with a Gedialog. I would like to add his dialog to the layout of C4D, to have the plugin always opened.

      But when I select this new layout, the dialog display well but the command don't work, like the plugin was not executed. I have to launch manually the plugin from the Plugins tab to make it work.

      Do you know how can I launch the plugin automatically with the C4D layout where his dialog is attached ?

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

        On 23/05/2014 at 04:58, xxxxxxxx wrote:

        Can't you do it indirect.
        So create a plugin that startups your plugin and changes the layout and add this plugin to the c4d interface?
        -Pim

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

          On 23/05/2014 at 06:53, xxxxxxxx wrote:

          Mmm, I don't understand, sorry.

          The dialog is added to the interface manually, like what we do when we want to customize our workplan.

          But when we load this interface, the plugin is not lanched, the plugin's dialog don't do anything.

          I don't think that launch the plugin always at the C4D startup is good because it will be launched even on the interfaces who don't have the plugin dialog, right ?

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

            On 23/05/2014 at 08:23, xxxxxxxx wrote:

            Sorry, what I mean is do it the other way.
            Create a (start) plugin that changes the layout and starts your (main) plugin.
            Add the (start) plugin to the interface.
            So when the user starts the (start) plugin, the layout is changed and the (main) plugin is started.

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

              On 24/05/2014 at 02:20, xxxxxxxx wrote:

              Oups, sorry, in fact it was an intern error on my code.

              I initialized something in the Execute function of the CommandData, but when a plugin is loaded by the interface, the Execute function is not executed, only the RestoreLayout one, so be carefull with that.

              Thanks for your time, pgrooff.

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

                On 27/05/2014 at 02:16, xxxxxxxx wrote:

                Thanks, good tip.

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