Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-25 05:12:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-25 05:12:44 +0300
commit0c03fa78c10f04283512f2a5a4557d86c72d6f29 (patch)
tree257e95d18d20a923c52f4aef811787e956b93703 /source/blender/makesrna/intern/rna_define.c
parentb5100196021d12129c0d7e80be7e202c319ea120 (diff)
fix [#26601] Python error when use of autocomplete
Was a naming collision with 'keys' python method, reserve keys/items/values/get for python. Updated animsys_update.py for shapekey data paths. renamed: Particle.hair --> hair_keys Particle.keys --> particle_keys Key.keys --> key_blocks EnumProperty.items --> enum_items KeyMap.items --> keymap_items noted: http://wiki.blender.org/index.php/Dev:2.5/Py/API/Updates#Since_2.56a
Diffstat (limited to 'source/blender/makesrna/intern/rna_define.c')
-rw-r--r--source/blender/makesrna/intern/rna_define.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 4a14b2286f9..12f15911bda 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -411,6 +411,21 @@ static int rna_validate_identifier(const char *identifier, char *error, int prop
return 0;
}
}
+
+ if(property) {
+ static const char *kwlist_prop[] = {
+ /* not keywords but reserved all the same because py uses */
+ "keys", "values", "items", "get",
+ NULL
+ };
+
+ for(a=0; kwlist_prop[a]; a++) {
+ if (strcmp(identifier, kwlist_prop[a]) == 0) {
+ strcpy(error, "this keyword is reserved by python");
+ return 0;
+ }
+ }
+ }
return 1;
}