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:
authorJoshua Leung <aligorith@gmail.com>2016-03-29 17:01:27 +0300
committerJoshua Leung <aligorith@gmail.com>2016-03-29 17:21:57 +0300
commitdeffd4352bb0143a69dfa57044152ddac6432468 (patch)
tree58feb02d88d9856eda6e52728d89dcef01ecde49 /source/blender/editors/interface/interface_handlers.c
parent3237ae2855b6dbfad8ba9e86e6e7add0942403d7 (diff)
Drivers Setup: Expose all mapping types for creating drivers
* This includes the "manually create" modes, which correspond to the previous behaviour for setting up drivers. This is necessary when the current screen layout is not well suited to having multiple property editors open (e.g. small screen or heavily subdivided screen). * Only the modes relevant for the current property type (i.e. array vs single) will be shown * The "Add Driver" entries in the RMB context menu have now been replaced by a submenu which will list all the available mapping types. * NOTE: The code for the ANIM_OT_button_driver_add() operator is perhaps a bit hairy. However, it currently allows us to have the desired behaviour. It can always get cleaned up later though.
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r--source/blender/editors/interface/interface_handlers.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 01fc6aafc4e..9edc6e58a76 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -6719,14 +6719,14 @@ static bool ui_but_menu(bContext *C, uiBut *but)
uiItemS(layout);
if (is_array_component) {
- uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Drivers"),
- ICON_NONE, "ANIM_OT_driver_button_add", "all", 1);
- uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Single Driver"),
- ICON_NONE, "ANIM_OT_driver_button_add", "all", 0);
+ uiItemMenuEnumO(layout, C, "ANIM_OT_driver_button_add", "mapping_type",
+ CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Drivers"),
+ ICON_NONE);
}
else {
- uiItemBooleanO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Driver"),
- ICON_NONE, "ANIM_OT_driver_button_add", "all", 1);
+ uiItemMenuEnumO(layout, C, "ANIM_OT_driver_button_add", "mapping_type",
+ CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Add Driver"),
+ ICON_NONE);
}
if (ANIM_driver_can_paste()) {