Age | Commit message (Collapse) | Author |
|
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.
|
|
Use <pre>..</pre> for pseudo-code.
|
|
Indicates typical names for callbacks and allows them to be documented.
|
|
After rB9b298cf3dbec, the `StructRNA` declarations can now be accessed via
`RNA prototypes.h`
Also, since all redundated declarations are now removed,
`_WM_MESSAGE_EXTERN_BEGIN` and `_WM_MESSAGE_EXTERN_END` are also no
longer needed.
Differential Revision: https://developer.blender.org/D14342
|
|
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
|
|
Lets `makesrna` generate a `RNA_prototypes.h` header with declarations for all
RNA properties. This can be included in regular source files when needing to
reference RNA properties statically.
This solves an issue on MSVC with adding such declarations in functions, like
we used to do. See 800fc1736748. Removes any such declarations and the related
FIXME comments.
Reviewed By: campbellbarton, LazyDodo, brecht
Differential Revision: https://developer.blender.org/D13837
|
|
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
|
|
GHOST always converts NDOF keyboard buttons into keyboard events
so there is no need to expose their values for Blender event types.
|
|
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.
|
|
In practice this didn't cause a bug since assigning hot-keys was also
checking for "press" events (which NDOF_MOTION doesn't generate).
Add ISNDOF_BUTTON macro which is now used by ISHOTKEY to avoid
problems in the future.
|
|
This reverts commit 25fc5876d3bb37018adcfe1a1b943b90d45f5f9a.
Committed this unintentionally, looking into an alternate fix.
|
|
This reverts commit cb986446e29a51b07bdb73b999a0339df5ecdeb4.
|
|
|
|
|
|
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.
|