[Bf-blender-cvs] [6ef497d401e] blender2.8: WITH_CLAY_ENGINE: Should be used for CLAY only, not drawmanager

Dalai Felinto noreply at git.blender.org
Mon May 1 15:45:51 CEST 2017


Commit: 6ef497d401e5e7842d1e9d33e491672bb77d60e0
Author: Dalai Felinto
Date:   Mon May 1 15:37:27 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB6ef497d401e5e7842d1e9d33e491672bb77d60e0

WITH_CLAY_ENGINE: Should be used for CLAY only, not drawmanager

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

M	source/blender/draw/intern/draw_manager.c
M	source/blender/makesrna/intern/rna_scene.c

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

diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index ad2d241a224..97cd1102406 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -791,8 +791,6 @@ void DRW_shgroup_uniform_mat4(DRWShadingGroup *shgroup, const char *name, const
 	DRW_interface_uniform(shgroup, name, DRW_UNIFORM_MAT4, value, 16, 1, 0);
 }
 
-#ifdef WITH_CLAY_ENGINE
-
 /* Creates a VBO containing OGL primitives for all DRWCallDynamic */
 static void shgroup_dynamic_batch(DRWShadingGroup *shgroup)
 {
@@ -905,7 +903,6 @@ static void shgroup_dynamic_batch_from_calls(DRWShadingGroup *shgroup)
 		shgroup_dynamic_batch(shgroup);
 	}
 }
-#endif  /* WITH_CLAY_ENGINE */
 
 /** \} */
 
@@ -944,7 +941,6 @@ void DRW_pass_free(DRWPass *pass)
 /** \name Draw (DRW_draw)
  * \{ */
 
-#ifdef WITH_CLAY_ENGINE
 static void set_state(DRWState flag, const bool reset)
 {
 	/* TODO Keep track of the state and only revert what is needed */
@@ -1353,15 +1349,6 @@ void DRW_state_reset(void)
 	set_state(state, true);
 }
 
-#else  /* !WITH_CLAY_ENGINE */
-
-void DRW_draw_pass(DRWPass *UNUSED(pass)) {}
-void DRW_draw_callbacks_pre_scene(void) {}
-void DRW_draw_callbacks_post_scene(void) {}
-void DRW_state_reset(void) {}
-
-#endif  /* WITH_CLAY_ENGINE */
-
 /** \} */
 
 
@@ -2435,6 +2422,7 @@ void DRW_engines_register(void)
 {
 #ifdef WITH_CLAY_ENGINE
 	RE_engines_register(NULL, &DRW_engine_viewport_clay_type);
+#endif
 	RE_engines_register(NULL, &DRW_engine_viewport_eevee_type);
 
 	DRW_engine_register(&draw_engine_object_type);
@@ -2451,7 +2439,6 @@ void DRW_engines_register(void)
 	DRW_engine_register(&draw_engine_particle_type);
 	DRW_engine_register(&draw_engine_pose_type);
 	DRW_engine_register(&draw_engine_sculpt_type);
-#endif
 
 	/* setup callbacks */
 	{
@@ -2479,7 +2466,6 @@ void DRW_engines_register(void)
 extern struct GPUUniformBuffer *globals_ubo; /* draw_common.c */
 void DRW_engines_free(void)
 {
-#ifdef WITH_CLAY_ENGINE
 	DRW_shape_cache_free();
 
 	DrawEngineType *next;
@@ -2495,6 +2481,7 @@ void DRW_engines_free(void)
 	if (globals_ubo)
 		GPU_uniformbuffer_free(globals_ubo);
 
+#ifdef WITH_CLAY_ENGINE
 	BLI_remlink(&R_engines, &DRW_engine_viewport_clay_type);
 #endif
 }
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 1691637ec03..559b2e611df 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2465,6 +2465,7 @@ static void rna_LayerEngineSettings_##_ENGINE_##_##_NAME_##_set(PointerRNA *ptr,
 	RNA_LAYER_ENGINE_GET_SET(bool, EditMode, COLLECTION_MODE_EDIT, _NAME_)
 
 /* clay engine */
+#ifdef WITH_CLAY_ENGINE
 RNA_LAYER_ENGINE_CLAY_GET_SET_INT(matcap_icon)
 RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(matcap_rotation)
 RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(matcap_hue)
@@ -2474,6 +2475,7 @@ RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(ssao_factor_cavity)
 RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(ssao_factor_edge)
 RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(ssao_distance)
 RNA_LAYER_ENGINE_CLAY_GET_SET_FLOAT(ssao_attenuation)
+#endif /* WITH_CLAY_ENGINE */
 
 /* object engine */
 RNA_LAYER_MODE_OBJECT_GET_SET_BOOL(show_wire)




More information about the Bf-blender-cvs mailing list