diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-02-10 23:54:02 +0300 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-02-10 23:54:02 +0300 |
commit | 46bb5643b7660033bc0d15c5fcc752324a1b519f (patch) | |
tree | ae9f798b1ce120af18a1b3bb98e876349b605000 /source/blender/editors | |
parent | cbe53cc48d5e4460c2d04d1344bd30a882b2cadb (diff) |
Different method for blur node aspect correction. Now the user can still set different sizes for x/y blurring in relative mode, but choose to use aspect correction on either of the axes.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 42b5835c6df..e1577309afa 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -538,7 +538,7 @@ static void node_composit_buts_renderlayers(uiLayout *layout, bContext *C, Point static void node_composit_buts_blur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) { - uiLayout *col; + uiLayout *col, *row; col= uiLayoutColumn(layout, 0); @@ -548,23 +548,21 @@ 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, "size_type", 0, NULL, ICON_NULL); - col= uiLayoutColumn(layout, 1); - 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, "use_relative", 0, NULL, ICON_NULL); + + if (RNA_boolean_get(ptr, "use_relative")) { + uiItemL(col, "Aspect Correction", 0); + row= uiLayoutRow(layout, 1); + uiItemR(row, ptr, "aspect_correction", UI_ITEM_R_EXPAND, NULL, 0); + + col= uiLayoutColumn(layout, 1); uiItemR(col, ptr, "factor_x", 0, "X", ICON_NULL); uiItemR(col, ptr, "factor_y", 0, "Y", ICON_NULL); - break; + } + else { + col= uiLayoutColumn(layout, 1); + uiItemR(col, ptr, "size_x", 0, "X", ICON_NULL); + uiItemR(col, ptr, "size_y", 0, "Y", ICON_NULL); } } |