diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-01-15 08:41:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-01-15 08:41:25 +0300 |
commit | ac91b159ae149cb21f357a3b5e83374bb7d1d0ed (patch) | |
tree | 5d7663732e57a556a91663618376462beda881b1 /source/blender/makesrna | |
parent | 4c17156c9eb37cee7b6b96b8ef58e34e7ad281f3 (diff) |
disallow identifiers with spaces 'cap end' wasn't working with the python api and made doc generation fail
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index cd852a39538..844f3ea5451 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -200,6 +200,11 @@ static int rna_validate_identifier(const char *identifier, char *error, int prop continue; } + if (identifier[a]==' ') { + strcpy(error, "spaces are not ok in identifier names"); + return 0; + } + if (isalnum(identifier[a])==0) { strcpy(error, "one of the characters failed an isalnum() check and is not an underscore"); return 0; |