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:
authorCampbell Barton <ideasman42@gmail.com>2012-06-14 19:04:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-14 19:04:40 +0400
commit0b2fcf43680eb0c6877bd111580fa98ae7ccb7e7 (patch)
treea7e8128cd82b18df3ca0dcda5a458dc2e1cfaa02 /source/blender/nodes
parent91eed57e62f2c820a9d1b4764ff3d4c7adafd51c (diff)
change to scale node - multiply scale by scene size, without this theres no reliable way to match different scaled footage to an output and still have useful preview's at <100 percentage.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_scale.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_scale.c b/source/blender/nodes/composite/nodes/node_composite_scale.c
index a36919ba553..90ab485af75 100644
--- a/source/blender/nodes/composite/nodes/node_composite_scale.c
+++ b/source/blender/nodes/composite/nodes/node_composite_scale.c
@@ -49,11 +49,12 @@ static bNodeSocketTemplate cmp_node_scale_out[]= {
/* node->custom1 stores if input values are absolute or relative scale */
static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
+ RenderData *rd = data;
+
if (out[0]->hasoutput==0)
return;
if (in[0]->data) {
- RenderData *rd= data;
CompBuf *stackbuf, *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA);
ImBuf *ibuf;
int newx, newy;
@@ -114,9 +115,13 @@ static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, b
int a, x, y;
float *fp;
+#ifdef USE_SCENE_COMPO_SCALE
+ x = MAX2((int)in[1]->vec[0], 1) * (rd->size / 100.0f);
+ y = MAX2((int)in[2]->vec[0], 1) * (rd->size / 100.0f);
+#else
x = MAX2((int)in[1]->vec[0], 1);
y = MAX2((int)in[2]->vec[0], 1);
-
+#endif
stackbuf = alloc_compbuf(x, y, CB_RGBA, 1);
fp = stackbuf->rect;