editor icon indicating copy to clipboard operation
editor copied to clipboard

Focus in hierarchy

Open LeXXik opened this issue 1 year ago • 2 comments

This is a feature request to select a focused entity in a collapsed hierarchy. Steps:

  1. Select a child entity in a hierarchy or viewport.
  2. Collapse one of the selected child parents.
  3. Press F to focus on the entity.

After pressing F, the entity is focused in the viewport, but still stays hidden in the hierarchy. This is a feature request to also select it in the hierarchy, similar to when a model is selected in the viewport. This would be helpful when working with entities that cannot be selected via viewport.

https://github.com/playcanvas/editor/assets/5677782/4e9f1612-336a-488d-a5eb-f01c243722b2

LeXXik avatar Mar 20 '24 14:03 LeXXik

Click on viewport - select an entity and focus its item in the hierarchy. If that entity was already selected, nothing happens, so a slight change in logic can be made: trigger hierarchy re-focusing regardless if an entity was previously picked.

So second click on it in the viewport will lead to a focus on it the hierarchy.

F - is purely a camera focus feature, and it works also with multi-selection. I don't think it should be affecting the hierarchy focus as it might lead to unintended behaviours.

Maksims avatar Mar 20 '24 15:03 Maksims

Right. That is one way to do it, and I use it as well. It won't work, though, if you cannot select the entity in the viewport, e.g. no render component.

Edit: Adding for reference. In Blender, for example, when you press a focus hotkey, the viewport focuses on the selected object, but not in the hierarchy (similar as it is now in Editor). However, you can also press the same hotkey, while hovering over the hierarchy tree - then it finds and selects it in the tree.

LeXXik avatar Mar 20 '24 16:03 LeXXik