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
2020-11-06Cleanup: follow our code style for float literalsCampbell Barton
2020-10-29Allow Trackpad Ctrl-Pan to Cycle Enum ValuesYevgeny Makarov
Allow Trackpad Ctrl-Pan to cycle enum values. Also allows cycling in more button types. Differential Revision: https://developer.blender.org/D8535 Reviewed by Brecht Van Lommel
2020-10-27Fix use after free in interface handlerHans Goudey
ASAN reported a use after free in after rB15d78ea85b602c. This commit removed a reassignment of the `data` variable here that was actually required because it may have been freed earlier in the function. This sort of error would be avoided if the same variable wasn't reused for different purposes.
2020-10-21WM: ensure is_repeat isn't copied from the last eventCampbell Barton
This means if a keymap item is set to ignore repeat events, it may do so accidentally from this setting being copied.
2020-10-19Spelling: MiscellaneousHarley Acheson
Corrects 34 miscellaneous misspelled words. Differential Revision: https://developer.blender.org/D9248 Reviewed by Campbell Barton
2020-10-15UI: Add reset to default value to keymapHans Goudey
With all the work on DNA defaults for 2.91, it's nice to expose this convenient operator. This was already hardcoded in the UI code to the backspace key, adding it to the keymap instead will make the shortcut automatically show in the button right click menu. Differential Revision: https://developer.blender.org/D9219
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-09UI: use Ctrl-TrackPad to cycle valuesYevgeny Makarov
Minor change missing from 9bfea67751dc59554c8928802b4e1f04278ab537 Ref D8530
2020-10-03Cleanup: Remove/replace C standard library assert() and header usagesJulian Eisel
We have our own assert implementation, `BLI_assert()` that is prefered over the C standard library one. Its output is more consistent across compilers and makes termination on assert failure optional (through `WITH_ASSERT_ABORT`). In many places we'd include the C library header without ever accessing it.
2020-10-02Fix T78503: Disabled layout portion passes mouse throughHans Goudey
3D Viewport -> Sidebar -> View -> Local Camera is disabled. When you click on it, box select starts. This behavior isn't intended, and fixing it is quite simple. The only case where this would continuing would still be desired is if a disabled button overlapped with a non-disabled button, but this shouldn't be the case anywhere. Differential Revision: https://developer.blender.org/D8832
2020-09-30Cleanup: Reduce indentationHans Goudey
Instead of indenting the entire functional block, check for the error case and the supported case early to make the code more readable.
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-21Fix assert failure when using Ctrl+Mousewheel on Object Mode buttonJulian Eisel
Do a proper check to see if the button supports Ctrl+Mousewheel cycling. See T80659.
2020-09-19Cleanup: use parenthesis for if statements in macrosCampbell Barton
2020-09-18UI: Support interacting with superimposed icons while editingJulian Eisel
For example you can now start entering text in the Properties or Outliner search, and press the 'x' while the button is still in text-edit mode. This way you don't have to exit text editing first, before being able to quickly clear the string with a mouse click. So this is a small improvement for convenience. It also works for the eyedropper (change to picking an object while text editing) or the '+' and '-' icons in the file saving dialog.
2020-09-18UI: Support mouse over highlighting for superimposed iconsJulian Eisel
E.g. the 'x' icons or eyedropper icons in text buttons. They didn't use to have any mouse over feedback, now we dim the icon until hovered. This kind of feedback helps users see that the icons are interactive, and if they are within their interaction hotspot.
2020-09-18UI: Correct superimposed icon interaction hotspotJulian Eisel
The hotspot was slighly too large, which could be apparent in cases where there are multiple superimposed icons.
2020-09-16Cleanup: spellingCampbell Barton
2020-09-09Cleanup: Rename public "bUnit" functionsHans Goudey
This commit renames the functions in "BKE_unit.h` to be consistent with the naming in the rest of blenkernel. bUnit_AsString -> BKE_unit_value_as_string_adaptive bUnit_AsString2 -> BKE_unit_value_as_string bUnit_ReplaceString -> BKE_unit_replace_string bUnit_ApplyPreferredUnit -> BKE_unit_apply_preferred_unit bUnit_ToUnitAltName -> BKE_unit_name_to_alt bUnit_ClosestScalar -> BKE_unit_closest_scalar bUnit_BaseScalar -> BKE_unit_base_scalar bUnit_IsValid -> BKE_unit_is_valid bUnit_GetSystem -> BKE_unit_system_get bUnit_GetBaseUnit -> BKE_unit_base_get bUnit_GetBaseUnitOfType -> BKE_unit_base_of_type_get bUnit_GetName -> BKE_unit_name_get bUnit_GetNameDisplay -> BKE_unit_display_name_get bUnit_GetIdentifier -> BKE_unit_identifier_get bUnit_GetScaler -> BKE_unit_scalar_get bUnit_IsSuppressed -> BKE_unit_is_suppressed Differential Revision: https://developer.blender.org/D8828
2020-09-04UI Code Quality: Use derived struct for number buttonsJulian Eisel
For the man rationale behind this design, see 49f088e2d093. Further, this removes users of uiBut.a1/uiBut.a2, which is a very ugly design choice (hard to reason about). Note that I had to do rather ugly, specific exceptions for the number buttons in `ui_def_but_rna()`. But once all users of a1/a2 are removed, this special handling shouldn't be needed anymore. I also had to move a sanity check out of the button definition. It's now moved into a new debug only sanity checking function executed when finishing the layout definition (block end).
2020-09-04Curve Profile: Miscellaneous cleanupHans Goudey
- Declare variables where they are initialized - Use consistent variable and static function names - Use helper functions more for common operations - Remove use of BezTriple struct, use CurveProfilePoint instead - Apply small simplifications to code in some situations
2020-09-04Cleanup: typo fix in a commentSybren A. Stüvel
No functional changes.
2020-09-02Cleanup: use bool instead of int in various placesJacques Lucke
2020-08-26Docs: comments for interface_handlers.cCampbell Barton
Explain why some features have defines, also use doxy sections for defines & prototypes.
2020-08-26Cleanup: use const variables in interface codeCampbell Barton
2020-08-26Cleanup: build without USE_KEYNAV_LIMIT definedCampbell Barton
2020-08-25Cleanup: Declare variables where they are initializedHans Goudey
Further changes to interface_handlers.c to avoid a block of variable declarations at the beginning of functions. Also use const in some situations. I only made changes where the variable's intended scope was obvious.
2020-08-25Cleanup in interface_handlers.cValentin
- Reduce variables scope - Use some const prefixes - Initialize variables at declaration - Use comparison to boolean false instead of 0 Differential Revision: https://developer.blender.org/D8678
2020-08-19UI Code Quality: Use LISTBASE_FOREACH in interface directoryHans Goudey
I only skipped a few loops in the monstrous ui_handle_menu_event function. Also, I only changed variable names where necessary to prevent redeclarations. Differential Revision: https://developer.blender.org/D8586
2020-08-18Merge branch 'blender-v2.90-release' into masterCampbell Barton
2020-08-18Fix incorrect pixelsize use where DPI scale was intendedCampbell Barton
Changing line-width shouldn't scale cursor motion. Related to T79787. Use dpi_fac for scaling curve error threshold & number button drag threshold calculation.
2020-08-16Cleanup: Quiet GCC maybe uninitialized warningHans Goudey
There was a false positive here. Thankfully, marking the button's type as constant can quiet the warning.
2020-08-14UI Code Quality: Use derived struct for color ramp buttonsHans Goudey
The same changes as rB570044e9f412 and rB0ab21bf06ae0.
2020-08-14UI Code Quality: Use derived struct for curve mapping buttonsHans Goudey
The same changes as in rB570044e9f412.
2020-08-14UI Code Quality: Use derived struct for curve profile buttonsHans Goudey
Continuing the work from rB49f088e2d093. Differential Revision: https://developer.blender.org/D8561
2020-08-07Fix compile error with WITH_INPUT_NDOF after last own commitJulian Eisel
Caused by dcff28e1e7a8.
2020-08-07UI Code Quality: Use derived struct for HSV Cube buttonsJulian Eisel
For the main rationale behind this design, see 49f088e2d093. Further, this removes users of uiBut.a1, which is a very ugly design choice (hard to reason about). Part of T74432.
2020-08-07UI Code Quality: Use derived struct for color buttonsJulian Eisel
For the main rationale behind this design, see 03b122e2a18df. Further, this removes users of `uiBut.a1`/`uiBut.a2`, which is a very ugly design choice (hard to reason about). Part of Part of T74432.
2020-08-07UI Code Quality: Use derived structs for search buttons and decoratorsJulian Eisel
The current on-size-fits-all `uiBut` creates quite a mess, where it's hard to reason about which members are free for use, under which conditions they are used and how. `uiBut` also has members that aren't used at times, violating the "don't pay for what you don't use" principle. To address this, we want to move to typed buttons, where `uiBut` is just a base struct and each type extends it as needed. That structures data better and type specific data is only available if it's actually used by a button type. Two trade-offs: * Many casts to the derived type have to be done. * Sometimes we change the button type after it's created. So I had to add logic to reallocate the button for use with the new, possibly derived struct. Ideally that wouldn't be needed, but for now that's what we have. Part of T74432. Differential Revision: https://developer.blender.org/D7610 Reviewed by: Brecht Van Lommel, Campbell Barton
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-08-05Merge branch 'blender-v2.90-release'Julian Eisel
2020-08-05Fix T78907: Renaming file doesn't work while mouse is over file iconJulian Eisel
The icons are label buttons. Usually these are not editable and can not become active. These are draggable ones though (so dragging files can be dragged by dragging the icon) which creates an exception to this rule. So hovering the icon would activate its label and when executing the rename operator via shortcut it wouldn't get exited properly. This broke the invariant of only allowing a single active button at a time. Added an assert to check that invariant now. Letting the code to activate the text button ensure any currently active button is exited seems sensible.
2020-08-05Merge branch 'blender-v2.90-release' into masterNathan Craddock
2020-08-05Fix T72297: disabled buttons toggling on dragNathan Craddock
Disabled buttons would incorrectly toggle state when a drag toggle passed over them. This adds a check to prevent a drag toggle on disabled buttons. Differential Revision: https://developer.blender.org/D8476
2020-07-31Merge branch 'blender-v2.90-release'Philipp Oeser
2020-07-31UI: fix buttons ranges not properly updated when tabbing to next/previousPhilipp Oeser
button This was reported for the FCurve modifier restrict ranges, but might fail elsewhere, too. Reason is that the post_but has its range (hardmin/ hardmax etc) set before the updates to the active button take place, so changes here dont end up on the post_but (even though the RNA range function is properly called for a new defined button - new one is not the same as the post_but though). Now update the ranges on the post_but when that gets active. Fixes T78763 Maniphest Tasks: T78763 Differential Revision: https://developer.blender.org/D8265
2020-07-30Cleanup: Rename defineHans Goudey
*_LEN follows names elsewhere in Blender more closely than "_N_"
2020-07-29Cleanup: rename uiBut.dt, uiBlock.dt to 'emboss'Campbell Barton
Use 'emboss' instead of 'draw_type' as enum, layout & functions use the term emboss. This issue was noted by @Poulpator in D8414, as `dt` is also an abbreviation for delta-time.
2020-07-27Cleanup: match call signature for UI unit number evaluationCampbell Barton
Also rename ui_but_string_set_eval_num to ui_but_string_eval_number as it doesn't set any of the buttons values.
2020-07-21Cleanup: spellingCampbell Barton