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:
authorTon Roosendaal <ton@blender.org>2013-01-24 20:11:07 +0400
committerTon Roosendaal <ton@blender.org>2013-01-24 20:11:07 +0400
commitb12a0199480f5d452828450fa257020635f7ad6d (patch)
treee2b4537fd96bc0d89264615ec42831c1aaa5aa8b /source/blender/render
parent1da7d7d1a0a4297cf6b09758c01f98f50543993f (diff)
Usability
- Cycles materials now render in Blender Internal too, skipping the nodes. Not very useful, but at least things then show up on renders and in previews. - Node editor: if wrong shader nodes are in a tree, they draw with thene color RED ALERT headers now. (Switching render engine will show it).
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/shadeinput.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index db93a21de2d..c59c3685d7d 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -151,6 +151,7 @@ void shade_material_loop(ShadeInput *shi, ShadeResult *shr)
/* do a shade, finish up some passes, apply mist */
void shade_input_do_shade(ShadeInput *shi, ShadeResult *shr)
{
+ int compat = 0;
float alpha;
/* ------ main shading loop -------- */
@@ -158,10 +159,11 @@ void shade_input_do_shade(ShadeInput *shi, ShadeResult *shr)
memset(&shi->raycounter, 0, sizeof(shi->raycounter));
#endif
- if (shi->mat->nodetree && shi->mat->use_nodes) {
- ntreeShaderExecTree(shi->mat->nodetree, shi, shr);
- }
- else {
+ if (shi->mat->nodetree && shi->mat->use_nodes)
+ compat = ntreeShaderExecTree(shi->mat->nodetree, shi, shr);
+
+ /* also run this when node shaders fail, due to incompatible shader nodes */
+ if (compat == 0) {
/* copy all relevant material vars, note, keep this synced with render_types.h */
shade_input_init_material(shi);