diff options
author | Bastien Montagne <bastien@blender.org> | 2022-05-16 12:01:01 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-05-16 12:01:01 +0300 |
commit | 717c150eb10a614eba209ba2f51c2b78e563aecb (patch) | |
tree | 66b98e596b69dacd49d63f99f5a0c0077c8c7c47 | |
parent | 124aae91e226984016aa3482f849d8bbebbb3fa3 (diff) | |
parent | 2397287a51bf45f22b2008d17e8e89c2269d870a (diff) |
Merge branch 'blender-v3.2-release'
-rw-r--r-- | source/blender/blenkernel/intern/image_save.cc | 9 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 13 |
2 files changed, 16 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/image_save.cc b/source/blender/blenkernel/intern/image_save.cc index 106384643df..a4c48c90d17 100644 --- a/source/blender/blenkernel/intern/image_save.cc +++ b/source/blender/blenkernel/intern/image_save.cc @@ -795,10 +795,11 @@ bool BKE_image_render_write_exr(ReportList *reports, const bool pass_half_float = half_float && pass_RGBA; /* Colorspace conversion only happens on RGBA passes. */ - float *output_rect = (save_as_render && pass_RGBA) ? - image_exr_from_scene_linear_to_output( - rp->rect, rr->rectx, rr->recty, 4, imf, tmp_output_rects) : - rp->rect; + float *output_rect = + (save_as_render && pass_RGBA) ? + image_exr_from_scene_linear_to_output( + rp->rect, rr->rectx, rr->recty, rp->channels, imf, tmp_output_rects) : + rp->rect; for (int a = 0; a < rp->channels; a++) { /* Save Combined as RGBA if single layer save. */ diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 91bee19481c..8f7660d4015 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -5546,7 +5546,12 @@ static char *rna_idp_path(PointerRNA *ptr, if (iter->type == IDP_GROUP) { if (prop->type == PROP_POINTER) { PointerRNA child_ptr = RNA_property_pointer_get(ptr, prop); - BLI_assert(!RNA_pointer_is_null(&child_ptr)); + if (RNA_pointer_is_null(&child_ptr)) { + /* Pointer ID prop might be a 'leaf' in the IDProp group hierarchy, in which case a NULL + * value is perfectly valid. Just means it won't match the searched needle. */ + continue; + } + link.name = iter->name; link.index = -1; if ((path = rna_idp_path(&child_ptr, iter, needle, &link))) { @@ -5568,7 +5573,11 @@ static char *rna_idp_path(PointerRNA *ptr, for (j = 0; j < iter->len; j++, array++) { PointerRNA child_ptr; if (RNA_property_collection_lookup_int(ptr, prop, j, &child_ptr)) { - BLI_assert(!RNA_pointer_is_null(&child_ptr)); + if (RNA_pointer_is_null(&child_ptr)) { + /* Array item ID prop might be a 'leaf' in the IDProp group hierarchy, in which case + * a NULL value is perfectly valid. Just means it won't match the searched needle. */ + continue; + } link.index = j; if ((path = rna_idp_path(&child_ptr, array, needle, &link))) { break; |