Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-03-01 11:56:15 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-03-01 11:56:15 +0400
commit2eb29e4788008c1346b3a757cccec503b73c9b90 (patch)
tree8b27a7524ad45b8cfcadff31cfa17d2885a0f18b /source/blender/editors/space_node/node_edit.c
parent1d5a3886a175da808df1872f161e4eb8848ab358 (diff)
A number of improvements for the file output node(s).
1) Old CMP_NODE_OUTPUT_FILE and CMP_NODE_OUTPUT_MULTI_FILE have been merged, only CMP_NODE_OUTPUT_FILE remains. All functions renamed accordingly. 2) do_versions code for converting single-file output nodes into multi-file output nodes. If a Z buffer input is used, the node is made into a multilayer exr with two inputs. (see below). Also re-identifies multi-file output nodes with the CMP_NODE_OUTPUT_FILE type. 3) "Global" format is stored in node now. By default this overrides any per-socket settings. 4) Multilayer EXR output implemented. When M.EXR format is selected for node format, all socket format details are ignored. Socket names are used for layer names. 5) Input buffer types are used as-is when possible, i.e. stored as B/W, RGB or RGBA. In regular file output the format dictates the number of actual channels, so the CompBuf is typechecked to the right type first. For multilayer EXR the number of channels is more flexible, so an input buffer will store only the channels it actually uses. 6) The editor socket type is updated from linked sockets as an indicator of the actual data written to files. This may not be totally accurate for regular file output though, due to restrictions of format setting.
Diffstat (limited to 'source/blender/editors/space_node/node_edit.c')
-rw-r--r--source/blender/editors/space_node/node_edit.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index c89e91724fb..a6d18b58cca 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -2254,6 +2254,8 @@ static void node_remove_extra_links(SpaceNode *snode, bNodeSocket *tsock, bNodeL
}
else
nodeRemLink(snode->edittree, tlink);
+
+ snode->edittree->update |= NTREE_UPDATE_LINKS;
}
}
}
@@ -3515,49 +3517,47 @@ void NODE_OT_new_node_tree(wmOperatorType *ot)
RNA_def_string(ot->srna, "name", "NodeTree", MAX_ID_NAME-2, "Name", "");
}
-/* ****************** Multi File Output Add Socket ******************* */
+/* ****************** File Output Add Socket ******************* */
-static int node_output_multi_file_add_socket_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_output_file_add_socket_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
SpaceNode *snode= CTX_wm_space_node(C);
bNodeTree *ntree = snode->edittree;
bNode *node = nodeGetActive(ntree);
+ char file_path[MAX_NAME];
if (!node)
return OPERATOR_CANCELLED;
- ntreeCompositOutputMultiFileAddSocket(ntree, node, &scene->r.im_format);
+ RNA_string_get(op->ptr, "file_path", file_path);
+ ntreeCompositOutputFileAddSocket(ntree, node, file_path, &scene->r.im_format);
snode_notify(C, snode);
return OPERATOR_FINISHED;
}
-static int node_output_multi_file_add_socket_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
-{
- return node_output_multi_file_add_socket_exec(C, op);
-}
-
-void NODE_OT_output_multi_file_add_socket(wmOperatorType *ot)
+void NODE_OT_output_file_add_socket(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Multi File Node Socket";
- ot->description= "Add a new input to a multi file output node";
- ot->idname= "NODE_OT_output_multi_file_add_socket";
+ ot->name= "Add File Node Socket";
+ ot->description= "Add a new input to a file output node";
+ ot->idname= "NODE_OT_output_file_add_socket";
/* callbacks */
- ot->exec= node_output_multi_file_add_socket_exec;
- ot->invoke= node_output_multi_file_add_socket_invoke;
+ ot->exec= node_output_file_add_socket_exec;
ot->poll= composite_node_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_string(ot->srna, "file_path", "Image", MAX_NAME, "File Path", "Sub-path of the output file");
}
/* ****************** Multi File Output Remove Socket ******************* */
-static int node_output_multi_file_remove_active_socket_exec(bContext *C, wmOperator *UNUSED(op))
+static int node_output_file_remove_active_socket_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode= CTX_wm_space_node(C);
bNodeTree *ntree = snode->edittree;
@@ -3566,7 +3566,7 @@ static int node_output_multi_file_remove_active_socket_exec(bContext *C, wmOpera
if (!node)
return OPERATOR_CANCELLED;
- if (!ntreeCompositOutputMultiFileRemoveActiveSocket(ntree, node))
+ if (!ntreeCompositOutputFileRemoveActiveSocket(ntree, node))
return OPERATOR_CANCELLED;
snode_notify(C, snode);
@@ -3574,15 +3574,15 @@ static int node_output_multi_file_remove_active_socket_exec(bContext *C, wmOpera
return OPERATOR_FINISHED;
}
-void NODE_OT_output_multi_file_remove_active_socket(wmOperatorType *ot)
+void NODE_OT_output_file_remove_active_socket(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Multi File Node Socket";
- ot->description= "Remove active input from a multi file output node";
- ot->idname= "NODE_OT_output_multi_file_remove_active_socket";
+ ot->name= "Remove File Node Socket";
+ ot->description= "Remove active input from a file output node";
+ ot->idname= "NODE_OT_output_file_remove_active_socket";
/* callbacks */
- ot->exec= node_output_multi_file_remove_active_socket_exec;
+ ot->exec= node_output_file_remove_active_socket_exec;
ot->poll= composite_node_active;
/* flags */