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

    Grasp Icon? not showing up

    SDK Help
    0
    8
    2.2k
    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 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

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

        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

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

          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?

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

            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

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

              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.

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

                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.

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

                  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://developers.maxon.net/forum/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

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

                    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

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