renaming a collection in outliner triggers renaming mode for all meshes inside #81675

Closed
opened 2020-10-13 15:23:56 +02:00 by Marcin Twarowski · 8 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-10-12 22:51, hash: dc71ad0624
Worked: 2.90.1
Caused by b077de086e

Exact steps for others to reproduce the error

  • Open file
    outliner_collection_rename_bug.blend
  • There's a collapsed collection with multiple objects.
    obraz.png
  • Double-click on the collection's name. Renaming mode starts.
    obraz.png
  • Press 'Esc' to cancel.
  • Expand the collection. All meshes are now in 'rename' mode (but not camera and light).
    obraz.png
    For some reason this usually doesn't happen first time I try it. If you don't see the bug first time, simply collapse the collection and repeat the process.
**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71 **Blender Version** Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-10-12 22:51, hash: `dc71ad0624` Worked: 2.90.1 Caused by b077de086e **Exact steps for others to reproduce the error** - Open file [outliner_collection_rename_bug.blend](https://archive.blender.org/developer/F8986351/outliner_collection_rename_bug.blend) - There's a collapsed collection with multiple objects. ![obraz.png](https://archive.blender.org/developer/F8986363/obraz.png) - Double-click on the collection's name. Renaming mode starts. ![obraz.png](https://archive.blender.org/developer/F8986371/obraz.png) - Press 'Esc' to cancel. - Expand the collection. All meshes are now in 'rename' mode (but not camera and light). ![obraz.png](https://archive.blender.org/developer/F8986373/obraz.png) For some reason this usually doesn't happen first time I try it. If you don't see the bug first time, simply collapse the collection and repeat the process.

Added subscriber: @MarcinTwarowski

Added subscriber: @MarcinTwarowski
Marcin Twarowski changed title from renaming collection in outliner triggers renaming mode for all meshes inside to renaming a collection in outliner triggers renaming mode for all meshes inside 2020-10-13 15:29:36 +02:00
Member

Added subscribers: @JulianEisel, @lichtwerk

Added subscribers: @JulianEisel, @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Can confirm

Caused by b077de086e

CC @JulianEisel

Can confirm Caused by b077de086e CC @JulianEisel
Member

I see a few issues in 4902094440 which I think got exposed with b077de086e.
Not sure why exactly it didn't happen before. Seems like we rebuilt the tree after renaming, which we now avoid, so something in the rebuild must have disabled the renaming. I'd expect the flag that tells the item to be in renaming mode to be kept during rebuilds, but apparently not.

I know how to fix the issues I've seen, but want to investigate further why it worked fine before. Will check again in a bit.

I see a few issues in 4902094440 which I think got exposed with b077de086e. Not sure why exactly it didn't happen before. Seems like we rebuilt the tree after renaming, which we now avoid, so something in the rebuild must have disabled the renaming. I'd expect the flag that tells the item to be in renaming mode to be kept during rebuilds, but apparently not. I know how to fix the issues I've seen, but want to investigate further why it worked fine before. Will check again in a bit.
Member

So the root issue is the stupid way we handle element coordinates.

  • do_outliner_item_rename() enables the rename mode for the item under the cursor. Issue is, collapsed children end up having stored the same coordinate as their parent, so they too get the rename mode enabled (there is no more early-exit that would hide this).
  • The items displayed as inline icons do get the proper coordinates of the icons, so they are not mistaken as being under the cursor.

Rebuilding the tree causes the coordinates to be set to 0, which the logic of the rename operator happened to rely on. We rebuild the tree less often after b077de086e.

I'm confident we can always set coordinates of invisible items to 0 now, how it should be in the first place.

So the root issue is the stupid way we handle element coordinates. * `do_outliner_item_rename()` enables the rename mode for the item under the cursor. Issue is, collapsed children end up having stored the same coordinate as their parent, so they too get the rename mode enabled (there is no more early-exit that would hide this). * The items displayed as inline icons do get the proper coordinates of the icons, so they are not mistaken as being under the cursor. Rebuilding the tree causes the coordinates to be set to 0, which the logic of the rename operator happened to rely on. We rebuild the tree less often after b077de086e. I'm confident we can always set coordinates of invisible items to 0 now, how it should be in the first place.

This issue was referenced by 5129e2e042

This issue was referenced by 5129e2e042a057a28ea75e4342a664277c74ca34
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Julian Eisel self-assigned this 2020-10-15 20:34:34 +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
4 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#81675
No description provided.