[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31826] trunk/blender/source/blender/ makesrna/intern/rna_access.c: Apply patch [#23632] Allow single quotes in RNA paths.
Nathan Letwory
nathan at letworyinteractive.com
Wed Sep 8 10:42:36 CEST 2010
Revision: 31826
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31826
Author: jesterking
Date: 2010-09-08 10:42:36 +0200 (Wed, 08 Sep 2010)
Log Message:
-----------
Apply patch [#23632] Allow single quotes in RNA paths.
By Lukas T?\195?\182nne
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 :)
Modified Paths:
--------------
trunk/blender/source/blender/makesrna/intern/rna_access.c
Modified: trunk/blender/source/blender/makesrna/intern/rna_access.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_access.c 2010-09-08 08:36:12 UTC (rev 31825)
+++ trunk/blender/source/blender/makesrna/intern/rna_access.c 2010-09-08 08:42:36 UTC (rev 31826)
@@ -2935,6 +2935,14 @@
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;
}
More information about the Bf-blender-cvs
mailing list