diff options
author | Ton Roosendaal <ton@blender.org> | 2006-03-12 14:51:56 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-03-12 14:51:56 +0300 |
commit | 8a8c70c63a6d5e7c9fc41e12559ff5c9be0e54dd (patch) | |
tree | 7ace83a36c9aeeb8b552e3f30590a6f55f166b10 /source/blender/src | |
parent | 4e4cd9407d57c3fe31675eb2a2fbf8ea8472aa9a (diff) |
A couple of render improvements;
- Bug fix: the upper tile in a collumn for Panorama render didn't put the
mainthread to sleep properly. Now panorama renders 25% faster if you had
set Y-Parts to 4.
- Enabling Compositing in Scene for first time now adds a "Composite" node
too, so render output gets applied.
- An attempt to render with "Do Composite" without "Composite" node will
throw an error and stops rendering. In background mode it will just not
render at all, and print errors.
- Errors that prevent rendering now give a popup menu again.
- Having MBlur or Fields option on will now normally render, but with an
error print in console (not done yet...)
Diffstat (limited to 'source/blender/src')
-rw-r--r-- | source/blender/src/editnode.c | 24 | ||||
-rw-r--r-- | source/blender/src/renderwin.c | 3 | ||||
-rw-r--r-- | source/blender/src/toolbox.c | 2 |
3 files changed, 18 insertions, 11 deletions
diff --git a/source/blender/src/editnode.c b/source/blender/src/editnode.c index 6f3a3a4fb15..f7cf5be5df4 100644 --- a/source/blender/src/editnode.c +++ b/source/blender/src/editnode.c @@ -333,7 +333,7 @@ void node_shader_default(Material *ma) /* called from shading buttons or header */ void node_composit_default(Scene *sce) { - bNode *in, *out; + bNode *in, *out1, *out2; bNodeSocket *fromsock, *tosock; /* but lets check it anyway */ @@ -344,27 +344,31 @@ void node_composit_default(Scene *sce) sce->nodetree= ntreeAddTree(NTREE_COMPOSIT); - out= nodeAddNodeType(sce->nodetree, CMP_NODE_VIEWER, NULL); - out->locx= 300.0f; out->locy= 300.0f; + out1= nodeAddNodeType(sce->nodetree, CMP_NODE_VIEWER, NULL); + out1->locx= 300.0f; out1->locy= 200.0f; + out2= nodeAddNodeType(sce->nodetree, CMP_NODE_COMPOSITE, NULL); + out2->locx= 300.0f; out2->locy= 500.0f; in= nodeAddNodeType(sce->nodetree, CMP_NODE_R_RESULT, NULL); - in->locx= 10.0f; in->locy= 300.0f; + in->locx= 10.0f; in->locy= 400.0f; nodeSetActive(sce->nodetree, in); - /* only a link from color to color */ + /* links from color to color */ fromsock= in->outputs.first; - tosock= out->inputs.first; - nodeAddLink(sce->nodetree, in, fromsock, out, tosock); + tosock= out1->inputs.first; + nodeAddLink(sce->nodetree, in, fromsock, out1, tosock); + tosock= out2->inputs.first; + nodeAddLink(sce->nodetree, in, fromsock, out2, tosock); ntreeSolveOrder(sce->nodetree); /* needed for pointers */ - out->id= find_id("IM", "Compositor"); - if(out->id==NULL) { + out1->id= find_id("IM", "Compositor"); + if(out1->id==NULL) { Image *ima= alloc_libblock(&G.main->image, ID_IM, "Compositor"); strcpy(ima->name, "Compositor"); ima->ok= 1; ima->xrep= ima->yrep= 1; - out->id= &ima->id; + out1->id= &ima->id; } } diff --git a/source/blender/src/renderwin.c b/source/blender/src/renderwin.c index 2562111e59f..e115857e893 100644 --- a/source/blender/src/renderwin.c +++ b/source/blender/src/renderwin.c @@ -80,6 +80,7 @@ #include "BIF_renderwin.h" #include "BIF_resources.h" #include "BIF_toets.h" +#include "BIF_toolbox.h" #include "BIF_writeimage.h" #include "BDR_editobject.h" @@ -1030,6 +1031,7 @@ static void end_test_break_callback() - set callbacks - cleanup */ +static void error_cb(char *str){error(str);} static void do_render(int anim) { @@ -1045,6 +1047,7 @@ static void do_render(int anim) RE_display_init_cb(re, renderwin_init_display_cb); RE_display_draw_cb(re, renderwin_progress_display_cb); RE_display_clear_cb(re, renderwin_clear_display_cb); + RE_error_cb(re, error_cb); init_test_break_callback(); RE_test_break_cb(re, test_break); RE_timecursor_cb(re, set_timecursor); diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c index 183884eb19d..a8d0d70f3f4 100644 --- a/source/blender/src/toolbox.c +++ b/source/blender/src/toolbox.c @@ -221,7 +221,7 @@ void error(char *fmt, ...) sprintf(nfmt, "%s", fmt); va_start(ap, fmt); - if (G.background || !G.curscreen || (G.rendering)) { + if (G.background || !G.curscreen) { vprintf(nfmt, ap); printf("\n"); } else { |