outliner.object_operation (select hierarchy) does not change active object when directly called through a key event #107996

Closed
opened 2023-05-17 02:24:50 +02:00 by Lluc Romaní Brasó · 10 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 526.98

Blender Version
Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash: e1ccd9d4a1d3
Worked: (newest version of Blender that worked as expected)

Short description of error
"outliner.object_operation" has an inconsistent behaviour when assigned to a key:
when I go to the outliner and I select a hierarchy with the "right-click menu" > "select hierarchy" I just click on the object that has a hierarchy that I want to select.

If I assign this "outliner.object_operation" "select hierarchy" to a key for example "right click" + "alt" when I click on the same object by pressing "alt" sometimes it will not perform the correct selection.

I recorded a video to explain better the problem, sorry for my voice I'm a bit sick :(
https://youtu.be/7E_2Zra_3CY

Exact steps for others to reproduce the error

  • Assign "outliner.object_operation" "select hierarchy" to "right click" + "alt" .
  • Alt+right click on the hierarchy.
  • "select hierarchy" does work, but it selects the hierarchy of the active object instead from the object under the mouse pointer.
    • Expected: "select hierarchy" if performed with a mouse click, should select the object under the mouse pointer and select the hierarchy.
**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 526.98 **Blender Version** Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash: `e1ccd9d4a1d3` Worked: (newest version of Blender that worked as expected) **Short description of error** "outliner.object_operation" has an inconsistent behaviour when assigned to a key: when I go to the outliner and I select a hierarchy with the "right-click menu" > "select hierarchy" I just click on the object that has a hierarchy that I want to select. If I assign this "outliner.object_operation" "select hierarchy" to a key for example "right click" + "alt" when I click on the same object by pressing "alt" sometimes it will not perform the correct selection. I recorded a video to explain better the problem, sorry for my voice I'm a bit sick :( https://youtu.be/7E_2Zra_3CY **Exact steps for others to reproduce the error** - Assign "outliner.object_operation" "select hierarchy" to "right click" + "alt" . - Alt+right click on the hierarchy. - "select hierarchy" does work, but it selects the hierarchy of the active object instead from the object under the mouse pointer. - Expected: "select hierarchy" if performed with a mouse click, should select the object under the mouse pointer and select the hierarchy.
Lluc Romaní Brasó added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-05-17 02:24:51 +02:00
YimingWu added
Module
User Interface
Status
Confirmed
Type
Design
and removed
Status
Needs Triage
Type
Report
labels 2023-05-17 08:14:39 +02:00
Member

Can confirm the behaviour.

I think basically when you use context menu to select hierarchy, it worked because it first activated the object before popping up the menu, while using alt-click, the outline doesn't do that for you.

It seems that object_select_hierarchy_fn does not select the object under pointer, which makes sense because normally the operation is executed through the menu, and if we do so it will move the selection to the other row. We didn't get a event when exec is called, so I think the best option so far (if we need to suport this) is to have yet another select option that allows hierarchy selection under mouse pointer, but not sure if TreeStoreElem * tselem is available.

Will poke interface guys for this.

@Lluc3D A way to sort of make it work for the moment is to have alt-click as active, and alt-double-click as select hierarchy, so basically alt-double-click is activating the object and selecting the hierarchy.

图片

@pablovazquez Do you think we could add such alt-double-click (or ctrl or something) key map by default as select hierarchy? I could see this becoming rather convenient.

Can confirm the behaviour. I think basically when you use context menu to select hierarchy, it worked because it first activated the object before popping up the menu, while using alt-click, the outline doesn't do that for you. It seems that `object_select_hierarchy_fn` does not select the object under pointer, which makes sense because normally the operation is executed through the menu, and if we do so it will move the selection to the other row. We didn't get a `event` when `exec` is called, so I think the best option so far (if we need to suport this) is to have yet another select option that allows hierarchy selection under mouse pointer, but not sure if `TreeStoreElem * tselem` is available. Will poke interface guys for this. @Lluc3D A way to sort of make it work for the moment is to have alt-click as active, and alt-double-click as select hierarchy, so basically alt-double-click is activating the object and selecting the hierarchy. ![图片](/attachments/d74dff73-12b9-4048-b3e5-4f72b11ebddb) @pablovazquez Do you think we could add such `alt-double-click` (or ctrl or something) key map by default as select hierarchy? I could see this becoming rather convenient.
YimingWu changed title from "outliner.object_operation" has an inconsistent behaviour when assigned to a key to `outliner.object_operation (select hierarchy)` does not change active object when directly called through a key event 2023-05-17 08:23:24 +02:00

@ChengduLittleA the workaround is great I can use that for now, thanks :)

@ChengduLittleA the workaround is great I can use that for now, thanks :)

