[Bf-blender-cvs] [cd71dd63824] hair_guides hair_guides_grooming: Merge branch 'blender2.8' into hair_guides

Lukas Tönne noreply at git.blender.org
Fri Jun 15 08:18:37 CEST 2018


Commit: cd71dd638245ad21e59e3f83229e926a285ccc45
Author: Lukas Tönne
Date:   Fri Jun 15 07:02:23 2018 +0100
Branches: hair_guides hair_guides_grooming
https://developer.blender.org/rBcd71dd638245ad21e59e3f83229e926a285ccc45

Merge branch 'blender2.8' into hair_guides

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



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

diff --cc release/scripts/startup/bl_ui/space_view3d_toolbar.py
index db72dfc052e,53947a7d8af..0a176556f5d
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@@ -62,8 -67,10 +67,9 @@@ def draw_vpaint_symmetry(layout, vpaint
      row.prop(vpaint, "use_symmetry_z", text="Z", toggle=True)
  
      col = layout.column()
+     col.use_property_split = True
      col.prop(vpaint, "radial_symmetry", text="Radial")
  
 -
  # ********** default tools for editmode_mesh ****************
  
  
diff --cc source/blender/draw/engines/workbench/workbench_forward.c
index a31a45ffdc0,bbb43f3655e..9a362440877
--- a/source/blender/draw/engines/workbench/workbench_forward.c
+++ b/source/blender/draw/engines/workbench/workbench_forward.c
@@@ -50,12 -50,8 +50,9 @@@
  static struct {
  	struct GPUShader *composite_sh_cache[MAX_SHADERS];
  	struct GPUShader *transparent_accum_sh_cache[MAX_SHADERS];
- 	struct GPUShader *transparent_revealage_sh;
- 	struct GPUShader *transparent_revealage_hair_sh;
- 	struct GPUShader *transparent_revealage_hair_fibers_sh;
  	struct GPUShader *object_outline_sh;
  	struct GPUShader *object_outline_hair_sh;
 +	struct GPUShader *object_outline_hair_fibers_sh;
  	struct GPUShader *checker_depth_sh;
  
  	struct GPUTexture *object_id_tx; /* ref only, not alloced */
@@@ -316,24 -286,7 +296,10 @@@ void workbench_forward_engine_init(WORK
  		e_data.object_outline_hair_sh = DRW_shader_create(
  		        forward_vert, NULL,
  		        forward_depth_frag, defines_hair);
 +		e_data.object_outline_hair_fibers_sh = DRW_shader_create(
 +		        forward_vert, NULL,
 +		        forward_depth_frag, defines_hair_fibers);
  
- #ifdef WORKBENCH_REVEALAGE_ENABLED
- 		char *forward_transparent_revealage_frag = workbench_build_forward_transparent_revealage_frag();
- 		e_data.transparent_revealage_sh = DRW_shader_create(
- 		        forward_vert, NULL,
- 		        forward_transparent_revealage_frag, defines);
- 		e_data.transparent_revealage_hair_sh = DRW_shader_create(
- 		        forward_vert, NULL,
- 		        forward_transparent_revealage_frag, defines_hair);
- 		e_data.transparent_revealage_hair_fibers_sh = DRW_shader_create(
- 		        forward_vert, NULL,
- 		        forward_transparent_revealage_frag, defines_hair_fibers);
- 		MEM_freeN(forward_transparent_revealage_frag);
- #endif
- 
  		e_data.checker_depth_sh = DRW_shader_create_fullscreen(
  		        datatoc_workbench_checkerboard_depth_frag_glsl, NULL);
  		MEM_freeN(forward_vert);
@@@ -442,14 -363,8 +376,9 @@@ void workbench_forward_engine_free(
  		DRW_SHADER_FREE_SAFE(e_data.composite_sh_cache[index]);
  		DRW_SHADER_FREE_SAFE(e_data.transparent_accum_sh_cache[index]);
  	}
- #ifdef WORKBENCH_REVEALAGE_ENABLED
- 	DRW_SHADER_FREE_SAFE(e_data.transparent_revealage_sh);
- 	DRW_SHADER_FREE_SAFE(e_data.transparent_revealage_hair_sh);
- 	DRW_SHADER_FREE_SAFE(e_data.transparent_revealage_hair_fibers_sh);
- #endif
  	DRW_SHADER_FREE_SAFE(e_data.object_outline_sh);
  	DRW_SHADER_FREE_SAFE(e_data.object_outline_hair_sh);
 +	DRW_SHADER_FREE_SAFE(e_data.object_outline_hair_fibers_sh);
  	DRW_SHADER_FREE_SAFE(e_data.checker_depth_sh);
  }
  
diff --cc source/blender/draw/engines/workbench/workbench_materials.c
index da1a9182306,231d9a9582a..31188fd2edf
--- a/source/blender/draw/engines/workbench/workbench_materials.c
+++ b/source/blender/draw/engines/workbench/workbench_materials.c
@@@ -91,22 -91,10 +91,18 @@@ char *workbench_material_build_defines(
  	if (NORMAL_ENCODING_ENABLED()) {
  		BLI_dynstr_appendf(ds, "#define WORKBENCH_ENCODE_NORMALS\n");
  	}
 -	if (is_hair) {
 -		BLI_dynstr_appendf(ds, "#define HAIR_SHADER\n");
 +
 +	switch (hair_type) {
 +		case DRW_SHADER_HAIR_NONE:
 +			break;
 +		case DRW_SHADER_HAIR_PARTICLES:
 +			BLI_dynstr_appendf(ds, "#define HAIR_SHADER\n");
 +			break;
 +		case DRW_SHADER_HAIR_FIBERS:
 +			BLI_dynstr_append(ds, DRW_hair_shader_defines());
 +			break;
  	}
  
- #ifdef WORKBENCH_REVEALAGE_ENABLED
- 	BLI_dynstr_appendf(ds, "#define WORKBENCH_REVEALAGE_ENABLED\n");
- #endif
- 
  	str = BLI_dynstr_get_cstring(ds);
  	BLI_dynstr_free(ds);
  	return str;
diff --cc source/blender/draw/intern/draw_cache.h
index 4b353d8f461,e7ab847d42e..ea08b8e0fe0
--- a/source/blender/draw/intern/draw_cache.h
+++ b/source/blender/draw/intern/draw_cache.h
@@@ -31,11 -31,9 +31,12 @@@ struct GPUMaterial
  struct ModifierData;
  struct Object;
  struct PTCacheEdit;
 +struct HairSystem;
 +struct HairExportCache;
 +struct DRWHairFiberTextureBuffer;
  
  void DRW_shape_cache_free(void);
+ void DRW_shape_cache_reset(void);
  
  /* 3D cursor */
  struct Gwn_Batch *DRW_cache_cursor_get(bool crosshair_lines);
@@@ -188,13 -186,8 +189,14 @@@ struct Gwn_Batch *DRW_cache_particles_g
          struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
  struct Gwn_Batch *DRW_cache_particles_get_prim(int type);
  
 +/* Hair */
 +struct Gwn_Batch *DRW_cache_hair_get_fibers(struct HairSystem *hsys, const struct HairExportCache *hair_export,
 +                                            const struct DRWHairFiberTextureBuffer **r_buffer);
 +struct Gwn_Batch *DRW_cache_hair_get_follicle_points(struct HairSystem *hsys, const struct HairExportCache *hair_export);
 +struct Gwn_Batch *DRW_cache_hair_get_guide_curve_edges(struct HairSystem *hsys, const struct HairExportCache *hair_export);
 +
  /* Metaball */
  struct Gwn_Batch *DRW_cache_mball_surface_get(struct Object *ob);
+ struct Gwn_Batch **DRW_cache_mball_surface_shaded_get(struct Object *ob, struct GPUMaterial **gpumat_array, uint gpumat_array_len);
  
  #endif /* __DRAW_CACHE_H__ */



More information about the Bf-blender-cvs mailing list