From 68abfd076b18e63ee2e78b11c73c6b988c231a4c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 28 Jan 2010 16:13:12 +0000 Subject: [PATCH] Fix RMB menu insert driver not working on some buttons, passing wrong pointer into RNA. --- source/blender/editors/animation/drivers.c | 6 +++--- source/blender/editors/animation/keyingsets.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index b816ffbe905..a993c4e238b 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -390,7 +390,7 @@ static int add_driver_button_exec (bContext *C, wmOperator *op) if (all) index= -1; - if (ptr.data && prop && RNA_property_animateable(ptr.data, prop)) { + if (ptr.data && prop && RNA_property_animateable(&ptr, prop)) { path= RNA_path_from_ID_to_property(&ptr, prop); if (path) { @@ -505,7 +505,7 @@ static int copy_driver_button_exec (bContext *C, wmOperator *op) memset(&ptr, 0, sizeof(PointerRNA)); uiAnimContextProperty(C, &ptr, &prop, &index); - if (ptr.data && prop && RNA_property_animateable(ptr.data, prop)) { + if (ptr.data && prop && RNA_property_animateable(&ptr, prop)) { path= RNA_path_from_ID_to_property(&ptr, prop); if (path) { @@ -549,7 +549,7 @@ static int paste_driver_button_exec (bContext *C, wmOperator *op) memset(&ptr, 0, sizeof(PointerRNA)); uiAnimContextProperty(C, &ptr, &prop, &index); - if (ptr.data && prop && RNA_property_animateable(ptr.data, prop)) { + if (ptr.data && prop && RNA_property_animateable(&ptr, prop)) { path= RNA_path_from_ID_to_property(&ptr, prop); if (path) { diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 9d21eded9c7..07a072d533d 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -339,7 +339,7 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op) uiAnimContextProperty(C, &ptr, &prop, &index); /* check if property is able to be added */ - if (ptr.data && prop && RNA_property_animateable(ptr.data, prop)) { + if (ptr.data && prop && RNA_property_animateable(&ptr, prop)) { path= RNA_path_from_ID_to_property(&ptr, prop); if (path) {