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-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.
2020-08-12Cleanup: Use const for contextHans Goudey
2020-08-12UI: Category support for instanced panelsHans Goudey
This adds support for panel categories to the instanced panel system used for modifiers and others. The change is pulled from D7997 where it is needed for FCurve modifiers, but it is unused now. The change is simple and basically amounts to checking the panel category where it was overlooked before.
2020-08-06Fix T78698: Move cursor stuck after removing modifierJulian Eisel
The panels are rebuilt when a modifier is removed so the button handlers need to properly finish. By adding a context argument to the panel_delete function this will happen properly.
2020-07-03Cleanup: Remove obsolete code in interface_panel.cHans Goudey
Some code delt with panel merging in earlier versions of Blender, which is no longer needed. Other code delt with controls that aren't used anymore, and in some cases have region-level equivalents. There's a surprising amount of this unused code in this file, so removing it will be helpful for the future. Differential Revision: https://developer.blender.org/D7938
2020-07-03Cleanup: Interface, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/interface` module. No functional changes.
2020-06-30Cleanup: spellingCampbell Barton
2020-06-29UI: Add shortcuts for modifier panelsHans Goudey
The shortcuts act on the modifier with its panel under the mouse. The following shortcuts are enabled by default: - Remove modifier: X, Delete - Apply modifier: Ctrl A - Duplicate modifier: Shift D More shortcuts can be added in the keymap. Each panel can now store a custom data RNA pointer, and a new function is added to get the custom data for the panel under the cursor. This custom data could be used to refactor the "List Panel System" to generalize it and integrate it further with RNA. The same functionality will be added in further commits where it applies to constraints, grease pencil modifiers, and effects. Differential Revision: https://developer.blender.org/D8031
2020-06-25UI: Slightly simplify box style panel margin offsetHans Goudey
A small cleanup to use fewer if statements.
2020-06-25Cleanup: spellingCampbell Barton
2020-06-21UI: Fix view reset when toggling subpanel expansionHans Goudey
The view should only reset for the ctrl-click mode that collapses all other panels.
2020-06-19UI: Drag and Drop Constraints, Layout UpdatesHans Goudey
This patch implements the list panel system D7490 for constraints. In this case the panels are still defined in Python. The layouts are also updated to use subpanels and the a more organized single column layout. There may be more tweaks necessary for the layouts. Reviewed By: Severin, billreynish, Mets Differential Revision: https://developer.blender.org/D7499
2020-06-18Cleanup: redundant parenthesisCampbell Barton
2020-06-17UI: Ctrl-click on panel header expands & collapses subpanelsHans Goudey
If the panel is already open and you ctrl click on its header, its sub-panels are now expanded / collapsed instead of toggling the expansion for all other panels. If you're toggling a panel's expansion it's already in view anyway, so there is no need to collapse the other panels. Differential Revision: https://developer.blender.org/D8042
2020-06-16Cleanup: Use LISTBASE_FOREACH in interface_panel.cHans Goudey
2020-06-15Fix T77541: Unregistering DATA_PT_modifiers doesn't remove modifier panelsHans Goudey
This is a pretty quick fix; the solution is just removing all the instanced panels whena panel is unregistered. This also necessitates adding the option to call UI_panels_free_instanced with NULL context. Differential Revision: https://developer.blender.org/D7977
2020-06-10UI: Only set panel data expand flag for active panelsHans Goudey
This solves a crash when switching from the modifiers tab to an armature object and expanding a panel. Thanks to Alexander Gavrilov for mentioning the problem.
2020-06-10Fix T77694: Start panel animation when expansion data changesHans Goudey
During normal drawing there is a rather complicated method to check whether the panels should be animating. It's not set up to deal with the panel expansion changing from outside the UI, which is now possible with the panel expansion connected to the modifier's show_expanded property. The solution is to activate panel animation if setting the expansion property has changed.
2020-06-05UI: Pan 2D Region When Dragging to BoundaryHans Goudey
This adds a modal operator called Edge Pan, which is meant to run invisibly while something inside a region is being dragged. This patch applies this to dragging panels, but it can be used elsewhere too. The speed (which is defined relative to how far the mouse is beyond the boundary) and delay are easily adjustible. and the speed also increases smoothly from a start value to a max to make it feel more interactive and less robotic. Differential Revision: https://developer.blender.org/D7465
2020-05-28Cleanup: spellingCampbell Barton