Fix #129630: Inconsistent marker selection #129841
No reviewers
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
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#129841
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ideasman42/blender:pr-timeline-shortcut-fix"
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?
key selection in the dopesheet.
Note that the prevents timeline over the tineline from being handled in the underlying region.
I made the change after investigating clicking and dragging issues between the dope-sheet & markers.
While it would be possible to make dragging events work between them, as far as I can see it would be difficult to manage and result in event handling being quite fragile (the dope sheet being aware of event handling state of markers for e.g.).
Let's not address this for now. The Animation & Rigging module will be doing much more invasive changes to the dope sheet & other animation editors for the Layered Animation project anyway. And apart from that, I think it's quite OK to either do operations on the markers, or on the rest of the editor contents.
@ -1354,2 +1316,4 @@
View2D *v2d = UI_view2d_fromcontext(C);
int ret_val = OPERATOR_FINISHED;
TimeMarker *nearest_marker = region_position_is_over_marker(v2d, markers, mval[0]);
bool found = (nearest_marker != nullptr);
const bool
@ -1355,1 +1317,4 @@
int ret_val = OPERATOR_FINISHED;
TimeMarker *nearest_marker = region_position_is_over_marker(v2d, markers, mval[0]);
bool found = (nearest_marker != nullptr);
bool is_selected = (nearest_marker && nearest_marker->flag & SELECT);
const bool
@ -1358,3 +1322,1 @@
float frame_at_mouse_position = UI_view2d_region_to_view_x(v2d, mval[0]);
int cfra = ED_markers_find_nearest_marker_time(markers, frame_at_mouse_position);
ret_val = select_timeline_marker_frame(markers, cfra, extend, wait_to_deselect_others);
float frame_at_mouse_position = UI_view2d_region_to_view_x(v2d, mval[0]);
const float
@ -1359,2 +1322,2 @@
int cfra = ED_markers_find_nearest_marker_time(markers, frame_at_mouse_position);
ret_val = select_timeline_marker_frame(markers, cfra, extend, wait_to_deselect_others);
float frame_at_mouse_position = UI_view2d_region_to_view_x(v2d, mval[0]);
int cfra = ED_markers_find_nearest_marker_time(markers, frame_at_mouse_position);
const int
@ -197,6 +197,14 @@ bool ED_time_scrub_event_in_region(const ARegion *region, const wmEvent *event)
return BLI_rcti_isect_pt_v(&rect, event->xy);
}
bool ED_time_scrub_event_in_region_poll(const wmWindow * /*win*/,
I'd add a comment that this function needs to fit the signature
WM_event_add_keymap_handler_poll()
expects, so that it's clear why it's calling a function with the exact same signature (except the two unused parameters).@ -35,2 +36,4 @@
* \{ */
/**
* Public API for getting markers from the scene & area.
Document what kind of pointer the
ListBase
contains, so that the function is usable without inspecting its implementation.@ -477,2 +480,4 @@
wmKeyMap *keymap,
EventHandlerPoll poll);
bool WM_event_handler_region_v2d_mask_test(const wmWindow *win,
Document what this function returns/tests for.
Also: What's the reason this is a "test" function, while it's being used as a "poll" parameter and the other functions in this family are also named "poll"?
If these really are different categories, some documentation to explain the difference would be nice. If they are the same, then use the same terminology.
They're the same, renaming
_test(..)
to_poll(..)
.@ -479,0 +484,4 @@
const ScrArea *area,
const ARegion *region,
const wmEvent *event);
bool WM_event_handler_region_v2d_mask_no_marker_test(const wmWindow *win,
Document what this function returns/tests for.
@ -4842,0 +4859,4 @@
const_cast<ScrArea *>(area));
if (markers && !BLI_listbase_is_empty(markers)) {
rcti rect = region->winrct;
rect.ymax = rect.ymin + UI_MARKER_MARGIN_Y;
This seems to be tightly coupled to the drawing code. Add a comment here that says which code this has to be in sync with, and also add a comment at the other code that it has to be in sync with this function.
The code is currently scattered about, noted to check functions that use
UI_MARKER_MARGIN_Y
, but I think this is a candidate for a refactor that adds functions to return thercti
for the margin/main regions.Notes in comment.
@ -35,3 +35,3 @@
};
using EventHandlerPoll = bool (*)(const ARegion *region, const wmEvent *event);
using EventHandlerPoll = bool (*)(const wmWindow *win,
What's the reason this type alias is defined twice, once here and once in
source/blender/windowmanager/WM_api.hh
? Shouldn't this have a comment that says these should be kept in sync? Or can't they just be in one header without any duplication?I was surprised to see this too, agree it should be either de-duplicated or noted as a duplicate, in practice getting out of sync will fail to compile.
Since the duplicate was there already, I don't think it's that important to deduplicate for this PR -- I just wanted to voice my surprise. The 'changes requested' as mostly about the
const
use + some welcome documentation.As it happens this declarations looks to be redundant (this header includes both declarations), but I'll leave cleanups out of this PR.
095d10856c
to86c3755437
Updated the PR to address comments.
Some other changes:
"Markers"
key-map handler intowm_event_system.cc
so it can be shared by the function that excludes marker events.MARKER_OT_select
&ACTION_OT_clickselect
internals are similar & should be kept in sync.@blender-bot build
@blender-bot build