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:
authorCampbell Barton <ideasman42@gmail.com>2018-06-09 18:36:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-09 18:38:32 +0300
commit7fdde7fd86f2448700e6473ae4bc5f8b1d4b1208 (patch)
treeb32a5003a4261adb1a291bc01c3a444c8943119b /source/blender/makesrna/intern/rna_ui.c
parentec8a20fec0d103a799b9d9c86b0b55fba3b02b84 (diff)
UI: use draw_header function for popover buttons
Add 'is_popover' for panel draw functions to check if they're in a popup. This puts dyntopo toggle next to the popover.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index e02421b9270..ebee502515f 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -1132,6 +1132,11 @@ static void rna_def_panel(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pin", "");
/* XXX, should only tag region for redraw */
RNA_def_property_update(prop, NC_WINDOW, NULL);
+
+ prop = RNA_def_property(srna, "is_popover", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PNL_POPOVER);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Popover", "");
}
static void rna_def_uilist(BlenderRNA *brna)