Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-29Fix T63795: Display custom properties with brackets in infoYuki Hashimoto
When custom properties are changed, they are displayed with brackets in info. Ref D14380
2022-03-29Fix T96701: RMB select fails to show gizmo on mouse button releaseCampbell Barton
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
2022-03-28Fix various UI messages issues.Bastien Montagne
2022-03-26Cleanup: move eFileSel_Action from DNA to WM_api.hCampbell Barton
This isn't stored in blend files so it can be moved out of DNA. Also use an enum for `WM_FILESEL_*` members.
2022-03-25XR: Fix crash on executing some action operatorsPeter Kim
Since the XR area does not have any region geometry, hud updates from operators would cause invalid access when updating region sizes.
2022-03-25Cleanup: spelling in comments, stringsCampbell Barton
2022-03-24Cleanup: use "filepath" instead of "filename" for full pathsCampbell Barton
Reserve "filename" when only the name component is used.
2022-03-23Event System: improve handling of unknown keysCampbell Barton
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.
2022-03-23Event System: ignore keys such as print-screen & num-lockCampbell Barton
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
2022-03-23Fix T96712: Debug Assert with PrintScrn & ScrollLock keysCampbell Barton
Caused by 08d8eee006f7e2a7ac05ef691bbaee230cbfbe5a.
2022-03-22Metal: Initial Implementation of Metal Backend for GPU Module.Jason Fielder
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
2022-03-21Cleanup: add image_format.cc for functions related to ImageFormatDataBrecht Van Lommel
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.
2022-03-21Correct error in 3dc44f8c89acc082334034982ffc8bc802f23475Campbell Barton
The array for event.flag was too big, harmless but incorrect. Remove the size from the declaration as it's not needed.
2022-03-21Event System: improve event printingCampbell Barton
- 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).
2022-03-21Cleanup: cursor motion events now have value set to KM_NOTHINGCampbell Barton
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.
2022-03-17View 3D: the select operator now uses the cancel flag on failureCampbell Barton
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).
2022-03-17View 3D: support for select passthrough when picking selected itemsCampbell Barton
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.
2022-03-14Auto-generate RNA-structs declarations in `RNA_prototypes.h`Julian Eisel
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
2022-03-11Cleanup: fix source comment typosBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D14307
2022-03-11Event System: limit early evaluation of drag actions to mouse buttonsCampbell Barton
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.
2022-03-11Event System: only set press values in win->eventstateCampbell Barton
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.
2022-03-11Fix out of order event handling when calling operators from gizmosCampbell Barton
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.
2022-03-10Event System: key-press while dragging now activates drag firstCampbell Barton
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.
2022-03-10Fix T96279: 'Emulate 3 button mouse' fails to emulate MMBCampbell Barton
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.
2022-03-10Cleanup: de-duplicate event customdata freeing logicCampbell Barton
2022-03-10Cleanup: use 'WM_file_' prefix for file operationsCampbell Barton
2022-03-09Curves: rename initial brushesJacques Lucke
The brushes that are still called "Test" still need to be changed until they can get their correct name. Ref T96259.
2022-03-09Cleanup: use ELEM macroCampbell Barton
2022-03-09Cleanup: rename wmEvent.prev_click_* to prev_press_*Campbell Barton
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.
2022-03-09Event System: drag events no longer default to the drag start locationCampbell Barton
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
2022-03-08Event System: click/click-drag support for NDOF buttonsCampbell Barton
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.
2022-03-08Event System: add ISKEYBOARD_OR_BUTTON macroCampbell Barton
This simplifies checking for event types that support press & release.
2022-03-08Event System: refactor click detection into functionCampbell Barton
Also simplify modifier & keymodifier assignment.
2022-03-04Cleanup: remove outdated references to tweakCampbell Barton
2022-03-04Cleanup: spelling in comments, function nameCampbell Barton
2022-03-03Cleanup: Remove redundant drag image size parametersJulian Eisel
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).
2022-03-03Fix T96140: Crash on color button drag & dropJulian Eisel
Use-after-free in context store, which wasn't cleared correctly after setting and querying.
2022-03-03Cleanup: comments in wm_event_system.cCampbell Barton
2022-03-03Event System: use more thoroughly tested logic for click-drag eventsCampbell Barton
No functional changes, largely restoring old logic & removing the need for workarounds. Reverts: - 13b6cec039681db40e677463aa9fdff6d55896aa. - aa71414dfca7f301e101cce3e72551e7529290ea (partially).
2022-03-03Cleanup: remove references to key-map modifier values denoting orderCampbell Barton
This feature was never exposed to users.
2022-03-02Fix/Workaround T96120: Crash dropping from the file browserCampbell Barton
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.
2022-03-02Fix T96123: Crash when click-dragging across the visibility iconsCampbell Barton
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.
2022-03-02Fix modal item open/close in the outliner since removing tweak eventsCampbell Barton
Correct check for left-mouse event which assumed the alternative was a tweak event. Also remove print added by accident.
2022-03-02Fix releasing modifier keys suppressing drag eventsCampbell Barton
Always use event.prev_click_type since this is never set on key-release, which could still interrupt dragging (box selecting for example).
2022-03-02Cleanup: misleading code from aa71414dfca7f301e101cce3e72551e7529290Campbell Barton
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.
2022-03-02Docs: document the use_axis_view argumeht to view_roll_angleCampbell Barton
Also remove event print left in by accident.
2022-03-02Cleanup: rename direction enum as it's part of the key-map itemCampbell Barton
Also improve doc-strings for key-map item constants.
2022-03-02Event System: remove tweak events in favor of click-dragCampbell Barton
Supporting two kinds of dragging is redundant, remove tweak events as they only supported 3 mouse buttons and added complexity from using the 'value' to store directions. Support only click-drag events (KM_CLICK_DRAG) which can be used with any keyboard or mouse button. Details: - A "direction" member has been added to keymap items and events which can be used when the event value is set to KM_CLICK_DRAG. - Keymap items are version patched. - Loading older key-maps are also updated. - Currently the key-maps stored in ./release/scripts/presets/keyconfig/ still reference tweak events & need updating. For now they are updated on load. Note that in general this wont impact add-ons as modal operators don't receive tweak events. Reviewed By: brecht Ref D14214
2022-03-02Event System: support "Release Confirms" for click-drag eventsCampbell Barton
2022-03-02Fix click-drag events for dragging markersCampbell Barton
Clicking and dragging markers accumulates flags from multiple operators in a way that can't be interpreted when combine. Follow tweak behavior for cancelling click-drag events.