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>2019-03-20 14:40:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-20 15:10:34 +0300
commita1addc5c633d4c35eeb491c698052ec9300271dc (patch)
tree2f8cf2086db19233c3e641662f8a3cd540a5fd1e /source/blender/editors/include
parent69fb859909c8e99a8e5e9e06607992d5b9a41473 (diff)
UI: support for popups starting with buttons activated
While this could already be done from C, this is now exposed to Python
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/UI_interface.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 7d28c538780..80f58a9548b 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -201,6 +201,8 @@ enum {
UI_BUT_LIST_ITEM = 1 << 24,
/** edit this button as well as the active button (not just dragging) */
UI_BUT_DRAG_MULTI = 1 << 25,
+ /** Use for popups to start editing the button on initialization. */
+ UI_BUT_ACTIVATE_ON_INIT = 1 << 26,
/** #uiBut.str contains #UI_SEP_CHAR, used for key shortcuts */
UI_BUT_HAS_SEP_CHAR = 1 << 27,
@@ -631,6 +633,7 @@ void UI_but_type_set_menu_from_pulldown(uiBut *but);
/* special button case, only draw it when used actively, for outliner etc */
bool UI_but_active_only(const struct bContext *C, struct ARegion *ar, uiBlock *block, uiBut *but);
+bool UI_block_active_only_flagged_buttons(const struct bContext *C, struct ARegion *ar, struct uiBlock *block);
void UI_but_execute(const struct bContext *C, uiBut *but);
@@ -1053,6 +1056,7 @@ void uiLayoutSetContextFromBut(uiLayout *layout, uiBut *but);
void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext);
void uiLayoutSetActive(uiLayout *layout, bool active);
+void uiLayoutSetActivateInit(uiLayout *layout, bool active);
void uiLayoutSetEnabled(uiLayout *layout, bool enabled);
void uiLayoutSetRedAlert(uiLayout *layout, bool redalert);
void uiLayoutSetAlignment(uiLayout *layout, char alignment);
@@ -1068,6 +1072,7 @@ int uiLayoutGetLocalDir(const uiLayout *layout);
int uiLayoutGetOperatorContext(uiLayout *layout);
bool uiLayoutGetActive(uiLayout *layout);
+bool uiLayoutGetActivateInit(uiLayout *layout);
bool uiLayoutGetEnabled(uiLayout *layout);
bool uiLayoutGetRedAlert(uiLayout *layout);
int uiLayoutGetAlignment(uiLayout *layout);