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:
Diffstat (limited to 'source/blender/nodes/intern/TEX_nodes/TEX_scale.c')
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_scale.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_scale.c b/source/blender/nodes/intern/TEX_nodes/TEX_scale.c
index 792c3468e9f..3d4415365aa 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_scale.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_scale.c
@@ -21,7 +21,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): none yet.
+ * Contributor(s): Robin Allen
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -40,17 +40,19 @@ static bNodeSocketType outputs[]= {
{ -1, 0, "" }
};
-static void colorfn(float *out, float *coord, bNode *node, bNodeStack **in, short thread)
+static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread)
{
float scale[3], new_coord[3];
+ TexParams np = *p;
+ np.coord = new_coord;
- tex_input_vec(scale, in[1], coord, thread);
+ tex_input_vec(scale, in[1], p, thread);
- new_coord[0] = coord[0] * scale[0];
- new_coord[1] = coord[1] * scale[1];
- new_coord[2] = coord[2] * scale[2];
+ new_coord[0] = p->coord[0] * scale[0];
+ new_coord[1] = p->coord[1] * scale[1];
+ new_coord[2] = p->coord[2] * scale[2];
- tex_input_rgba(out, in[0], new_coord, thread);
+ tex_input_rgba(out, in[0], &np, thread);
}
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{