diff options
author | Campbell Barton <campbell@blender.org> | 2022-02-15 12:07:54 +0300 |
---|---|---|
committer | Fabian Schempp <fabianschempp@googlemail.com> | 2022-04-11 01:29:35 +0300 |
commit | fafeb063d7b494f77c6b3397db27f242d4982307 (patch) | |
tree | 06971f9ec849f34485ff1fa7372adec199be94e8 /source/blender/editors/space_clip/clip_ops.c | |
parent | fddaef10cfb6162d4daf7180581f3dbc2be3e8e0 (diff) |
RNA: add RNA_collection_is_empty & RNA_property_collection_is_empty
Some collections needed to be iterated over to count their length.
Provide a function to check if the collection is empty to avoid this.
Diffstat (limited to 'source/blender/editors/space_clip/clip_ops.c')
-rw-r--r-- | source/blender/editors/space_clip/clip_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 64ac20123d9..311f3719864 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -186,7 +186,7 @@ static int open_exec(bContext *C, wmOperator *op) MovieClip *clip = NULL; char str[FILE_MAX]; - if (RNA_collection_length(op->ptr, "files")) { + if (!RNA_collection_is_empty(op->ptr, "files")) { PointerRNA fileptr; PropertyRNA *prop; char dir_only[FILE_MAX], file_only[FILE_MAX]; |