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:
authorDalai Felinto <dfelinto@gmail.com>2018-08-21 00:18:06 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-08-21 02:58:20 +0300
commitb4d23818c81e5d1559f87e52b8a7b8247e8759a3 (patch)
treef50c8ee4daef98a2f8b586b27ad6ef0166129bdd /source/blender/editors/mesh/mesh_data.c
parent753be0a2a59fb77adc179aa8502b4f9b2ee97597 (diff)
Remove MESH_OT_drop_named_image
This was never ported to work with Cycles, so it is basically useless in 2.8. It can always be brought back in the future.
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.c')
-rw-r--r--source/blender/editors/mesh/mesh_data.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index d4a6267fa6b..3598262ecf4 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -536,88 +536,6 @@ void MESH_OT_uv_texture_add(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int drop_named_image_invoke(bContext *C, wmOperator *op, const wmEvent *event)
-{
- Main *bmain = CTX_data_main(C);
- Scene *scene = CTX_data_scene(C);
- View3D *v3d = CTX_wm_view3d(C);
- Base *base;
- Image *ima = NULL;
- Mesh *me;
- Object *obedit;
- int exitmode = 0;
-
- if (v3d == NULL) {
- BKE_report(op->reports, RPT_ERROR, "No 3D View Available");
- return OPERATOR_CANCELLED;
- }
-
- base = ED_view3d_give_base_under_cursor(C, event->mval);
-
- /* Check context */
- if (base == NULL || base->object->type != OB_MESH) {
- BKE_report(op->reports, RPT_ERROR, "Not an object or mesh");
- return OPERATOR_CANCELLED;
- }
-
- ima = (Image *)WM_operator_drop_load_path(C, op, ID_IM);
- if (!ima) {
- return OPERATOR_CANCELLED;
- }
- /* handled below */
- id_us_min((ID *)ima);
-
- /* put mesh in editmode */
-
- obedit = base->object;
- me = obedit->data;
- if (me->edit_btmesh == NULL) {
- EDBM_mesh_make(obedit, scene->toolsettings->selectmode, false);
- exitmode = 1;
- }
- if (me->edit_btmesh == NULL)
- return OPERATOR_CANCELLED;
-
- if (exitmode) {
- EDBM_mesh_load(bmain, obedit);
- EDBM_mesh_free(me->edit_btmesh);
- MEM_freeN(me->edit_btmesh);
- me->edit_btmesh = NULL;
-
- /* load_editMesh free's pointers used by CustomData layers which might be used by evaluated mesh too,
- * so signal to re-create evaluated mesh here (sergey) */
- DEG_id_tag_update(&me->id, 0);
- }
-
- /* dummie drop support; ensure view shows a result :) */
- if (v3d)
- v3d->flag2 |= V3D_SOLID_TEX;
-
- WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
-
- return OPERATOR_FINISHED;
-}
-
-void MESH_OT_drop_named_image(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Drop Image to Mesh UV Map";
- ot->description = "Assign Image to active UV Map, or create an UV Map";
- ot->idname = "MESH_OT_drop_named_image";
-
- /* api callbacks */
- ot->poll = layers_poll;
- ot->invoke = drop_named_image_invoke;
-
- /* flags */
- ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL;
-
- /* properties */
- RNA_def_string(ot->srna, "name", "Image", MAX_ID_NAME - 2, "Name", "Image name to assign");
- RNA_def_string(ot->srna, "filepath", "Path", FILE_MAX, "Filepath", "Path to image file");
- RNA_def_boolean(ot->srna, "relative_path", true, "Relative Path", "Select the file relative to the blend file");
-}
-
static int mesh_uv_texture_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = ED_object_context(C);