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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-09-25 18:32:26 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-09-25 18:32:26 +0400
commit58082beda937b05cb2aa42e4f9f0b801a3e8663d (patch)
tree0d396166631478123871c7cbdcbd6d20db0c7c81 /source/blender/editors/animation/drivers.c
parentcd429bdb505d7ef05503bd1b60960df8f9b849a1 (diff)
Fix #23847: keyframe insert on button not working in popup menus, e.g.
the vector popup for node inputs.
Diffstat (limited to 'source/blender/editors/animation/drivers.c')
-rw-r--r--source/blender/editors/animation/drivers.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 9b776fc0859..898d7db89fc 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -372,7 +372,7 @@ static int add_driver_button_exec (bContext *C, wmOperator *op)
/* try to create driver using property retrieved from UI */
memset(&ptr, 0, sizeof(PointerRNA));
- uiAnimContextProperty(C, &ptr, &prop, &index);
+ uiContextActiveProperty(C, &ptr, &prop, &index);
if (all)
index= -1;
@@ -389,6 +389,8 @@ static int add_driver_button_exec (bContext *C, wmOperator *op)
if (success) {
/* send updates */
+ uiContextAnimUpdate(C);
+
DAG_ids_flush_update(CTX_data_main(C), 0);
WM_event_add_notifier(C, NC_ANIMATION|ND_FCURVES_ORDER, NULL); // XXX
@@ -427,7 +429,7 @@ static int remove_driver_button_exec (bContext *C, wmOperator *op)
/* try to find driver using property retrieved from UI */
memset(&ptr, 0, sizeof(PointerRNA));
- uiAnimContextProperty(C, &ptr, &prop, &index);
+ uiContextActiveProperty(C, &ptr, &prop, &index);
if (all)
index= -1;
@@ -440,6 +442,8 @@ static int remove_driver_button_exec (bContext *C, wmOperator *op)
if (success) {
/* send updates */
+ uiContextAnimUpdate(C);
+
DAG_ids_flush_update(CTX_data_main(C), 0);
WM_event_add_notifier(C, NC_ANIMATION|ND_FCURVES_ORDER, NULL); // XXX
@@ -478,7 +482,7 @@ static int copy_driver_button_exec (bContext *C, wmOperator *op)
/* try to create driver using property retrieved from UI */
memset(&ptr, 0, sizeof(PointerRNA));
- uiAnimContextProperty(C, &ptr, &prop, &index);
+ uiContextActiveProperty(C, &ptr, &prop, &index);
if (ptr.id.data && ptr.data && prop && RNA_property_animateable(&ptr, prop)) {
path= RNA_path_from_ID_to_property(&ptr, prop);
@@ -486,6 +490,8 @@ static int copy_driver_button_exec (bContext *C, wmOperator *op)
if (path) {
/* only copy the driver for the button that this was involved for */
success= ANIM_copy_driver(ptr.id.data, path, index, 0);
+
+ uiContextAnimUpdate(C);
MEM_freeN(path);
}
@@ -522,7 +528,7 @@ static int paste_driver_button_exec (bContext *C, wmOperator *op)
/* try to create driver using property retrieved from UI */
memset(&ptr, 0, sizeof(PointerRNA));
- uiAnimContextProperty(C, &ptr, &prop, &index);
+ uiContextActiveProperty(C, &ptr, &prop, &index);
if (ptr.id.data && ptr.data && prop && RNA_property_animateable(&ptr, prop)) {
path= RNA_path_from_ID_to_property(&ptr, prop);
@@ -530,6 +536,8 @@ static int paste_driver_button_exec (bContext *C, wmOperator *op)
if (path) {
/* only copy the driver for the button that this was involved for */
success= ANIM_paste_driver(ptr.id.data, path, index, 0);
+
+ uiContextAnimUpdate(C);
MEM_freeN(path);
}