Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed selection highlighting removed on Maya object by isolate select. #198

Conversation

ppt-adsk
Copy link
Collaborator

@ppt-adsk ppt-adsk commented Nov 8, 2024

No description provided.

@ppt-adsk ppt-adsk self-assigned this Nov 8, 2024
@@ -478,7 +478,10 @@ class MayaPathMapper : public Fvp::PathMapper

Fvp::PrimSelections
UfePathToPrimSelections(const Ufe::Path& appPath) const override {
return _piSi.UfePathToPrimSelectionsLit(appPath);
auto litPaths = _piSi.UfePathToPrimSelectionsLit(appPath);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awkwardly, when selected, Maya objects have geometry under two Hydra prim hierarchies, with selection highlighting geometry (poly wire) rooted under /MayaHydraViewportRenderer/rprims, and the real mesh geometry under /MayaHydraViewportRenderer/rprims/Lighted. Both must be considered "selected" for isolate select to preserve them in the scene, otherwise the unlit selection highlighting geometry will be hidden.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recall we have a tech debt to remove /Lighted for lit prims, something worth a look later

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the fix, the test fails. With the fix, the test passes.

Comment on lines +152 to +155
cmds.mayaHydraCppTest('/MayaHydraViewportRenderer/rprims/pTorus1',
f='TestPrimPath.isVisible');
cmds.mayaHydraCppTest('/MayaHydraViewportRenderer/rprims/Lighted/pTorus1',
f='TestPrimPath.isVisible');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both the selection highlighting and the real geometry are visible under isolate select.

f='TestPrimPath.isVisible');
cmds.mayaHydraCppTest('/MayaHydraViewportRenderer/rprims/Lighted/pTorus1',
f='TestPrimPath.isVisible');
cmds.mayaHydraCppTest('/MayaHydraViewportRenderer/rprims/Lighted/group1',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Geometry that is not isolate selected is not visible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a testing utility to receive paths directly as Hydra prim paths, not application UFE paths.

@ppt-adsk ppt-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Nov 11, 2024
@lilike-adsk lilike-adsk merged commit 9bbe85d into dev Nov 12, 2024
10 checks passed
@lilike-adsk lilike-adsk deleted the tremblp/HYDRA-1181/isolate_select_vs_Maya_selection_highlighting branch November 12, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants