diff options
author | Campbell Barton <campbell@blender.org> | 2022-02-15 12:07:54 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-02-15 12:13:00 +0300 |
commit | 07ed869b94fa8acf18d64864c6d8662bfbec33dd (patch) | |
tree | 8ff07b7983bb693c704550104fae0cc3c1a4dfde /source/blender/editors/space_clip | |
parent | 4637e83990babd208e932e7f7b09a86e1de2e4fd (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')
-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]; |