diff options
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 14 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 7 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 23 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_navmesh.c | 11 | ||||
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 8 |
6 files changed, 35 insertions, 29 deletions
diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt index 8783367ef7e..4607ed79c3b 100644 --- a/source/blender/editors/mesh/CMakeLists.txt +++ b/source/blender/editors/mesh/CMakeLists.txt @@ -24,6 +24,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../bmesh ../../gpu ../../imbuf diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 077c0ca37bd..cbed6a37c1f 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -51,12 +51,14 @@ #include "BKE_material.h" #include "BKE_context.h" #include "BKE_deform.h" -#include "BKE_depsgraph.h" #include "BKE_report.h" #include "BKE_texture.h" #include "BKE_main.h" #include "BKE_editmesh.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "BLT_translation.h" #include "RNA_define.h" @@ -2449,7 +2451,7 @@ static void shape_propagate(BMEditMesh *em, wmOperator *op) //TAG Mesh Objects that share this data for (base = scene->base.first; base; base = base->next) { if (base->object && base->object->data == me) { - DAG_id_tag_update(&base->object->id, OB_RECALC_DATA); + DEG_id_tag_update(&base->object->id, OB_RECALC_DATA); } } #endif @@ -3355,7 +3357,7 @@ static int edbm_separate_exec(bContext *C, wmOperator *op) if (retval_iter) { BM_mesh_bm_to_me(bm_old, me, (&(struct BMeshToMeshParams){0})); - DAG_id_tag_update(&me->id, OB_RECALC_DATA); + DEG_id_tag_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); } @@ -3370,7 +3372,7 @@ static int edbm_separate_exec(bContext *C, wmOperator *op) if (retval) { /* delay depsgraph recalc until all objects are duplicated */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, NULL); return OPERATOR_FINISHED; @@ -5888,7 +5890,7 @@ static int edbm_mark_freestyle_edge_exec(bContext *C, wmOperator *op) } } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); + DEG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -5952,7 +5954,7 @@ static int edbm_mark_freestyle_face_exec(bContext *C, wmOperator *op) } } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); + DEG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 7300d6f4e52..555fe6c917d 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -44,7 +44,6 @@ #include "BKE_DerivedMesh.h" #include "BKE_context.h" #include "BKE_global.h" -#include "BKE_depsgraph.h" #include "BKE_main.h" #include "BKE_mesh.h" #include "BKE_mesh_mapping.h" @@ -52,6 +51,8 @@ #include "BKE_editmesh.h" #include "BKE_editmesh_bvh.h" +#include "DEG_depsgraph.h" + #include "BKE_object.h" /* XXX. only for EDBM_mesh_ensure_valid_dm_hack() which will be removed */ #include "WM_api.h" @@ -116,7 +117,7 @@ void EDBM_mesh_ensure_valid_dm_hack(Scene *scene, BMEditMesh *em) { /* since we may not have done selection flushing */ if ((em->ob->recalc & OB_RECALC_DATA) == 0) { - DAG_id_tag_update(&em->ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&em->ob->id, OB_RECALC_DATA); } BKE_object_handle_update(G.main->eval_ctx, scene, em->ob); } @@ -1276,7 +1277,7 @@ void EDBM_update_generic(BMEditMesh *em, const bool do_tessface, const bool is_d { Object *ob = em->ob; /* order of calling isn't important */ - DAG_id_tag_update(ob->data, OB_RECALC_DATA); + DEG_id_tag_update(ob->data, OB_RECALC_DATA); WM_main_add_notifier(NC_GEOM | ND_DATA, ob->data); if (do_tessface) { diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 333c8b29667..49755c75480 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -42,7 +42,6 @@ #include "BLI_math.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_library.h" #include "BKE_main.h" #include "BKE_mesh.h" @@ -50,6 +49,8 @@ #include "BKE_report.h" #include "BKE_editmesh.h" +#include "DEG_depsgraph.h" + #include "RNA_define.h" #include "WM_api.h" @@ -245,7 +246,7 @@ void ED_mesh_uv_loop_reset_ex(struct Mesh *me, const int layernum) } } - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); } void ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me) @@ -314,7 +315,7 @@ int ED_mesh_uv_texture_add(Mesh *me, const char *name, const bool active_set) ED_mesh_uv_loop_reset_ex(me, layernum_dst); } - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); WM_main_add_notifier(NC_GEOM | ND_DATA, me); return layernum_dst; @@ -354,7 +355,7 @@ bool ED_mesh_uv_texture_remove_index(Mesh *me, const int n) delete_customdata_layer(me, cdlu); - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); WM_main_add_notifier(NC_GEOM | ND_DATA, me); return true; @@ -433,7 +434,7 @@ int ED_mesh_color_add(Mesh *me, const char *name, const bool active_set) BKE_mesh_update_customdata_pointers(me, true); } - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); WM_main_add_notifier(NC_GEOM | ND_DATA, me); return layernum; @@ -452,7 +453,7 @@ bool ED_mesh_color_remove_index(Mesh *me, const int n) return false; delete_customdata_layer(me, cdl); - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); WM_main_add_notifier(NC_GEOM | ND_DATA, me); return true; @@ -573,7 +574,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, const wmEvent *e /* load_editMesh free's pointers used by CustomData layers which might be used by DerivedMesh too, * so signal to re-create DerivedMesh here (sergey) */ - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); } /* dummie drop support; ensure view shows a result :) */ @@ -712,7 +713,7 @@ static int mesh_customdata_clear_exec__internal(bContext *C, CustomData_free_layers(data, type, tot); } - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return OPERATOR_FINISHED; @@ -808,7 +809,7 @@ static int mesh_customdata_skin_add_exec(bContext *C, wmOperator *UNUSED(op)) BKE_mesh_ensure_skin_customdata(me); - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return OPERATOR_FINISHED; @@ -870,7 +871,7 @@ static int mesh_customdata_custom_splitnormals_add_exec(bContext *C, wmOperator CustomData_add_layer(data, CD_CUSTOMLOOPNORMAL, CD_DEFAULT, NULL, me->totloop); } - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return OPERATOR_FINISHED; @@ -947,7 +948,7 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges, int calc_tessface) BKE_mesh_calc_normals(mesh); - DAG_id_tag_update(&mesh->id, 0); + DEG_id_tag_update(&mesh->id, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, mesh); } diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c index 443f2f0baa8..57a8da5e18d 100644 --- a/source/blender/editors/mesh/mesh_navmesh.c +++ b/source/blender/editors/mesh/mesh_navmesh.c @@ -41,7 +41,6 @@ #include "BLI_linklist.h" #include "BKE_library.h" -#include "BKE_depsgraph.h" #include "BKE_context.h" #include "BKE_mesh.h" #include "BKE_scene.h" @@ -440,7 +439,7 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, recast_destroyPolyMesh(pmesh); recast_destroyPolyMeshDetail(dmesh); - DAG_id_tag_update((ID *)obedit->data, OB_RECALC_DATA); + DEG_id_tag_update((ID *)obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); @@ -552,7 +551,7 @@ static int navmesh_face_copy_exec(bContext *C, wmOperator *op) } } - DAG_id_tag_update((ID *)obedit->data, OB_RECALC_DATA); + DEG_id_tag_update((ID *)obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -633,7 +632,7 @@ static int navmesh_face_add_exec(bContext *C, wmOperator *UNUSED(op)) } } - DAG_id_tag_update((ID *)obedit->data, OB_RECALC_DATA); + DEG_id_tag_update((ID *)obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -682,7 +681,7 @@ static int navmesh_reset_exec(bContext *C, wmOperator *UNUSED(op)) BKE_mesh_ensure_navmesh(me); - DAG_id_tag_update(&me->id, OB_RECALC_DATA); + DEG_id_tag_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, &me->id); return OPERATOR_FINISHED; @@ -710,7 +709,7 @@ static int navmesh_clear_exec(bContext *C, wmOperator *UNUSED(op)) CustomData_free_layers(&me->pdata, CD_RECAST, me->totpoly); - DAG_id_tag_update(&me->id, OB_RECALC_DATA); + DEG_id_tag_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, &me->id); return OPERATOR_FINISHED; diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 8727511035e..e7b1f925d5e 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -49,7 +49,6 @@ #include "BLI_kdtree.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_deform.h" #include "BKE_DerivedMesh.h" #include "BKE_key.h" @@ -62,6 +61,9 @@ #include "BKE_editmesh.h" #include "BKE_multires.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "ED_mesh.h" #include "ED_object.h" #include "ED_view3d.h" @@ -604,9 +606,9 @@ int join_mesh_exec(bContext *C, wmOperator *op) /* Due to dependnecy cycle some other object might access old derived data. */ BKE_object_free_derived_caches(ob); - DAG_relations_tag_update(bmain); /* removed objects, need to rebuild dag */ + DEG_relations_tag_update(bmain); /* removed objects, need to rebuild dag */ - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); |