Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_dragdrop.c
| Show First 20 Lines • Show All 862 Lines • ▼ Show 20 Lines | if (changed) { | ||||
| ED_region_tag_redraw_no_rebuild(region); | ED_region_tag_redraw_no_rebuild(region); | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| static char *datastack_drop_tooltip(bContext *UNUSED(C), | static char *datastack_drop_tooltip(bContext *UNUSED(C), | ||||
| wmDrag *drag, | wmDrag *drag, | ||||
| const wmEvent *UNUSED(event), | const int UNUSED(xy[2]), | ||||
| struct wmDropBox *UNUSED(drop)) | struct wmDropBox *UNUSED(drop)) | ||||
| { | { | ||||
| StackDropData *drop_data = drag->poin; | StackDropData *drop_data = drag->poin; | ||||
| switch (drop_data->drop_action) { | switch (drop_data->drop_action) { | ||||
| case DATA_STACK_DROP_REORDER: | case DATA_STACK_DROP_REORDER: | ||||
| return BLI_strdup(TIP_("Reorder")); | return BLI_strdup(TIP_("Reorder")); | ||||
| break; | break; | ||||
| case DATA_STACK_DROP_COPY: | case DATA_STACK_DROP_COPY: | ||||
| ▲ Show 20 Lines • Show All 316 Lines • ▼ Show 20 Lines | static bool collection_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event) | ||||
| if (changed) { | if (changed) { | ||||
| ED_region_tag_redraw_no_rebuild(region); | ED_region_tag_redraw_no_rebuild(region); | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| static char *collection_drop_tooltip(bContext *C, | static char *collection_drop_tooltip(bContext *C, | ||||
| wmDrag *drag, | wmDrag *drag, | ||||
| const wmEvent *event, | const int UNUSED(xy[2]), | ||||
| wmDropBox *UNUSED(drop)) | wmDropBox *UNUSED(drop)) | ||||
| { | { | ||||
| wmWindowManager *wm = CTX_wm_manager(C); | |||||
| const wmEvent *event = wm->winactive ? wm->winactive->eventstate : NULL; | |||||
| CollectionDrop data; | CollectionDrop data; | ||||
| if (!event->shift && collection_drop_init(C, drag, event, &data)) { | if (event && !event->shift && collection_drop_init(C, drag, event, &data)) { | ||||
| TreeElement *te = data.te; | TreeElement *te = data.te; | ||||
| if (!data.from || event->ctrl) { | if (!data.from || event->ctrl) { | ||||
| return BLI_strdup(TIP_("Link inside Collection")); | return BLI_strdup(TIP_("Link inside Collection")); | ||||
| } | } | ||||
| switch (data.insert_type) { | switch (data.insert_type) { | ||||
| case TE_INSERT_BEFORE: | case TE_INSERT_BEFORE: | ||||
| if (te->prev && outliner_is_collection_tree_element(te->prev)) { | if (te->prev && outliner_is_collection_tree_element(te->prev)) { | ||||
| return BLI_strdup(TIP_("Move between collections")); | return BLI_strdup(TIP_("Move between collections")); | ||||
| ▲ Show 20 Lines • Show All 317 Lines • Show Last 20 Lines | |||||