At the moment renaming Dg/Dag nodes is not handled properly, and we can easily break the mapping of Maya paths -> render index paths.
AFAIK, HdRenderIndex does not allow of renaming the prims, so we need to remove the nodes then recreate them. In the case of Dag nodes, it should be just calling HdMayaAdapter::RemoveCallbakcs + RemovePrim + Populate + Create Callbacks again.
Shaders are a bit trickier since we have to dirty the material assignments of all the sprims that have material assignments with the previous name.
Since implementing all this in the callback could be tricky, due to some Maya parameters are not being in the right state, I think the best approach is to use an event queue, which we can empty before every draw.
At the moment renaming Dg/Dag nodes is not handled properly, and we can easily break the mapping of Maya paths -> render index paths.
AFAIK, HdRenderIndex does not allow of renaming the prims, so we need to remove the nodes then recreate them. In the case of Dag nodes, it should be just calling HdMayaAdapter::RemoveCallbakcs + RemovePrim + Populate + Create Callbacks again.
Shaders are a bit trickier since we have to dirty the material assignments of all the sprims that have material assignments with the previous name.
Since implementing all this in the callback could be tricky, due to some Maya parameters are not being in the right state, I think the best approach is to use an event queue, which we can empty before every draw.