Hi, you have to write an own routine for that. I was writing this one a while ago:
/**
* @brief Moves all children of srcObj to tgtObj. Adds Undos.
* @param srcObj The source object
* @param tgtObj The target object
*/
inline void g_MoveChildren(BaseObject* srcObj, BaseObject* tgtObj)
{
if (!srcObj)
return;
auto doc = srcObj->GetDocument();
if (!doc)
return;
auto child = srcObj->GetDown();
while (child)
{
const auto temp = child->GetNext();
doc->AddUndo(UNDOTYPE::CHANGE, child);
child->Remove();
child->InsertUnderLast(tgtObj);
child = temp;
}
}
For further information about hierarchy manipulation, see https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_manual_gelistnode.html#page_manual_gelistnode_lists_edit