[Bf-blender-cvs] [bb090d1acd0] greasepencil-object: Show an error message if a GP modifier cannot be applied instead of failing silently
Joshua Leung
noreply at git.blender.org
Thu Nov 23 15:33:03 CET 2017
Commit: bb090d1acd07f69d1250ab82f1c131225c404067
Author: Joshua Leung
Date: Thu Nov 23 20:40:24 2017 +1300
Branches: greasepencil-object
https://developer.blender.org/rBbb090d1acd07f69d1250ab82f1c131225c404067
Show an error message if a GP modifier cannot be applied instead of failing silently
===================================================================
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 ad3a45e214e..82cbf44e1ba 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -660,8 +660,13 @@ static int modifier_apply_obdata(ReportList *reports, const bContext *C, Scene *
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else if (ob->type == OB_GPENCIL) {
- if (ELEM(NULL, mti->bakeModifierGP, ob, ob->data))
+ if (ELEM(NULL, ob, ob->data)) {
return 0;
+ }
+ else if (mti->bakeModifierGP == NULL) {
+ BKE_report(reports, RPT_ERROR, "Not implemented");
+ return 0;
+ }
mti->bakeModifierGP(C, &eval_ctx, md, ob);
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
More information about the Bf-blender-cvs
mailing list