From 16feaf02afbd8eab4c7578aa5bafdf6f9e29cd59 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 26 Nov 2010 17:25:06 +0000 Subject: remove support for rna resolving paths with collection['name'], only support collection["name"], added r31826. This is valid python syntax but I rather be strict with data path format else it becomes harder to parse them if we try to support this. it means checks like fcurve.data_path.startswith('pose.bones["SomeBone"]') isn't ensured to work, since blender uses "" quotes everywhere for keyframe paths I dont think its an advantage to allow users to do it differently. --- source/blender/makesrna/intern/rna_access.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'source/blender/makesrna/intern/rna_access.c') diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index c4b0c6b1373..1cac7aefdfa 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -530,7 +530,7 @@ int RNA_struct_is_a(StructRNA *type, StructRNA *srna) PropertyRNA *RNA_struct_find_property(PointerRNA *ptr, const char *identifier) { - if(identifier[0]=='[' && ELEM(identifier[1], '"', '\'')) { // " (dummy comment to avoid confusing some function lists in text editors) + if(identifier[0]=='[' && identifier[1]=='"') { // " (dummy comment to avoid confusing some function lists in text editors) /* id prop lookup, not so common */ PropertyRNA *r_prop= NULL; PointerRNA r_ptr; /* only support single level props */ @@ -2881,7 +2881,7 @@ static char *rna_path_token(const char **path, char *fixedbuf, int fixedlen, int /* 2 kinds of lookups now, quoted or unquoted */ quote= *p; - if(quote != '\'' && quote != '"') + if(quote != '"') quote= 0; if(quote==0) { @@ -2960,14 +2960,6 @@ static int rna_token_strip_quotes(char *token) return 1; } } - else if(token[0]=='\'') { - int len = strlen(token); - if (len >= 2 && token[len-1]=='\'') { - /* strip away "" */ - token[len-1]= '\0'; - return 1; - } - } return 0; } -- cgit v1.2.3