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
This commit is contained in:
Philipp Oeser 2021-01-05 16:43:59 +01:00
parent 583006d0ef
commit da9d471e1d
Notes: blender-bot 2023-02-13 19:59:09 +01:00
Referenced by issue #84389, RGB Curves Film Like option in Shader Editor is also just Standard
1 changed files with 4 additions and 1 deletions

View File

@ -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)