|
I have an importer plugin that creates nodes and wish to select one of them. (It is not a node which exists in the scene prior to import that is).
A simple task at first glance; but the following code doesn’t work (or is not sufficient).
theHold.Begin(); interfacePtr->SelectNode(theNode, 0); theHold.Accept("Selection");
Neither does this
ExecuteMAXScriptScript("select $<node name>");
How to do it?
|
|
|
|
Yes I’m sure they are. This is not the only code in the plugin; I’m referencing the same interface and node pointer in several other places.
For example
InterfacePtr->CreateInstance(...); theNode->SetName("someName");
are working fine.
|
|
|
|
This will look odd. I tested this code in a utility plugin:
::theHold.Begin(); InterfacePtr->SelectNode(theNode); theHold.Accept("Select");
And it’s working.
Should I conclude that SceneImport plugins automatically deselect everything in the scene? I tested InterfacePtr->GetSelNodeCount in the import plugin using a message box hook and it returns 1. But subsequently after the scene is created everything is deselected.
|
|
|