Page MenuHome

Fix (unreported) surface deform modifier not reporting its errors in the UI
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Jan 16 2020, 3:07 PM.

Details

Summary

Not totally sure, but seems like we need to set the error with the
evaluated ModifierData?

I havent hunted this down to a single commit, but assume this broke with
the activity around T58210:
rB71e2efc4ce6b
rB484389cdcd6c
rBde491abf9962
rB989fbff16f49

Alternative would be to use BKE_Report (see DataTransfer modifier), but
this justs passes the evaluated modifier data to 'surfacedeformBind' and report with that.

Diff Detail

Repository
rB Blender
Branch
surfacedeform_mod_err_missing (branched from master)
Build Status
Buildable 6277
Build 6277: arc lint + arc unit

Event Timeline

repro file:

  • Open file
  • just hit "Bind" in the modifier
  • you should see the error "Target contains concave polygons" in the modifier UI, but you dont...
Bastien Montagne (mont29) requested changes to this revision.Jan 16 2020, 3:16 PM

I would rather pass both smd's to surfacedeformBind:

In surfacedeformBind:

  1. rename smd parameter to smd_orig (it should always be clear when we are using original vs. evaluated data, as much as possible).
  2. add a new smd_eval parameter, and use it for error messages.

Among other benefits of this approach vs. just passing a string pointer, you can make 'printf'-like reports easily, while with proposed solution here any besides purely static strings messages would require more changes.
And another issue with current patch is that it would break i18n, you'd need to use the N_() macro…

This revision now requires changes to proceed.Jan 16 2020, 3:16 PM

pass the evaluated modifier data to 'surfacedeformBind' and report with that

This revision is now accepted and ready to land.Jan 16 2020, 4:52 PM