forked from bartvdbraak/blender
Fix #31349: Composite node is not found when part of a group.
Made smarter check for composite output node which now checks if there are composite output nodes in group nodes.
This commit is contained in:
parent
f4705b38f9
commit
c2863e3f9b
@ -1805,6 +1805,28 @@ static int check_valid_camera(Scene *scene, Object *camera_override)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int node_tree_has_composite_output(bNodeTree *ntree)
|
||||||
|
{
|
||||||
|
bNode *node;
|
||||||
|
|
||||||
|
for (node = ntree->nodes.first; node; node = node->next) {
|
||||||
|
if (node->type == CMP_NODE_COMPOSITE) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
else if (node->type == NODE_GROUP) {
|
||||||
|
if (node_tree_has_composite_output((bNodeTree *)node->id))
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int check_composite_output(Scene *scene)
|
||||||
|
{
|
||||||
|
return node_tree_has_composite_output(scene->nodetree);
|
||||||
|
}
|
||||||
|
|
||||||
int RE_is_rendering_allowed(Scene *scene, Object *camera_override, ReportList *reports)
|
int RE_is_rendering_allowed(Scene *scene, Object *camera_override, ReportList *reports)
|
||||||
{
|
{
|
||||||
SceneRenderLayer *srl;
|
SceneRenderLayer *srl;
|
||||||
@ -1839,19 +1861,12 @@ int RE_is_rendering_allowed(Scene *scene, Object *camera_override, ReportList *r
|
|||||||
|
|
||||||
if (scene->r.scemode & R_DOCOMP) {
|
if (scene->r.scemode & R_DOCOMP) {
|
||||||
if (scene->use_nodes) {
|
if (scene->use_nodes) {
|
||||||
bNodeTree *ntree= scene->nodetree;
|
if (!scene->nodetree) {
|
||||||
bNode *node;
|
|
||||||
|
|
||||||
if (ntree==NULL) {
|
|
||||||
BKE_report(reports, RPT_ERROR, "No Nodetree in Scene");
|
BKE_report(reports, RPT_ERROR, "No Nodetree in Scene");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (node= ntree->nodes.first; node; node= node->next)
|
if (!check_composite_output(scene)) {
|
||||||
if (node->type==CMP_NODE_COMPOSITE)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (node==NULL) {
|
|
||||||
BKE_report(reports, RPT_ERROR, "No Render Output Node in Scene");
|
BKE_report(reports, RPT_ERROR, "No Render Output Node in Scene");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user