diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-09-24 00:26:03 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-09-24 00:26:03 +0400 |
commit | 63746ac4f731fb03cffd67e199aca5b49d6ecf4a (patch) | |
tree | 00bd131ac0dd5e46250688d52464a8fcfc9548fe /source/blender/editors/animation/keyframing.c | |
parent | 1199551239ed0832e2784718a49ecda1c2614303 (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/keyframing.c')
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |