Compositor: Compositor Output should Follow Active Node.
When using multiple compositor output nodes, compositing would fail , showing a completely black output as it doesn't respect the active node. This patch will equalize the implementation with the viewer nodes. Patch created by @OmarEmaraDev Fixes: #86836 Pull Request #105235
This commit is contained in:
@@ -15,7 +15,8 @@ void CompositorNode::convert_to_operations(NodeConverter &converter,
|
||||
const CompositorContext &context) const
|
||||
{
|
||||
const bNode *editor_node = this->get_bnode();
|
||||
bool is_active = (editor_node->flag & NODE_DO_OUTPUT_RECALC) || context.is_rendering();
|
||||
bool is_active = ((editor_node->flag & NODE_DO_OUTPUT_RECALC) || context.is_rendering()) &&
|
||||
(editor_node->flag & NODE_DO_OUTPUT);
|
||||
bool ignore_alpha = (editor_node->custom2 & CMP_NODE_OUTPUT_IGNORE_ALPHA) != 0;
|
||||
|
||||
NodeInput *image_socket = this->get_input_socket(0);
|
||||
|
||||
@@ -17,7 +17,7 @@ void SplitViewerNode::convert_to_operations(NodeConverter &converter,
|
||||
const CompositorContext &context) const
|
||||
{
|
||||
const bNode *editor_node = this->get_bnode();
|
||||
bool do_output = (editor_node->flag & NODE_DO_OUTPUT_RECALC || context.is_rendering()) &&
|
||||
bool is_active = (editor_node->flag & NODE_DO_OUTPUT_RECALC || context.is_rendering()) &&
|
||||
(editor_node->flag & NODE_DO_OUTPUT);
|
||||
|
||||
NodeInput *image1Socket = this->get_input_socket(0);
|
||||
@@ -54,7 +54,7 @@ void SplitViewerNode::convert_to_operations(NodeConverter &converter,
|
||||
|
||||
converter.add_preview(split_viewer_operation->get_output_socket());
|
||||
|
||||
if (do_output) {
|
||||
if (is_active) {
|
||||
converter.register_viewer(viewer_operation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ void ViewerNode::convert_to_operations(NodeConverter &converter,
|
||||
const CompositorContext &context) const
|
||||
{
|
||||
const bNode *editor_node = this->get_bnode();
|
||||
bool do_output = (editor_node->flag & NODE_DO_OUTPUT_RECALC || context.is_rendering()) &&
|
||||
bool is_active = (editor_node->flag & NODE_DO_OUTPUT_RECALC || context.is_rendering()) &&
|
||||
(editor_node->flag & NODE_DO_OUTPUT);
|
||||
bool ignore_alpha = (editor_node->custom2 & CMP_NODE_OUTPUT_IGNORE_ALPHA) != 0;
|
||||
|
||||
@@ -61,7 +61,7 @@ void ViewerNode::convert_to_operations(NodeConverter &converter,
|
||||
|
||||
converter.add_node_input_preview(image_socket);
|
||||
|
||||
if (do_output) {
|
||||
if (is_active) {
|
||||
converter.register_viewer(viewer_operation);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user