Merge branch 'blender-v3.6-release'
This commit is contained in:
commit
286edd6b2a
|
@ -430,12 +430,14 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd,
|
|||
if (j > src_poly.start()) {
|
||||
mirrorj += result_polys[mirror_i].size() - (j - src_poly.start());
|
||||
}
|
||||
|
||||
const blender::float3 orig_normal = loop_normals[mirrorj];
|
||||
copy_v3_v3(loop_normals[mirrorj], loop_normals[j]);
|
||||
mul_m4_v3(mtx_nor, loop_normals[mirrorj]);
|
||||
|
||||
const int space_index = lnors_spacearr.corner_space_indices[mirrorj];
|
||||
blender::bke::mesh::lnor_space_custom_normal_to_data(&lnors_spacearr.spaces[space_index],
|
||||
loop_normals[mirrorj],
|
||||
orig_normal,
|
||||
loop_normals[mirrorj],
|
||||
clnors[mirrorj]);
|
||||
}
|
||||
|
|
|
@ -307,25 +307,27 @@ bool imb_oiio_write(const WriteContext &ctx, const char *filepath, const ImageSp
|
|||
final_buf = std::move(orig_buf);
|
||||
}
|
||||
|
||||
bool ok = false;
|
||||
bool write_ok = false;
|
||||
bool close_ok = false;
|
||||
if (ctx.flags & IB_mem) {
|
||||
/* This memory proxy must remain alive for the full duration of the write. */
|
||||
/* This memory proxy must remain alive until the ImageOutput is finally closed. */
|
||||
ImBufMemWriter writer(ctx.ibuf);
|
||||
|
||||
imb_addencodedbufferImBuf(ctx.ibuf);
|
||||
out->set_ioproxy(&writer);
|
||||
if (out->open("", file_spec)) {
|
||||
ok = final_buf.write(out.get());
|
||||
write_ok = final_buf.write(out.get());
|
||||
close_ok = out->close();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (out->open(filepath, file_spec)) {
|
||||
ok = final_buf.write(out.get());
|
||||
write_ok = final_buf.write(out.get());
|
||||
close_ok = out->close();
|
||||
}
|
||||
}
|
||||
|
||||
out->close();
|
||||
return ok;
|
||||
return write_ok && close_ok;
|
||||
}
|
||||
|
||||
WriteContext imb_create_write_context(const char *file_format,
|
||||
|
|
Loading…
Reference in New Issue