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>2009-06-23 16:36:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-06-23 16:36:15 +0400
commitbf74f105bc5ec98980fa087347203244750fb669 (patch)
treeb23e701e4a851f29c271e8d02ad7ab21fc38f523 /source/blender/python
parent502a3849bd0881f74f5a2adc543032a89eede252 (diff)
small changes...
- allow RNA_property_enum_items to take the totitems int pointer as NULL (spares a loop on all the enum items). this change also makes enums types with no enum array crash in some places, could support these though Id rather disallow them, generating docs is a quick way to test for this. - open recent file operator used and enum to open the recent file without an enum array, changed to an int type. - added space_logic.py poll functions
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy_rna.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 57c7144f949..93a8af8b177 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -46,9 +46,9 @@
static int mathutils_rna_vector_cb_index= -1; /* index for our callbacks */
-static int mathutils_rna_vector_check(PyObject *user)
+static int mathutils_rna_vector_check(BPy_PropertyRNA *self)
{
- return ((BPy_PropertyRNA *)user)->prop?1:0;
+ return self->prop?1:0;
}
static int mathutils_rna_vector_get(BPy_PropertyRNA *self, int subtype, float *vec_from)
@@ -190,7 +190,7 @@ static char *pyrna_enum_as_string(PointerRNA *ptr, PropertyRNA *prop)
const EnumPropertyItem *item;
int totitem;
- RNA_property_enum_items(ptr, prop, &item, &totitem);
+ RNA_property_enum_items(ptr, prop, &item, NULL);
return (char*)BPy_enum_as_string((EnumPropertyItem*)item);
}