diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-01-05 18:43:59 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-01-05 19:04:56 +0300 |
commit | da9d471e1d9ac451929340cfe8aa5a8c5b268a75 (patch) | |
tree | 20bafd19be038a97cf7fbc6bf4e81a3602914f6c /source/blender/editors/space_node/drawnode.c | |
parent | 583006d0ef1a0b71c66dfab9c37cc4de27cf81d4 (diff) |
Fix T84389: RGB Curves node shows "tone" option outside of compositor
Since the introduction in rB4de7c0c3105a, the option is only used in the
compositor, it has no effect elsewhere [texture nodes, shader nodes].
Now only show the option for the compositor.
Maniphest Tasks: T84389
Differential Revision: https://developer.blender.org/D10005
Diffstat (limited to 'source/blender/editors/space_node/drawnode.c')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 6c4aa1fd767..1333c9ed215 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -189,7 +189,10 @@ static void node_buts_curvecol(uiLayout *layout, bContext *UNUSED(C), PointerRNA cumap->flag &= ~CUMA_DRAW_SAMPLE; } - uiTemplateCurveMapping(layout, ptr, "mapping", 'c', false, false, false, true); + /* "Tone" (Standard/Filmlike) only used in the Compositor. */ + bNodeTree *ntree = (bNodeTree *)ptr->owner_id; + uiTemplateCurveMapping( + layout, ptr, "mapping", 'c', false, false, false, (ntree->type == NTREE_COMPOSIT)); } static void node_buts_normal(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) |