Execute a plugin attached in the layout



  • 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 ?



  • 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



  • 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 ?



  • 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.



  • 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.



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

    Thanks, good tip.


Log in to reply