[Bf-blender-cvs] [94fbea36ab7] temp-greasepencil-vfx: Remove unused callback

Antonio Vazquez noreply at git.blender.org
Wed Jun 27 10:09:16 CEST 2018


Commit: 94fbea36ab7a216a7513c7c7f140dc6f36ad5cd8
Author: Antonio Vazquez
Date:   Wed Jun 27 10:09:04 2018 +0200
Branches: temp-greasepencil-vfx
https://developer.blender.org/rB94fbea36ab7a216a7513c7c7f140dc6f36ad5cd8

Remove unused callback

The FX are done in draw engine and the apply call is not required now. I fmore callbacks are required in the future, we will add them, but now is unused code.

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

M	source/blender/blenkernel/BKE_shader_fx.h
M	source/blender/blenkernel/intern/shader_fx.c
M	source/blender/shader_fx/intern/FX_shader_blur.c
M	source/blender/shader_fx/intern/FX_shader_flip.c
M	source/blender/shader_fx/intern/FX_shader_light.c
M	source/blender/shader_fx/intern/FX_shader_pixel.c
M	source/blender/shader_fx/intern/FX_shader_swirl.c
M	source/blender/shader_fx/intern/FX_shader_wave.c

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

diff --git a/source/blender/blenkernel/BKE_shader_fx.h b/source/blender/blenkernel/BKE_shader_fx.h
index 38d37e10bc8..11c5983106a 100644
--- a/source/blender/blenkernel/BKE_shader_fx.h
+++ b/source/blender/blenkernel/BKE_shader_fx.h
@@ -99,10 +99,6 @@ typedef struct ShaderFxTypeInfo {
 	*/
 	void(*copyData)(const struct ShaderFxData *fx, struct ShaderFxData *target);
 
-	/* apply effect */
-	void(*applyEffect)(struct ShaderFxData *md, struct Depsgraph *depsgraph,
-		struct Object *ob);
-
 	/* Initialize new instance data for this effect type, this function
 	 * should set effect variables to their default values.
 	 * 
@@ -179,9 +175,6 @@ void BKE_shaderfx_copyData(struct ShaderFxData *fx, struct ShaderFxData *target)
 void BKE_shaderfx_copyData_ex(struct ShaderFxData *fx, struct ShaderFxData *target, const int flag);
 void BKE_shaderfx_foreachIDLink(struct Object *ob, ShaderFxIDWalkFunc walk, void *userData);
 
-void BKE_shaderfx_apply(
-	struct Depsgraph *depsgraph, struct Object *ob, bool is_render);
-
 bool BKE_shaderfx_has_gpencil(struct Object *ob);
 
 #endif /* __BKE_SHADER_FX_H__ */
diff --git a/source/blender/blenkernel/intern/shader_fx.c b/source/blender/blenkernel/intern/shader_fx.c
index 49876c388de..9225d103634 100644
--- a/source/blender/blenkernel/intern/shader_fx.c
+++ b/source/blender/blenkernel/intern/shader_fx.c
@@ -75,29 +75,6 @@ bool BKE_shaderfx_has_gpencil(Object *ob)
 	return false;
 }
 
