Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-01-24 22:39:09 +0300
committerJulian Eisel <julian@blender.org>2021-01-24 23:29:14 +0300
commitf04206cbc7129603a7c437b79b1d1c99bd191783 (patch)
treea33f217ee230f248295fedd6530422ba2f1317a4 /source/blender/editors/space_view3d
parente747c07156cce226dde25309b4346f8354103a24 (diff)
Cleanup: Add/use helper to check if dragging a certain ID type or asset ID type
This check is a common pattern, avoid duplication by using a helper function.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index b5b7f0b22cd..9f7cf48da0c 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -489,7 +489,7 @@ static bool view3d_drop_id_in_main_region_poll(bContext *C,
return false;
}
- return WM_drag_get_local_ID(drag, id_type) || WM_drag_get_asset_data(drag, id_type);
+ return WM_drag_is_ID_type(drag, id_type);
}
static bool view3d_ob_drop_poll(bContext *C,
@@ -544,7 +544,7 @@ static bool view3d_ima_drop_poll(bContext *C,
return (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE));
}
- return WM_drag_get_local_ID(drag, ID_IM) || WM_drag_get_asset_data(drag, ID_IM);
+ return WM_drag_is_ID_type(drag, ID_IM);
}
static bool view3d_ima_bg_is_camera_view(bContext *C)