From 6abf53b574895f4d0381c80167369291192f5d8b Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Wed, 8 Sep 2010 08:42:36 +0000 Subject: =?UTF-8?q?Apply=20patch=20[#23632]=20Allow=20single=20quotes=20in?= =?UTF-8?q?=20RNA=20paths.=20By=20Lukas=20T=C3=B6nne?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 :) --- source/blender/makesrna/intern/rna_access.c | 8 ++++++++ 1 file changed, 8 insertions(+) (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 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; } -- cgit v1.2.3