-/* apply shaders effects */
-void BKE_shaderfx_apply(Depsgraph *depsgraph, Object *ob, bool is_render)
-{
-	ShaderFxData *fx;
-	bGPdata *gpd = ob->data;
-	const bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd);
-
-	for (fx = ob->greasepencil_modifiers.first; fx; fx = fx->next) {
-		if (SHADER_FX_ACTIVE(fx, is_render))
-		{
-			const ShaderFxTypeInfo *fxi = BKE_shaderfxType_getInfo(fx->type);
-			
-			if (SHADER_FX_EDIT(fx, is_edit)) {
-				continue;
-			}
-
-			if (fxi && fxi->applyEffect) {
-				fxi->applyEffect(fx, depsgraph, ob);
-			}
-		}
-	}
-}
-
 void BKE_shaderfx_init(void)
 {
 	/* Initialize shaders */
diff --git a/source/blender/shader_fx/intern/FX_shader_blur.c b/source/blender/shader_fx/intern/FX_shader_blur.c
index 3dcc7ce35b8..6537bd18740 100644
--- a/source/blender/shader_fx/intern/FX_shader_blur.c
+++ b/source/blender/shader_fx/intern/FX_shader_blur.c
@@ -51,8 +51,6 @@ ShaderFxTypeInfo shaderfx_Type_Blur = {
 
 	/* copyData */          NULL,
 
-	/* applyEffect */       NULL,
-
 	/* initData */          initData,
 	/* freeData */          NULL,
 	/* isDisabled */        NULL,
diff --git a/source/blender/shader_fx/intern/FX_shader_flip.c b/source/blender/shader_fx/intern/FX_shader_flip.c
index eb599e427b2..6c16c10a784 100644
--- a/source/blender/shader_fx/intern/FX_shader_flip.c
+++ b/source/blender/shader_fx/intern/FX_shader_flip.c
@@ -54,8 +54,6 @@ ShaderFxTypeInfo  shaderfx_Type_Flip = {
 
 	/* copyData */          NULL,
 
-	/* applyEffect */       NULL,
-
 	/* initData */          initData,
 	/* freeData */          NULL,
 	/* isDisabled */        NULL,
diff --git a/source/blender/shader_fx/intern/FX_shader_light.c b/source/blender/shader_fx/intern/FX_shader_light.c
index 0f415f1de9b..ef61d37a469 100644
--- a/source/blender/shader_fx/intern/FX_shader_light.c
+++ b/source/blender/shader_fx/intern/FX_shader_light.c
@@ -89,8 +89,6 @@ ShaderFxTypeInfo shaderfx_Type_Light = {
 
 	/* copyData */          NULL,
 
-	/* applyEffect */       NULL,
-
 	/* initData */          initData,
 	/* freeData */          NULL,
 	/* isDisabled */        isDisabled,
diff --git a/source/blender/shader_fx/intern/FX_shader_pixel.c b/source/blender/shader_fx/intern/FX_shader_pixel.c
index 30870feeb45..c0543b9dee9 100644
--- a/source/blender/shader_fx/intern/FX_shader_pixel.c
+++ b/source/blender/shader_fx/intern/FX_shader_pixel.c
@@ -51,8 +51,6 @@ ShaderFxTypeInfo shaderfx_Type_Pixel = {
 
 	/* copyData */          NULL,
 
-	/* applyEffect */       NULL,
-
 	/* initData */          initData,
 	/* freeData */          NULL,
 	/* isDisabled */        NULL,
diff --git a/source/blender/shader_fx/intern/FX_shader_swirl.c b/source/blender/shader_fx/intern/FX_shader_swirl.c
index 7546dec4fe0..e8c103bebd2 100644
--- a/source/blender/shader_fx/intern/FX_shader_swirl.c
+++ b/source/blender/shader_fx/intern/FX_shader_swirl.c
@@ -88,8 +88,6 @@ ShaderFxTypeInfo shaderfx_Type_Swirl = {
 
 	/* copyData */          NULL,
 
-	/* applyEffect */       NULL,
-
 	/* initData */          initData,
 	/* freeData */          NULL,
 	/* isDisabled */        isDisabled,
diff --git a/source/blender/shader_fx/intern/FX_shader_wave.c b/source/blender/shader_fx/intern/FX_shader_wave.c
index 7905d1ea9c8..107612245e5 100644
--- a/source/blender/shader_fx/intern/FX_shader_wave.c
+++ b/source/blender/shader_fx/intern/FX_shader_wave.c
@@ -56,8 +56,6 @@ ShaderFxTypeInfo shaderfx_Type_Wave = {
 
 	/* copyData */          NULL,
 
-	/* applyEffect */       NULL,
-
 	/* initData */          initData,
 	/* freeData */          NULL,
 	/* isDisabled */        NULL,



More information about the Bf-blender-cvs mailing list