Fix for the node tree nodes.new API function, this wasn't setting the scene and main context pointers in the node template, used by file output node. Also the file output node itself now works in case of scene==NULL (might happen in some contexts).
This commit is contained in:
@@ -578,7 +578,7 @@ static EnumPropertyItem *rna_Node_channel_itemf(bContext *UNUSED(C), PointerRNA
|
||||
return item;
|
||||
}
|
||||
|
||||
static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *UNUSED(C), ReportList *reports,
|
||||
static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *C, ReportList *reports,
|
||||
int type, bNodeTree *group)
|
||||
{
|
||||
bNode *node;
|
||||
@@ -591,6 +591,8 @@ static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *UNUSED(C), Repor
|
||||
|
||||
ntemp.type = type;
|
||||
ntemp.ngroup = group;
|
||||
ntemp.scene = CTX_data_scene(C);
|
||||
ntemp.main = CTX_data_main(C);
|
||||
node = nodeAddNode(ntree, &ntemp);
|
||||
|
||||
if (node == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user