diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-02 20:17:05 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-02 20:17:05 +0400 |
commit | 2f453773f6b4cd0a03f5e2d9876ee250b87871f0 (patch) | |
tree | 08c4bb2c1c3ee3fe5131e46a4e39b9224ba5c251 /source/blender/nodes | |
parent | 02fae3440c8b4b89aa0f9412bc4e0db60a787c13 (diff) | |
parent | e1594ebb3c52f573a8a6c90f3d30acfb3de6e8a5 (diff) |
Cycles: svn merge -r41266:41467 ^/trunk/blender
Diffstat (limited to 'source/blender/nodes')
5 files changed, 30 insertions, 10 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_mixrgb.c b/source/blender/nodes/composite/nodes/node_composite_mixrgb.c index 6732803f19c..0f5a2b61b87 100644 --- a/source/blender/nodes/composite/nodes/node_composite_mixrgb.c +++ b/source/blender/nodes/composite/nodes/node_composite_mixrgb.c @@ -33,9 +33,9 @@ /* **************** MIX RGB ******************** */ static bNodeSocketTemplate cmp_node_mix_rgb_in[]= { - { SOCK_FLOAT, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, PROP_FACTOR}, - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, - { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f}, + { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, PROP_FACTOR}, + { SOCK_RGBA, 1, "Image", 1.0f, 1.0f, 1.0f, 1.0f}, + { SOCK_RGBA, 1, "Image", 1.0f, 1.0f, 1.0f, 1.0f}, { -1, 0, "" } }; static bNodeSocketTemplate cmp_node_mix_rgb_out[]= { diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c index 7851654a0b9..5ca8f2c3d9a 100644 --- a/source/blender/nodes/shader/node_shader_tree.c +++ b/source/blender/nodes/shader/node_shader_tree.c @@ -233,8 +233,15 @@ void ntreeShaderExecTree(bNodeTree *ntree, ShadeInput *shi, ShadeResult *shr) /* each material node has own local shaderesult, with optional copying */ memset(shr, 0, sizeof(ShadeResult)); - if (!exec) - exec = ntree->execdata = ntreeShaderBeginExecTree(ntree, 1); + /* ensure execdata is only initialized once */ + if (!exec) { + BLI_lock_thread(LOCK_NODES); + if(!ntree->execdata) + ntree->execdata = ntreeShaderBeginExecTree(ntree, 1); + BLI_unlock_thread(LOCK_NODES); + + exec = ntree->execdata; + } nts= ntreeGetThreadStack(exec, shi->thread); ntreeExecThreadNodes(exec, nts, &scd, shi->thread); diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c index 78792956684..5e5d44540dc 100644 --- a/source/blender/nodes/texture/node_texture_tree.c +++ b/source/blender/nodes/texture/node_texture_tree.c @@ -232,8 +232,15 @@ int ntreeTexExecTree( data.mtex= mtex; data.shi= shi; - if (!exec) - exec = ntreeTexBeginExecTree(nodes, 1); + /* ensure execdata is only initialized once */ + if (!exec) { + BLI_lock_thread(LOCK_NODES); + if(!nodes->execdata) + ntreeTexBeginExecTree(nodes, 1); + BLI_unlock_thread(LOCK_NODES); + + exec= nodes->execdata; + } nts= ntreeGetThreadStack(exec, thread); ntreeExecThreadNodes(exec, nts, &data, thread); diff --git a/source/blender/nodes/texture/nodes/node_texture_scale.c b/source/blender/nodes/texture/nodes/node_texture_scale.c index fbca9be068c..f42b3addc91 100644 --- a/source/blender/nodes/texture/nodes/node_texture_scale.c +++ b/source/blender/nodes/texture/nodes/node_texture_scale.c @@ -35,7 +35,7 @@ static bNodeSocketTemplate inputs[]= { { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f }, - { SOCK_VECTOR, 1, "Scale", 1.0f, 1.0f, 1.0f, 0.0f, -10.0f, 10.0f, PROP_FACTOR }, + { SOCK_VECTOR, 1, "Scale", 1.0f, 1.0f, 1.0f, 0.0f, -10.0f, 10.0f, PROP_XYZ }, { -1, 0, "" } }; diff --git a/source/blender/nodes/texture/nodes/node_texture_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c index 2d543470342..1b8eb3aabc6 100644 --- a/source/blender/nodes/texture/nodes/node_texture_texture.c +++ b/source/blender/nodes/texture/nodes/node_texture_texture.c @@ -54,8 +54,14 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor float co[3], dxt[3], dyt[3]; copy_v3_v3(co, p->co); - copy_v3_v3(dxt, p->dxt); - copy_v3_v3(dyt, p->dyt); + if (p->osatex) { + copy_v3_v3(dxt, p->dxt); + copy_v3_v3(dyt, p->dyt); + } + else { + zero_v3(dxt); + zero_v3(dyt); + } if(node->custom2 || node->need_exec==0) { /* this node refers to its own texture tree! */ |