Age | Commit message (Collapse) | Author |
|
- Add logging for CLICK_DRAG event handling to debug drag events.
- Use logging API for reporting the key-map, operator and event.
This command now prints useful information for investigating
key-map and event handling issues:
blender --log "wm.handler.*" --log-level 4
|
|
- Replace SPACE_TYPE_LAST with SPACE_TYPE_NUM (adding 1).
- Rename RGN_TYPE_LEN to RGN_TYPE_NUM
This makes it possible to tag space-type/region-type combinations
with `bool tag[SPACE_TYPE_NUM][RGN_TYPE_NUM]` which reads more clearly
than `bool tag[SPACE_TYPE_LAST + 1][RGN_TYPE_LEN]`.
|
|
color attribute system.
This commit removes sculpt colors from experimental
status and unifies it with vertex colors. It
introduces the concept of "color attributes", which
are any attributes that represents colors. Color
attributes can be represented with byte or floating-point
numbers and can be stored in either vertices or
face corners.
Color attributes share a common namespace
(so you can no longer have a floating-point
sculpt color attribute and a byte vertex color
attribute with the same name).
Note: this commit does not include vertex paint mode,
which is a separate patch, see:
https://developer.blender.org/D14179
Differential Revision: https://developer.blender.org/D12587
Ref D12587
|
|
This is to improve grammatical consistency with other selection options.
Maniphest Tasks: T96745
Differential Revision: https://developer.blender.org/D14444
|
|
Replace 5 arguments with a single struct as the same arguments
are used in many places.
This didn't read well and was confusing with both arguments named
`val` & `value` in the case of WM_modalkeymap_add_item.
|
|
When custom properties are changed, they are displayed with brackets in
info.
Ref D14380
|
|
Regression in [0] which removed a special check when tweak events ended.
Add a similar check for drag events that runs drag is disabled in the
main event handling loop.
[0]: 4986f718482b061082936f1f6aa13929741093a2
|
|
|
|
This isn't stored in blend files so it can be moved out of DNA.
Also use an enum for `WM_FILESEL_*` members.
|
|
Since the XR area does not have any region geometry, hud updates from
operators would cause invalid access when updating region sizes.
|
|
|
|
Reserve "filename" when only the name component is used.
|
|
When converting ghost keys to Blender's event system:
- All keys that aren't part of the GHOST_TKey enum map to EVENT_NONE
(ignored), note that it's an internal error if the value of key isn't
a known value.
- Modify the switch statement so any missing members of GHOST_TKey
warn at compile time (GCC & Clang only).
- GHOST_kKeyUnknown maps to EVT_UNKNOWNKEY.
We could ignore this key, changing can be evaluated separately.
|
|
Avoid adding events with their type set to EVENT_NONE as these
can't be categorized usefully (keyboard/mouse/NDOF ... etc),
and add an extra case that needs to be accounted for.
Adding these events seems to be an unintentional change from [0],
these keys used to be ignored in 2.4x.
[0]: a1c8543f2acd7086d412cb794b32f96794b00659
|
|
Caused by 08d8eee006f7e2a7ac05ef691bbaee230cbfbe5a.
|
|
Adding WITH_METAL option to CMAKE to guard compilation for macOS only. Implemented stub METALBackend to mirror GPUBackend interface and added capabilities initialisation, along with API initialisation paths.
Global rendering coordination commands added to backend with GPU_render_begin and GPU_render_end() commands globally wrapping GPU work. This is required for Metal to ensure temporary resources are generated within an NSAutoReleasePool and freed accordingly.
Authored by Apple: Michael Parkin-White, Vil Harvey, Marco Giordano, Michael Jones, Morteza Mostajabodaveh, Jason Fielder
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D14293
|
|
Also fixes missing code to read/write/free/copy color management settings
in various places. This can't be set through the UI currently, but still
should be handled consistently.
|
|
The array for event.flag was too big, harmless but incorrect.
Remove the size from the declaration as it's not needed.
|
|
- Use set-style printing of modifier flags instead of booleans.
- Include event.flag.
- Print on a single line (so output can be more easily filtered).
|
|
In some cases value of cursor motion events was set from the last event
written to the wmWindow.eventstate. Avoid potential errors by ensuring
cursor motion events always have their value set to KM_NOTHING.
|
|
Needed so mapping selection to click doesn't pass the click event
through to setting the 3D cursor for e.g.
While this doesn't happen with the default key-map, setting selection
to LMB-click would set the 3D cursor as well (when the selection
fell through to nothing).
|
|
Currently this isn't used in the key-map, it will eventually
allow the 3D viewports tweak tool to match the behavior of other
editors that support tweaking a selection without first de-selecting
all other elements.
|
|
So far it was needed to declare a new RNA struct to `RNA_access.h` manually.
Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property
declarations. Now this also includes the RNA struct declarations, so they don't
have to be added manually anymore.
Differential Revision: https://developer.blender.org/D13862
Reviewed by: brecht, campbellbarton
|
|
Contributed by luzpaz.
Differential Revision: https://developer.blender.org/D14307
|
|
Change early drag evaluation added in
1f1dcf41d51a03150ee38f220c590f8715b11e88 to only apply to drag events
from mouse buttons. Otherwise pressing two keyboard keys at one would
create a drag event for the first pressed key. While this didn't cause
any bugs as far as I know, this behavior makes most sense for drags
that come from cursor input.
|
|
Only set press events in the windows eventstate, not the current event
since it's not useful for these to be set current events press values.
This makes it possible for a press event to access values for the
previous press.
|
|
Activating a gizmo used the windows eventstate which may have values
newer than the event used to activate the gizmo.
This meant transforms check for the key that activated transform
could be incorrect.
Support passing an event when calling operators to avoid this problem.
|
|
When dragging with a large threshold (using a tablet for example),
it's possible to press another key before the drag threshold is reached.
So tweaking then pressing X would show the delete popup instead of
transforming along the X-axis.
Now key presses while dragging cause the drag event to be evaluated
before the key press.
Note that to properly base the mouse-move event on the previous
state the last handled event is now stored in the window.
Without this the inserted mouse-move event may contain invalid values
from the next event (it's modifier state or other `prev_*` values).
Requested by @JulienKaspar.
|
|
Regression in 08d8eee006f7e2a7ac05ef691bbaee230cbfbe5a caused
emulate-middle mouse to work once, clearing the modifier key.
Now the modifier key from emulated mouse events is never stored
in the windows event-state.
|
|
|
|
|
|
The brushes that are still called "Test" still need to be changed
until they can get their correct name.
Ref T96259.
|
|
|
|
At the time of naming these members only some event types generated
click events so it made some sense to differentiate a click.
Now all buttons support click & drag it's more logical to use the
prefix "prev_press_" as any press event will set these values.
Also update doc-strings.
|
|
This avoids transform jumping which is a problem when tweaking values a
small amount. A fix for T40549 was made box-select used the location
when the key was pressed.
While it's important for box-select or any operator where it's expected
the drag-start location is used, this is only needed in some cases.
Since the event stores the click location and the current location,
no longer overwrite the events real location. Operators that depend on
using the drag-start can use this location if they need.
In some cases the region relative cursor location (Event.mval) now needs
to be calculated based on the click location.
- Added `WM_event_drag_start_mval` for convenient access to the region
relative drag-start location (for drag events).
- Added `WM_event_drag_start_xy` for window relative coordinates.
- Added Python property Event.mouse_prev_click_x/y
Resolves T93599.
Reviewed By: Severin
Ref D14213
|
|
Support this for completeness, as it's simpler to support click-drag
for all events types that support press/release instead of having to
document which kinds buttons support click-drag.
|
|
This simplifies checking for event types that support press & release.
|
|
Also simplify modifier & keymodifier assignment.
|
|
|
|
|
|
Just use the image-buffer size and the already provided scale to
determine the size, not the button size (which would always have to
match the scaled image-buffer size or it would give unexpected results).
|
|
Use-after-free in context store, which wasn't cleared correctly after
setting and querying.
|
|
|
|
No functional changes, largely restoring old logic & removing the need
for workarounds.
Reverts:
- 13b6cec039681db40e677463aa9fdff6d55896aa.
- aa71414dfca7f301e101cce3e72551e7529290ea (partially).
|
|
This feature was never exposed to users.
|
|
Since removal of tweak events 4986f718482b061082936f1f6aa13929741093a2,
box-select is activating while dragging files.
As far as I can tell this used to work because of differences
int the order tweak / click-drag events are handled.
Apply a workaround since dragging files doesn't prevent other parts
of the UI from activated (it's possible to open menus for e.g),
this is something we will likely want to limit which would resolve
this bug too.
|
|
Partially revert aa71414dfca7f301e101cce3e72551e7529290ea
This attempted have the click-drag event compatible with old tweak
events, but needs to be re-thought since it caused events to be handled
in unexpected situations.
|
|
Correct check for left-mouse event which assumed the alternative was
a tweak event.
Also remove print added by accident.
|
|
Always use event.prev_click_type since this is never set on key-release,
which could still interrupt dragging (box selecting for example).
|
|
This branch was previously run when the action had been handled,
since action checks were removed it was running. This assignment
does nothing but shouldn't be kept.
|