Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_clip/space_clip.c
| Show First 20 Lines • Show All 599 Lines • ▼ Show 20 Lines | if (CTX_data_equals(member, "edit_mask")) { | ||||
| } | } | ||||
| return CTX_RESULT_OK; | return CTX_RESULT_OK; | ||||
| } | } | ||||
| return CTX_RESULT_MEMBER_NOT_FOUND; | return CTX_RESULT_MEMBER_NOT_FOUND; | ||||
| } | } | ||||
| /* dropboxes */ | /* dropboxes */ | ||||
| static bool clip_drop_poll(bContext *UNUSED(C), | static bool clip_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) | ||||
| wmDrag *drag, | |||||
| const wmEvent *UNUSED(event), | |||||
| const char **UNUSED(r_tooltip)) | |||||
| { | { | ||||
| if (drag->type == WM_DRAG_PATH) { | if (drag->type == WM_DRAG_PATH) { | ||||
| /* rule might not work? */ | /* rule might not work? */ | ||||
| if (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE, ICON_FILE_BLANK)) { | if (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE, ICON_FILE_BLANK)) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| } | } | ||||
| Show All 14 Lines | static void clip_drop_copy(wmDrag *drag, wmDropBox *drop) | ||||
| RNA_string_set(&itemptr, "name", file); | RNA_string_set(&itemptr, "name", file); | ||||
| } | } | ||||
| /* area+region dropbox definition */ | /* area+region dropbox definition */ | ||||
| static void clip_dropboxes(void) | static void clip_dropboxes(void) | ||||
| { | { | ||||
| ListBase *lb = WM_dropboxmap_find("Clip", SPACE_CLIP, 0); | ListBase *lb = WM_dropboxmap_find("Clip", SPACE_CLIP, 0); | ||||
| WM_dropbox_add(lb, "CLIP_OT_open", clip_drop_poll, clip_drop_copy, NULL); | WM_dropbox_add(lb, "CLIP_OT_open", clip_drop_poll, clip_drop_copy, NULL, NULL); | ||||
| } | } | ||||
| static void clip_refresh(const bContext *C, ScrArea *area) | static void clip_refresh(const bContext *C, ScrArea *area) | ||||
| { | { | ||||
| wmWindowManager *wm = CTX_wm_manager(C); | wmWindowManager *wm = CTX_wm_manager(C); | ||||
| wmWindow *window = CTX_wm_window(C); | wmWindow *window = CTX_wm_window(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| SpaceClip *sc = (SpaceClip *)area->spacedata.first; | SpaceClip *sc = (SpaceClip *)area->spacedata.first; | ||||
| ▲ Show 20 Lines • Show All 784 Lines • Show Last 20 Lines | |||||