Page MenuHome

WindowManager: Support Dynamic tooltips when dragging.
ClosedPublic

Authored by Jeroen Bakker (jbakker) on Aug 2 2021, 2:36 PM.

Details

Summary

Originally the operator name was drawn next to the dragging content.
After that there was an option to add custom, static text with the
dragging content. This patch allows dynamic text to be drawn.

The custom text was implemented as out parameter of the poll function
what made the code unclear. This patch introduces a tooltip function
that separates tooltip generation from the poll function.

NOTE: the text should always be returned in its own memory block. This block will be freed after it is copied in the drag struct.

Diff Detail

Repository
rB Blender

Event Timeline

Jeroen Bakker (jbakker) requested review of this revision.Aug 2 2021, 2:36 PM
Jeroen Bakker (jbakker) created this revision.
  • Remove checks in view3d_object_data_drop_tooltip.

Looks good, just what I expected.

This revision is now accepted and ready to land.Aug 2 2021, 3:02 PM
  • Remove checks in view3d_object_data_drop_tooltip.
  • Silenced compilation warnings.