maya-usd icon indicating copy to clipboard operation
maya-usd copied to clipboard

Ability to disable showing instance children with an optionVar

Open radon199 opened this issue 4 years ago • 6 comments

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

radon199 avatar Apr 22 '21 14:04 radon199

Are you referring to point instancing or just instanceable prims?

wtelford avatar May 03 '21 21:05 wtelford

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

radon199 avatar May 03 '21 21:05 radon199

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.

  • The following Error is reported when selecting in the Outliner // Error: Authoring to the descendant of an instance [OutsideJar] is not allowed. Please mark 'instanceable=false' to author edits to instance proxies. //
  • Trying to author an edit on one of these children in the AE prints a similar error message
  • Viewport selection traverses up to select the instanced prim

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

  • Provide visual feedback in the Outliner that something is a member of an instance (icon, badge, color, font, etc....)
  • Disable and Grey out the manipulator upon Outliner selection
  • Disable and Grey out the Properties in the attribute Editor upon Outliner Selection

wtelford avatar May 07 '21 18:05 wtelford

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.

radon199 avatar May 07 '21 18:05 radon199

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.

wtelford avatar May 07 '21 19:05 wtelford

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.

radon199 avatar May 09 '21 17:05 radon199