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-05Reset some extra changes to the state in mastertemp-fix-headerless-panels-switch-windowsHans Goudey
2020-11-05Revert "UI: Refactor panel alignment function"Hans Goudey
This reverts commit 14b2de37dbc3563164bb37fb6fe493bf77190948.
2020-11-05Revert "Cleanup: Use shorthand variables"Hans Goudey
This reverts commit 4115229637c0acdcffbaceae282ccd854bfdb1c8.
2020-11-04Property Search: Fix missing update switching tabs after searchHans Goudey
What I thought was an "optimization" was really a bug. The "use search for expansion" value needs to be set for every panel, even panels in other tabs. Otherwise it won't be properly set when switching back to a tab that was visited during search. Differential Revision: https://developer.blender.org/D9427
2020-10-20Cleanup: use BLI_listbase_is_single instead of countingCampbell Barton
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-10-16Property Search: Reset panel expansion when exiting searchHans Goudey
This patch implements panel expansion saving and resetting for property search. While search is active, the panel expansion is based on whether or not it has a search result. When the search finishes, the panel expansion returns to its state before the search started. However, any panels interacted with during the search won't reset their expansion. This requires adding a new runtime flag for panels to store whether to use search result status as expansion. It also requires better handling for animation when panel expansion changes with another new runtime flag. `UI_panel_is_closed` gets the search-dependent expansion, but it is intentionally not used to access expansion in every case-- sometimes it's necessary to use `PNL_CLOSED` directly. Differential Revision: https://developer.blender.org/D8984
2020-10-07Fix / cleanup panel category tab drawingYevgeny Makarov
The panel category tabs (In the 3D view N-panel) did not look great when zoomed in or with high DPI screens, with multiple overlapping outlines, and roundness that didn't match elsewhere in Blender. In addition, there was some unecessarily low-level drawing code in the panel code. This commit uses an existing function `UI_draw_roundbox_4fv`to draw the tabs instead. There are some slight visual differences, though these are easily adjusted with theme colors. Differential Revision: https://developer.blender.org/D9045
2020-10-06Fix T81470: Buttons in closed panel visible during searchHans Goudey
The buttons hide when the search finishes based on whether they are in the "panel header" group. These buttons were not protected with a new group. This adds a new group for operator button calls, and also makes it so a new group is always created after the header buttons.
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-03Cleanup: Remove dead code in panel logicJulian Eisel
The region types checked here were removed from the editors in 9e2abbc9ba5d and eb7485389b8a. So the if-conditions would never be true.
2020-10-02Property Search: Don't use search color for subpanel titlesHans Goudey
This replaces the blue theme color for subpanel titles with the the same fade as for parent panels. The search color doesn't work well for subpanel title colors. And actually, because there are often buttons with checkboxes in the panel headers, we don't have to treat this indicator any differently than regular buttons. Differential Revision: https://developer.blender.org/D8976
2020-09-30Cleanup: Make function privateHans Goudey
The "UI_panel_set_expand_from_list_data" doesn't need to be in the public API since it's just called every time an instanced panel is added. This commit just sets the expansion automatically and adjusts some naming to account for the moved function.
2020-09-30Fix use after free deleting object with modifier panels visibleHans Goudey
It's necessary to check if the panels are active before accessing their data. Thanks to @ankitm for reporting this.
2020-09-29Property Search: Set expansion properly for child panelsHans Goudey
Although I haven't seen this cause any visible errors, there is some incorrect handling for setting panel expansion during search: - Properly check if child panel is active first - Don't stop traversal at headerless panels that could theoretically have children
2020-09-28Fix T79275: Missing redraw for pinned active tool settings panelsDavid Friedli
In the 3D view sidebar, the active tool settings panel can be pinned to other categories, and in those other categories it doesn't redraw when the active tool changes. This commit checks for pinned panels from the "Tool" category when checking whether to redraw. Note that the relatively expensive string comparison is only done for currently visible pinned panels. Differential Revision: https://developer.blender.org/D9012
2020-09-24Cleanup: Move function to proper sectionHans Goudey
The main panel drawing funciton should be in the "Drawing" section.
2020-09-24Cleanup: Remove unused functionHans Goudey
2020-09-24Cleanup: spellingCampbell Barton
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-23Fix incorrect comparison for panel sortingHans Goudey
"Reported" by Valentin (Poulpator).
2020-09-20Cleanup: Fix clang tidy inconsistent parameter warningHans Goudey
2020-09-20Cleanup: Use shorthand variablesHans Goudey
We don't use the other variables in the sorting struct, so we might as well use the panels directly.
2020-09-19Property Search: Don't set expansion for panels in inactive tabsHans Goudey
The search should check if a panel is active before changing its expansion, otherwise it sets the expansion for all of the region's panels, even invisible ones in other tabs.
2020-09-18UI: Refactor panel alignment functionHans Goudey
This code had grown overly complicated and hard to understand. The improvements in this commit: - Avoid allocating a duplicate of every active panel. - Instead of complicated logic to calculate each panel's offset, just keep track of the current offset while iterating through. - More readable code structure, better comments. Note that calcuting the X offset here is a relic from pre-2.5 when panels could be aligned horizontally. I kept this in, but it would be reasonable to remove it in the future.
2020-09-18Cleanup: Rename variables in panel alignment codeHans Goudey
This makes these variable names more consistent with current standards, mostly by not over-abbreviating already short words. The following commit will refactor this function.
2020-09-17Cleanup: Correct commentsHans Goudey
2020-09-17Cleanup: Use enum instead of defines for panel runtime flagHans Goudey
Discovered an unused panel runtime flag as well, which this commit removes.
2020-09-17Cleanup: Comment formatting in interface_panel.cHans Goudey
Also cleaned up some grammar and wording issues, and switched a case in an if statement to remove a double negative.
2020-09-16Cleanup: spellingCampbell Barton
2020-09-15Property Search: Properly set expansion for instanced panelsHans Goudey
Stack panels (for modifiers, etc..) also get their expansion from their associated list data. This means that property search expansion needs to properly update the list data, which can be accomplished by calling `set_panels_list_data_expand_flag`. This commit also moves this logic to `UI_panels_end`, where it fits better.
2020-09-15UI: Refactor some list panel expansion codeHans Goudey
This commit moves the "get panel expansion from list data" function to UI_panels_end, which is an improvement because it's more centralized.
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-09Cleanup: reduce variable scopeJacques Lucke
2020-09-08Cleanup: consistent syntax for doxygen parametersCampbell Barton
Also use back-slash instead of '@'.
2020-09-02UI: Use instanced panel custom data instead of list indexHans Goudey
For modifier shortcuts we added a "custom_data" field to panels. This commit uses the same system for accessing the list data that corresponds to each panel. This way the context is only used once and the modifier for each panel can be accessed more easily later. This ends up being mostly a cleanup commit with a few small changes in interface_panel.c. The large changes in the UI functions are due to the fact that the panel custom data is now passed around as a single pointer instead of being created again for every panel. The list_index variable in Panel.runtime is removed as it's now unnecessary. Differential Revision: https://developer.blender.org/D8559
2020-09-02UI: Remove unecessary panel_free_block functionHans Goudey
This function was called when the modifier list changes and the panel list has to be rebuilt. Originally I thought it was necessary to to remove the block immediately when the panel was removed, but we can just leave it and it will be removed later in the UI drawing process. Removing this results in fewer string lookups.
2020-08-28Cleanup: use doxy sections in interface_panels.cCampbell Barton
2020-08-28Cleanup: spellingCampbell Barton
2020-08-27UI: Avoid redundant loops in region panel handlerHans Goudey
Currently the panel handler loops through every block and every button for every single panel. This commit moves that check to happen a single time at the beginning.
2020-08-27Fix T68317: Panel "A" key doesn't collapse subpanels properlyHans Goudey
We need to only collapse or expand the first panel under the cursor rather than all of them. Note that whether the parent panel or the subpanel is first depends on the order of the uiBlocks in the region's list.
2020-08-27UI: Cleanup / refactor region panel event handlingHans Goudey
The code for handling panel events was much more complicated than it needed to be. This commit removes some unecessary function calls and variables, reduces indentation levels by returning early, and does some other general cleanup.
2020-08-27Cleanup: Move panel category drawing to proper sectionHans Goudey
Somehow the panel category drawing functions ended up in the middle of the region event handling code. This commit moves them to their own section next to the rest of the drawing code.
2020-08-26Cleanup: use const variables in interface codeCampbell Barton
2020-08-23Cleanup: GPU: Use explicit clear value in GPU_clear* commandsClément Foucault
This replace `GPU_clear()` by `GPU_clear_color()` and `GPU_clear_depth()`. Since we always set the clear value before clearing, it is unecessary to track the clear color state. Moreover, it makes it clearer what we clear the framebuffer to.
2020-08-21Cleanup: Remove unused variablesHans Goudey
2020-08-21UI: Fix panel collapse all behavior invertedHans Goudey
Ctrl click on a panel should collapse all other panels but leave that panel expanded. In a recent cleanup commit that was mistakenly reversed.
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-19UI: Remove panel X axis closing codeHans Goudey
Horizontal panel alignment hasn't been used for years, and we have no plans to use it in the future. It adds a fair amount of complexity to the panel code which makes adding features take longer. This code removes the X closing flag, and all of the logic / variables unused without it. This commit includes a file subversion bump. Differential Revision: https://developer.blender.org/D8601
2020-08-18GPUState: GPU_blend final API renamingClément Foucault
We now use GPU_blend for enabling / disabling blending and explicitly set the blend equation.