@elpie89 wrote:
hei, no solution for this?
Well... let's start from beginning.
(first of all i don't care about c# API, all that I show is c++ API)
You need to get access to IContainerObject what can be done with couple headers:
#include <IContainerObject.h>
#include <IContainerManager.h>
next is to get the IContainerObject*:
//INode* node = ...
{
if (GetContainerManagerInterface()->IsContainerNode(node))
{
IContainerObject* obj = IContainerObject::GetInterface(node->GetObjectRef());
if (obj)
{
...
you can't get nodes from closed container, so if it is closed you have to open:
BOOL open = obj->IsOpen();
if (!open) obj->SetOpen(true);
NodeTab nodes;
obj->GetContentNodes(get_nested, nodes);
...
and close the container if it was opened by the method...
You have to know and understand two things:
#1 - if you open and close containers you will see scene redraw. So take care of this by using disable/enable scene redraw
#2 - when you open closed container the scene "merge" mechanism works, and it wipes Undo history
Good luck!
PS. actually you have to know three things:
#3 - when you close opened by the method container you loose access to the container's nodes. So you have to do all your "export" inside the method