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:
Diffstat (limited to 'source/blender/python/intern/bpy_rna.c')
-rw-r--r--source/blender/python/intern/bpy_rna.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 2e0dfc515d1..316cfe4d8b1 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -2192,16 +2192,9 @@ static int pyrna_prop_array_bool(BPy_PropertyRNA *self)
static int pyrna_prop_collection_bool(BPy_PropertyRNA *self)
{
- /* No callback defined, just iterate and find the nth item. */
- CollectionPropertyIterator iter;
- int test;
-
PYRNA_PROP_CHECK_INT(self);
- RNA_property_collection_begin(&self->ptr, self->prop, &iter);
- test = iter.valid;
- RNA_property_collection_end(&iter);
- return test;
+ return !RNA_property_collection_is_empty(&self->ptr, self->prop);
}
/* notice getting the length of the collection is avoided unless negative