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-30Cleanup: use utility function to initialize SelectPick_ParamsCampbell Barton
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-17Cleanup: spelling in commentsCampbell Barton
Use <pre>..</pre> for pseudo-code.
2022-03-17Cleanup: include argument names for drop-box callbacksCampbell Barton
Indicates typical names for callbacks and allows them to be documented.
2022-03-15Cleanup: remove redundant 'extern StructRNA' declarationsGermano Cavalcante
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
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-14RNA: Generate property declerations header, solving msg-bus C++ incompatibilityJulian Eisel
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
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-10Cleanup: spelling in comments & some minor clarificationsCampbell 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: remove unused NDOF buttonsCampbell Barton
GHOST always converts NDOF keyboard buttons into keyboard events so there is no need to expose their values for Blender event types.
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-08Event System: exclude cursor & NDOF motion from ISHOTKEY() macroCampbell Barton
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.
2022-03-07Revert "Revert "Fix Crash: Switching to wireframe mode.""Campbell Barton
This reverts commit 25fc5876d3bb37018adcfe1a1b943b90d45f5f9a. Committed this unintentionally, looking into an alternate fix.
2022-03-07Revert "Fix Crash: Switching to wireframe mode."Campbell Barton
This reverts commit cb986446e29a51b07bdb73b999a0339df5ecdeb4.
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.