Enhance ways of accessing active modifier for poll functions of operators #79735
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#79735
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
Currently, poll function of operators can only get the modifier they are supposed to work on from the context. This is often missing (when called from shortcuts e.g., also with drag-n-drop of modifier panels...).
This is a sever problem for liboverrides, as some modifiers should then be edited (the locally added ones), and others not.
I can see two ways to solve that:
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscribers: @mont29, @brecht, @ideasman42
Added subscriber: @HooglyBoogly
This is definitely an issue. It seems the operator system might need to be more flexible here. Two ideas:
Maybe these two ideas expand the scope of this task a bit, but together they would solve these sorts of situations.
Firstly, is there an example of what's currently not possible? (bug report for eg), even though the issue described makes sense, I'd like to have some steps that fail.
Since this can be solved using an active modifier, this is a more conservative choice, although I'd still like to look into the failing case in more detail.
Enhance ways to access to 'active' modifier for poll funtions of operators.to Enhance ways to access to 'active' modifier for poll functions of operators.@ideasman42 ah, thought the report that triggered that task would be more visible from this side... It was #79635 (Library overrides - modifiers).
In a nutshell, on liboverride objects, many modifier operators are only allowed on local (added to the override) modifiers, and not on the ones coming from the linked data. Thus the need to know on which modifier we are working on (we'd need the same for constraints btw, did not check yet whether those were always properly accessible from the
poll
functions of their operators either).So always having access to an active modifier would work for that specific case at least.
This is basically already implemented if I understand this idea correctly.
UI_region_panel_custom_data_under_cursor
is that lookup function. The problem is this is not accessible without the event (not in poll functions) so we need to store the active panel custom data somewhere. The invoke functions should probably be refactored to use that stored version instead of the lookup function then.@mont29 This image might make you happy:
{F9373310 size=full}
We're using an active modifier to set the node editor context for geometry nodes. Then the modifier shortcuts only affect the active modifier.
Enhance ways to access to 'active' modifier for poll functions of operators.to Enhance ways of accessing active modifier for poll functions of operators