diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2010-09-08 12:42:36 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2010-09-08 12:42:36 +0400 |
commit | 6abf53b574895f4d0381c80167369291192f5d8b (patch) | |
tree | cbbf5f408cdda026ea0b3ed11b332907c95ce893 | |
parent | 741a53050f87886b83b092c49dd70697e3315aec (diff) |
Apply patch [#23632] Allow single quotes in RNA paths.
By Lukas Tönne
In the console RNA paths can use double quotes (" ") or single quotes (' ') to select from a collection, an
ID property or a vector/color component. The RNA_path_resolve function however only accepts double quotes. This patch
adds the ability to use single quotes in areas other than the console too.
PS. Note the very nice patch ID :)
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 51ad6e55ddd..4205a9618d3 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -2935,6 +2935,14 @@ 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; } |