Read InExcludeData items
-
On 21/06/2018 at 03:38, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Windows ;
Language(s) : C++ ;---------
I've created a basic exclude list and a button
GROUP OBJECT_GROUP_BACKGROUNDS
{ _
_ DEFAULT 1;
_ IN_EXCLUDE OBJECT_EXPORTABLE_GEOMETRY_
_ {_
_ NUM_FLAGS 0;_
_ ACCEPT { Opolygon; };_
_ } _
_ BUTTON OBJECT_EXPORT_BACKGROUNDS {}_
}And I need to get the click on the button and list all the items of the list and I tried
Bool ObjectData::Message(GeListNode* node, Int32 type, void* data)
{
_ //............_
_
_
_ if (((DescriptionCommand* )data)- >id == DescID(OBJECT_EXPORT_BACKGROUNDS))_
_ {_
_
GeData outdata;
const Bool success = ((BaseObject* )node)->GetDataInstance()->GetParameter(OBJECT_EXPORTABLE_GEOMETRY, outdata);;// check type if (success && outdata.GetType() == CUSTOMDATATYPE_INEXCLUDE_LIST) { InExcludeData\* inexData = (InExcludeData\* )outdata.GetCustomDataType(CUSTOMDATATYPE_INEXCLUDE_LIST); //............ } }
_
}But probably I'm doing something wrong since success is true but the GetType is 0 so I cannot read the values.
Thank you in advance for any tip!
-
On 22/06/2018 at 08:02, xxxxxxxx wrote:
Hi,
actually we see nothing immediately wrong with your code snippet. Except maybe you are using different symbols for the DescIDs in the resource files and in source. If these are defined with different values, well then this could explain your issue. Just a guess.
There's also an example demonstrating the use of InExcludeList: objectdata_descriptions
Edit: Forgot to link to GitHub example
-
On 27/06/2018 at 05:01, xxxxxxxx wrote:
Thank you for the tip