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:
authorJoshua Leung <aligorith@gmail.com>2009-01-23 05:50:04 +0300
committerJoshua Leung <aligorith@gmail.com>2009-01-23 05:50:04 +0300
commit2e7f3bb99cae050e5f5d5333327fea05389fdeed (patch)
treed8ea38d0556b7cc77415b5e866a04580f1bed414 /source/blender/makesrna
parent94a4a2066aaf02b6e712a9653a53f1feae8adfc6 (diff)
Animato Bugfixes:
* Fixed bug in with RNA-paths. String identifiers (i.e. some_collection["somekey"]) were not getting handled at all due to wrong indices it seems. I don't know of any other code using this, so hopefully there aren't any unintended bugs caused by this. This means that bone animation now works again. * Added a few more sanity checks to file-reading code, and heaps of extra prints everywhere else for debugging purposes (these will be removed in due course).
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_access.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index e066516a8eb..18d2fd31400 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1469,14 +1469,17 @@ int RNA_path_resolve(PointerRNA *ptr, const char *path, PointerRNA *r_ptr, Prope
return 0;
len= strlen(token);
+ printf("RNA path identifier strlen = %d \n", len);
/* check for "" to see if it is a string */
- if(len >= 2 && *token == '"' && token[len-2] == '"') {
+ if(len >= 2 && token[0] == '"' && token[len-1] == '"') {
/* strip away "" */
- token[len-2]= 0;
+ token[len-1]= 0;
+ printf("RNA path identifier - string %s \n", token+1);
RNA_property_collection_lookup_string(&curptr, prop, token+1, &nextptr);
}
else {
+ printf("RNA path identifier - int %s \n", token);
/* otherwise do int lookup */
intkey= atoi(token);
RNA_property_collection_lookup_int(&curptr, prop, intkey, &nextptr);