Edit Mesh: re-enable text overlay in blender2.8 (length, area, angle)
ClosedPublic

Authored by Germano Cavalcante (mano-wii) on Oct 27 2017, 4:16 PM.

Details

Summary

An attempt for task T51368

Basically, the draw_em_measure_stats function was copied from drawobject.c to edit_mesh_mode.c with a few minor changes:

  • All references to DerivedMesh have been deleted;
  • The functions and enums of view3d_intern.h have been replaced by those of draw_maganer_text.h;

I had to call ED_view3d_init_mats_rv3d(ob, rv3d) to calculate rv3d->persmatob and use it in DRW_text_cache_draw. (This function seems unreliable because if it is called later with another object it can mess up the drawing).

I'm not sure which functions/headers will be removed in 2.8. So feel free to review or edit and/or commit.

*Some doubts are in the code comments

Diff Detail

Repository
rB Blender
  • Fixes do_edge_textpair;
  • New solution to calculate faces areas;
This revision is now accepted and ready to land.Oct 30 2017, 9:00 AM