Ignore this request, it was just a comment not a request for this particular bug.
It would be really cool if you could hold "alt"+"control" to select multiple hierarchies, Right now with the workaround you can only select one at a time, if you could select one hierarchy and then another one adding to the selection it would be very convenient.
But that may require more changes in the code. But it would be really useful if selecting hierarchies from the outliner was easier, potentially it could be used on armatures too for a better rigging process.

Ignore this request, it was just a comment not a request for this particular bug. It would be really cool if you could hold "alt"+"control" to select multiple hierarchies, Right now with the workaround you can only select one at a time, if you could select one hierarchy and then another one adding to the selection it would be very convenient. But that may require more changes in the code. But it would be really useful if selecting hierarchies from the outliner was easier, potentially it could be used on armatures too for a better rigging process.
Member

@Lluc3D I can see how that's convenient, but here's what the code commented, not sure if this helps in clarifying things:

static void object_select_hierarchy_fn(bContext *C,
                                       ReportList * /*reports*/,
                                       Scene * /*scene*/,
                                       TreeElement *te,
                                       TreeStoreElem * /*tsep*/,
                                       TreeStoreElem * /*tselem*/,
                                       void * /*user_data*/)
{
  /* Don't extend because this toggles, which is nice for Ctrl-Click but not for a menu item.
   * it's especially confusing when multiple items are selected since some toggle on/off. */

This is implemented by @natecraddock , I think a new select mode specifically for mouse is doable, there we can implement select toggle/extend. So I guess we can keep this open.

@Lluc3D I can see how that's convenient, but here's what the code commented, not sure if this helps in clarifying things: ```Cpp static void object_select_hierarchy_fn(bContext *C, ReportList * /*reports*/, Scene * /*scene*/, TreeElement *te, TreeStoreElem * /*tsep*/, TreeStoreElem * /*tselem*/, void * /*user_data*/) { /* Don't extend because this toggles, which is nice for Ctrl-Click but not for a menu item. * it's especially confusing when multiple items are selected since some toggle on/off. */ ``` This is implemented by @natecraddock , I think a new select mode specifically for mouse is doable, there we can implement select toggle/extend. So I guess we can keep this open.
Member

to select multiple hierarchies, Right now with the workaround you can only select one at a time, if you could select one hierarchy and then another one adding to the selection it would be very convenient.

I think this is handled in #104737 (not sure, I need to build the branch again)

It seems that object_select_hierarchy_fn does not select the object under pointer,

Maybe this can be achieved with the help of outliner_item_is_co_over_name_icons function?

> to select multiple hierarchies, Right now with the workaround you can only select one at a time, if you could select one hierarchy and then another one adding to the selection it would be very convenient. I think this is handled in https://projects.blender.org/blender/blender/pulls/104737 (not sure, I need to build the branch again) > It seems that `object_select_hierarchy_fn` does not select the object under pointer, Maybe this can be achieved with the help of `outliner_item_is_co_over_name_icons` function?
Member

It would be really cool if you could hold "alt"+"control" to select multiple hierarchies,

This is request to improve existing feature functionality. We could track this at RCS: https://blender.community/c/rightclickselect/

> It would be really cool if you could hold "alt"+"control" to select multiple hierarchies, This is request to improve existing feature functionality. We could track this at RCS: https://blender.community/c/rightclickselect/
Member

hi @Lluc3D if you have posted on RCS let us know or have a link here, so we can close this issue :)

hi @Lluc3D if you have posted on RCS let us know or have a link here, so we can close this issue :)
Member

@ChengduLittleA hi, original report is valid. That's upto UI-dev whether to change hierarchy selection behavior. But implementing this is not tough AFAICS.

I'm asking @Lluc3D to move the request made for "alt-ctrl support for selecting multiple hierarchies" to RCS.

@ChengduLittleA hi, original report is valid. That's upto UI-dev whether to change hierarchy selection behavior. But implementing this is not tough AFAICS. I'm asking @Lluc3D to move the request made for "`alt-ctrl` support for selecting multiple hierarchies" to RCS.

The request for "alt-ctrl" is not necessary it was just a comment sorry for that.

But the behaviour on the outliner would be nice to get it fix, altho the double-click workaround is useful I think it still should work with one click.

Thanks.

The request for "alt-ctrl" is not necessary it was just a comment sorry for that. But the behaviour on the outliner would be nice to get it fix, altho the double-click workaround is useful I think it still should work with one click. Thanks.
Member

Hi, now you can select hierarchy by double clicking the icon: !110151 / 796577d76e
I think we can close this.

Hi, now you can select hierarchy by double clicking the icon: !110151 / 796577d76e208df0358cdf306e5553386e555fc9 I think we can close this.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-04-19 11:48:23 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#107996
No description provided.