Vertex weights menu cannot be operated by mouse dragging #119831
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#119831
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.22631-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.76
Blender Version
Broken: version: 4.1.0 Release Candidate, branch: blender-v4.1-release, commit date: 2024-03-22 19:59, hash:
64bfe491645f
Worked: 4.0.2
Caused by
b52a071e7a
Short description of error
If you create a menu with weights for specific vertices, you will not be able to manipulate the menu by dragging the mouse.
This is a problem for add-on developers when creating menus of vertex details.
However, in 3.6/4.0, if you create a "state where no active select vertex exists" using circle selection or box selection, this behavior does not occur.
But it was a issue that caused my created weight table add-on to not work properly.
Exact steps for others to reproduce the error
Can confirm, will check
Caused by
b52a071e7a
CC @HooglyBoogly
Note: this also reminds me of #112123 / #109460
CC @JacquesLucke
Yeah, this is the same issue as #109460. The cleanup commit above exposed the issue by fixing a bug where the data wouldn't be unshared (from implicit sharing). I don't know how to fix this honestly, we can't do anything fancy like referencing static memory here. It feels like sort of a fundamental problem with the UI code that it breaks like this when the data pointer is different between redraws.
Looking at
cd74ba6413
it seems like button comparisons over redraws went wrong because a direct pointer was used for the button. But here it looks like a RNA property is used? This should generally be safer, or is the issue here that thePointerRNA.data
pointer changes?I expect we will run into more such issues as we are modernizing memory models, while the UI relies on things like pointer addresses. So we might need designs to decouple button identity from the referenced data more.
One possible solution could be using
UI_but_func_identity_compare_set()
, it's made for cases where the data-comparisons are not reliable. Not sure how to use this for this specific case though, esp since this is a genericUILayout.prop()
. Maybe hardcoded special handling for this property is needed, or we extend RNA to allow for data comparison callbacks.PointerRNA.data
changes with every redraw here. The vertex group data is reallocated on every change because it's shared with undo steps (or maybe the evaluated mesh, not sure).I agree that this will only be an issue more in the future. A generic solution that doesn't add too much complexity would be very nice. But a proper comparison doesn't seem trivial either. I'm not sure how to handle the active object changing between redraws, for example.
I think this is more of a known issue for now. The work I mentioned below to make PointerRNA into a proper data path will give us the tools to resolve this, because we can use that to check if UI buttons are the same across redraws instead of using the data pointer.