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:
authorLukas Toenne <lukas.toenne@googlemail.com>2011-02-10 21:54:49 +0300
committerLukas Toenne <lukas.toenne@googlemail.com>2011-02-10 21:54:49 +0300
commitcbe53cc48d5e4460c2d04d1344bd30a882b2cadb (patch)
tree1756e0745264fa298165d003dc374e2635e5c2ed /source/blender/editors/space_node
parentf7595e98828c1e47db934f61cae6dfe65e1b950c (diff)
More options for the blur node filter size. This can now be pixel based or relative to both axes or just either width or height.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/drawnode.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 668a7f338f2..42b5835c6df 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -548,15 +548,23 @@ static void node_composit_buts_blur(uiLayout *layout, bContext *UNUSED(C), Point
uiItemR(col, ptr, "use_gamma_correction", 0, NULL, ICON_NULL);
}
- uiItemR(col, ptr, "use_relative", 0, NULL, ICON_NULL);
+ uiItemR(col, ptr, "size_type", 0, NULL, ICON_NULL);
col= uiLayoutColumn(layout, 1);
- if (RNA_boolean_get(ptr, "use_relative")) {
- uiItemR(col, ptr, "factor_x", 0, "X", ICON_NULL);
- uiItemR(col, ptr, "factor_y", 0, "Y", ICON_NULL);
- }
- else {
+ switch (RNA_enum_get(ptr, "size_type")) {
+ case CMP_NODE_BLUR_SIZE_PIXEL:
uiItemR(col, ptr, "size_x", 0, "X", ICON_NULL);
uiItemR(col, ptr, "size_y", 0, "Y", ICON_NULL);
+ break;
+ case CMP_NODE_BLUR_SIZE_WIDTH:
+ uiItemR(col, ptr, "factor_x", 0, "X", ICON_NULL);
+ break;
+ case CMP_NODE_BLUR_SIZE_HEIGHT:
+ uiItemR(col, ptr, "factor_y", 0, "Y", ICON_NULL);
+ break;
+ case CMP_NODE_BLUR_SIZE_BOTH:
+ uiItemR(col, ptr, "factor_x", 0, "X", ICON_NULL);
+ uiItemR(col, ptr, "factor_y", 0, "Y", ICON_NULL);
+ break;
}
}