[Bf-blender-cvs] [5849921] cycles_point_density: Cycles point density: Show color source input only for particle source

Sergey Sharybin noreply at git.blender.org
Wed Jul 15 23:28:18 CEST 2015


Commit: 5849921aacb2bac1c8034443521c805f82b5b1f7
Author: Sergey Sharybin
Date:   Wed Jul 15 23:26:48 2015 +0200
Branches: cycles_point_density
https://developer.blender.org/rB5849921aacb2bac1c8034443521c805f82b5b1f7

Cycles point density: Show color source input only for particle source

It's not supported by object vertices source so doesn't make sense to show it.

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

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 29f39d5..fe0e959 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -955,7 +955,9 @@ static void node_shader_buts_tex_pointdensity(uiLayout *layout, bContext *UNUSED
 	uiItemR(layout, ptr, "radius", 0, NULL, ICON_NONE);
 	uiItemR(layout, ptr, "interpolation", 0, NULL, ICON_NONE);
 	uiItemR(layout, ptr, "resolution", 0, NULL, ICON_NONE);
-	uiItemR(layout, ptr, "color_source", 0, NULL, ICON_NONE);
+	if (shader_point_density->point_source == SHD_POINTDENSITY_SOURCE_PSYS) {
+		uiItemR(layout, ptr, "color_source", 0, NULL, ICON_NONE);
+	}
 }
 
 static void node_shader_buts_tex_coord(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)




More information about the Bf-blender-cvs mailing list