Merge branch 'blender-v4.2-release'
This commit is contained in:
@@ -134,10 +134,12 @@ void ImageNode::convert_to_operations(NodeConverter &converter,
|
||||
/* dummy operation is added below */
|
||||
break;
|
||||
}
|
||||
if (index == 0 && operation) {
|
||||
if (operation && index == 0) {
|
||||
converter.add_preview(operation->get_output_socket());
|
||||
}
|
||||
if (STREQ(rpass->name, RE_PASSNAME_COMBINED) && !(bnode_socket->flag & SOCK_UNAVAIL)) {
|
||||
if (operation && STREQ(rpass->name, RE_PASSNAME_COMBINED) &&
|
||||
!(bnode_socket->flag & SOCK_UNAVAIL))
|
||||
{
|
||||
for (NodeOutput *alpha_socket : get_output_sockets()) {
|
||||
bNodeSocket *bnode_alpha_socket = alpha_socket->get_bnode_socket();
|
||||
if (!STREQ(bnode_alpha_socket->name, "Alpha")) {
|
||||
|
||||
@@ -608,10 +608,21 @@ static int collection_exporter_export(bContext *C,
|
||||
const Main *bmain = CTX_data_main(C);
|
||||
BLI_path_abs(filepath, BKE_main_blendfile_path(bmain));
|
||||
|
||||
/* Ensure that any properties from when this operator was "last used" are cleared. Save them for
|
||||
* restoration later. Otherwise properties from a regular File->Export may contaminate this
|
||||
* collection export. */
|
||||
IDProperty *last_properties = ot->last_properties;
|
||||
ot->last_properties = nullptr;
|
||||
|
||||
RNA_string_set(&properties, "filepath", filepath);
|
||||
RNA_string_set(&properties, "collection", collection_name);
|
||||
int op_result = WM_operator_name_call_ptr(C, ot, WM_OP_EXEC_DEFAULT, &properties, nullptr);
|
||||
|
||||
/* Free the "last used" properties that were just set from the collection export and restore the
|
||||
* original "last used" properties. */
|
||||
IDP_FreeProperty(ot->last_properties);
|
||||
ot->last_properties = last_properties;
|
||||
|
||||
IDP_FreeProperty(op_props);
|
||||
|
||||
if (report_success && op_result == OPERATOR_FINISHED) {
|
||||
|
||||
@@ -635,9 +635,6 @@ ImBuf *IMB_dupImBuf(const ImBuf *ibuf1)
|
||||
if (ibuf1->byte_buffer.data) {
|
||||
flags |= IB_rect;
|
||||
}
|
||||
if (ibuf1->float_buffer.data) {
|
||||
flags |= IB_rectfloat;
|
||||
}
|
||||
|
||||
x = ibuf1->x;
|
||||
y = ibuf1->y;
|
||||
@@ -651,10 +648,18 @@ ImBuf *IMB_dupImBuf(const ImBuf *ibuf1)
|
||||
memcpy(ibuf2->byte_buffer.data, ibuf1->byte_buffer.data, size_t(x) * y * 4 * sizeof(uint8_t));
|
||||
}
|
||||
|
||||
if (flags & IB_rectfloat) {
|
||||
if (ibuf1->float_buffer.data) {
|
||||
/* Ensure the correct number of channels are being allocated for the new ImBuf. Some
|
||||
* compositing scenarios might end up with >4 channels and we want to duplicate them prooperly.
|
||||
*/
|
||||
if (imb_addrectfloatImBuf(ibuf2, ibuf1->channels, false) == false) {
|
||||
IMB_freeImBuf(ibuf2);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
memcpy(ibuf2->float_buffer.data,
|
||||
ibuf1->float_buffer.data,
|
||||
size_t(ibuf1->channels) * x * y * sizeof(float));
|
||||
size_t(ibuf2->channels) * x * y * sizeof(float));
|
||||
}
|
||||
|
||||
if (ibuf1->encoded_buffer.data) {
|
||||
|
||||
Reference in New Issue
Block a user