diff options
author | Bartosz Moniewski <monio> | 2020-02-17 14:31:38 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-02-17 15:24:07 +0300 |
commit | 67d12bb5192d04a596e216f63cff2875fdd8cfbf (patch) | |
tree | c4d866f343ec9b87f713ebd004a8f343ab6f5307 /source/blender/editors/space_node/drawnode.c | |
parent | ae9bbb4d0360aea694b46ee698d24dbc1476ebf3 (diff) |
Shading: add direction modes and phase offset to wave texture node
* Direction mode X, Y and Z to align with axes rather than diagonal or
spherical as previously. X is the new default, existing files will
use diagonal or spherical for compatibility.
* Phase offset to offset the wave along its direction, for purposes like
animation and distortion.
https://developer.blender.org/D6382
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 121c597c1bb..a00006f7025 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -873,6 +873,14 @@ static void node_shader_buts_tex_brick(uiLayout *layout, bContext *UNUSED(C), Po static void node_shader_buts_tex_wave(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) { uiItemR(layout, ptr, "wave_type", 0, "", ICON_NONE); + int type = RNA_enum_get(ptr, "wave_type"); + if (type == SHD_WAVE_BANDS) { + uiItemR(layout, ptr, "bands_direction", 0, "", ICON_NONE); + } + else { /* SHD_WAVE_RINGS */ + uiItemR(layout, ptr, "rings_direction", 0, "", ICON_NONE); + } + uiItemR(layout, ptr, "wave_profile", 0, "", ICON_NONE); } |