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

    Obaselist Group in MaterialData .res

    SDK Help
    0
    2
    321
    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 08/08/2017 at 05:50, xxxxxxxx wrote:

      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.

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

        On 09/08/2017 at 09:40, xxxxxxxx wrote:

        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);
        	}
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post