THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/10/2004 at 19:07, xxxxxxxx wrote:
Cinema 4D Version: 8.5+
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
When description link elements are created in GetDDescription, how do I use DESC_REFUSE and DESC_ACCEPT? The SDK doc says this about them:
DESC_ACCEPT - BaseContainer - Contains the accepted IDs as strings. (E.g. GetString(5155) == "Obase".)
DESC_REFUSE - BaseContainer - Contains the refused IDs as strings. (E.g. GetString(5155) == "Obase".)
Should I be using SetContainer(LONG id, const BaseContainer& s)
If so, how does it work? The second parameter is a BaseContainer but DESC_ACCEPT and DESC_REFUSE need to contain strings (E.g. GetString(5155) == "Obase".).
Thanks in advance for any help.
On 21/10/2004 at 18:47, xxxxxxxx wrote:
Anyone? A clue to point me in the right direction?
On 22/10/2004 at 00:37, xxxxxxxx wrote:
Yes, your guess was correct:
descbc->GetContainerInstance(DESC_ACCEPT)->SetString(5155, "Obase"); // 5155 == Obase
On 22/10/2004 at 06:53, xxxxxxxx wrote:
Thanks for the reply, Mikael. I'll give it a try.
On 22/10/2004 at 12:34, xxxxxxxx wrote:
Well, I'm doing something wrong, because now it's crashing Cinema.
Here's what I tried:
for (i=5; i<=linkCount; i++)
BaseContainer bc2 = GetCustomDataTypeDefault(DTYPE_BASELISTLINK);
bc2.SetString(DESC_NAME,"Target " + LongToString(i));
if (!description->SetParameter(DescLevel(linkID,DTYPE_BASELISTLINK,0),bc2,DescLevel(ADD_CONTROLER))) return FALSE;
const BaseContainer *descBC = description->GetParameter(DescLevel(linkID),bc2,NULL);
I don't think I understood the correct usage.
On 22/10/2004 at 15:51, xxxxxxxx wrote:
Where is 'linkCount' coming from and being set? Using a member variable like that has caused me problems and headaches. I store counts in a LINK and extract to a regular member variable as needed to avoid them.
Is it true that you want the same ID for both DESC_ACCEPT and DESC_REFUSE?
On 22/10/2004 at 16:04, xxxxxxxx wrote:
The variable "linkCount" is stored in the tags BaseContainer and retrieved just before the loop with:
LONG linkCount = tag->GetData().GetLong(LINK_COUNT);
The value stored in the BaseContainer is updated when the Add and Subtract buttons are clicked.