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-24UI: Add Trackpad Smooth Scrolling for PopoversYevgeny Makarov
Adds smooth scrolling with the trackpad for popovers. Also fixes the position of the scroll arrows on high-DPI. Differential Revision: https://developer.blender.org/D9533 Reviewed by Brecht Van Lommel
2020-11-18Merge branch 'blender-v2.91-release'Campbell Barton
2020-11-18Fix undo UI text containing shortcuts & newlinesCampbell Barton
- Shortcuts were being shown in the undo history. - Multi-line tool-tips now only use the first line.
2020-11-06Cleanup: follow our code style for float literalsCampbell Barton
2020-10-28UI: Popover Position ChangeYevgeny Makarov
Move popover down a very slight amount to fix clipping of its arrow tip. Differential Revision: https://developer.blender.org/D9030 Reviewed by Julian Eisel
2020-10-19Spelling: Then Versus ThanHarley Acheson
Corrects incorrect usages of the words 'then' and 'than'. Differential Revision: https://developer.blender.org/D9246 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-03Property Search: Set panel expansion when tab changesHans Goudey
This commit makes the panel expansion set based on the search results when the active tab in the properties editor changes. The multi-tab search patch (D8859) actually doesn't handle this because it uses a different code path. This feature uncovered a subtle but fairly significant issue with the implementation of property search (More details in T81113). Basically, the search needed multiple redraws to properly display the expansion of panels based on the search results. Because there is no animation of panel expansion when switching tabs, the problem was exposed only now. With this commit, hiding of "search only" buttons and panel size calculation happens in a single final step of the panel layout pass. The "search only" layout root flag is removed. Instead every button inside a panel header is in a single "uiButtonGroup" marked with a specific "in header" flag, an idea which could be generalized in the future. Differential Revision: https://developer.blender.org/D9006
2020-10-03UI: Move button groups from layout to block levelHans Goudey
For a future patch (D9006) we need these groups for longer than just the the layout process, in order to differentiate buttons in panel headers. It may also be helpful in the future to have a way to access related buttons added in the same uiLayout.prop call. With this commit, the groups are stored in and destructed with the uiBlock.
2020-10-03Cleanup: run UserDef versioning from readfile.cCampbell Barton
Now versioning UserDef is run in readfile.c, as is done for other Blender data. Previously versioning was mixed with other run-time initialization, so it needed to be called later by the window manager.
2020-10-02Property Search: Differentiate search filtered and inactive buttonsHans Goudey
Currently there's no way to know if a button is inactive when it doesn't match the search results, because they use the same 50% gray level. This isn't a huge problem, but it could lead to confusion. This commit uses a subtle solution, a 25% opacity when the button is inactive and also filtered by search. This requires flipping the meaning of the UI_SEARCH_FILTER_MATCHES flag in the code, and also adding a widget_alpha_factor utility in the widget code. Differential Revision: https://developer.blender.org/D8975
2020-10-02Fix userpref.blend using version from startup.blendCampbell Barton
Version patching userpref.blend wasn't using the correct version, causing settings not to be properly updated. This seems the likely cause of T70196 and similar bugs.
2020-09-30Cleanup: sort struct declarationsCampbell Barton
2020-09-24Cleanup: Remove unecessary storage of search filter in uiBlockHans Goudey
Since the search is applied all in one phase, there is no need to store a reference to the search filter in every uiBlock. Instead just pass it as an argument to UI_block_apply_search_filter.
2020-09-24Property Search: Fix matches in headers not used for expansionHans Goudey
Setting the search match flag every time property search runs can invalidate the results for panel headers. Instead, clear the flag on every redraw and or the result of every search in the panel to it.
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-15UI: Single tab property searchHans Goudey
This adds a search bar to the properties editor. The full search for every tab isn't included in this patch, but the interaction with panels, searching behavior, UI, region level, and DNA changes are included here. The block-level search works by iterating over the block's button groups and checking whether they match the search. If they do, they are tagged with a flag, and the block's panel is tagged too. For every update (text edit), the panel's expansion is set to whether the panel has a result or not. The search also checks for matching strings inside enums and in panel labels. One complication to this that isn't immediately apparent is that closed panel's subpanels have to be searched too. This adds some complexity to the area-level panel layout code. Possible Future Improvements: - Use the new fuzzy search in BLI - Reset panels to their expansion before the search started if the user escape out of the text box. - Open all child panels of a panel with expansion. Differential Revision: https://developer.blender.org/D8856
2020-09-15Property Search: Build button groups for SearchHans Goudey
This is needed for property search (upcoming patch D8856) where a buttons labels are often separate buttons, but we need to highlight the label to show that a property is a search result. This is especially important in "property split" layouts where the label is almost always another button in a separate column. The button groups here are basically a flattened view of the buttons in the layout tree. Every function that adds a new set of buttons creates a new button group, and the new buttons are automatically added to the most recent group. Then, each group is searched separately in the property search phase. It's important that every function adding a new button set calls layout_root_new_button_group. Note that this won't be disabled when property search isn't active. It may be useful for other things in the future, and trying to pass that information to layout functions didn't feel worth it to me. Differential Revision: https://developer.blender.org/D8783
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-04UI Code Quality: Store curve-button gradient type in derived structJulian Eisel
We want to move away from using `uiBut.a1`/`a2`, which is a hard to reason about design. Part of T74432. Also correct comment.
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-09-04Fix T78084: Search does not accept text fragments everywherePhilipp Oeser
This was reported for the "Add Node" search functionality, but is relevant in other searches as well. So e.g. when searching for "Separate XYZ", typing "sep", then " " (with the intention to type "X" next) would clear the search field. Now use the same method (matching against all search words) as in F3 searching ('menu_search_update_fn') in other searches as well [searching IDs, property objects, finding nodes,...] This should give a much nicer search experience in general. Note: this does not touch other searches in the Dopesheet, Outliner, Filebrowser or User Preferences that have other search implementations. Maniphest Tasks: T78084 Differential Revision: https://developer.blender.org/D8232
2020-08-21UI: Cleanup in interface_panel.cHans Goudey
- Use const in some places where applicable - Use consistent variable names in some places - Use "r_" prefix for return arguments - Declare variables in smaller scope where they are used
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-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 progessbar buttonsJulian Eisel
For the main rationale behind this design, see 03b122e2a18df. 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-07Merge branch 'blender-v2.90-release' into masterJacques Lucke
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
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-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-20T77086 Animation: Passing Dependency Graph to DriversSybren A. Stüvel
Custom driver functions need access to the dependency graph that is triggering the evaluation of the driver. This patch passes the dependency graph pointer through all the animation-related calls. Instead of passing the evaluation time to functions, the code now passes an `AnimationEvalContext` pointer: ``` typedef struct AnimationEvalContext { struct Depsgraph *const depsgraph; const float eval_time; } AnimationEvalContext; ``` These structs are read-only, meaning that the code cannot change the evaluation time. Note that the `depsgraph` pointer itself is const, but it points to a non-const depsgraph. FCurves and Drivers can be evaluated at a different time than the current scene time, for example when evaluating NLA strips. This means that, even though the current time is stored in the dependency graph, we need an explicit evaluation time. There are two functions that allow creation of `AnimationEvalContext` objects: - `BKE_animsys_eval_context_construct(Depsgraph *depsgraph, float eval_time)`, which creates a new context object from scratch, and - `BKE_animsys_eval_context_construct_at(AnimationEvalContext *anim_eval_context, float eval_time)`, which can be used to create a `AnimationEvalContext` with the same depsgraph, but at a different time. This makes it possible to later add fields without changing any of the code that just want to change the eval time. This also provides a fix for T75553, although it does require a change to the custom driver function. The driver should call `custom_function(depsgraph)`, and the function should use that depsgraph instead of information from `bpy.context`. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D8047
2020-07-16LibOverride: Fix getting proper RNA path and ID from embedded ones.Bastien Montagne
Master collections and root node trees should now be working as expected in that regard.
2020-06-22UI: Widget: Replace geometry by fragment shader drawingClément Foucault
This means all the antiailasing is done inside the fragment shader. We use a Signed Distance Field to draw the 2D rounded boxes. This ensure the best quality for AA. This reduce the averge Batch for widget to 16 verts instead of ~600 and reduce overshading a lot. Theme Emboss alpha and tria alpha needs to be changed after this refactor. The shadow drawing is left unchanged and still use geometry. Reviewed By: Severin Differential Revision: https://developer.blender.org/D7833
2020-05-26UI: List Panel SystemHans Goudey
This implements a general system to implement drag and drop, subpanels, and UI animation for the stack UIs in Blender. There are NO functional changes in this patch, but it makes it relatively trivial to implement these features for stacks. The biggest complication to using panels to implement the UI for lists is that there can be multiple modifiers of the same type. Currently there is an assumed 1 to 1 relationship between every panel and its type, but there can be multiple list items of the same type, so we have to break this relationship. The mapping between panels and their data is stored with an index in the panel's runtime struct. To make use the system for a list like modifiers, four components must be added: 1. A panel type defined and registered for each list data type, with a known mapping between list data types and panel idnames. 1. A function called by interface code to build the add the panel layouts with the provided helper functions. - UI_panel_list_matches_data will check if the panel list needs to be rebuilt. - UI_panels_free_instanced will remove the existing list panels - UI_panel_add_instanced adds a list panel of a given type. 3. An expand flag for the list data and implementations of get_list_data_expand_flag and set_list_data_expand_flag. 4. For reordering, the panel type's reorder callback. This is called when the instanced panels are drag-dropped. This requires implementing a "move to index" operator for the list data. Reviewed By: Severin, brecht Differential Revision: https://developer.blender.org/D7490
2020-05-20UI: Remove Panel Grid Snapping While DraggingHans Goudey
The reason to have this isn't quite clear, but it looks like a vestige of the 2.5 transition. Removing this makes dragging panels feel much more responsive. Thanks to Julian Eisel @Severin for the original change. Differential Revision: https://developer.blender.org/D7803
2020-05-12Merge branch 'blender-v2.83-release'Campbell Barton
2020-05-12Cleanup: remove DNA_screen_types.h, use struct qualifierCampbell Barton
Also remove draw-manager & depsgraph headers in interface_icons.c Change this in 2.83 to prevent merge issues in master with interface_intern.h header.
2020-05-12UI: undo/redo support for text fieldsHans Goudey
Support undo/redo when editing text buttons.
2020-05-11UI: show tool-tips in menu searchCampbell Barton
2020-05-07UI: support context menu in menu search popupCampbell Barton
2020-05-07Cleanup: split button search callbacks into their own structCampbell Barton
2020-05-07Cleanup: remove unused operator arguments to UI_popup_block_invoke_exCampbell Barton
Add optional can_refresh argument, useful to prevent text field from exiting on refresh.
2020-05-06Cleanup: move search templates into their own filesCampbell Barton
2020-04-17UI: Better split layout support for checkboxesJulian Eisel
Makes the following layout changes possible: {F8473498} {F8473499} {F8473502} The next commit will contain many layout changes to make good use of these new possibilities. The result should be more consistent, easier to read and should give a more organized impression. Additionally, it should be possible to replace many sub-panels with compacter layouts. Main changes: * Checkboxes now respect the property split layouts * Add support for row and column headers (i.e. `uiLayout.column(heading="Foo")`, `uiLayout.row(heading="Bar")`). If the first property added to this layout doesn't insert anything into the label split column, the heading is inserted there. Otherwise, it's inserted as own item. * Add support for manually inserting decorators for an existing item (`uiLayout.prop_decorator()`). That way layout creators can manually insert this, which was the only way I saw to support property split layouts with a checkbox before the actual property. {F8471883} * Autogenerated layouts for operator properties look bad if there are only checkboxes (which only use half the region width). So before creating the layout, we iterate over visible properties and disable split layout if all are booleans. I think this is fine, if needed we could also add layout hints to operators. * `uiTemplateOperatorPropertyButs()` now handles macros itself, the caller used to be responsible for this. Code that didn't handle these so far never used macros I think, so this change should be invisible. * Remove manual property split layout from autogenerated operator properties layout. * Padding of checkboxes is tweaked to make their label visually more connected to the checkboxes. * Support split layout for menus (should work for `uiLayout.menu()`, `.operator_menu_enum()`, `.prop_menu_enum()`, maybe more) Maniphest Task: https://developer.blender.org/T65965 Differential Revision: https://developer.blender.org/D7427 Reviewed by: Brecht Van Lommel, William Reynish, Pablo Vazques