T90371: Asset: Drop Material Tooltip.

This patch changes the drop named material tooltip to give feedback to
the user what is going to happen when they invoke the change.

There are 3 states:
* "": Operator will be canceled as not all data is present (dropping on
  background.)
* "Drop <named material> on <object name> (slot <slot number>, replacing
  <current material in slot>).
* "Drop <named material> on <object name> (slot <slot number).

Reviewed By: Severin

Maniphest Tasks: T90371

Differential Revision: https://developer.blender.org/D12106
This commit is contained in:
2021-08-04 08:58:19 +02:00
parent cd92b2350f
commit effc048710
6 changed files with 58 additions and 10 deletions

View File

@@ -53,6 +53,7 @@ struct uiLayout;
struct wmKeyConfig;
struct wmOperator;
struct wmOperatorType;
struct wmEvent;
/* object_edit.c */
/* context.object */
@@ -199,6 +200,9 @@ void ED_object_parent(struct Object *ob,
struct Object *parent,
const int type,
const char *substr);
char *ED_object_ot_drop_named_material_tooltip(struct bContext *C,
struct PointerRNA *properties,
const struct wmEvent *event);
/* bitflags for enter/exit editmode */
enum {