[Bf-blender-cvs] [642bf42040d] greasepencil-object: Add bContext to function
Antonio Vazquez
noreply at git.blender.org
Fri Apr 6 14:20:21 CEST 2018
Commit: 642bf42040d75c9e8241531955e4ee18a343a1d1
Author: Antonio Vazquez
Date: Fri Apr 6 14:20:13 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB642bf42040d75c9e8241531955e4ee18a343a1d1
Add bContext to function
This parameter is required for grease pencil modifiers
Maybe need more work to remove the bContext, but we need it now to compile.
===================================================================
M source/blender/editors/include/ED_object.h
M source/blender/editors/object/object_modifier.c
===================================================================
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index ebd9313f7c5..c403dddfe43 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -237,7 +237,7 @@ int ED_object_modifier_move_down(struct ReportList *reports, struct Object *ob,
int ED_object_modifier_move_up(struct ReportList *reports, struct Object *ob, struct ModifierData *md);
int ED_object_modifier_convert(struct ReportList *reports, struct Main *bmain, struct Scene *scene,
struct ViewLayer *view_layer, struct Object *ob, struct ModifierData *md);
-int ED_object_modifier_apply(struct ReportList *reports, const struct EvaluationContext *eval_ctx, struct Scene *scene,
+int ED_object_modifier_apply(struct ReportList *reports, struct bContext *C, const struct EvaluationContext *eval_ctx, struct Scene *scene,
struct Object *ob, struct ModifierData *md, int mode);
int ED_object_modifier_copy(struct ReportList *reports, struct Object *ob, struct ModifierData *md);
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 2a63aeb8a62..0b8c118df60 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -588,7 +588,7 @@ static int modifier_apply_shape(ReportList *reports, const EvaluationContext *ev
return 1;
}
-static int modifier_apply_obdata(ReportList *reports, const EvaluationContext *eval_ctx, Scene *scene, Object *ob, ModifierData *md)
+static int modifier_apply_obdata(ReportList *reports, bContext *C, const EvaluationContext *eval_ctx, Scene *scene, Object *ob, ModifierData *md)
{
const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
@@ -688,7 +688,7 @@ static int modifier_apply_obdata(ReportList *reports, const EvaluationContext *e
}
int ED_object_modifier_apply(
- ReportList *reports, const EvaluationContext *eval_ctx,
+ ReportList *reports, bContext *C, const EvaluationContext *eval_ctx,
Scene *scene, Object *ob, ModifierData *md, int mode)
{
int prev_mode;
@@ -734,7 +734,7 @@ int ED_object_modifier_apply(
}
}
else {
- if (!modifier_apply_obdata(reports, eval_ctx, scene, ob, md)) {
+ if (!modifier_apply_obdata(reports, C, eval_ctx, scene, ob, md)) {
md->mode = prev_mode;
return 0;
}
@@ -1040,7 +1040,7 @@ static int modifier_apply_exec(bContext *C, wmOperator *op)
EvaluationContext eval_ctx;
CTX_data_eval_ctx(C, &eval_ctx);
- if (!md || !ED_object_modifier_apply(op->reports, &eval_ctx, scene, ob, md, apply_as)) {
+ if (!md || !ED_object_modifier_apply(op->reports, C, &eval_ctx, scene, ob, md, apply_as)) {
return OPERATOR_CANCELLED;
}
More information about the Bf-blender-cvs
mailing list