diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-10-26 09:07:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-10-26 10:16:30 +0300 |
commit | e4facbbea54019abe257787a7e9e8594a6ce3609 (patch) | |
tree | 72e53c06918b0377e545358df98dc19bdb635ea2 /source/blender/modifiers/intern/MOD_datatransfer.c | |
parent | aa77689f77b412e88bbe66fb466d2fa453701719 (diff) |
Modifiers: include the object & modifier when logging errors
Without this, there was no way of finding out which object, modifier
combination caused the error, making the logs not very useful
for debugging.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_datatransfer.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_datatransfer.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c index 17d716b731c..9b6a21c840d 100644 --- a/source/blender/modifiers/intern/MOD_datatransfer.c +++ b/source/blender/modifiers/intern/MOD_datatransfer.c @@ -232,16 +232,19 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * if (BKE_reports_contain(&reports, RPT_ERROR)) { const char *report_str = BKE_reports_string(&reports, RPT_ERROR); - BKE_modifier_set_error(md, "%s", report_str); + BKE_modifier_set_error(ctx->object, md, "%s", report_str); MEM_freeN((void *)report_str); } else if ((dtmd->data_types & DT_TYPE_LNOR) && !(me->flag & ME_AUTOSMOOTH)) { - BKE_modifier_set_error((ModifierData *)dtmd, "Enable 'Auto Smooth' in Object Data Properties"); + BKE_modifier_set_error( + ctx->object, (ModifierData *)dtmd, "Enable 'Auto Smooth' in Object Data Properties"); } else if (result->totvert > HIGH_POLY_WARNING || ((Mesh *)(ob_source->data))->totvert > HIGH_POLY_WARNING) { BKE_modifier_set_error( - md, "Source or destination object has a high polygon count, computation might be slow"); + ctx->object, + md, + "Source or destination object has a high polygon count, computation might be slow"); } return result; |