Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_relations.c
| Show First 20 Lines • Show All 2,560 Lines • ▼ Show 20 Lines | |||||
| /** \} */ | /** \} */ | ||||
| /* ------------------------------------------------------------------- */ | /* ------------------------------------------------------------------- */ | ||||
| /** \name Drop Named Material on Object Operator | /** \name Drop Named Material on Object Operator | ||||
| * \{ */ | * \{ */ | ||||
| char *ED_object_ot_drop_named_material_tooltip(bContext *C, | char *ED_object_ot_drop_named_material_tooltip(bContext *C, | ||||
| PointerRNA *properties, | PointerRNA *properties, | ||||
| const wmEvent *event) | const int mval[2]) | ||||
| { | { | ||||
| int mat_slot = 0; | int mat_slot = 0; | ||||
| Object *ob = ED_view3d_give_material_slot_under_cursor(C, event->mval, &mat_slot); | Object *ob = ED_view3d_give_material_slot_under_cursor(C, mval, &mat_slot); | ||||
| if (ob == NULL) { | if (ob == NULL) { | ||||
| return BLI_strdup(""); | return BLI_strdup(""); | ||||
| } | } | ||||
| mat_slot = max_ii(mat_slot, 1); | mat_slot = max_ii(mat_slot, 1); | ||||
| char name[MAX_ID_NAME - 2]; | char name[MAX_ID_NAME - 2]; | ||||
| RNA_string_get(properties, "name", name); | RNA_string_get(properties, "name", name); | ||||
| ▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines | |||||