On 20/11/2013 at 05:06, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R13
Platform: Windows ;
Language(s) : C++ ;
---------
I'm trying to read all descIDs from the base container of an object, but I can't get those from obase.res file.
This is the code I'm using:
BaseContainer* pbc = pObj->GetDataInstance();
if (!pbc)
return nrProperties;
BaseContainer bc;
LONG nrProperties = 0;
for (LONG id, idx = 0; (id = pbc->GetIndexId(idx)) != NOTOK; idx++)
{
AutoAlloc<Description> desc;
if ((desc) && (pObj->GetDescription(desc, DESCFLAGS_DESC_0)))
{
BaseContainer* pdbc = desc->GetParameterI(id, NULL);
if (pdbc)
{
if (!pdbc->GetBool(DESC_HIDE))
{
bc.SetLong(T_OBJ_PROPERTY_ID + nrProperties, id);
bc.SetString(T_OBJ_PROPERTY_NAME + nrProperties, pdbc->GetString(DESC_NAME));
nrProperties++;
}
}
}
}