[Bf-blender-cvs] [9e42403aa61] temp-lineart-contained: Cleanup: Move PanelType flag from DNA to BKE header

Hans Goudey noreply at git.blender.org
Sat Dec 19 06:18:53 CET 2020


Commit: 9e42403aa6123f7ef59a06d89b7294f0bf7f022b
Author: Hans Goudey
Date:   Fri Nov 13 13:15:41 2020 -0500
Branches: temp-lineart-contained
https://developer.blender.org/rB9e42403aa6123f7ef59a06d89b7294f0bf7f022b

Cleanup: Move PanelType flag from DNA to BKE header

Since this flag isn't saved in files and PanelType itself is defined in
BKE, the flag makes more sense there.

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

M	source/blender/blenkernel/BKE_screen.h
M	source/blender/makesdna/DNA_screen_types.h
M	source/blender/makesrna/intern/rna_ui.c

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

diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index fd5339940dd..81669fd6878 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -278,6 +278,19 @@ typedef struct PanelType {
   ExtensionRNA rna_ext;
 } PanelType;
 
+/* #PanelType.flag */
+enum {
+  PNL_DEFAULT_CLOSED = (1 << 0),
+  PNL_NO_HEADER = (1 << 1),
+  /** Makes buttons in the header shrink/stretch to fill full layout width. */
+  PNL_LAYOUT_HEADER_EXPAND = (1 << 2),
+  PNL_LAYOUT_VERT_BAR = (1 << 3),
+  /** This panel type represents data external to the UI. */
+  PNL_INSTANCED = (1 << 4),
+  /** Draw panel like a box widget. */
+  PNL_DRAW_BOX = (1 << 6),
+};
+
 /* uilist types */
 
 /* Draw an item in the uiList */
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 7101dacc803..e42ff2a6e58 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -571,19 +571,6 @@ enum {
   PNL_INSTANCED_LIST_ORDER_CHANGED = (1 << 7),
 };
 
-/* paneltype flag */
-enum {
-  PNL_DEFAULT_CLOSED = (1 << 0),
-  PNL_NO_HEADER = (1 << 1),
-  /** Makes buttons in the header shrink/stretch to fill full layout width. */
-  PNL_LAYOUT_HEADER_EXPAND = (1 << 2),
-  PNL_LAYOUT_VERT_BAR = (1 << 3),
-  /** This panel type represents data external to the UI. */
-  PNL_INSTANCED = (1 << 4),
-  /** Draw panel like a box widget. */
-  PNL_DRAW_BOX = (1 << 6),
-};
-
 /* Fallback panel category (only for old scripts which need updating) */
 #define PNL_CATEGORY_FALLBACK "Misc"
 
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index d87b3a6386e..2994d0eafb5 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -26,6 +26,7 @@
 #include "BLT_translation.h"
 
 #include "BKE_idprop.h"
+#include "BKE_screen.h"
 
 #include "BLI_listbase.h"



More information about the Bf-blender-cvs mailing list