[Bf-blender-cvs] [da9d471e1d9] master: Fix T84389: RGB Curves node shows "tone" option outside of compositor

Philipp Oeser noreply at git.blender.org
Tue Jan 5 17:08:23 CET 2021


Commit: da9d471e1d9ac451929340cfe8aa5a8c5b268a75
Author: Philipp Oeser
Date:   Tue Jan 5 16:43:59 2021 +0100
Branches: master
https://developer.blender.org/rBda9d471e1d9ac451929340cfe8aa5a8c5b268a75

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

===================================================================

M	source/blender/editors/space_node/drawnode.c

===================================================================

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)



More information about the Bf-blender-cvs mailing list