We had a question recently about how to get the user interface to update when the C++ SDK INode::SetName API is used. The UI will not update, if the INode is not in a creation context. For example, if you have a node selected, and go into the Modifier Panel, you will see an edit box at the top with the node’s name being displayed. You can directly edit the name and of course it updates immediately. However, if the C++ SDK is used to change the name via INode::SetName, the updated name is not immediately displayed.
I confirmed this behavior by using a C++ plugin that published a simple function to MAXScript to change the name using SetName. Sure enough the update did not occur. However, if you use the MAXScript INode.Name property, it will work.
What I learned was that there is a special notification that needs to be sent from SDK code. This is something that is not documented nor shown in the examples. You can use it like this:
After setting the name (and any other node changes), you need to call the NotifyDependents API. Notice that it takes what appears to be an incorrect "PartID" value, but internally the system recognizes this special case and will then update the UI correctly.
The MAXScript version of this API is also doing this internally, and so this is only required on the SDK side.