Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
I am trying to figure out how to display ObjectData information when the object itself it is not directly in the Object Manager.
I have an ObjectData node that contains a GeListHead, which is parented to it. This object is actually in the scene and shows in the Object Manager list.
The GeListHead contains other ObjectData nodes.
I would like to be able to display the data for the child nodes of the GeListHead in the Attribute Manager. But I am finding that if I call ActiveObjectManager_SetObject then the nodes descriptions are only visable in the Attribute Manager until the next EventAdd is called, then it reverts back to whatever is selected in the Object Manager itself.
class MyObject : public ObjectData { public: virtual Bool Init(GeListNode *node) { _objects->SetParent(node); } void ShowData() { BaseObject* pObj = (BaseObject* )_objects->GetFirst(); ActiveObjectManager_SetObject(ACTIVEOBJECTMODE::OBJECT, pObj, ACTIVEOBJECTMANAGER_SETOBJECTS_OPEN); EventAdd(); } private: AutoAlloc<GeListHead> _objects; };
Is ActiveObjectManager_SetObject able to be used this way?
Alternatively how does the Xpresso editor work? How does it ensure the selected Xpresso nodes data gets displayed in the Attribute Manager? Would it work if I used the same approach as above but instead used a TagData plugin that contains the GeListHead?
Thanks, Kent
Hello @kbar,
Thank you for reaching out to us. This is a tricky one to answer, and my first instinct was that this is not too surprising due to what you do with your GeListHead, but the devil lies in the detail.
GeListHead
In general, I would say that the safest route would be the one many of our implementations take: Displaying elements that are not part of the "standardized" branches of a scene graph via a DescriptionCustomGui wrapped by a custom GUI of yours which is part of a description of a (set of) node type(s) you provide. The FieldList data type/GUI does this for example.
DescriptionCustomGui
FieldList
BranchInfo
SetObject
AOM_MSG_GETATOMLIST
DESCRIPTION_OBJECTSNOTINDOC
NBIT_ACTIVE
Cheers, Ferdinand
[1]:
static GeData MaterialMessageHook(const BaseContainer &msg, void *data) { switch (msg.GetId()) { case AOM_MSG_ISENABLED: return true; case AOM_MSG_GETATOMLIST: { BaseDocument *doc = GetActiveDocument(); if (!doc) break; doc->GetActiveMaterials(*((AtomArray*)data)); return true; } break; } return false; }