[Bf-blender-cvs] [a3f61ade7af] property-search-ui-v2: Property Search: Small cleanups

Hans Goudey noreply at git.blender.org
Wed Sep 9 18:25:41 CEST 2020


Commit: a3f61ade7af54c9f8ca0e227b729dd4b9b1d0963
Author: Hans Goudey
Date:   Wed Sep 9 11:25:21 2020 -0500
Branches: property-search-ui-v2
https://developer.blender.org/rBa3f61ade7af54c9f8ca0e227b729dd4b9b1d0963

Property Search: Small cleanups

===================================================================

M	source/blender/editors/interface/interface.c
M	source/blender/editors/interface/interface_panel.c

===================================================================

diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index b96b4eae1bc..ff05da89993 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3454,7 +3454,6 @@ uiBlock *UI_block_begin(const bContext *C, ARegion *region, const char *name, ch
 
   window = CTX_wm_window(C);
   scn = CTX_data_scene(C);
-  ScrArea *area = CTX_wm_area(C);
 
   block = MEM_callocN(sizeof(uiBlock), "uiBlock");
   block->active = 1;
@@ -3462,6 +3461,7 @@ uiBlock *UI_block_begin(const bContext *C, ARegion *region, const char *name, ch
   block->evil_C = (void *)C; /* XXX */
 
   /* Set the search filter for the properties editor. */
+  ScrArea *area = CTX_wm_area(C);
   if ((region && region->regiontype == RGN_TYPE_WINDOW) &&
       (area && area->spacetype == SPACE_PROPERTIES)) {
     SpaceProperties *sbuts = CTX_wm_space_properties(C);
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index e6c2ab8e705..4d9523fba08 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -71,13 +71,13 @@
 #define ANIMATION_TIME 0.30
 #define ANIMATION_INTERVAL 0.02
 
-#define PNL_LAST_ADDED (1 << 0)
-#define PNL_ACTIVE (1 << 1)
-#define PNL_WAS_ACTIVE (1 << 2)
-#define PNL_ANIM_ALIGN (1 << 3)
-#define PNL_NEW_ADDED (1 << 4)
-#define PNL_FIRST (1 << 5)
-#define PNL_SEARCH_FILTER_MATCHES (1 << 6)
+#define PNL_LAST_ADDED 1
+#define PNL_ACTIVE 2
+#define PNL_WAS_ACTIVE 4
+#define PNL_ANIM_ALIGN 8
+#define PNL_NEW_ADDED 16
+#define PNL_FIRST 32
+#define PNL_SEARCH_FILTER_MATCHES 64
 
 /* the state of the mouse position relative to the panel */
 typedef enum uiPanelMouseState {
@@ -808,7 +808,6 @@ static void ui_offset_panel_block(uiBlock *block)
 void ui_panel_set_search_filter_match(struct Panel *panel, const bool value)
 {
   SET_FLAG_FROM_TEST(panel->runtime_flag, value, PNL_SEARCH_FILTER_MATCHES);
-  // SET_FLAG_FROM_TEST(panel->flag, !value, PNL_CLOSED);
 }
 
 static void panel_matches_search_filter_recursive(const Panel *panel, bool *filter_matches)



More information about the Bf-blender-cvs mailing list