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
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-10-03 19:25:13 +0300
committerHans Goudey <h.goudey@me.com>2020-10-03 19:25:13 +0300
commitcb6234fccf7dfd3e09555cac18357427d802be1d (patch)
tree7d7b97232f84b0cce218e7b8635032ed67875eb5 /source/blender/makesdna/DNA_screen_types.h
parent724370b2f9727c007b911c036183b844dbc2ab59 (diff)
Property Search: Set panel expansion when tab changes
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
Diffstat (limited to 'source/blender/makesdna/DNA_screen_types.h')
-rw-r--r--source/blender/makesdna/DNA_screen_types.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index cfc9751c9a5..f0ff02d3668 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -38,6 +38,7 @@ struct Scene;
struct SpaceLink;
struct SpaceType;
struct uiLayout;
+struct uiBlock;
struct wmDrawBuffer;
struct wmTimer;
struct wmTooltipState;
@@ -143,6 +144,10 @@ typedef struct Panel_Runtime {
* This avoids freeing the same pointer twice when panels are removed.
*/
struct PointerRNA *custom_data_ptr;
+
+ /* Pointer to the panel's block. Useful when changes to panel #uiBlocks
+ * need some context from traversal of the panel "tree". */
+ struct uiBlock *block;
} Panel_Runtime;
/** The part from uiBlock that needs saved in file. */