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:
authorMatt Ebb <matt@mke3.net>2007-11-14 02:53:58 +0300
committerMatt Ebb <matt@mke3.net>2007-11-14 02:53:58 +0300
commita1c5b3b51d6c32ba055cf25c0e8efb0d2683248c (patch)
tree8cc0854de684bdb10fb35de5e3fcb635f4feb5ea /source/blender/src/drawnode.c
parent07110e83fd46b17e584c912aaa3a082f5f27416b (diff)
* New feature on compo scale node: "Scene Size %"
This option sets the relative scaling factor to the amount set in the scene "100%/75%/50%/25%" buttons. It's useful when you've got a fixed background image, and want to do preview renders at a lesser percentage, so you don't have to go and change the scale node each time you change the %. Also removed unnecessary use of a global from texture node.
Diffstat (limited to 'source/blender/src/drawnode.c')
-rw-r--r--source/blender/src/drawnode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/src/drawnode.c b/source/blender/src/drawnode.c
index 256633524e4..4a5dda72b18 100644
--- a/source/blender/src/drawnode.c
+++ b/source/blender/src/drawnode.c
@@ -1726,7 +1726,7 @@ static void node_scale_cb(void *node_v, void *unused_v)
/* check the 2 inputs, and set them to reasonable values */
for(nsock= node->inputs.first; nsock; nsock= nsock->next) {
- if(node->custom1==CMP_SCALE_RELATIVE)
+ if(ELEM(node->custom1, CMP_SCALE_RELATIVE, CMP_SCALE_SCENEPERCENT))
nsock->ns.vec[0]= 1.0;
else {
if(nsock->next==NULL)
@@ -1740,9 +1740,9 @@ static void node_scale_cb(void *node_v, void *unused_v)
static int node_composit_buts_scale(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
{
if(block) {
- uiBut *bt= uiDefButS(block, TOG, B_NODE_EXEC+node->nr, "Absolute",
+ uiBut *bt= uiDefButS(block, MENU, B_NODE_EXEC+node->nr, "Relative %x0|Absolute %x1|Scene Size % %x2|",
butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &node->custom1, 0, 0, 0, 0, "");
+ &node->custom1, 0, 0, 0, 0, "Scale new image to absolute pixel size, size relative to the incoming image, or using the 'percent' size of the scene");
uiButSetFunc(bt, node_scale_cb, node, NULL);
}
return 20;