Grasp Icon? not showing up



  • On 20/07/2018 at 09:34, xxxxxxxx wrote:

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

    ---------
    Hello, I have a series of plugins I'm making and they're nested in a couple folders.  Everything is working fine so far but I'm getting some behavior differences in pre-R18 and R19, (I'm unable to test R18 at the moment) where they display slightly different in the plugin menu drop down.

    This is the interface in Pre-R18;

    This is the interface in R19;

    In R19 the Grasp Icon,I think that's what it's called, is gone.  It's the exact same compile between the two, so I'm not really sure where to start trying to fix it.  Any advice?

    Daniel



  • On 23/07/2018 at 07:59, xxxxxxxx wrote:

    Hi Daniel,

    I can confirm your issue, sadly this is something you can't control from a plugin, sorry about that.

    Cheers,
    Maxime



  • On 24/07/2018 at 08:59, xxxxxxxx wrote:

    Hi, thanks for the response.

    I've seen some other plugins that do have the Grasp Icon in R19.  Do I not have it because I'm compiling in an earlier version?



  • On 25/07/2018 at 02:59, xxxxxxxx wrote:

    If you only get one submenu it's working nicely, but if you had another subMenu not anymore.

    void MySearchMenuResource(BaseContainer* bc)
    {
    	if (bc == nullptr) return;
    	BrowseContainer browse(bc);
      
    	Int32 id = 0;
    	GeData * dat = nullptr;
      
    	while (browse.GetNext(&id, &dat))
    	{
    		if (id == MENURESOURCE_SUBMENU || id == MENURESOURCE_STRING)
    		{
    			MySearchMenuResource(dat->GetContainer());
    		}
    		else if (id == MENURESOURCE_COMMAND)
    		{
    			if (dat->GetString() == String("PLUGIN_CMD_100004769"))
    			{
      
    				BaseContainer submenu = BaseContainer();
    				submenu.InsData(MENURESOURCE_SUBTITLE, "SubSubMenu");
    				submenu.InsData(MENURESOURCE_SEPERATOR, true);
    				submenu.InsData(MENURESOURCE_STRING, "PLUGIN_CMD_5159");
      
    				BaseContainer menu = BaseContainer();
    				menu.InsData(MENURESOURCE_SUBTITLE, "SubMenu");
    				menu.InsData(MENURESOURCE_SEPERATOR, true);
    				menu.InsData(MENURESOURCE_SUBMENU, submenu);
      
    				bc->InsDataAfter(MENURESOURCE_SUBMENU, menu, dat);
      
    				UpdateMenus();
    			}
    		}
    	}
    }
      
      
    Bool MyCommand::Execute(BaseDocument* doc)
    {
      
    	BaseContainer *bc = GetMenuResource(String("M_OBJECT_MANAGER"));
    	if (!bc) return true;
      
    	MySearchMenuResource(bc);
    	return true;
    }
    

    Not with this one

    void MySearchMenuResource(BaseContainer* bc)
    {
    	if (bc == nullptr) return;
    	BrowseContainer browse(bc);
      
    	Int32 id = 0;
    	GeData * dat = nullptr;
      
    	while (browse.GetNext(&id, &dat))
    	{
    		if (id == MENURESOURCE_SUBMENU || id == MENURESOURCE_STRING)
    		{
    			MySearchMenuResource(dat->GetContainer());
    		}
    		else if (id == MENURESOURCE_COMMAND)
    		{
    			if (dat->GetString() == String("PLUGIN_CMD_100004769"))
    			{
    				BaseContainer menu = BaseContainer();
    				menu.InsData(MENURESOURCE_SUBTITLE, "SubMenu");
    				menu.InsData(MENURESOURCE_SEPERATOR, true);
      
    				bc->InsDataAfter(MENURESOURCE_SUBMENU, menu, dat);
      
    				UpdateMenus();
    			}
    		}
    	}
    }
      
      
    Bool MyCommand::Execute(BaseDocument* doc)
    {
      
    	BaseContainer *bc = GetMenuResource(String("M_OBJECT_MANAGER"));
    	if (!bc) return true;
      
    	MySearchMenuResource(bc);
    	return true;
    }
    

    And it's the same for plugins in a nested folder.
    But if you get an example of such plugin, please let us know, maybe I missed something. Maybe you could replicate the plugin folder structure?

    Cheers,
    Maxime



  • On 31/07/2018 at 14:09, xxxxxxxx wrote:

    Hi again.  I don't 100% follow what you mean.

    My current folder structure for the plugins is just:

    Plugin Folder
    > My Plugin Folder
    > > Test 1 Folder
    > > > Test 1.dylib
    > > Test 2 Folder
    > > > Test 2.dylib
    > > Test.dylib

    I'm not doing any internal layout code at the moment.  I have a video showing exactly what I mean though here.  Hopefully that helps clear things up and thanks for any further help.



  • On 13/08/2018 at 08:26, xxxxxxxx wrote:

    Just going to bump this post, sorry if I shouldn't be.  I still haven't figure a way around this.



  • On 13/08/2018 at 08:54, xxxxxxxx wrote:

    Hi, Daniels,

    I'm terribly sorry I took some vacation last week and I loosed track of it.
    And I'm even sorrier because I confirm the issue.

    Actually, the current implementation for Arnold and many other plugins is that everything is registered in the same dylib and using CommandData through CommandData::GetSubContainer to get a custom menu.
    For more information please read this thread https://plugincafe.maxon.net/topic/436/13578_undocking-custom-plugin-menu

    But there is no way to get what you want, or at least you have to register all your plugins with the PLUGINFLAG_HIDE flag, and then make a CommandData that will list all your objects.
     
    Cheers,
    Maxime



  • On 14/08/2018 at 14:23, xxxxxxxx wrote:

    Hi,

    No worries, thanks for the response, I hope your vacation was pleasant.  I'll look into that as a solution.

    Daniel


Log in to reply