LumaPictures / maya-to-hydra

This repo is no longer updated. Please see https://github.com/Autodesk/maya-usd
Other
10 stars 3 forks source link

Renaming Dg/Dag nodes is not fully supported #16

Closed sirpalee closed 6 years ago

sirpalee commented 6 years ago

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.