diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-13 14:05:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-13 14:05:30 +0400 |
commit | 7d02e66256ea2866b121bd958f83d55866381412 (patch) | |
tree | df5c675d1351aab20bd4f10e51effaae7a19b39e /source/blender/editors/animation/keyframing.c | |
parent | 92089e3c4d89c2689dbd4452fb21cbbd9a0ecc71 (diff) | |
parent | ee32d36a599ccda9c3d5543cb631bb07da06958b (diff) |
svn merge -r40000:40179 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/editors/animation/keyframing.c')
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 53c9fc4d82c..1e7c18dc6ac 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -531,7 +531,7 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop) bConstraint *con= NULL; short searchtype= VISUALKEY_NONE; short has_parent = FALSE; - char *identifier= NULL; + const char *identifier= NULL; /* validate data */ // TODO: this check is probably not needed, but it won't hurt @@ -548,7 +548,7 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop) Object *ob= (Object *)ptr->data; con= ob->constraints.first; - identifier= (char *)RNA_property_identifier(prop); + identifier= RNA_property_identifier(prop); has_parent= (ob->parent != NULL); } else if (ptr->type == &RNA_PoseBone) { @@ -556,7 +556,7 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop) bPoseChannel *pchan= (bPoseChannel *)ptr->data; con= pchan->constraints.first; - identifier= (char *)RNA_property_identifier(prop); + identifier= RNA_property_identifier(prop); has_parent= (pchan->parent != NULL); } @@ -565,12 +565,18 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop) return 0; /* location or rotation identifiers only... */ - if (strstr(identifier, "location")) + if(identifier == NULL) { + printf("%s failed: NULL identifier\n", __func__); + return 0; + } + else if (strstr(identifier, "location")) { searchtype= VISUALKEY_LOC; - else if (strstr(identifier, "rotation")) + } + else if (strstr(identifier, "rotation")) { searchtype= VISUALKEY_ROT; + } else { - printf("visualkey_can_use() failed: identifier - '%s' \n", identifier); + printf("%s failed: identifier - '%s' \n", __func__, identifier); return 0; } |