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

Obaselist Group in MaterialData .res

 Post Reply Post Reply
Author
Message
peterakos View Drop Down
Member
Member


Joined: 2015 Jul 13
Online Status: Offline
Posts: 300
Post Options Post Options   Quote peterakos Quote  Post ReplyReply Direct Link To This Post Topic: Obaselist Group in MaterialData .res
    Posted: 2017 Aug 08 at 5:50am

User Information:

Cinema 4D Version:   R18 
Platform:   Windows  ;   
Language(s):     C++  ;   

---------

Hello.

I have MaterialData and inside its res file I have used 

INCLUDE Mbase;
GROUP Obaselist {
//Params
}

GROUP ParamGroup1 {
//Params
}

GROUP ParamGroup2 {
//Params
}


I have some parameters and I add these parameters in ParamGroup2 via code using description->SetParameter e.t.c.

EDIT:
The problem is that these parameters are added in Obaselist instead of ParamGroup2.
What  is included in INCLUDE Mbase; and in GROUP Obaselist ? 

It appears that I have ID conflicts with the included res files.
I have checked obaselist.h and mbase.h files but I didn't find any conflict there.

Thank you for your time.





Edited by peterakos - 2017 Aug 08 at 6:02am
Back to Top
Andreas Block View Drop Down
Forum Moderator
Forum Moderator
Avatar

Joined: 2014 Oct 01
Location: Hannover
Online Status: Offline
Posts: 1497
Post Options Post Options   Quote Andreas Block Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Aug 09 at 9:40am
Hi,

it's a bit difficult to judge without seeing the code you use to insert the parameter.

Here's how it works for me:

Bool GetDDescription(GeListNode* node, Description* desc, DESCFLAGS_DESC& flags)
{
if (!desc->LoadDescription(node->GetType()))
return false;

const DescID groupID = DescLevel(ParamGroup2, DTYPE_GROUP, 0);
const DescID cid = DescID(DescLevel(myparamid, DTYPE_STRING, 0));
{
BaseContainer bc = GetCustomDataTypeDefault(DTYPE_STRING);
bc.SetString(DESC_NAME, "My String Param");
desc->SetParameter(cid, bc, groupID);  // don't forget to provide correct group ID here
}

flags |= DESCFLAGS_DESC_LOADED;
return SUPER::GetDDescription(node, desc, flags);
}

Cheers,
Andreas
SDK Support Engineer
Back to Top
 Post Reply Post Reply

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.078 seconds.