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-24 00:26:03 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-09-24 00:26:03 +0400
commit63746ac4f731fb03cffd67e199aca5b49d6ecf4a (patch)
tree00bd131ac0dd5e46250688d52464a8fcfc9548fe /source/blender/editors/animation
parent1199551239ed0832e2784718a49ecda1c2614303 (diff)
Fix #22947: sample color tool not working in user preferences, was assuming the
color to be a property on an ID block. Note that sampling from another window still does not work, only within the same window.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/drivers.c8
-rw-r--r--source/blender/editors/animation/keyframing.c4
-rw-r--r--source/blender/editors/animation/keyingsets.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 9edcf637cdc..9b776fc0859 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -377,7 +377,7 @@ static int add_driver_button_exec (bContext *C, wmOperator *op)
if (all)
index= -1;
- if (ptr.data && prop && RNA_property_animateable(&ptr, prop)) {
+ if (ptr.id.data && ptr.data && prop && RNA_property_animateable(&ptr, prop)) {
path= RNA_path_from_ID_to_property(&ptr, prop);
if (path) {
@@ -432,7 +432,7 @@ static int remove_driver_button_exec (bContext *C, wmOperator *op)
if (all)
index= -1;
- if (ptr.data && prop) {
+ if (ptr.id.data && ptr.data && prop) {
path= RNA_path_from_ID_to_property(&ptr, prop);
success= ANIM_remove_driver(ptr.id.data, path, index, 0);
MEM_freeN(path);
@@ -480,7 +480,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, prop)) {
+ if (ptr.id.data && ptr.data && prop && RNA_property_animateable(&ptr, prop)) {
path= RNA_path_from_ID_to_property(&ptr, prop);
if (path) {
@@ -524,7 +524,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, prop)) {
+ if (ptr.id.data && 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/keyframing.c b/source/blender/editors/animation/keyframing.c
index fc5649be869..176c6a1f72a 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1364,7 +1364,7 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
memset(&ptr, 0, sizeof(PointerRNA));
uiAnimContextProperty(C, &ptr, &prop, &index);
- if ((ptr.data && prop) && RNA_property_animateable(&ptr, prop)) {
+ if ((ptr.id.data && ptr.data && prop) && RNA_property_animateable(&ptr, prop)) {
path= RNA_path_from_ID_to_property(&ptr, prop);
if (path) {
@@ -1448,7 +1448,7 @@ static int delete_key_button_exec (bContext *C, wmOperator *op)
memset(&ptr, 0, sizeof(PointerRNA));
uiAnimContextProperty(C, &ptr, &prop, &index);
- if (ptr.data && prop) {
+ if (ptr.id.data && ptr.data && 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 ab236de9ac5..c54cd74383a 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -326,7 +326,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, prop)) {
+ if (ptr.id.data && ptr.data && prop && RNA_property_animateable(&ptr, prop)) {
path= RNA_path_from_ID_to_property(&ptr, prop);
if (path) {
@@ -411,7 +411,7 @@ static int remove_keyingset_button_exec (bContext *C, wmOperator *op)
memset(&ptr, 0, sizeof(PointerRNA));
uiAnimContextProperty(C, &ptr, &prop, &index);
- if (ptr.data && prop) {
+ if (ptr.id.data && ptr.data && prop) {
path= RNA_path_from_ID_to_property(&ptr, prop);
if (path) {