[Bf-blender-cvs] [eb66c19a5cd] greasepencil-object: Remove context parameter

Antonio Vazquez noreply at git.blender.org
Wed May 30 16:35:31 CEST 2018


Commit: eb66c19a5cd2eba1b5094acde0e124fe0dcf6586
Author: Antonio Vazquez
Date:   Wed May 30 16:33:18 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBeb66c19a5cd2eba1b5094acde0e124fe0dcf6586

Remove context parameter

This parameter is removed because Context must be avoided.

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

M	source/blender/editors/object/object_modifier.c

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

diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 81cce3350a5..a614cdb68e2 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -590,7 +590,7 @@ static int modifier_apply_shape(ReportList *reports, Depsgraph *depsgraph, Scene
 	return 1;
 }
 
-static int modifier_apply_obdata(ReportList *reports, bContext *C, Depsgraph *depsgraph, Scene *scene, Object *ob, ModifierData *md)
+static int modifier_apply_obdata(ReportList *reports, Depsgraph *depsgraph, Scene *scene, Object *ob, ModifierData *md)
 {
 	const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
 
@@ -664,9 +664,11 @@ static int modifier_apply_obdata(ReportList *reports, bContext *C, Depsgraph *de
 			BKE_report(reports, RPT_ERROR, "Not implemented");
 			return 0;
 		}
-		
+#if 0 /* GPXX: Now is passing the context, but this must be removed 
+	   * disable to compile while found a better solution */	
 		mti->gp_bakeModifier(C, depsgraph, md, ob);
 		DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+#endif
 	}
 	else {
 		BKE_report(reports, RPT_ERROR, "Cannot apply modifier for this object type");
@@ -691,7 +693,7 @@ static int modifier_apply_obdata(ReportList *reports, bContext *C, Depsgraph *de
 }
 
 int ED_object_modifier_apply(
-        ReportList *reports, bContext *C, Depsgraph *depsgraph,
+        ReportList *reports, Depsgraph *depsgraph,
         Scene *scene, Object *ob, ModifierData *md, int mode)
 {
 	int prev_mode;
@@ -737,7 +739,7 @@ int ED_object_modifier_apply(
 		}
 	}
 	else {
-		if (!modifier_apply_obdata(reports, C, depsgraph, scene, ob, md)) {
+		if (!modifier_apply_obdata(reports, depsgraph, scene, ob, md)) {
 			md->mode = prev_mode;
 			return 0;
 		}
@@ -1051,7 +1053,7 @@ static int modifier_apply_exec(bContext *C, wmOperator *op)
 	ModifierData *md = edit_modifier_property_get(op, ob, 0);
 	int apply_as = RNA_enum_get(op->ptr, "apply_as");
 
-	if (!md || !ED_object_modifier_apply(op->reports, C, depsgraph, scene, ob, md, apply_as)) {
+	if (!md || !ED_object_modifier_apply(op->reports, depsgraph, scene, ob, md, apply_as)) {
 		return OPERATOR_CANCELLED;
 	}



More information about the Bf-blender-cvs mailing list