Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search

Grasp Icon? not showing up

Author
Message
  Topic Search Topic Search
DSchmidt View Drop Down
Member
Member


Joined: 2012 Jun 19
Online Status: Offline
Posts: 135
Direct Link To This Post Topic: Grasp Icon? not showing up
    Posted: 2018 Jul 20 at 9:34am

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
Back to Top
MaximeA View Drop Down
Forum Moderator
Forum Moderator

Forum Moderator

Joined: 2018 Jan 04
Location: France - Nantes
Online Status: Offline
Posts: 119
Direct Link To This Post Posted: 2018 Jul 23 at 7:59am
Hi Daniel,

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

Cheers,
Maxime
MAXON
SDK Specialist
Back to Top
DSchmidt View Drop Down
Member
Member


Joined: 2012 Jun 19
Online Status: Offline
Posts: 135
Direct Link To This Post Posted: 2018 Jul 24 at 8:59am
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?
Back to Top
MaximeA View Drop Down
Forum Moderator
Forum Moderator

Forum Moderator

Joined: 2018 Jan 04
Location: France - Nantes
Online Status: Offline
Posts: 119
Direct Link To This Post Posted: 2018 Jul 25 at 2:59am
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
MAXON
SDK Specialist
Back to Top
DSchmidt View Drop Down
Member
Member


Joined: 2012 Jun 19
Online Status: Offline
Posts: 135
Direct Link To This Post Posted: 2018 Jul 31 at 2:09pm
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.  




Edited by DSchmidt - 2018 Jul 31 at 2:10pm
Back to Top
DSchmidt View Drop Down
Member
Member


Joined: 2012 Jun 19
Online Status: Offline
Posts: 135
Direct Link To This Post Posted: 2018 Aug 13 at 8:26am
Just going to bump this post, sorry if I shouldn't be.  I still haven't figure a way around this.
Back to Top
MaximeA View Drop Down
Forum Moderator
Forum Moderator

Forum Moderator

Joined: 2018 Jan 04
Location: France - Nantes
Online Status: Offline
Posts: 119
Direct Link To This Post Posted: 2018 Aug 13 at 8:54am
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 http://www.plugincafe.com/forum/forum_posts.asp?TID=13578

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



Edited by MaximeA - 2018 Aug 13 at 8:59am
MAXON
SDK Specialist
Back to Top
DSchmidt View Drop Down
Member
Member


Joined: 2012 Jun 19
Online Status: Offline
Posts: 135
Direct Link To This Post Posted: 2018 Aug 14 at 2:23pm
Hi,

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

Daniel
Back to Top

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.109 seconds.