diff options
author | Diego Borghetti <bdiego@gmail.com> | 2010-07-09 00:58:34 +0400 |
---|---|---|
committer | Diego Borghetti <bdiego@gmail.com> | 2010-07-09 00:58:34 +0400 |
commit | 24f63b20810692ff3d25fbe205098467ba32d277 (patch) | |
tree | b65300a3ad0458920f84e6ee661c3519edd06bb7 /source/blender/nodes | |
parent | a9050083fe649f2a5839aeba4cb0bd5ddbbc5c5e (diff) |
New option for Scale node.
This is because problem reported by venomgfx on the irc.
If you have a render of 2k with a render size of 25% (and this
problem is for any resolution/size) and you try to use a image
of 1k in the compo, the first thing you do is put a scale node.
Here come the problem, if you set the option "Scene Size" in the
node scale, the buffer output is not the same size that the render.
This is because the "Scene size" work with the image size and
not the render size, so in this case is the 25% of 1k.. not
the 25% 2k.
So this new option "Render Size" scale the output buffer to the
render resolution, taking into account the render size (percentage) too.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_scale.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_scale.c b/source/blender/nodes/intern/CMP_nodes/CMP_scale.c index d7a9497f41d..9779875b01a 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_scale.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_scale.c @@ -64,6 +64,10 @@ static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, b else if(node->custom1==CMP_SCALE_SCENEPERCENT) { newx = cbuf->x * (rd->size / 100.0f); newy = cbuf->y * (rd->size / 100.0f); + } + else if (node->custom1==CMP_SCALE_RENDERPERCENT) { + newx= (rd->xsch * rd->size)/100; + newy= (rd->ysch * rd->size)/100; } else { /* CMP_SCALE_ABSOLUTE */ newx= MAX2((int)in[1]->vec[0], 1); newy= MAX2((int)in[2]->vec[0], 1); |