[Bf-blender-cvs] [1fd1d061ac2] blender2.8: Clay: Don't use hardcoded constant in the string

Sergey Sharybin noreply at git.blender.org
Tue May 8 11:57:27 CEST 2018


Commit: 1fd1d061ac28bb17216b647ca4d1b6373fd4435a
Author: Sergey Sharybin
Date:   Mon May 7 15:25:21 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB1fd1d061ac28bb17216b647ca4d1b6373fd4435a

Clay: Don't use hardcoded constant in the string

Stringify the actual constant instead.

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

M	source/blender/draw/engines/clay/clay_engine.c

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

diff --git a/source/blender/draw/engines/clay/clay_engine.c b/source/blender/draw/engines/clay/clay_engine.c
index d7af8fb5398..fe8da3c4888 100644
--- a/source/blender/draw/engines/clay/clay_engine.c
+++ b/source/blender/draw/engines/clay/clay_engine.c
@@ -602,7 +602,7 @@ static DRWShadingGroup *CLAY_hair_shgroup_create(DRWPass *pass, int id)
 	if (!e_data.hair_sh) {
 		e_data.hair_sh = DRW_shader_create(
 		        datatoc_clay_particle_vert_glsl, NULL, datatoc_clay_particle_strand_frag_glsl,
-		        "#define MAX_MATERIAL 512\n");
+		        "#define MAX_MATERIAL " STRINGIFY(MAX_CLAY_MAT) "\n" );
 	}
 
 	DRWShadingGroup *grp = DRW_shgroup_create(e_data.hair_sh, pass);



More information about the Bf-blender-cvs mailing list