Thanks for the update.
Could you please explain what you mean by "modifying the layout"?
The one thing I was trying to achieve was to redisplay the active node into the Attribute Manager.
I had noticed that when one saves a layout it also stores the current Attribute Manager's mode.
Say, the user has selects a polygon object, the Attribute Manager will display the object's attribute.
Then the user saves the current layout. When later the user switches back to this saved layout, the Attribute Manager will switch to Object Mode.
But I argued that when the user had selected a tool prior to switching to the saved layout,
he/she might want to have the Attribute Manager show the selected tools' attributes after switching.
This is what I tried to achieve. When my description tool is active, and the docked dialog gets initialized
I would try to show the active tool's node attributes in the Attribute Manager.
Following is what actually is meant to be done by the
BaseSceneHook* bsh = doc->FindSceneHook(MYSCENEHOOK_PLUGIN_ID);
MySceneHook* msh = bsh->GetNodeData<MySceneHook>();
GeListNode* nodedata = msh->GetNode(MYNODE_PLUGIN_ID);
// activate our node
// 1. The description tool is just a decoy for the viewports,
// we don't want any other native tool being active.
// The user sees our description tool as the active one,
// but the real "tool" is our node with its attributes
// to perform actions inside a GeUserArea
// 2. As the node is the actual tool for the GeUserArea,
// we want to display the node's attributes in the Attribute Manager,
// and this when our description tool is active and it isn't
// the item currently being displayed
const Int32 idx = items ? items->Find(nodedata) : NOTOK;
if (idx == NOTOK)
ActiveObjectManager_SetObject(ACTIVEOBJECTMODE::NODE, nodedata, ACTIVEOBJECTMANAGER_SETOBJECTS_OPEN);
Is that what you mean: changing the item which gets displayed into the Attribute Manager
is "modifying the layout"?
As for the BaseObject pointer in the MyUserArea::DrawMsg. This was only to try and keep the code small, as the whole demonstration plugin was already becoming quite large.
In the actual plugin I do actually get the active object. I had tried in the past using BaseLink, but that meant I also needed to keep that BaseLink in sync whenever a different object became the active one.