Autodesk / maya-usd

A common USD (Universal Scene Description) plugin for Autodesk Maya
761 stars 202 forks source link

Ability to disable showing instance children with an optionVar #1364

Open radon199 opened 3 years ago

radon199 commented 3 years ago

UFE outliner display was hard coded to follow the usdview standard of showing the children of instanced prims. This works for what is functionally a read only tool but when authoring transformations and other things in Maya it can be confusing for users to see children they are not allowed to manipulate, and also selecting an instanced child that is maybe many levels of instancing deep means you have to walk out and test where the instance actually starts by failing to move prims ( maybe it is easier to tell in 2022 but we only just moved to 2020 in production and I suspect we are a year or two away from adopting 2022 ).

Can we please have an option var that disables the traversal of instanced prims so that a user can be more aware of what is actually going on, but also be able to toggle the option to see all of the instanced prims?

Ideally when this traversal is disabled the outliner would only show up to the first instance, and viewport selection would fail upwards to the highest selectable SceneItem.

I think this is where this traversal is being allowed : https://github.com/Autodesk/maya-usd/blob/600c31abcd68ef3fe0047b28fb5f33f6edd0872f/lib/mayaUsd/ufe/UsdHierarchy.cpp#L72

wtelford commented 3 years ago

Are you referring to point instancing or just instanceable prims?

radon199 commented 3 years ago

Just standard scenegraph instancing. The request could be further clarified by "Option to not traverse instance proxies", which is enabled by the above UsdPrimPredicate.

wtelford commented 3 years ago

It sounds like the problem you've identified here might be that users can not easily identify instances and manipulable prims at a glance from the Outliner. Are there additional problems you feel hiding instanced children would solve?

With Maya USD 0.9.0 in Maya 2022 we have the following behaviors to help.

Fixes to consider "in addition to"/"instead of" hiding them might involve implementing the following:

radon199 commented 3 years ago

The other methods of displaying that an instance is invalid would also be fine. I guess I come from the perspective that if something exists in the Maya outliner, you can do stuff with it. Since the only prim that can accept the instanceable=false option is the root prim that would be visible if instanced prims are non-visible, it makes sense to me to just not show them, but some other kinds of display would be fine.

While I can understand that Autodesk would like everyone to move up to the newer versions of Maya as soon as possible, we only just moved to Maya-2020 and I suspect we will be on that version for the next 12+ months or at least until we have suitable time to migrate our tools and productions. Because of this things only available in 2022 with UFE2.0 ( like prim icons ) don't help us as much, and so I guess that was why I gravitated to a solution that would provide the users the required feed back in this version of UFE.

wtelford commented 3 years ago

That makes complete sense with regard to older versions of Maya. I just wanted to verify I understood the problem and not just the proposed solution. My first thought is always towards the "ideal" solution which could mean requiring the latest version of Maya AND plugin. After we establish the ideal scenario I then think about how to have functionality gracefully fall-back for previous Maya releases.

The hooks required to filter the display in the Outliner for inactive prims only exist in Maya 2022. So an Outliner display filter may not be a viable approach for instances in pre-2022 versions of Maya.

radon199 commented 3 years ago

Thanks Will. Sorry, I'm probably too focused on 2020 as we are hoping to move to maya_usd within the next month and we are currently trying to move what we can to the Maya outliner from our current in house outliner. Our current outliner hides the instances prim children, and so the workflow is familiar to the users. I think a combination of outliner filter to show hide, as well as the option var to preset, would cover both scenario. Outliner, manipulator and widget coloring/disabling are also good indicators when the instanced prims are visible for those on 2022.