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-25Cleanup: spelling in comments, stringsCampbell Barton
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-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-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-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-04Cleanup: remove outdated references to tweakCampbell Barton
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-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-02-25Cleanup: use flags for wmEvent modifier keysCampbell Barton
Using flags makes checking multiple modifiers at once more convenient and avoids macros/functions such as IS_EVENT_MOD & WM_event_modifier_flag which have been removed. It also simplifies checking if modifier keys have changed.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-09Cleanup: GHOST_ISystem::toggleConsole APIShrey Aggarwal
GHOST_ISystem::toggleConsole had a somewhat misleading name it could be fed 4 different values, so it was not as much a toggle as a set console window state. This change renames `toggleConsole` to a more appropriately named `setConsoleWindowState` and replaces the integer it had to an enum so it's easy to tell what is being asked of it at the call site. Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D14020
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-08Cleanup: move public doc-strings into headers for 'windowmanager'Campbell Barton
Ref T92709
2021-11-05Cleanup (UI): Add/use type for operator context enumJulian Eisel
Adds a `wmOperatorCallContext` typedef for the existing `WM_OP_XXX` operator context enum. This adds type safety, allows the compiler to produce better warnings and helps understanding what a variable is for. Differential Revision: https://developer.blender.org/D13113 Reviewed by: Campbell Barton
2021-10-26XR Controller Support Step 5: NavigationPeter Kim
Adds navigation transforms (pose, scale) to the XR session state that will be applied to the viewer/controller poses. By manipulating these values, a viewer can move through the VR viewport without the need to physically walk through it. Add-ons can access these transforms via Python (XrSessionState.navigation_location/rotation/scale) to use with custom operators. Also adds 3 new VR navigation operators that will be exposed to users as default actions in the VR Scene Inspection add-on. While all three of these operators have custom properties that can greatly influence their behaviors, for now these properties will not be accessible by users from the UI. However, other add-ons can still set these custom properties if they desire. 1). Raycast-based teleport Moves the user to a location pointed at on a mesh object. The result can optionally be constrained to specific axes, for example to achieve "elevation snapping" behavior by constraining to the Z-axis. In addition, one can specify an interpolation factor and offset. Credit to KISKA for the elevation snapping concept. 2). "Grab" navigation Moves the user through the viewport by pressing inputs on one or two held controllers and applying deltas to the navigation matrix based on the displacement of these controllers. When inputs on both controllers are pressed at the same time (bimanual interaction), the user can scale themselves relative to the scene based on the distance between the controllers. Also supports locks for location, rotation, and scale. 3). Fly navigation Navigates the viewport by pressing a button and moving/turning relative to navigation space or the VR viewer or controller. Via the operator's properties, one can select from a variety of these modes as well as specify the min/max speed and whether to lock elevation. Reviewed By: Severin Differential Revision: https://developer.blender.org/D11501
2021-10-22Fix errors in be171b295fc7dGermano Cavalcante
´´´ error C4133: 'function': incompatible types - from 'float [2]' to 'int *' error C4133: 'function': incompatible types - from 'const int [2]' to 'const float *' ´´´
2021-10-22Cleanup: Compile warningsAaron Carlisle
2021-10-21Cleanup: Use array utility for cursor eventsAaron Carlisle
2021-10-20Cleanup: use an array for wmEvent cursor position variablesAaron Carlisle
Use arrays for wmEvent coordinates, this quiets warnings with GCC11. - `x, y` -> `xy`. - `prevx, prevy` -> `prev_xy`. - `prevclickx, prevclicky` -> `prev_click_xy`. There is still some cleanup such as using `copy_v2_v2_int()`, this can be done separately. Reviewed By: campbellbarton, Severin Ref D12901
2021-10-15Fix crash using menu search without an active areaCampbell Barton
2021-10-15Cleanup: use const for context argumentCampbell Barton
2021-09-08Fix T91225: Quick Favorites and shortcuts are broken for some propertiesPhilipp Oeser
Caused by {rB3e4d720ae483}. Before above commit, this had a different path handling and RNA_path_from_ID_to_struct() was always used [which kind of took care of this]. Now this is only used if ptr represents an ID itself, so we are "loosing" part of the path. This patch adds the path back on the member_id in wm_context_member_from_ptr() for everthing related to space_data, so WM_context_path_resolve_property_full() can construct a full path even for these. Maniphest Tasks: T91225 Differential Revision: https://developer.blender.org/D12418
2021-09-02Cleanup: spelling in commentsCampbell Barton
2021-08-31Fix T90723: User menus & shortcuts fails for sequences, bones & NLACampbell Barton
Use context members instead of not working well or failing due to: - Missing "path" functions (in the case of edit-bones). - Paths containing names (in the case of sequence-strips or pose-bones). While technically correct it's not useful for shortcuts or menu items to lookup data by name.
2021-08-31Fix logical error resolving RNA pathsCampbell Barton
Only append RNA_path_from_ID_to_struct to context attributes if those paths resolve to ID types. Also simplify creating RNA paths by adding utility functions: - WM_context_path_resolve_property_full - WM_context_path_resolve_full Part of fix for T90723.
2021-08-23RNA: add length augmented to RNA_string_get_allocCampbell Barton
This was noted as a TODO as it wraps RNA_property_string_get_alloc which takes a length return argument.
2021-08-19Cleanup: reduce indentation in loops that check region visibilityCampbell Barton
2021-08-06Cleanup: use MEM_SAFE_FREE macroCampbell Barton
2021-07-30Cleanup: spelling in commentsCampbell Barton
2021-07-15UI: Internal support for custom UI list item drag & activate operatorsJulian Eisel
For pose libraries, we need to be able to apply a pose whenever activating (clicking) an item in the Pose Library asset view and blend it by dragging (press & move). And since we want to allow Python scripts to define what happens at least when activating an asset (so they can define for example a custom "Apply" operator for preset assets), it makes sense to just let them pass an operator name to the asset view template. The template will be introduced in a following commit.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-04-30Fix crash running window operators in background modeCampbell Barton
2021-04-16Fix missing owner_id values from 919558854d624f5db40acfa9f5674ac8c94873b6Campbell Barton
This prevented dynamic enum callbacks being called.
2021-04-16Fix T65064: Keymaps items controlling dynamic enums fail to exportCampbell Barton
Keymap UI and import/export could depend on the current context for dynamic enum's. Use STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID for OperatorProperties.
2021-03-24Cleanup: use new BLI_assert_unreachable macroCampbell Barton
2021-03-18Cleanup: spellingCampbell Barton
2021-03-05Cleanup: Use boolean in WM_cursor_waitAntonio Vazquez
2021-03-02UI: Clean up labels and descriptions: "Draw" to "Display"William Reynish
In Blender, we used to use the term 'draw' to refer to information displayed to the user. For version 2.80, it was decided to change these instances to 'display' instead. This was to avoid the ambiguity between end-user drawing tools and display options. From the Oxford English Dictionary: - Draw: produce (a picture or diagram) by making lines and marks on paper with a pencil, pen, etc. - Display: show (data or an image) on a computer, television, or other screen. Therefore, we should use draw when referring to drawing tools for making marks, but use display when referring to information shown/displayed to the user. From a user POV, the computer displays certain information, whereas the user draws a mark. Apparently this change was not implemented consistently, so this patch changes all remaining relevant instances of "draw". Differential Revision: https://developer.blender.org/D10551
2021-03-01Cleanup: Use LISTBASE_FOREACH and LISTBASE_FOREACH_MUTABLE macroGermano Cavalcante
2021-02-24UI: Cleanup and fix labels and descriptions in various placesYevgeny Makarov
Changes include using proper and consistent grammar, simplifying phrasing, using correct terminology, and not including python API identifiers in tooltips. Differential Revision: https://developer.blender.org/D9924
2021-02-24PyAPI: Fix memory leak of parameters used for python 'draw_callbacks'Germano Cavalcante
When closing the blender, while the callbacks are removed, the reference count of the object used as `customdata` is not decremented. This commit adds two functions that correctly release the python `draw_callbacks` before releasing all `draw_callbacks`. Differential Revision: https://developer.blender.org/D10478
2021-02-12WM: Add 'Confirm On Release' option for WM_OT_radial_controlJuanfran Matheu
Adds a new property called "Confirm On Release" that does what it says, confirm the action without having to do left-click or to press any other extra-key which concludes in a more dynamic and efficient way of changing brush size or strength for example, especially for tablet users. Reviewed By: campbellbarton Ref D10233
2021-01-28Fix T83539: 'activate_init' fails with buttons that have popupsCampbell Barton
Activating buttons was running too early, before the popup was positioned on the screen, causing data-selectors to be positioned incorrectly. As the early button activation isn't needed, remove this call. Ensure this doesn't happen again with an assert.
2021-01-02Cleanup: Explicitly pass icon size to generation function, not just boolJulian Eisel
* This way you don't have to look up the function declaration to know what the boolean value means. * You can call the function in a loop over the available sizes and pass the index as size. * Makes it easier to add a new size in future if needed.
2020-12-24UI: Cleanup spelling of compound wordsYevgeny Makarov
Approximately 138 changes in the spelling of compound words and proper names like "Light Probe", "Shrink/Fatten", "Face Map". In many cases, hyphens were used where they aren't correct, like "re-fit". Other common changes include: - "Datablock" -> "data-block" - "Floating point" -> "floating-point" - "Ngons" -> "n-gons" These changes help give the language used in the interface a consistent, more professional feel. Differential Revision: https://developer.blender.org/D9923