On 17/12/2013 at 01:55, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R14
Platform:
Language(s) : C++ ;
---------
Hi folks,
I have a simple tag with a dynamic combobox which gets filled in GetDdescription. Like this:
Bool ModelMetaDataTag::GetDDescription(GeListNode* node, Description* description, DESCFLAGS_DESC& flags)
{
if (!description->LoadDescription(node->GetType())) return FALSE;
std::vector<String> items;
BaseContainer *descbase = description->GetParameterI(DescLevel(1001),NULL);
if (descbase) {
BaseContainer *listBc = descbase->GetContainerInstance(DESC_CYCLE);
if (listBc)
{
listBc->FlushAll(); // clear combobox
for (size_t i = 0; i < items.size(); ++i) {
listBc->SetString((LONG)i, items[i]);
}
}
}
flags |= DESCFLAGS_DESC_LOADED;
return SUPER::GetDDescription(node, description, flags);
}
When I have this tag selected and then perform a clone of the document and insert it then the combobox of the tag will be empty and I need to rebuild it by deselecting and activating it again.
For the mentioned procedure I use these python commands:
docClone = doc.GetClone(c4d.COPYFLAGS_DOCUMENT)
c4d.documents.InsertBaseDocument(docClone)
Now the question how can I restore the content of the combobox immediately when the cloned document gets inserted?
Best regards,
Satara