LumaPictures/maya-to-hydra-alproxy

Selection highlighting not displaying in "UseVp2" mode

Opened this issue · 5 comments

If SelectionOverlayMode is set to "UseVp2", then I get no selection highlight (either wireframe or coloring) when I select an AL_USdMaya proxy shape. Wireframe works if I switch to "UseHdSt", but then I lose drawing of maya locators (ie, spaceLocator, cameras). I don't get color highlighting in either.

There are two issues here:
1, UseHdSt disables the drawing of locators and cameras (incorrectly), that needs to be fixed in Maya to Hydra.
2, When set to UseVp2, AL_USDMaya doesn't draw the wireframe properly.

In this case UseVp2 should be avoided, as it'll end creating a second set of render index for the al usdmaya proxy. So I'll be focusing on 1 for now. We'll need 2 later, when we are not using HdSt.

We'll need 2 later, when we are not using HdSt.

Can you elaborate on this, please.

@chadrik UseHdSt only works with the HdStRenderDelegate, any other render delegates, that don't support selection overlays, require UseVp2.

Fixed 1. This involved both fixes in "Maya to Hydra" and "Maya to Hydra AL Proxy". First of all, selection behaved in bizarre ways; this was due to the ordering of the selection changed callback. We ran our code at the same time SelectionChanged ran, but that also meant AL USDMaya didn't clean up temporary shapes. (this broke selection when either deselecting using a command or when Maya skipped calls to al proxy's selection code -- i.e. selection outside the proxy's bounding box). The issue of selection highlights was due to a missing function implementation in the al proxy delegate.

Other than this, I made sure locators and cameras show up when "UseHdSt" is selected.

After the latest changes, UseVp2 somewhat works when using the HdStreamRenderDelegate. Selection Highlighting works (i.e., done by HdStreamRenderDelegate), but not the wireframe overlay on the selected objects.

UseHdSt has one more issue. When an object is transformed after switching to Maya to Hydra, selection doesn't work anymore, and the selection still uses the last location. You need to switch to VP2 then back to Maya to Hydra to make selection work again. This works well when UseVp2 is selected.

Note: These two issues most likely need to be fixed in AL USDMaya.