From d675415eef9f565b1828f48dfe874321af1c4af8 Mon Sep 17 00:00:00 2001 From: Luca Rood Date: Thu, 8 Jun 2017 10:14:53 +0200 Subject: Replace all old DAG calls with direct calls to new DEG and remove BKE_depsgraph.h This removes BKE_depsgraph.h and depsgraph.c --- source/blender/blenkernel/BKE_depsgraph.h | 135 ----------------- source/blender/blenkernel/CMakeLists.txt | 2 - source/blender/blenkernel/intern/depsgraph.c | 167 --------------------- source/blender/blenkernel/intern/object_facemap.c | 2 - source/blender/collada/AnimationImporter.cpp | 6 +- source/blender/collada/SkinInfo.cpp | 4 +- source/blender/collada/collada_utils.cpp | 4 +- source/blender/draw/intern/draw_manager.c | 1 - source/blender/editors/animation/CMakeLists.txt | 1 + .../blender/editors/animation/anim_channels_edit.c | 5 +- source/blender/editors/animation/anim_deps.c | 9 +- source/blender/editors/animation/drivers.c | 7 +- source/blender/editors/animation/keyframing.c | 10 +- source/blender/editors/animation/keyingsets.c | 5 +- source/blender/editors/armature/CMakeLists.txt | 1 + source/blender/editors/armature/armature_naming.c | 7 +- .../blender/editors/armature/armature_relations.c | 12 +- source/blender/editors/armature/armature_utils.c | 5 +- source/blender/editors/armature/pose_edit.c | 13 +- source/blender/editors/armature/pose_lib.c | 9 +- source/blender/editors/armature/pose_select.c | 23 +-- source/blender/editors/armature/pose_transform.c | 11 +- source/blender/editors/armature/pose_utils.c | 5 +- source/blender/editors/curve/CMakeLists.txt | 1 + source/blender/editors/curve/editcurve.c | 62 ++++---- source/blender/editors/curve/editcurve_add.c | 7 +- source/blender/editors/curve/editcurve_paint.c | 5 +- source/blender/editors/curve/editfont.c | 7 +- source/blender/editors/gpencil/CMakeLists.txt | 1 + source/blender/editors/gpencil/gpencil_convert.c | 5 +- source/blender/editors/interface/CMakeLists.txt | 1 + source/blender/editors/interface/interface_anim.c | 5 +- .../editors/interface/interface_eyedropper.c | 8 +- source/blender/editors/interface/interface_ops.c | 7 +- .../editors/interface/interface_templates.c | 16 +- source/blender/editors/mask/CMakeLists.txt | 1 + source/blender/editors/mask/mask_add.c | 5 +- source/blender/editors/mask/mask_ops.c | 25 +-- source/blender/editors/mask/mask_relationships.c | 7 +- source/blender/editors/mask/mask_shapekey.c | 11 +- source/blender/editors/mesh/CMakeLists.txt | 1 + source/blender/editors/mesh/editmesh_tools.c | 14 +- source/blender/editors/mesh/editmesh_utils.c | 7 +- source/blender/editors/mesh/mesh_data.c | 23 +-- source/blender/editors/mesh/mesh_navmesh.c | 11 +- source/blender/editors/mesh/meshtools.c | 8 +- source/blender/editors/metaball/CMakeLists.txt | 1 + source/blender/editors/metaball/mball_edit.c | 11 +- source/blender/editors/object/object_add.c | 58 +++---- source/blender/editors/object/object_bake.c | 7 +- source/blender/editors/object/object_bake_api.c | 3 +- source/blender/editors/object/object_constraint.c | 42 +++--- .../blender/editors/object/object_data_transfer.c | 9 +- source/blender/editors/object/object_edit.c | 32 ++-- source/blender/editors/object/object_facemap_ops.c | 16 +- source/blender/editors/object/object_group.c | 13 +- source/blender/editors/object/object_hook.c | 16 +- source/blender/editors/object/object_lattice.c | 7 +- source/blender/editors/object/object_modifier.c | 64 ++++---- source/blender/editors/object/object_relations.c | 74 ++++----- source/blender/editors/object/object_shapekey.c | 20 +-- source/blender/editors/object/object_transform.c | 21 +-- source/blender/editors/object/object_vgroup.c | 53 +++---- source/blender/editors/physics/CMakeLists.txt | 1 + source/blender/editors/physics/dynamicpaint_ops.c | 10 +- source/blender/editors/physics/particle_boids.c | 20 +-- source/blender/editors/physics/particle_edit.c | 29 ++-- source/blender/editors/physics/particle_object.c | 26 ++-- .../blender/editors/physics/rigidbody_constraint.c | 12 +- source/blender/editors/physics/rigidbody_object.c | 16 +- source/blender/editors/render/render_internal.c | 5 +- source/blender/editors/render/render_preview.c | 4 +- source/blender/editors/render/render_shading.c | 50 +++--- source/blender/editors/scene/CMakeLists.txt | 1 + source/blender/editors/scene/scene_edit.c | 5 +- source/blender/editors/screen/screen_edit.c | 1 - source/blender/editors/sculpt_paint/CMakeLists.txt | 1 + source/blender/editors/sculpt_paint/paint_image.c | 7 +- .../blender/editors/sculpt_paint/paint_image_2d.c | 5 +- .../editors/sculpt_paint/paint_image_proj.c | 11 +- source/blender/editors/sculpt_paint/paint_vertex.c | 33 ++-- source/blender/editors/sculpt_paint/sculpt.c | 11 +- source/blender/editors/sculpt_paint/sculpt_undo.c | 4 +- source/blender/editors/sculpt_paint/sculpt_uv.c | 5 +- .../blender/editors/space_action/action_buttons.c | 1 - source/blender/editors/space_clip/CMakeLists.txt | 1 + source/blender/editors/space_clip/clip_buttons.c | 7 +- source/blender/editors/space_clip/clip_graph_ops.c | 5 +- source/blender/editors/space_clip/clip_utils.c | 5 +- source/blender/editors/space_clip/tracking_ops.c | 7 +- .../editors/space_clip/tracking_ops_orient.c | 19 +-- .../editors/space_clip/tracking_ops_plane.c | 7 +- .../editors/space_clip/tracking_ops_solve.c | 7 +- .../editors/space_clip/tracking_ops_stabilize.c | 11 +- source/blender/editors/space_graph/CMakeLists.txt | 1 + source/blender/editors/space_graph/graph_buttons.c | 4 +- source/blender/editors/space_graph/graph_edit.c | 5 +- source/blender/editors/space_image/image_ops.c | 5 +- source/blender/editors/space_node/CMakeLists.txt | 1 + source/blender/editors/space_node/node_draw.c | 11 +- source/blender/editors/space_node/node_edit.c | 7 +- .../blender/editors/space_outliner/CMakeLists.txt | 1 + .../editors/space_outliner/outliner_collections.c | 18 ++- .../blender/editors/space_outliner/outliner_draw.c | 7 +- .../blender/editors/space_outliner/outliner_edit.c | 15 +- .../editors/space_outliner/outliner_select.c | 7 +- .../editors/space_outliner/outliner_tools.c | 20 +-- .../blender/editors/space_outliner/outliner_tree.c | 7 +- source/blender/editors/space_text/text_ops.c | 2 +- source/blender/editors/space_view3d/space_view3d.c | 3 +- .../blender/editors/space_view3d/view3d_buttons.c | 7 +- .../editors/space_view3d/view3d_camera_control.c | 10 +- source/blender/editors/space_view3d/view3d_edit.c | 7 +- .../blender/editors/space_view3d/view3d_header.c | 5 +- .../blender/editors/space_view3d/view3d_select.c | 9 +- source/blender/editors/space_view3d/view3d_snap.c | 11 +- source/blender/editors/space_view3d/view3d_view.c | 5 +- .../editors/transform/transform_conversions.c | 28 ++-- .../blender/editors/transform/transform_generics.c | 23 +-- source/blender/editors/util/CMakeLists.txt | 1 + source/blender/editors/util/ed_transverts.c | 5 +- source/blender/editors/util/editmode_undo.c | 5 +- source/blender/editors/uvedit/uvedit_ops.c | 19 +-- .../blender/editors/uvedit/uvedit_smart_stitch.c | 5 +- source/blender/editors/uvedit/uvedit_unwrap_ops.c | 23 +-- .../blender_interface/BlenderStrokeRenderer.cpp | 2 +- source/blender/makesrna/intern/rna_ID.c | 14 +- source/blender/makesrna/intern/rna_access.c | 5 +- source/blender/makesrna/intern/rna_animation.c | 7 +- source/blender/makesrna/intern/rna_armature.c | 9 +- source/blender/makesrna/intern/rna_boid.c | 14 +- source/blender/makesrna/intern/rna_cachefile.c | 3 +- source/blender/makesrna/intern/rna_camera.c | 10 +- source/blender/makesrna/intern/rna_cloth.c | 9 +- source/blender/makesrna/intern/rna_color.c | 15 +- source/blender/makesrna/intern/rna_constraint.c | 1 - source/blender/makesrna/intern/rna_curve.c | 12 +- source/blender/makesrna/intern/rna_curve_api.c | 2 +- source/blender/makesrna/intern/rna_depsgraph.c | 7 +- source/blender/makesrna/intern/rna_dynamicpaint.c | 7 +- source/blender/makesrna/intern/rna_fcurve.c | 10 +- source/blender/makesrna/intern/rna_fluidsim.c | 5 +- source/blender/makesrna/intern/rna_image.c | 9 +- source/blender/makesrna/intern/rna_key.c | 5 +- source/blender/makesrna/intern/rna_lamp.c | 9 +- source/blender/makesrna/intern/rna_lattice.c | 7 +- source/blender/makesrna/intern/rna_lattice_api.c | 2 +- source/blender/makesrna/intern/rna_linestyle.c | 21 +-- source/blender/makesrna/intern/rna_main_api.c | 5 +- source/blender/makesrna/intern/rna_mask.c | 11 +- source/blender/makesrna/intern/rna_material.c | 11 +- source/blender/makesrna/intern/rna_mesh.c | 5 +- source/blender/makesrna/intern/rna_mesh_api.c | 8 +- source/blender/makesrna/intern/rna_meta.c | 11 +- source/blender/makesrna/intern/rna_meta_api.c | 2 +- source/blender/makesrna/intern/rna_modifier.c | 16 +- source/blender/makesrna/intern/rna_movieclip.c | 4 +- source/blender/makesrna/intern/rna_nla.c | 1 - source/blender/makesrna/intern/rna_object.c | 26 ++-- source/blender/makesrna/intern/rna_object_api.c | 3 +- source/blender/makesrna/intern/rna_object_force.c | 32 ++-- source/blender/makesrna/intern/rna_particle.c | 22 +-- source/blender/makesrna/intern/rna_pose.c | 14 +- source/blender/makesrna/intern/rna_rigidbody.c | 1 - source/blender/makesrna/intern/rna_scene.c | 96 ++++++------ source/blender/makesrna/intern/rna_scene_api.c | 1 - source/blender/makesrna/intern/rna_screen.c | 5 +- source/blender/makesrna/intern/rna_sculpt_paint.c | 9 +- source/blender/makesrna/intern/rna_smoke.c | 10 +- source/blender/makesrna/intern/rna_space.c | 10 +- source/blender/makesrna/intern/rna_speaker.c | 1 - source/blender/makesrna/intern/rna_texture.c | 11 +- source/blender/makesrna/intern/rna_tracking.c | 7 +- source/blender/makesrna/intern/rna_userdef.c | 7 +- source/blender/makesrna/intern/rna_vfont.c | 5 +- source/blender/makesrna/intern/rna_world.c | 9 +- 176 files changed, 1057 insertions(+), 1204 deletions(-) delete mode 100644 source/blender/blenkernel/BKE_depsgraph.h delete mode 100644 source/blender/blenkernel/intern/depsgraph.c diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h deleted file mode 100644 index 363f8c82853..00000000000 --- a/source/blender/blenkernel/BKE_depsgraph.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2004 Blender Foundation. - * All rights reserved. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -#ifndef __BKE_DEPSGRAPH_H__ -#define __BKE_DEPSGRAPH_H__ - -/** \file BKE_depsgraph.h - * \ingroup bke - */ - -/* Dependency Graph - * - * The dependency graph tracks relations between datablocks, and is used to - * determine which datablocks need to be update based on dependencies and - * visibility. - * - * It does not itself execute changes in objects, but rather sorts the objects - * in the appropriate order and sets flags indicating they should be updated. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -struct Depsgraph; -struct ID; -struct Main; -struct Object; -struct Scene; - -/* Global initialization/deinitialization */ -void DAG_init(void); -void DAG_exit(void); - -/* Build and Update - * - * DAG_scene_relations_update will rebuild the dependency graph for a given - * scene if needed, and sort objects in the scene. - * - * DAG_relations_tag_update will clear all dependency graphs and mark them to - * be rebuilt later. The graph is not rebuilt immediately to avoid slowdowns - * when this function is call multiple times from different operators. - * - * DAG_scene_relations_rebuild forces an immediaterebuild of the dependency - * graph, this is only needed in rare cases - */ - -void DAG_scene_relations_update(struct Main *bmain, struct Scene *sce); -void DAG_scene_relations_validate(struct Main *bmain, struct Scene *sce); -void DAG_relations_tag_update(struct Main *bmain); -void DAG_scene_relations_rebuild(struct Main *bmain, struct Scene *scene); -void DAG_scene_free(struct Scene *sce); - -/* Update Tagging - * - * DAG_scene_update_flags will mark all objects that depend on time (animation, - * physics, ..) to be recalculated, used when changing the current frame. - * - * DAG_on_visible_update will mark all objects that are visible for the first - * time to be updated, for example on file load or changing layer visibility. - * - * DAG_id_tag_update will mark a given datablock to be updated. The flag indicates - * a specific subset to be update (only object transform and data for now). - * - * DAG_id_type_tag marks a particular datablock type as having changing. This does - * not cause any updates but is used by external render engines to detect if for - * example a datablock was removed. */ - -void DAG_on_visible_update(struct Main *bmain, const bool do_time); - -void DAG_id_tag_update(struct ID *id, short flag); -void DAG_id_tag_update_ex(struct Main *bmain, struct ID *id, short flag); -void DAG_id_type_tag(struct Main *bmain, short idtype); -int DAG_id_type_tagged(struct Main *bmain, short idtype); - -/* Flushing Tags - * - * DAG_scene_flush_update flushes object recalculation flags immediately to other - * dependencies. Do not use outside of depsgraph.c, this will be removed. - * - * DAG_ids_flush_tagged will flush datablock update flags flags to dependencies, - * use this right before updating to mark all the needed datablocks for update. - * - * DAG_ids_check_recalc and DAG_ids_clear_recalc are used for external render - * engines to detect changes. */ - -void DAG_ids_flush_tagged(struct Main *bmain); -void DAG_ids_check_recalc(struct Main *bmain, struct Scene *scene, bool time); -void DAG_ids_clear_recalc(struct Main *bmain); - -/* Editors: callbacks to notify editors of datablock changes */ - -void DAG_editors_update_cb(void (*id_func)(struct Main *bmain, struct ID *id), - void (*scene_func)(struct Main *bmain, struct Scene *scene, int updated), - void (*scene_pre_func)(struct Main *bmain, struct Scene *scene, bool time)); - -void DAG_editors_update_pre(struct Main *bmain, struct Scene *scene, bool time); - -/* ** Threaded update ** */ - -/* Debugging: print dependency graph for scene or armature object to console */ - -void DAG_print_dependencies(struct Main *bmain, struct Scene *scene, struct Object *ob); - -/* ************************ DAG querying ********************* */ - -short DAG_get_eval_flags_for_object(struct Scene *scene, void *object); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 71aeb393c97..44dcb0a51ae 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -97,7 +97,6 @@ set(SRC intern/customdata_file.c intern/data_transfer.c intern/deform.c - intern/depsgraph.c intern/displist.c intern/dynamicpaint.c intern/editderivedmesh.c @@ -231,7 +230,6 @@ set(SRC BKE_customdata_file.h BKE_data_transfer.h BKE_deform.h - BKE_depsgraph.h BKE_displist.h BKE_dynamicpaint.h BKE_editmesh.h diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c deleted file mode 100644 index f99a4acd81e..00000000000 --- a/source/blender/blenkernel/intern/depsgraph.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2004 Blender Foundation. - * All rights reserved. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/blenkernel/intern/depsgraph.c - * \ingroup bke - */ - - -#include -#include -#include -#include - -#include "MEM_guardedalloc.h" - -#ifdef WIN32 -# include "BLI_winstuff.h" -#endif - -#include "BLI_utildefines.h" - -#include "DNA_object_types.h" -#include "DNA_scene_types.h" - -#include "BKE_global.h" -#include "BKE_depsgraph.h" -#include "BKE_main.h" - -#include "DEG_depsgraph.h" -#include "DEG_depsgraph_build.h" -#include "DEG_depsgraph_debug.h" -#include "DEG_depsgraph_query.h" - -/* ************************ DAG ********************* */ - -/* ************************************ - * This functions are to be supported * - * ************************************ - */ - -void DAG_init(void) -{ - DEG_register_node_types(); -} - -void DAG_exit(void) -{ - DEG_free_node_types(); -} - -/* ************************ API *********************** */ - -void DAG_editors_update_cb(DEG_EditorUpdateIDCb id_func, - DEG_EditorUpdateSceneCb scene_func, - DEG_EditorUpdateScenePreCb scene_func_pre) -{ - DEG_editors_set_update_cb(id_func, scene_func, scene_func_pre); -} - -void DAG_editors_update_pre(Main *bmain, Scene *scene, bool time) -{ - DEG_editors_update_pre(bmain, scene, time); -} - -/* Tag all relations for update. */ -void DAG_relations_tag_update(Main *bmain) -{ - DEG_relations_tag_update(bmain); -} - -/* Rebuild dependency graph only for a given scene. */ -void DAG_scene_relations_rebuild(Main *bmain, Scene *scene) -{ - DEG_scene_relations_rebuild(bmain, scene); -} - -/* Create dependency graph if it was cleared or didn't exist yet. */ -void DAG_scene_relations_update(Main *bmain, Scene *scene) -{ - DEG_scene_relations_update(bmain, scene); -} - -void DAG_scene_relations_validate(Main *bmain, Scene *scene) -{ - DEG_debug_scene_relations_validate(bmain, scene); -} - -void DAG_scene_free(Scene *scene) -{ - DEG_scene_graph_free(scene); -} - -void DAG_on_visible_update(Main *bmain, const bool do_time) -{ - DEG_on_visible_update(bmain, do_time); -} - -void DAG_ids_check_recalc(Main *bmain, Scene *scene, bool time) -{ - DEG_ids_check_recalc(bmain, scene, time); -} - -void DAG_id_tag_update(ID *id, short flag) -{ - DEG_id_tag_update_ex(G.main, id, flag); -} - -void DAG_id_tag_update_ex(Main *bmain, ID *id, short flag) -{ - DEG_id_tag_update_ex(bmain, id, flag); -} - -void DAG_id_type_tag(Main *bmain, short idtype) -{ - DEG_id_type_tag(bmain, idtype); -} - -int DAG_id_type_tagged(Main *bmain, short idtype) -{ - return DEG_id_type_tagged(bmain, idtype); -} - -void DAG_ids_clear_recalc(Main *bmain) -{ - DEG_ids_clear_recalc(bmain); -} - -short DAG_get_eval_flags_for_object(Scene *scene, void *object) -{ - return DEG_get_eval_flags_for_id(scene->depsgraph, (ID *)object); -} - -void DAG_ids_flush_tagged(Main *bmain) -{ - DEG_ids_flush_tagged(bmain); -} - -/* ************************ DAG DEBUGGING ********************* */ - -void DAG_print_dependencies(Main *UNUSED(bmain), - Scene *scene, - Object *UNUSED(ob)) -{ - DEG_debug_graphviz(scene->depsgraph, stdout, "Depsgraph", false); -} diff --git a/source/blender/blenkernel/intern/object_facemap.c b/source/blender/blenkernel/intern/object_facemap.c index 02dedc10026..0e1e29f7bf3 100644 --- a/source/blender/blenkernel/intern/object_facemap.c +++ b/source/blender/blenkernel/intern/object_facemap.c @@ -41,8 +41,6 @@ #include "BKE_object_facemap.h" /* own include */ #include "BKE_object_deform.h" -#include "BKE_depsgraph.h" - #include "BLI_utildefines.h" #include "BLI_path_util.h" #include "BLI_string.h" diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index bd47ee0214d..5e6fe84d3a9 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -1918,7 +1918,7 @@ Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root, COLLADAFW::No job->lay = BKE_scene_base_find(scene, job)->lay = 2; mul_v3_fl(job->size, 0.5f); - DAG_id_tag_update(&job->id, OB_RECALC_OB); + DEG_id_tag_update(&job->id, OB_RECALC_OB); verify_adt_action((ID *)&job->id, 1); @@ -1939,14 +1939,14 @@ Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root, COLLADAFW::No if (par_job) { job->parent = par_job; - DAG_id_tag_update(&par_job->id, OB_RECALC_OB); + DEG_id_tag_update(&par_job->id, OB_RECALC_OB); job->parsubstr[0] = 0; } BKE_object_where_is_calc(scene, job); // after parenting and layer change - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); joint_objects[node->getUniqueId()] = job; } diff --git a/source/blender/collada/SkinInfo.cpp b/source/blender/collada/SkinInfo.cpp index c48c060dc95..c29f1748efc 100644 --- a/source/blender/collada/SkinInfo.cpp +++ b/source/blender/collada/SkinInfo.cpp @@ -241,9 +241,9 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::mapparentinv, workob.obmat); - DAG_id_tag_update(&obn->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&obn->id, OB_RECALC_OB | OB_RECALC_DATA); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); #endif copy_m4_m4(ob->obmat, bind_shape_matrix); diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp index 1ba8658f245..0f39b27316c 100644 --- a/source/blender/collada/collada_utils.cpp +++ b/source/blender/collada/collada_utils.cpp @@ -124,7 +124,7 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space) /** done once after import */ #if 0 - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); #endif @@ -832,4 +832,4 @@ void bc_sanitize_mat(float mat[4][4], int precision) for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) mat[i][j] = double_round(mat[i][j], precision); -} \ No newline at end of file +} diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index de89f22649f..7d6907ec318 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -32,7 +32,6 @@ #include "BIF_glutil.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_object.h" #include "BKE_pbvh.h" diff --git a/source/blender/editors/animation/CMakeLists.txt b/source/blender/editors/animation/CMakeLists.txt index 1bf1bb2a474..13432e38669 100644 --- a/source/blender/editors/animation/CMakeLists.txt +++ b/source/blender/editors/animation/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 22578b6a518..01575bff3c2 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -34,7 +34,6 @@ #include "MEM_guardedalloc.h" -#include "BKE_depsgraph.h" #include "BLI_blenlib.h" #include "BLI_utildefines.h" #include "BLI_listbase.h" @@ -59,6 +58,8 @@ #include "BKE_global.h" #include "BKE_scene.h" +#include "DEG_depsgraph_build.h" + #include "UI_view2d.h" #include "ED_anim_api.h" @@ -1721,7 +1722,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op)) /* send notifier that things have changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index cc77a321a89..abdc6450abd 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -49,11 +49,12 @@ #include "BKE_fcurve.h" #include "BKE_gpencil.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_node.h" #include "BKE_sequencer.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "ED_anim_api.h" @@ -77,7 +78,7 @@ void ANIM_list_elem_update(Scene *scene, bAnimListElem *ale) adt = BKE_animdata_from_id(id); if (adt) { adt->recalc |= ADT_RECALC_ANIM; - DAG_id_tag_update(id, OB_RECALC_TIME); + DEG_id_tag_update(id, OB_RECALC_TIME); } /* update data */ @@ -98,7 +99,7 @@ void ANIM_list_elem_update(Scene *scene, bAnimListElem *ale) else { /* in other case we do standard depsgraph update, ideally * we'd be calling property update functions here too ... */ - DAG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX or do we want something more restrictive? + DEG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX or do we want something more restrictive? } } @@ -114,7 +115,7 @@ void ANIM_id_update(Scene *UNUSED(scene), ID *id) adt->recalc |= ADT_RECALC_ANIM; /* set recalc flags */ - DAG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX or do we want something more restrictive? + DEG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX or do we want something more restrictive? } } diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 21c25f829b1..7bda7f0522c 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -43,11 +43,12 @@ #include "DNA_texture_types.h" #include "BKE_animsys.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_context.h" #include "BKE_report.h" +#include "DEG_depsgraph_build.h" + #include "ED_keyframing.h" #include "UI_interface.h" @@ -841,7 +842,7 @@ static int add_driver_button_none(bContext *C, wmOperator *op, short mapping_typ if (success) { /* send updates */ UI_context_update_anim_flag(C); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); // XXX return OPERATOR_FINISHED; @@ -939,7 +940,7 @@ static int remove_driver_button_exec(bContext *C, wmOperator *op) if (success) { /* send updates */ UI_context_update_anim_flag(C); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); // XXX } diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index f2a35bb1553..d29c0d722b5 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -56,7 +56,6 @@ #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_armature.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_idcode.h" #include "BKE_nla.h" @@ -66,6 +65,9 @@ #include "BKE_key.h" #include "BKE_material.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "ED_anim_api.h" #include "ED_keyframing.h" #include "ED_keyframes_edit.h" @@ -155,7 +157,7 @@ bAction *verify_adt_action(ID *id, short add) /* tag depsgraph to be rebuilt to include time dependency */ /* XXX: we probably should have bmain passed down, but that involves altering too many API's */ - DAG_relations_tag_update(G.main); + DEG_relations_tag_update(G.main); } /* return the action */ @@ -1616,7 +1618,7 @@ static int clear_anim_v3d_exec(bContext *C, wmOperator *UNUSED(op)) /* delete F-Curve completely */ if (can_delete) { ANIM_fcurve_delete_from_animdata(NULL, adt, fcu); - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); changed = true; } } @@ -1723,7 +1725,7 @@ static int delete_key_v3d_exec(bContext *C, wmOperator *op) else BKE_reportf(op->reports, RPT_ERROR, "No keyframes removed from Object '%s'", id->name + 2); - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } CTX_DATA_END; diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 4408ec26b3f..fd73a27c9f6 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -48,9 +48,10 @@ #include "BKE_main.h" #include "BKE_animsys.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "ED_keyframing.h" #include "ED_screen.h" @@ -1049,7 +1050,7 @@ int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSe Object *ob = (Object *)ksp->id; // XXX: only object transforms? - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); break; } } diff --git a/source/blender/editors/armature/CMakeLists.txt b/source/blender/editors/armature/CMakeLists.txt index b213aca478f..5348298f57e 100644 --- a/source/blender/editors/armature/CMakeLists.txt +++ b/source/blender/editors/armature/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c index c928508237d..14db676cd01 100644 --- a/source/blender/editors/armature/armature_naming.c +++ b/source/blender/editors/armature/armature_naming.c @@ -48,11 +48,12 @@ #include "BKE_constraint.h" #include "BKE_context.h" #include "BKE_deform.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_main.h" #include "BKE_modifier.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -375,7 +376,7 @@ static int armature_flip_names_exec(bContext *C, wmOperator *UNUSED(op)) BLI_freelistN(&bones_names); /* since we renamed stuff... */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* copied from #rna_Bone_update_renamed */ /* redraw view */ @@ -425,7 +426,7 @@ static int armature_autoside_names_exec(bContext *C, wmOperator *op) CTX_DATA_END; /* since we renamed stuff... */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index 0dc97483dfc..a6f63548c96 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -47,13 +47,15 @@ #include "BKE_animsys.h" #include "BKE_constraint.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_global.h" #include "BKE_layer.h" #include "BKE_main.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -406,7 +408,7 @@ int join_armature_exec(bContext *C, wmOperator *op) } CTX_DATA_END; - DAG_relations_tag_update(bmain); /* because we removed object(s) */ + DEG_relations_tag_update(bmain); /* because we removed object(s) */ ED_armature_from_edit(arm); ED_armature_edit_free(arm); @@ -624,7 +626,7 @@ static int separate_armature_exec(bContext *C, wmOperator *op) /* 2) duplicate base */ newbase = ED_object_add_duplicate(bmain, scene, sl, oldbase, USER_DUP_ARM); /* only duplicate linked armature */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); newob = newbase->object; newbase->flag &= ~BASE_SELECTED; @@ -638,8 +640,8 @@ static int separate_armature_exec(bContext *C, wmOperator *op) /* 4) fix links before depsgraph flushes */ // err... or after? separated_armature_fix_links(oldob, newob); - DAG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */ - DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */ + DEG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */ + DEG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */ /* 5) restore original conditions */ diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index a3b439536b7..a2663cdd935 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -39,11 +39,12 @@ #include "BKE_armature.h" #include "BKE_context.h" #include "BKE_deform.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_idprop.h" #include "BKE_main.h" +#include "DEG_depsgraph.h" + #include "ED_armature.h" #include "ED_util.h" @@ -672,7 +673,7 @@ void ED_armature_from_edit(bArmature *arm) } } - DAG_id_tag_update(&arm->id, 0); + DEG_id_tag_update(&arm->id, 0); } void ED_armature_edit_free(struct bArmature *arm) diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 86b7271bfff..736329d29bf 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -43,10 +43,11 @@ #include "BKE_armature.h" #include "BKE_context.h" #include "BKE_deform.h" -#include "BKE_depsgraph.h" #include "BKE_object.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -580,7 +581,7 @@ static void pose_copy_menu(Scene *scene) BKE_pose_tag_recalc(bmain, ob->pose); } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); // and all its relations + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); // and all its relations BIF_undo_push("Copy Pose Attributes"); @@ -613,7 +614,7 @@ static int pose_flip_names_exec(bContext *C, wmOperator *UNUSED(op)) BLI_freelistN(&bones_names); /* since we renamed stuff... */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); @@ -660,7 +661,7 @@ static int pose_autoside_names_exec(bContext *C, wmOperator *op) CTX_DATA_END; /* since we renamed stuff... */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); @@ -709,7 +710,7 @@ static int pose_bone_rotmode_exec(bContext *C, wmOperator *op) CTX_DATA_END; /* notifiers and updates */ - DAG_id_tag_update((ID *)ob, OB_RECALC_DATA); + DEG_id_tag_update((ID *)ob, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob); return OPERATOR_FINISHED; @@ -1166,7 +1167,7 @@ static int pose_flip_quats_exec(bContext *C, wmOperator *UNUSED(op)) CTX_DATA_END; /* notifiers and updates */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index e3c64b523b1..c4336338176 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -46,7 +46,6 @@ #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_armature.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_idprop.h" #include "BKE_library.h" @@ -55,6 +54,8 @@ #include "BKE_context.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -1090,7 +1091,7 @@ static void poselib_preview_apply(bContext *C, wmOperator *op) */ // FIXME: shouldn't this use the builtin stuff? if ((pld->arm->flag & ARM_DELAYDEFORM) == 0) - DAG_id_tag_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */ + DEG_id_tag_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */ else BKE_pose_where_is(pld->scene, pld->ob); } @@ -1598,7 +1599,7 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op) * - note: code copied from transform_generics.c -> recalcData() */ if ((arm->flag & ARM_DELAYDEFORM) == 0) - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ else BKE_pose_where_is(scene, ob); } @@ -1611,7 +1612,7 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op) action_set_activemarker(act, marker, NULL); /* Update event for pose and deformation children */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* updates */ if (IS_AUTOKEY_MODE(scene, NORMAL)) { diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c index fdc58f6e253..0d1752e07a1 100644 --- a/source/blender/editors/armature/pose_select.c +++ b/source/blender/editors/armature/pose_select.c @@ -43,10 +43,11 @@ #include "BKE_armature.h" #include "BKE_constraint.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_object.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -122,7 +123,7 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select) * (see rna_Bone_select_update() in rna_armature.c for details) */ if (arm->flag & ARM_HAS_VIZ_DEPS) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } /* send necessary notifiers */ @@ -197,7 +198,7 @@ bool ED_do_pose_selectbuffer( if (ob_act->mode & OB_MODE_WEIGHT_PAINT) { if (nearBone == arm->act_bone) { ED_vgroup_select_by_name(ob_act, nearBone->name); - DAG_id_tag_update(&ob_act->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_act->id, OB_RECALC_DATA); } } /* if there are some dependencies for visualizing armature state @@ -207,7 +208,7 @@ bool ED_do_pose_selectbuffer( /* NOTE: ob not ob_act here is intentional - it's the source of the * bones being selected [T37247] */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } } } @@ -314,7 +315,7 @@ static int pose_select_connected_invoke(bContext *C, wmOperator *op, const wmEve if (arm->flag & ARM_HAS_VIZ_DEPS) { /* mask modifier ('armature' mode), etc. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -370,7 +371,7 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op) /* weightpaint or mask modifiers need depsgraph updates */ if (multipaint || (arm->flag & ARM_HAS_VIZ_DEPS)) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -422,7 +423,7 @@ static int pose_select_parent_exec(bContext *C, wmOperator *UNUSED(op)) if (arm->flag & ARM_HAS_VIZ_DEPS) { /* mask modifier ('armature' mode), etc. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -489,7 +490,7 @@ static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op if (arm->flag & ARM_HAS_VIZ_DEPS) { /* mask modifier ('armature' mode), etc. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -583,7 +584,7 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op) if (arm->flag & ARM_HAS_VIZ_DEPS) { /* mask modifier ('armature' mode), etc. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -828,7 +829,7 @@ static int pose_select_grouped_exec(bContext *C, wmOperator *op) if (arm->flag & ARM_HAS_VIZ_DEPS) { /* mask modifier ('armature' mode), etc. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } /* report done status */ @@ -921,7 +922,7 @@ static int pose_select_mirror_exec(bContext *C, wmOperator *op) /* in weightpaint we select the associated vertex group too */ if (ob_act->mode & OB_MODE_WEIGHT_PAINT) { ED_vgroup_select_by_name(ob_act, pchan_mirror_act->name); - DAG_id_tag_update(&ob_act->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_act->id, OB_RECALC_DATA); } } diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 063ba37f20d..c2f66db63f8 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -45,13 +45,14 @@ #include "BKE_blender_copybuffer.h" #include "BKE_context.h" #include "BKE_deform.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_idprop.h" #include "BKE_main.h" #include "BKE_object.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -225,7 +226,7 @@ static int pose_visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op)) } CTX_DATA_END; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); @@ -534,7 +535,7 @@ static int pose_paste_exec(bContext *C, wmOperator *op) } BKE_main_free(tmp_bmain); /* Update event for pose and deformation children. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* Notifiers for updates, */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); @@ -760,7 +761,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op, ED_pose_recalculate_paths(scene, ob); } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob); @@ -907,7 +908,7 @@ static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op) } /* notifiers and updates */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c index b960bec3603..124cf24f12b 100644 --- a/source/blender/editors/armature/pose_utils.c +++ b/source/blender/editors/armature/pose_utils.c @@ -39,11 +39,12 @@ #include "BKE_action.h" #include "BKE_armature.h" -#include "BKE_depsgraph.h" #include "BKE_idprop.h" #include "BKE_context.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "WM_api.h" @@ -187,7 +188,7 @@ void poseAnim_mapping_refresh(bContext *C, Scene *scene, Object *ob) */ /* FIXME: shouldn't this use the builtin stuff? */ if ((arm->flag & ARM_DELAYDEFORM) == 0) - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ else BKE_pose_where_is(scene, ob); diff --git a/source/blender/editors/curve/CMakeLists.txt b/source/blender/editors/curve/CMakeLists.txt index 2f5b2ab6e87..ae5c0a13ced 100644 --- a/source/blender/editors/curve/CMakeLists.txt +++ b/source/blender/editors/curve/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index da23c6ab222..b3f1f4f59be 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -45,7 +45,6 @@ #include "BKE_context.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_displist.h" #include "BKE_fcurve.h" #include "BKE_global.h" @@ -58,6 +57,9 @@ #include "BKE_action.h" #include "BKE_modifier.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "WM_api.h" #include "WM_types.h" @@ -1315,7 +1317,7 @@ static int separate_exec(bContext *C, wmOperator *op) /* 2. duplicate the object and data */ newbase = ED_object_add_duplicate(bmain, scene, sl, oldbase, 0); /* 0 = fully linked */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); newob = newbase->object; newcu = newob->data = BKE_curve_copy(bmain, oldcu); @@ -1334,8 +1336,8 @@ static int separate_exec(bContext *C, wmOperator *op) ED_curve_editnurb_free(newob); curve_delete_segments(oldob, true); - DAG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */ - DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */ + DEG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */ + DEG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */ WM_event_add_notifier(C, NC_GEOM | ND_DATA, oldob->data); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, newob); @@ -1383,7 +1385,7 @@ static int curve_split_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); } else { BKE_report(op->reports, RPT_ERROR, "Cannot split current selection"); @@ -2329,7 +2331,7 @@ static int switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) if (ED_curve_updateAnimPaths(obedit->data)) WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -2377,7 +2379,7 @@ static int set_goal_weight_exec(bContext *C, wmOperator *op) } } - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -2430,7 +2432,7 @@ static int set_radius_exec(bContext *C, wmOperator *op) } WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -2582,7 +2584,7 @@ static int smooth_exec(bContext *C, wmOperator *UNUSED(op)) } WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -2773,7 +2775,7 @@ static int curve_smooth_weight_exec(bContext *C, wmOperator *UNUSED(op)) curve_smooth_value(editnurb, offsetof(BezTriple, weight), offsetof(BPoint, weight)); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -2801,7 +2803,7 @@ static int curve_smooth_radius_exec(bContext *C, wmOperator *UNUSED(op)) curve_smooth_value(editnurb, offsetof(BezTriple, radius), offsetof(BPoint, radius)); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -2829,7 +2831,7 @@ static int curve_smooth_tilt_exec(bContext *C, wmOperator *UNUSED(op)) curve_smooth_value(editnurb, offsetof(BezTriple, alfa), offsetof(BPoint, alfa)); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -2901,7 +2903,7 @@ static int hide_exec(bContext *C, wmOperator *op) } } - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); BKE_curve_nurb_vert_active_validate(obedit->data); @@ -2963,7 +2965,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) } } - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_FINISHED; @@ -3382,7 +3384,7 @@ static int subdivide_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -3577,7 +3579,7 @@ static int set_spline_type_exec(bContext *C, wmOperator *op) if (ED_curve_updateAnimPaths(obedit->data)) WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); if (changed_size) { @@ -3631,7 +3633,7 @@ static int set_handle_type_exec(bContext *C, wmOperator *op) BKE_nurbList_handles_set(editnurb, RNA_enum_get(op->ptr, "type")); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -3676,7 +3678,7 @@ static int curve_normals_make_consistent_exec(bContext *C, wmOperator *op) BKE_nurbList_handles_recalculate(editnurb, calc_length, SELECT); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -4064,7 +4066,7 @@ static int merge_nurb(bContext *C, wmOperator *op) BKE_curve_nurb_active_set(obedit->data, NULL); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -4271,7 +4273,7 @@ static int make_segment_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -4515,7 +4517,7 @@ static int spin_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -4970,7 +4972,7 @@ static int add_vertex_exec(bContext *C, wmOperator *op) } WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -5125,7 +5127,7 @@ static int curve_extrude_exec(bContext *C, wmOperator *UNUSED(op)) } WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); } return OPERATOR_FINISHED; @@ -5224,7 +5226,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op) } WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -5742,7 +5744,7 @@ static int curve_delete_exec(bContext *C, wmOperator *op) if (ED_curve_updateAnimPaths(obedit->data)) WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return retval; } @@ -5886,7 +5888,7 @@ static int curve_dissolve_exec(bContext *C, wmOperator *UNUSED(op)) if (ED_curve_updateAnimPaths(obedit->data)) WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, obedit); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); } return OPERATOR_FINISHED; @@ -5927,7 +5929,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) } WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } @@ -6053,9 +6055,9 @@ int join_curve_exec(bContext *C, wmOperator *op) /* Account for mixed 2D/3D curves when joining */ BKE_curve_curve_dimension_update(cu); - DAG_relations_tag_update(bmain); // because we removed object(s), call before editmode! + DEG_relations_tag_update(bmain); // because we removed object(s), call before editmode! - 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); @@ -6095,7 +6097,7 @@ static int clear_tilt_exec(bContext *C, wmOperator *UNUSED(op)) } WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c index cc8e272d4f7..281f6c3c22e 100644 --- a/source/blender/editors/curve/editcurve_add.c +++ b/source/blender/editors/curve/editcurve_add.c @@ -42,9 +42,10 @@ #include "BKE_context.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_library.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "WM_api.h" @@ -502,7 +503,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) cu->flag |= CU_PATH | CU_3D; } else { - DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DEG_id_tag_update(&obedit->id, OB_RECALC_DATA); } } else { /* adding surface */ @@ -512,7 +513,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) newob = true; } else { - DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DEG_id_tag_update(&obedit->id, OB_RECALC_DATA); } } diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c index 867aec61922..e9d214157c0 100644 --- a/source/blender/editors/curve/editcurve_paint.c +++ b/source/blender/editors/curve/editcurve_paint.c @@ -33,10 +33,11 @@ #include "BKE_context.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" #include "WM_types.h" @@ -1123,7 +1124,7 @@ static int curve_draw_exec(bContext *C, wmOperator *op) cu->actvert = nu->pntsu - 1; WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); curve_draw_exit(op); diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 09a76553b2e..c18f1408387 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -49,13 +49,14 @@ #include "BKE_context.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_font.h" #include "BKE_library.h" #include "BKE_main.h" #include "BKE_object.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -254,7 +255,7 @@ static void text_update_edited(bContext *C, Object *obedit, int mode) /* run update first since it can move the cursor */ if (mode == FO_EDIT) { /* re-tesselllate */ - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); } else { /* depsgraph runs above, but since we're not tagging for update, call direct */ @@ -585,7 +586,7 @@ static int set_style(bContext *C, const int style, const bool clear) ef->textbufinfo[i].flag |= style; } - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; diff --git a/source/blender/editors/gpencil/CMakeLists.txt b/source/blender/editors/gpencil/CMakeLists.txt index 3d5317b2ebd..587c25031ab 100644 --- a/source/blender/editors/gpencil/CMakeLists.txt +++ b/source/blender/editors/gpencil/CMakeLists.txt @@ -24,6 +24,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../imbuf ../../gpu ../../makesdna diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c index 8c98d570096..a4e5a908531 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -59,7 +59,6 @@ #include "BKE_collection.h" #include "BKE_context.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_global.h" #include "BKE_gpencil.h" @@ -71,6 +70,8 @@ #include "BKE_screen.h" #include "BKE_tracking.h" +#include "DEG_depsgraph.h" + #include "UI_interface.h" #include "WM_api.h" @@ -548,7 +549,7 @@ static void gp_stroke_path_animation(bContext *C, ReportList *reports, Curve *cu WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL); /* send updates */ - DAG_id_tag_update(&cu->id, 0); + DEG_id_tag_update(&cu->id, 0); } #undef MIN_TIME_DELTA diff --git a/source/blender/editors/interface/CMakeLists.txt b/source/blender/editors/interface/CMakeLists.txt index c57f8d5c7a8..748849f1aa5 100644 --- a/source/blender/editors/interface/CMakeLists.txt +++ b/source/blender/editors/interface/CMakeLists.txt @@ -24,6 +24,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../gpu ../../imbuf ../../makesdna diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index a04360b3395..812f4ef0747 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -39,11 +39,12 @@ #include "BLI_utildefines.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_global.h" #include "BKE_nla.h" +#include "DEG_depsgraph_build.h" + #include "ED_keyframing.h" #include "UI_interface.h" @@ -211,7 +212,7 @@ bool ui_but_anim_expression_create(uiBut *but, const char *str) /* updates */ driver->flag |= DRIVER_FLAG_RECOMPILE; - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME, NULL); ok = true; } diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c index 858c21dfdda..a1ba937d925 100644 --- a/source/blender/editors/interface/interface_eyedropper.c +++ b/source/blender/editors/interface/interface_eyedropper.c @@ -43,10 +43,12 @@ #include "BKE_screen.h" #include "BKE_report.h" #include "BKE_animsys.h" -#include "BKE_depsgraph.h" #include "BKE_idcode.h" #include "BKE_unit.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -1205,8 +1207,8 @@ static void driverdropper_sample(bContext *C, wmOperator *op, const wmEvent *eve if (success) { /* send updates */ UI_context_update_anim_flag(C); - DAG_relations_tag_update(CTX_data_main(C)); - DAG_id_tag_update(ddr->ptr.id.data, OB_RECALC_OB | OB_RECALC_DATA); + DEG_relations_tag_update(CTX_data_main(C)); + DEG_id_tag_update(ddr->ptr.id.data, OB_RECALC_OB | OB_RECALC_DATA); WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); // XXX } } diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 09388ff1a18..e47088d020e 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -42,7 +42,6 @@ #include "BLT_lang.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_idprop.h" #include "BKE_layer.h" #include "BKE_screen.h" @@ -51,6 +50,8 @@ #include "BKE_text.h" /* for UI_OT_reports_to_text */ #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_types.h" @@ -396,7 +397,7 @@ static int use_property_button_exec(bContext *C, wmOperator *UNUSED(op)) } /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update((ID *)CTX_data_scene(C), 0); + DEG_id_tag_update((ID *)CTX_data_scene(C), 0); return OPERATOR_FINISHED; } @@ -431,7 +432,7 @@ static int unuse_property_button_exec(bContext *C, wmOperator *UNUSED(op)) IDP_FreeFromGroup(props, prop_to_remove); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update((ID *)CTX_data_scene(C), 0); + DEG_id_tag_update((ID *)CTX_data_scene(C), 0); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index dbef5b68a03..39294265bca 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -55,7 +55,6 @@ #include "BKE_colortools.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_idcode.h" #include "BKE_idprop.h" @@ -73,6 +72,9 @@ #include "BKE_screen.h" #include "BKE_texture.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "ED_screen.h" #include "ED_object.h" #include "ED_render.h" @@ -398,13 +400,13 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) Scene *scene = CTX_data_scene(C); ED_object_single_user(bmain, scene, (struct Object *)id); WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } else { if (id) { Main *bmain = CTX_data_main(C); id_single_user(C, id, &template->ptr, template->prop); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } } } @@ -1045,7 +1047,7 @@ static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v) ob->partype = PAROBJECT; WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); ED_undo_push(C, "Modifier convert to real"); } @@ -1326,7 +1328,7 @@ static void do_constraint_panels(bContext *C, void *ob_pt, int event) Main *bmain = CTX_data_main(C); if (ob->pose) BKE_pose_tag_recalc(bmain, ob->pose); /* checks & sorts pose channels */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); break; } #endif @@ -1340,8 +1342,8 @@ static void do_constraint_panels(bContext *C, void *ob_pt, int event) * object_test_constraints(ob); * if (ob->pose) BKE_pose_update_constraint_flags(ob->pose); */ - if (ob->type == OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB); - else DAG_id_tag_update(&ob->id, OB_RECALC_OB); + if (ob->type == OB_ARMATURE) DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB); + else DEG_id_tag_update(&ob->id, OB_RECALC_OB); WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob); } diff --git a/source/blender/editors/mask/CMakeLists.txt b/source/blender/editors/mask/CMakeLists.txt index 033d034cf4e..d17df344dc9 100644 --- a/source/blender/editors/mask/CMakeLists.txt +++ b/source/blender/editors/mask/CMakeLists.txt @@ -25,6 +25,7 @@ set(INC ../include ../../blenkernel ../../blenlib + ../../depsgraph ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c index 69335195b96..ad1a567f843 100644 --- a/source/blender/editors/mask/mask_add.c +++ b/source/blender/editors/mask/mask_add.c @@ -34,9 +34,10 @@ #include "BLI_math.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_mask.h" +#include "DEG_depsgraph.h" + #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_mask_types.h" @@ -692,7 +693,7 @@ static int add_feather_vertex_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask); - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index 35de390274c..7bd8d9de278 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -35,10 +35,11 @@ #include "BLI_math.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_main.h" #include "BKE_mask.h" +#include "DEG_depsgraph.h" + #include "DNA_scene_types.h" #include "DNA_mask_types.h" #include "DNA_object_types.h" /* SELECT */ @@ -1062,7 +1063,7 @@ static int slide_point_modal(bContext *C, wmOperator *op, const wmEvent *event) } WM_event_add_notifier(C, NC_MASK | NA_EDITED, data->mask); - DAG_id_tag_update(&data->mask->id, 0); + DEG_id_tag_update(&data->mask->id, 0); break; } @@ -1089,7 +1090,7 @@ static int slide_point_modal(bContext *C, wmOperator *op, const wmEvent *event) } WM_event_add_notifier(C, NC_MASK | NA_EDITED, data->mask); - DAG_id_tag_update(&data->mask->id, 0); + DEG_id_tag_update(&data->mask->id, 0); free_slide_point_data(op->customdata); /* keep this last! */ return OPERATOR_FINISHED; @@ -1105,7 +1106,7 @@ static int slide_point_modal(bContext *C, wmOperator *op, const wmEvent *event) cancel_slide_point(op->customdata); WM_event_add_notifier(C, NC_MASK | NA_EDITED, data->mask); - DAG_id_tag_update(&data->mask->id, 0); + DEG_id_tag_update(&data->mask->id, 0); free_slide_point_data(op->customdata); /* keep this last! */ return OPERATOR_CANCELLED; @@ -1469,7 +1470,7 @@ static int slide_spline_curvature_modal(bContext *C, wmOperator *op, const wmEve } WM_event_add_notifier(C, NC_MASK | NA_EDITED, slide_data->mask); - DAG_id_tag_update(&slide_data->mask->id, 0); + DEG_id_tag_update(&slide_data->mask->id, 0); break; } @@ -1483,7 +1484,7 @@ static int slide_spline_curvature_modal(bContext *C, wmOperator *op, const wmEve } WM_event_add_notifier(C, NC_MASK | NA_EDITED, slide_data->mask); - DAG_id_tag_update(&slide_data->mask->id, 0); + DEG_id_tag_update(&slide_data->mask->id, 0); free_slide_spline_curvature_data(slide_data); /* keep this last! */ return OPERATOR_FINISHED; @@ -1495,7 +1496,7 @@ static int slide_spline_curvature_modal(bContext *C, wmOperator *op, const wmEve cancel_slide_spline_curvature(slide_data); WM_event_add_notifier(C, NC_MASK | NA_EDITED, slide_data->mask); - DAG_id_tag_update(&slide_data->mask->id, 0); + DEG_id_tag_update(&slide_data->mask->id, 0); free_slide_spline_curvature_data(op->customdata); /* keep this last! */ return OPERATOR_CANCELLED; @@ -1541,7 +1542,7 @@ static int cyclic_toggle_exec(bContext *C, wmOperator *UNUSED(op)) } } - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask); return OPERATOR_FINISHED; @@ -1900,7 +1901,7 @@ static int set_handle_type_exec(bContext *C, wmOperator *op) if (changed) { WM_event_add_notifier(C, NC_MASK | ND_DATA, mask); - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); return OPERATOR_FINISHED; } @@ -1954,7 +1955,7 @@ static int mask_hide_view_clear_exec(bContext *C, wmOperator *UNUSED(op)) if (changed) { WM_event_add_notifier(C, NC_MASK | ND_DRAW, mask); - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); return OPERATOR_FINISHED; } @@ -2016,7 +2017,7 @@ static int mask_hide_view_set_exec(bContext *C, wmOperator *op) if (changed) { WM_event_add_notifier(C, NC_MASK | ND_DRAW, mask); - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); return OPERATOR_FINISHED; } @@ -2076,7 +2077,7 @@ static int mask_feather_weight_clear_exec(bContext *C, wmOperator *UNUSED(op)) BKE_mask_update_display(mask, CFRA); WM_event_add_notifier(C, NC_MASK | ND_DRAW, mask); - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/mask/mask_relationships.c b/source/blender/editors/mask/mask_relationships.c index 4e0aa8f84ae..c500ec75aee 100644 --- a/source/blender/editors/mask/mask_relationships.c +++ b/source/blender/editors/mask/mask_relationships.c @@ -34,10 +34,11 @@ #include "BLI_string.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_mask.h" #include "BKE_tracking.h" +#include "DEG_depsgraph.h" + #include "DNA_mask_types.h" #include "WM_api.h" @@ -73,7 +74,7 @@ static int mask_parent_clear_exec(bContext *C, wmOperator *UNUSED(op)) } WM_event_add_notifier(C, NC_MASK | ND_DATA, mask); - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); return OPERATOR_FINISHED; } @@ -176,7 +177,7 @@ static int mask_parent_set_exec(bContext *C, wmOperator *UNUSED(op)) } WM_event_add_notifier(C, NC_MASK | ND_DATA, mask); - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/mask/mask_shapekey.c b/source/blender/editors/mask/mask_shapekey.c index 99ffc9cd7d2..3fb1cc87dbd 100644 --- a/source/blender/editors/mask/mask_shapekey.c +++ b/source/blender/editors/mask/mask_shapekey.c @@ -36,13 +36,14 @@ #include "BLI_math.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_mask.h" #include "DNA_object_types.h" #include "DNA_mask_types.h" #include "DNA_scene_types.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -75,7 +76,7 @@ static int mask_shape_key_insert_exec(bContext *C, wmOperator *UNUSED(op)) if (changed) { WM_event_add_notifier(C, NC_MASK | ND_DATA, mask); - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); return OPERATOR_FINISHED; } @@ -124,7 +125,7 @@ static int mask_shape_key_clear_exec(bContext *C, wmOperator *UNUSED(op)) if (changed) { WM_event_add_notifier(C, NC_MASK | ND_DATA, mask); - DAG_id_tag_update(&mask->id, OB_RECALC_DATA); + DEG_id_tag_update(&mask->id, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -216,7 +217,7 @@ static int mask_shape_key_feather_reset_exec(bContext *C, wmOperator *UNUSED(op) if (changed) { WM_event_add_notifier(C, NC_MASK | ND_DATA, mask); - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); return OPERATOR_FINISHED; } @@ -386,7 +387,7 @@ static int mask_shape_key_rekey_exec(bContext *C, wmOperator *op) if (changed) { WM_event_add_notifier(C, NC_MASK | ND_DATA, mask); - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); return OPERATOR_FINISHED; } 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); diff --git a/source/blender/editors/metaball/CMakeLists.txt b/source/blender/editors/metaball/CMakeLists.txt index 0f9de8dbf87..89ba942ac36 100644 --- a/source/blender/editors/metaball/CMakeLists.txt +++ b/source/blender/editors/metaball/CMakeLists.txt @@ -22,6 +22,7 @@ set(INC ../include ../../blenkernel ../../blenlib + ../../depsgraph ../../makesdna ../../makesrna ../../render/extern/include diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index bc42717b69f..bb0a3234b43 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -48,10 +48,11 @@ #include "RNA_define.h" #include "RNA_access.h" -#include "BKE_depsgraph.h" #include "BKE_context.h" #include "BKE_mball.h" +#include "DEG_depsgraph.h" + #include "ED_mball.h" #include "ED_screen.h" #include "ED_view3d.h" @@ -433,7 +434,7 @@ static int duplicate_metaelems_exec(bContext *C, wmOperator *UNUSED(op)) ml = ml->prev; } WM_event_add_notifier(C, NC_GEOM | ND_DATA, mb); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); } return OPERATOR_FINISHED; @@ -475,7 +476,7 @@ static int delete_metaelems_exec(bContext *C, wmOperator *UNUSED(op)) ml = next; } WM_event_add_notifier(C, NC_GEOM | ND_DATA, mb); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); } return OPERATOR_FINISHED; @@ -515,7 +516,7 @@ static int hide_metaelems_exec(bContext *C, wmOperator *op) ml = ml->next; } WM_event_add_notifier(C, NC_GEOM | ND_DATA, mb); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); } return OPERATOR_FINISHED; @@ -556,7 +557,7 @@ static int reveal_metaelems_exec(bContext *C, wmOperator *UNUSED(op)) ml = ml->next; } WM_event_add_notifier(C, NC_GEOM | ND_DATA, mb); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); } return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 068caee4e1a..3c64117a2d8 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -67,7 +67,6 @@ #include "BKE_context.h" #include "BKE_constraint.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" #include "BKE_displist.h" #include "BKE_effect.h" @@ -94,6 +93,9 @@ #include "BKE_speaker.h" #include "BKE_texture.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -433,8 +435,8 @@ Object *ED_object_add_type( ob->gameflag &= ~(OB_SENSOR | OB_RIGID_BODY | OB_SOFT_BODY | OB_COLLISION | OB_CHARACTER | OB_OCCLUDER | OB_DYNAMIC | OB_NAVMESH); /* copied from rna_object.c */ } - DAG_id_type_tag(bmain, ID_OB); - DAG_relations_tag_update(bmain); + DEG_id_type_tag(bmain, ID_OB); + DEG_relations_tag_update(bmain); if (ob->data) { ED_render_id_flush_update(bmain, ob->data); } @@ -445,7 +447,7 @@ Object *ED_object_add_type( WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, scene); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); return ob; } @@ -541,7 +543,7 @@ static int effector_add_exec(bContext *C, wmOperator *op) ob->pd = object_add_collision_fields(type); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); return OPERATOR_FINISHED; } @@ -646,7 +648,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op) newob = true; } else { - DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DEG_id_tag_update(&obedit->id, OB_RECALC_DATA); } ED_object_new_primitive_matrix(C, obedit, loc, rot, mat); @@ -750,7 +752,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op) newob = true; } else { - DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DEG_id_tag_update(&obedit->id, OB_RECALC_DATA); } if (obedit == NULL) { @@ -1008,7 +1010,7 @@ static int group_instance_add_exec(bContext *C, wmOperator *op) id_us_plus(&group->id); /* works without this except if you try render right after, see: 22027 */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); @@ -1128,7 +1130,7 @@ void ED_base_object_free_and_unlink(Main *bmain, Scene *scene, Object *ob) object_delete_check_glsl_update(ob); BKE_collections_object_remove(bmain, scene, ob, true); - DAG_id_type_tag(bmain, ID_OB); + DEG_id_type_tag(bmain, ID_OB); } static int object_delete_exec(bContext *C, wmOperator *op) @@ -1215,7 +1217,7 @@ static int object_delete_exec(bContext *C, wmOperator *op) if (scene->id.tag & LIB_TAG_DOIT) { scene->id.tag &= ~LIB_TAG_DOIT; - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, scene); @@ -1408,7 +1410,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, set_sca_new_poins_ob(ob); BKE_id_clear_newpoin(&dob->ob->id); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } if (use_hierarchy) { @@ -1462,7 +1464,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, BKE_object_apply_mat4(ob_dst, dob->mat, false, true); /* to set ob_dst->orig and in case theres any other discrepicies */ - DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB); + DEG_id_tag_update(&ob_dst->id, OB_RECALC_OB); } } } @@ -1479,7 +1481,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, /* similer to the code above, see comments */ invert_m4_m4(ob_dst->parentinv, dob->mat); BKE_object_apply_mat4(ob_dst, dob->mat, false, true); - DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB); + DEG_id_tag_update(&ob_dst->id, OB_RECALC_OB); } } @@ -1488,7 +1490,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, if (object->proxy_group == base->object) { object->proxy = NULL; object->proxy_from = NULL; - DAG_id_tag_update(&object->id, OB_RECALC_OB); + DEG_id_tag_update(&object->id, OB_RECALC_OB); } } } @@ -1522,7 +1524,7 @@ static int object_duplicates_make_real_exec(bContext *C, wmOperator *op) } CTX_DATA_END; - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_SCENE, scene); WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL); @@ -1605,7 +1607,7 @@ static Base *duplibase_for_convert(Main *bmain, Scene *scene, SceneLayer *sl, Ba } obn = BKE_object_copy(bmain, ob); - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); BKE_collection_object_add_from(scene, ob, obn); basen = BKE_scene_layer_base_find(sl, obn); @@ -1665,7 +1667,7 @@ static int convert_exec(bContext *C, wmOperator *op) { for (CollectionPointerLink *link = selected_editable_bases.first; link; link = link->next) { Base *base = link->ptr.data; - DAG_id_tag_update(&base->object->id, OB_RECALC_DATA); + DEG_id_tag_update(&base->object->id, OB_RECALC_DATA); } uint64_t customdata_mask_prev = scene->customdata_mask; @@ -1734,7 +1736,7 @@ static int convert_exec(bContext *C, wmOperator *op) } else { newob = ob; - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); } /* make new mesh data from the original copy */ @@ -1800,7 +1802,7 @@ static int convert_exec(bContext *C, wmOperator *op) for (ob1 = bmain->object.first; ob1; ob1 = ob1->id.next) { if (ob1->data == ob->data) { ob1->type = OB_CURVE; - DAG_id_tag_update(&ob1->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob1->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); } } } @@ -1902,7 +1904,7 @@ static int convert_exec(bContext *C, wmOperator *op) } if (!keep_original && (ob->flag & OB_DONE)) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); ((ID *)ob->data)->tag &= ~LIB_TAG_DOIT; /* flag not to convert this datablock again */ } } @@ -1927,7 +1929,7 @@ static int convert_exec(bContext *C, wmOperator *op) } /* delete object should renew depsgraph */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } // XXX ED_object_editmode_enter(C, 0); @@ -1943,7 +1945,7 @@ static int convert_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_OBJECT | ND_DATA, BASACT_NEW->object); } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, scene); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); @@ -1998,7 +2000,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, SceneLayer } else { obn = ID_NEW_SET(ob, BKE_object_copy(bmain, ob)); - DAG_id_tag_update(&obn->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&obn->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); BKE_collection_object_add_from(scene, ob, obn); basen = BKE_scene_layer_base_find(sl, obn); @@ -2120,7 +2122,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, SceneLayer } break; case OB_ARMATURE: - DAG_id_tag_update(&obn->id, OB_RECALC_DATA); + DEG_id_tag_update(&obn->id, OB_RECALC_DATA); if (obn->pose) BKE_pose_tag_recalc(bmain, obn->pose); if (dupflag & USER_DUP_ARM) { @@ -2277,7 +2279,7 @@ static int duplicate_exec(bContext *C, wmOperator *op) ED_object_base_activate(C, basen); if (basen->object->data) { - DAG_id_tag_update(basen->object->data, 0); + DEG_id_tag_update(basen->object->data, 0); } } CTX_DATA_END; @@ -2286,9 +2288,9 @@ static int duplicate_exec(bContext *C, wmOperator *op) BKE_main_id_clear_newpoins(bmain); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(&CTX_data_scene(C)->id, 0); + DEG_id_tag_update(&CTX_data_scene(C)->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); @@ -2369,7 +2371,7 @@ static int add_named_exec(bContext *C, wmOperator *op) BKE_main_id_clear_newpoins(bmain); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT | ND_OB_ACTIVE, scene); diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 92a3850f2f3..e3dd47295fe 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -58,10 +58,11 @@ #include "BKE_cdderivedmesh.h" #include "BKE_modifier.h" #include "BKE_DerivedMesh.h" -#include "BKE_depsgraph.h" #include "BKE_mesh.h" #include "BKE_scene.h" +#include "DEG_depsgraph.h" + #include "RE_pipeline.h" #include "RE_shader_ext.h" #include "RE_multires_bake.h" @@ -688,7 +689,7 @@ static void finish_bake_internal(BakeRender *bkr) } BKE_image_release_ibuf(ima, ibuf, NULL); - DAG_id_tag_update(&ima->id, 0); + DEG_id_tag_update(&ima->id, 0); } } @@ -698,7 +699,7 @@ static void finish_bake_internal(BakeRender *bkr) BLI_assert(BLI_thread_is_main()); for (me = G.main->mesh.first; me; me = me->id.next) { if (me->id.tag & LIB_TAG_DOIT) { - DAG_id_tag_update(&me->id, OB_RECALC_DATA); + DEG_id_tag_update(&me->id, OB_RECALC_DATA); BKE_mesh_tessface_clear(me); } } diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index a4aff5b10f3..990761e233a 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -57,7 +57,6 @@ #include "BKE_modifier.h" #include "BKE_mesh.h" #include "BKE_screen.h" -#include "BKE_depsgraph.h" #include "DEG_depsgraph.h" @@ -275,7 +274,7 @@ static void refresh_images(BakeImages *bake_images) Image *ima = bake_images->data[i].image; if (ima->ok == IMA_OK_LOADED) { GPU_free_image(ima); - DAG_id_tag_update(&ima->id, 0); + DEG_id_tag_update(&ima->id, 0); } } } diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 2437a6bff28..d110400de80 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -53,7 +53,6 @@ #include "BKE_armature.h" #include "BKE_constraint.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_global.h" #include "BKE_main.h" @@ -62,6 +61,9 @@ #include "BKE_tracking.h" #include "BIK_api.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #ifdef WITH_PYTHON #include "BPY_extern.h" #endif @@ -1196,9 +1198,9 @@ void ED_object_constraint_update(Object *ob) object_test_constraints(ob); if (ob->type == OB_ARMATURE) - DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB); else - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } static void object_pose_tag_update(Main *bmain, Object *ob) @@ -1221,7 +1223,7 @@ void ED_object_constraint_dependency_update(Main *bmain, Object *ob) if (ob->pose) { object_pose_tag_update(bmain, ob); } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } void ED_object_constraint_tag_update(Object *ob, bConstraint *con) @@ -1233,9 +1235,9 @@ void ED_object_constraint_tag_update(Object *ob, bConstraint *con) object_test_constraint(ob, con); if (ob->type == OB_ARMATURE) - DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB); else - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } void ED_object_constraint_dependency_tag_update(Main *bmain, Object *ob, bConstraint *con) @@ -1245,7 +1247,7 @@ void ED_object_constraint_dependency_tag_update(Main *bmain, Object *ob, bConstr if (ob->pose) { object_pose_tag_update(bmain, ob); } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } static int constraint_poll(bContext *C) @@ -1269,7 +1271,7 @@ static int constraint_delete_exec(bContext *C, wmOperator *UNUSED(op)) ED_object_constraint_update(ob); /* needed to set the flags on posebones correctly */ /* relatiols */ - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); /* notifiers */ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_REMOVED, ob); @@ -1411,12 +1413,12 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op)) CTX_DATA_END; /* force depsgraph to get recalculated since relationships removed */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); /* note, calling BIK_clear_data() isn't needed here */ /* do updates */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_REMOVED, ob); return OPERATOR_FINISHED; @@ -1443,12 +1445,12 @@ static int object_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op)) CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) { BKE_constraints_free(&ob->constraints); - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } CTX_DATA_END; /* force depsgraph to get recalculated since relationships removed */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); /* do updates */ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_REMOVED, NULL); @@ -1496,13 +1498,13 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op) chan->constflag |= pchan->constflag; BKE_pose_tag_recalc(bmain, ob->pose); - DAG_id_tag_update((ID *)ob, OB_RECALC_DATA); + DEG_id_tag_update((ID *)ob, OB_RECALC_DATA); } } BLI_freelistN(&lb); /* force depsgraph to get recalculated since new relationships added */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, NULL); @@ -1535,13 +1537,13 @@ static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op)) /* if we're not handling the object we're copying from, copy all constraints over */ if (obact != ob) { BKE_constraints_copy(&ob->constraints, &obact->constraints, true); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } } CTX_DATA_END; /* force depsgraph to get recalculated since new relationships added */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); /* notifiers for updates */ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_ADDED, NULL); @@ -1818,7 +1820,7 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase /* force depsgraph to get recalculated since new relationships added */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); if ((ob->type == OB_ARMATURE) && (pchan)) { BKE_pose_tag_recalc(bmain, ob->pose); /* sort pose channels */ @@ -1828,10 +1830,10 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase * XXX Temp hack until new depsgraph hopefully solves this. */ ob->adt->recalc |= ADT_RECALC_ANIM; } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB); } else - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); /* notifiers for updates */ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_ADDED, ob); @@ -2071,7 +2073,7 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op)) CTX_DATA_END; /* refresh depsgraph */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_REMOVED, ob); diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c index 250737a130c..9a89ec453fd 100644 --- a/source/blender/editors/object/object_data_transfer.c +++ b/source/blender/editors/object/object_data_transfer.c @@ -40,13 +40,14 @@ #include "BKE_context.h" #include "BKE_data_transfer.h" -#include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" #include "BKE_mesh_mapping.h" #include "BKE_mesh_remap.h" #include "BKE_object.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -423,7 +424,7 @@ static int data_transfer_exec(bContext *C, wmOperator *op) } } - DAG_id_tag_update(&ob_dst->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_dst->id, OB_RECALC_DATA); if (reverse_transfer) { SWAP(Object *, ob_src, ob_dst); @@ -641,7 +642,7 @@ static int datalayout_transfer_exec(bContext *C, wmOperator *op) BKE_object_data_transfer_layout(scene, ob_src, ob_dst, dtmd->data_types, use_delete, dtmd->layers_select_src, dtmd->layers_select_dst); - DAG_id_tag_update(&ob_dst->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_dst->id, OB_RECALC_DATA); } else { Object *ob_src = ob_act; @@ -672,7 +673,7 @@ static int datalayout_transfer_exec(bContext *C, wmOperator *op) layers_select_src, layers_select_dst); } - DAG_id_tag_update(&ob_dst->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_dst->id, OB_RECALC_DATA); } BLI_freelistN(&ctx_objects); diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index fe232e37886..f9254096290 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -66,7 +66,6 @@ #include "BKE_context.h" #include "BKE_curve.h" #include "BKE_effect.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_image.h" #include "BKE_lattice.h" @@ -85,6 +84,9 @@ #include "BKE_report.h" #include "BKE_workspace.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "ED_armature.h" #include "ED_curve.h" #include "ED_mesh.h" @@ -194,7 +196,7 @@ static bool ED_object_editmode_load_ex(Main *bmain, Object *obedit, const bool f * to inform dependency graph about this. But is it really the * best place to do this? */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { ED_curve_editnurb_load(obedit); @@ -216,7 +218,7 @@ static bool ED_object_editmode_load_ex(Main *bmain, Object *obedit, const bool f /* Tag update so no access to freed data referenced from * derived cache will happen. */ - DAG_id_tag_update((ID *)obedit->data, 0); + DEG_id_tag_update((ID *)obedit->data, 0); return true; } @@ -267,7 +269,7 @@ void ED_object_editmode_exit(bContext *C, int flag) BKE_ptcache_object_reset(scene, obedit, PTCACHE_RESET_OUTDATED); /* also flush ob recalc, doesn't take much overhead, but used for particles */ - DAG_id_tag_update(&obedit->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&obedit->id, OB_RECALC_OB | OB_RECALC_DATA); if (flag & EM_DO_UNDO) ED_undo_push(C, "Editmode"); @@ -358,7 +360,7 @@ void ED_object_editmode_enter(bContext *C, int flag) scene->obedit = ob; ED_armature_to_edit(arm); /* to ensure all goes in restposition and without striding */ - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); /* XXX: should this be OB_RECALC_DATA? */ + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); /* XXX: should this be OB_RECALC_DATA? */ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_ARMATURE, scene); } @@ -392,7 +394,7 @@ void ED_object_editmode_enter(bContext *C, int flag) } if (ok) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } else { scene->obedit = NULL; /* XXX for context */ @@ -684,7 +686,7 @@ static void copy_attr(Main *bmain, Scene *scene, SceneLayer *sl, short event) for (base = FIRSTBASE_NEW; base; base = base->next) { if (base != BASACT_NEW) { if (TESTBASELIB_NEW(base)) { - DAG_id_tag_update(&base->object->id, OB_RECALC_DATA); + DEG_id_tag_update(&base->object->id, OB_RECALC_DATA); if (event == 1) { /* loc */ copy_v3_v3(base->object->loc, ob->loc); @@ -787,7 +789,7 @@ static void copy_attr(Main *bmain, Scene *scene, SceneLayer *sl, short event) BLI_strncpy(cu1->family, cu->family, sizeof(cu1->family)); - DAG_id_tag_update(&base->object->id, OB_RECALC_DATA); + DEG_id_tag_update(&base->object->id, OB_RECALC_DATA); } } else if (event == 19) { /* bevel settings */ @@ -803,7 +805,7 @@ static void copy_attr(Main *bmain, Scene *scene, SceneLayer *sl, short event) cu1->ext1 = cu->ext1; cu1->ext2 = cu->ext2; - DAG_id_tag_update(&base->object->id, OB_RECALC_DATA); + DEG_id_tag_update(&base->object->id, OB_RECALC_DATA); } } else if (event == 25) { /* curve resolution */ @@ -822,7 +824,7 @@ static void copy_attr(Main *bmain, Scene *scene, SceneLayer *sl, short event) nu = nu->next; } - DAG_id_tag_update(&base->object->id, OB_RECALC_DATA); + DEG_id_tag_update(&base->object->id, OB_RECALC_DATA); } } else if (event == 21) { @@ -838,7 +840,7 @@ static void copy_attr(Main *bmain, Scene *scene, SceneLayer *sl, short event) } modifier_copyData(md, tmd); - DAG_id_tag_update(&base->object->id, OB_RECALC_DATA); + DEG_id_tag_update(&base->object->id, OB_RECALC_DATA); } } } @@ -899,7 +901,7 @@ static void copy_attr(Main *bmain, Scene *scene, SceneLayer *sl, short event) } if (do_depgraph_update) - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } static void UNUSED_FUNCTION(copy_attr_menu) (Main *bmain, Scene *scene, SceneLayer *sl) @@ -1255,7 +1257,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) if (ob->type == OB_MESH) { BKE_mesh_smooth_flag_set(ob, !clear); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); done = true; @@ -1268,7 +1270,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) else nu->flag &= ~ME_SMOOTH; } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); done = true; @@ -1366,7 +1368,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene *scene, SceneLayer *sl) else ob->size[1] = ob->size[0] * y / x; done = true; - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); BKE_image_release_ibuf(tex->ima, ibuf, NULL); } diff --git a/source/blender/editors/object/object_facemap_ops.c b/source/blender/editors/object/object_facemap_ops.c index b8666fc7a65..87b59da6c62 100644 --- a/source/blender/editors/object/object_facemap_ops.c +++ b/source/blender/editors/object/object_facemap_ops.c @@ -38,7 +38,7 @@ #include "BKE_object_facemap.h" #include "BKE_object_deform.h" -#include "BKE_depsgraph.h" +#include "DEG_depsgraph.h" #include "BLI_utildefines.h" #include "BLI_path_util.h" @@ -182,7 +182,7 @@ static int face_map_add_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob = ED_object_context(C); BKE_object_facemap_add(ob); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); @@ -211,7 +211,7 @@ static int face_map_remove_exec(bContext *C, wmOperator *UNUSED(op)) if (fmap) { BKE_object_facemap_remove(ob, fmap); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -259,7 +259,7 @@ static int face_map_assign_exec(bContext *C, wmOperator *UNUSED(op)) } } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -308,7 +308,7 @@ static int face_map_remove_from_exec(bContext *C, wmOperator *UNUSED(op)) } } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -362,7 +362,7 @@ static int face_map_select_exec(bContext *C, wmOperator *UNUSED(op)) if (fmap) { fmap_select(ob, true); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -392,7 +392,7 @@ static int face_map_deselect_exec(bContext *C, wmOperator *UNUSED(op)) if (fmap) { fmap_select(ob, false); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -462,7 +462,7 @@ static int face_map_move_exec(bContext *C, wmOperator *op) ob->actfmap = pos2 + 1; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_VERTEX_GROUP, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c index b22b034ecab..9d06624bd9c 100644 --- a/source/blender/editors/object/object_group.c +++ b/source/blender/editors/object/object_group.c @@ -40,7 +40,6 @@ #include "DNA_scene_types.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_group.h" #include "BKE_library.h" #include "BKE_library_remap.h" @@ -48,6 +47,8 @@ #include "BKE_report.h" #include "BKE_object.h" +#include "DEG_depsgraph_build.h" + #include "ED_screen.h" #include "ED_object.h" @@ -166,7 +167,7 @@ static int objects_add_active_exec(bContext *C, wmOperator *op) if (!updated) return OPERATOR_CANCELLED; - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL); return OPERATOR_FINISHED; @@ -230,7 +231,7 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op) if (!ok) BKE_report(op->reports, RPT_ERROR, "Active object contains no groups"); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL); return OPERATOR_FINISHED; @@ -270,7 +271,7 @@ static int group_objects_remove_all_exec(bContext *C, wmOperator *UNUSED(op)) } CTX_DATA_END; - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL); return OPERATOR_FINISHED; @@ -321,7 +322,7 @@ static int group_objects_remove_exec(bContext *C, wmOperator *op) if (!updated) return OPERATOR_CANCELLED; - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL); return OPERATOR_FINISHED; @@ -367,7 +368,7 @@ static int group_create_exec(bContext *C, wmOperator *op) } CTX_DATA_END; - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index abb0172d9ce..fce55689e9a 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -48,7 +48,6 @@ #include "BKE_action.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_layer.h" #include "BKE_main.h" #include "BKE_modifier.h" @@ -58,6 +57,9 @@ #include "BKE_deform.h" #include "BKE_editmesh.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "RNA_define.h" #include "RNA_access.h" #include "RNA_enum_types.h" @@ -319,7 +321,7 @@ static bool object_hook_index_array(Scene *scene, Object *obedit, EDBM_mesh_load(obedit); EDBM_mesh_make(scene->toolsettings, obedit, true); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); em = me->edit_btmesh; @@ -548,7 +550,7 @@ static int add_hook_object(Main *bmain, Scene *scene, SceneLayer *sl, Object *ob /* apparently this call goes from right to left... */ mul_m4_series(hmd->parentinv, pose_mat, ob->imat, obedit->obmat); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); return true; } @@ -658,7 +660,7 @@ static int object_hook_remove_exec(bContext *C, wmOperator *op) BLI_remlink(&ob->modifiers, (ModifierData *)hmd); modifier_free((ModifierData *)hmd); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -732,7 +734,7 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op) BKE_object_modifier_hook_reset(ob, hmd); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -782,7 +784,7 @@ static int object_hook_recenter_exec(bContext *C, wmOperator *op) sub_v3_v3v3(hmd->cent, scene->cursor, ob->obmat[3]); mul_m3_v3(imat, hmd->cent); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -840,7 +842,7 @@ static int object_hook_assign_exec(bContext *C, wmOperator *op) hmd->indexar = indexar; hmd->totindex = tot; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c index 73ce1fae605..4eafe715a6f 100644 --- a/source/blender/editors/object/object_lattice.c +++ b/source/blender/editors/object/object_lattice.c @@ -52,13 +52,14 @@ #include "RNA_enum_types.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_key.h" #include "BKE_lattice.h" #include "BKE_deform.h" #include "BKE_report.h" #include "BKE_utildefines.h" +#include "DEG_depsgraph.h" + #include "ED_lattice.h" #include "ED_object.h" #include "ED_screen.h" @@ -591,7 +592,7 @@ static int make_regular_exec(bContext *C, wmOperator *UNUSED(op)) BKE_lattice_resize(lt, lt->pntsu, lt->pntsv, lt->pntsw, NULL); } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); return OPERATOR_FINISHED; @@ -811,7 +812,7 @@ static int lattice_flip_exec(bContext *C, wmOperator *op) } /* updates */ - DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DEG_id_tag_update(&obedit->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index d614be175f2..85751fd64de 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -54,7 +54,6 @@ #include "BKE_animsys.h" #include "BKE_curve.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_displist.h" #include "BKE_DerivedMesh.h" #include "BKE_effect.h" @@ -75,6 +74,9 @@ #include "BKE_softbody.h" #include "BKE_editmesh.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -171,8 +173,8 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc } } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - DAG_relations_tag_update(bmain); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_relations_tag_update(bmain); return new_md; } @@ -253,7 +255,7 @@ bool ED_object_multires_update_totlevels_cb(Object *ob, void *totlevel_v) for (md = ob->modifiers.first; md; md = md->next) { if (md->type == eModifierType_Multires) { multires_set_tot_level(ob, (MultiresModifierData *)md, totlevel); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } } return false; @@ -320,7 +322,7 @@ static bool object_modifier_remove(Main *bmain, Object *ob, ModifierData *md, ob->mode &= ~OB_MODE_PARTICLE_EDIT; } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); BLI_remlink(&ob->modifiers, md); modifier_free(md); @@ -341,8 +343,8 @@ bool ED_object_modifier_remove(ReportList *reports, Main *bmain, Object *ob, Mod return 0; } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - DAG_relations_tag_update(bmain); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_relations_tag_update(bmain); return 1; } @@ -365,8 +367,8 @@ void ED_object_modifier_clear(Main *bmain, Object *ob) md = next_md; } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - DAG_relations_tag_update(bmain); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_relations_tag_update(bmain); } int ED_object_modifier_move_up(ReportList *reports, Object *ob, ModifierData *md) @@ -515,7 +517,7 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene * } } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); return 1; } @@ -643,7 +645,7 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob, MEM_freeN(vertexCos); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } else { BKE_report(reports, RPT_ERROR, "Cannot apply modifier for this object type"); @@ -924,7 +926,7 @@ static int modifier_move_up_exec(bContext *C, wmOperator *op) if (!md || !ED_object_modifier_move_up(op->reports, ob, md)) return OPERATOR_CANCELLED; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -963,7 +965,7 @@ static int modifier_move_down_exec(bContext *C, wmOperator *op) if (!md || !ED_object_modifier_move_down(op->reports, ob, md)) return OPERATOR_CANCELLED; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1005,7 +1007,7 @@ static int modifier_apply_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1055,7 +1057,7 @@ static int modifier_convert_exec(bContext *C, wmOperator *op) if (!md || !ED_object_modifier_convert(op->reports, bmain, scene, sl, ob, md)) return OPERATOR_CANCELLED; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1094,7 +1096,7 @@ static int modifier_copy_exec(bContext *C, wmOperator *op) if (!md || !ED_object_modifier_copy(op->reports, ob, md)) return OPERATOR_CANCELLED; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1188,7 +1190,7 @@ static int multires_subdivide_exec(bContext *C, wmOperator *op) ED_object_multires_update_totlevels_cb, &mmd->totlvl); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); if (ob->mode & OB_MODE_SCULPT) { @@ -1257,7 +1259,7 @@ static int multires_reshape_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1405,7 +1407,7 @@ static int multires_base_apply_exec(bContext *C, wmOperator *op) multiresModifier_base_apply(mmd, ob); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1511,7 +1513,7 @@ static int skin_root_mark_exec(bContext *C, wmOperator *UNUSED(op)) BLI_gset_free(visited, NULL); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1566,7 +1568,7 @@ static int skin_loose_mark_clear_exec(bContext *C, wmOperator *op) } } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1616,7 +1618,7 @@ static int skin_radii_equalize_exec(bContext *C, wmOperator *UNUSED(op)) } } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1789,8 +1791,8 @@ static int skin_armature_create_exec(bContext *C, wmOperator *op) arm_md->object = arm_ob; arm_md->deformflag = ARM_DEF_VGROUP | ARM_DEF_QUATERNION; - DAG_relations_tag_update(bmain); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); @@ -1857,7 +1859,7 @@ static int correctivesmooth_bind_exec(bContext *C, wmOperator *op) csmd->bind_coords_num = (unsigned int)-1; } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1926,7 +1928,7 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op) mmd->totcagevert = 0; mmd->totinfluence = 0; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); } else { @@ -2000,7 +2002,7 @@ static int explode_refresh_exec(bContext *C, wmOperator *op) emd->flag |= eExplodeFlag_CalcFaces; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -2145,7 +2147,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op) if (free) { omd->refresh |= MOD_OCEAN_REFRESH_CLEAR_CACHE; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; } @@ -2195,7 +2197,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op) scene->r.cfra = cfra; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); #endif @@ -2268,7 +2270,7 @@ static int laplaciandeform_bind_exec(bContext *C, wmOperator *op) else { lmd->flag |= MOD_LAPLACIANDEFORM_BIND; } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; } @@ -2320,7 +2322,7 @@ static int surfacedeform_bind_exec(bContext *C, wmOperator *op) smd->flags |= MOD_SDEF_BIND; } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index f19b5619066..ae3a3866c24 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -67,7 +67,6 @@ #include "BKE_context.h" #include "BKE_constraint.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" #include "BKE_displist.h" #include "BKE_global.h" @@ -94,6 +93,9 @@ #include "BKE_texture.h" #include "BKE_editmesh.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "WM_api.h" #include "WM_types.h" @@ -145,7 +147,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) EDBM_mesh_load(obedit); EDBM_mesh_make(scene->toolsettings, obedit, true); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); em = me->edit_btmesh; @@ -233,7 +235,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) { if (ob != obedit) { - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); par = obedit->parent; if (BKE_object_parent_loop_check(par, ob)) { @@ -266,7 +268,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) } CTX_DATA_END; - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT, NULL); @@ -371,8 +373,8 @@ static int make_proxy_exec(bContext *C, wmOperator *op) BKE_object_make_proxy(newob, ob, gob); /* depsgraph flushes are needed for the new data */ - DAG_relations_tag_update(bmain); - DAG_id_tag_update(&newob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&newob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, newob); } else { @@ -527,7 +529,7 @@ void ED_object_parent_clear(Object *ob, const int type) /* Always clear parentinv matrix for sake of consistency, see T41950. */ unit_m4(ob->parentinv); - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); } /* note, poll should check for editable scene */ @@ -542,7 +544,7 @@ static int parent_clear_exec(bContext *C, wmOperator *op) } CTX_DATA_END; - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); WM_event_add_notifier(C, NC_OBJECT | ND_PARENT, NULL); return OPERATOR_FINISHED; @@ -616,7 +618,7 @@ bool ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object bPoseChannel *pchan = NULL; const bool pararm = ELEM(partype, PAR_ARMATURE, PAR_ARMATURE_NAME, PAR_ARMATURE_ENVELOPE, PAR_ARMATURE_AUTO); - DAG_id_tag_update(&par->id, OB_RECALC_OB); + DEG_id_tag_update(&par->id, OB_RECALC_OB); /* preconditions */ if (partype == PAR_FOLLOW || partype == PAR_PATH_CONST) { @@ -713,7 +715,7 @@ bool ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object ((CurveModifierData *)md)->object = par; } if (par->curve_cache && par->curve_cache->path == NULL) { - DAG_id_tag_update(&par->id, OB_RECALC_DATA); + DEG_id_tag_update(&par->id, OB_RECALC_DATA); } } break; @@ -796,7 +798,7 @@ bool ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object invert_m4_m4(ob->parentinv, workob.obmat); } - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); } } @@ -882,7 +884,7 @@ static int parent_set_exec(bContext *C, wmOperator *op) if (!ok) return OPERATOR_CANCELLED; - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); WM_event_add_notifier(C, NC_OBJECT | ND_PARENT, NULL); @@ -998,7 +1000,7 @@ static int parent_noinv_set_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); Object *par = ED_object_active_context(C); - DAG_id_tag_update(&par->id, OB_RECALC_OB); + DEG_id_tag_update(&par->id, OB_RECALC_OB); /* context iterator */ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) @@ -1013,7 +1015,7 @@ static int parent_noinv_set_exec(bContext *C, wmOperator *op) memset(ob->loc, 0, 3 * sizeof(float)); /* set recalc flags */ - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); /* set parenting type for object - object only... */ ob->parent = par; @@ -1023,7 +1025,7 @@ static int parent_noinv_set_exec(bContext *C, wmOperator *op) } CTX_DATA_END; - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); return OPERATOR_FINISHED; @@ -1058,7 +1060,7 @@ static int object_slow_parent_clear_exec(bContext *C, wmOperator *UNUSED(op)) ob->partype -= PARSLOW; BKE_object_where_is_calc(scene, ob); ob->partype |= PARSLOW; - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } } } @@ -1096,7 +1098,7 @@ static int object_slow_parent_set_exec(bContext *C, wmOperator *UNUSED(op)) if (ob->parent) ob->partype |= PARSLOW; - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } CTX_DATA_END; @@ -1150,7 +1152,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op) /* remove track-object for old track */ ob->track = NULL; - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); /* also remove all tracking constraints */ for (con = ob->constraints.last; con; con = pcon) { @@ -1164,7 +1166,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op) } CTX_DATA_END; - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); return OPERATOR_FINISHED; @@ -1224,7 +1226,7 @@ static int track_set_exec(bContext *C, wmOperator *op) data = con->data; data->tar = obact; - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); /* Lamp, Camera and Speaker track differently by default */ if (ELEM(ob->type, OB_LAMP, OB_CAMERA, OB_SPEAKER)) { @@ -1247,7 +1249,7 @@ static int track_set_exec(bContext *C, wmOperator *op) data = con->data; data->tar = obact; - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); /* Lamp, Camera and Speaker track differently by default */ if (ELEM(ob->type, OB_LAMP, OB_CAMERA, OB_SPEAKER)) { @@ -1271,7 +1273,7 @@ static int track_set_exec(bContext *C, wmOperator *op) data = con->data; data->tar = obact; - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); /* Lamp, Camera and Speaker track differently by default */ if (ELEM(ob->type, OB_LAMP, OB_CAMERA, OB_SPEAKER)) { @@ -1285,7 +1287,7 @@ static int track_set_exec(bContext *C, wmOperator *op) } } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); return OPERATOR_FINISHED; @@ -1447,7 +1449,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) /* if amount of material indices changed: */ test_object_materials(ob_dst, ob_dst->data); - DAG_id_tag_update(&ob_dst->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_dst->id, OB_RECALC_DATA); break; case MAKE_LINKS_MATERIALS: /* new approach, using functions from kernel */ @@ -1455,7 +1457,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) Material *ma = give_current_material(ob_src, a + 1); assign_material(ob_dst, ma, a + 1, BKE_MAT_ASSIGN_USERPREF); /* also works with ma==NULL */ } - DAG_id_tag_update(&ob_dst->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_dst->id, OB_RECALC_DATA); break; case MAKE_LINKS_ANIMDATA: BKE_animdata_copy_id((ID *)ob_dst, (ID *)ob_src, false); @@ -1466,7 +1468,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) } BKE_animdata_copy_id((ID *)ob_dst->data, (ID *)ob_src->data, false); } - DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob_dst->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); break; case MAKE_LINKS_GROUP: { @@ -1495,7 +1497,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) break; case MAKE_LINKS_MODIFIERS: BKE_object_link_modifiers(ob_dst, ob_src); - DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob_dst->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); break; case MAKE_LINKS_FONTS: { @@ -1524,7 +1526,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) cu_dst->vfontbi = cu_src->vfontbi; id_us_plus((ID *)cu_dst->vfontbi); - DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob_dst->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); break; } } @@ -1547,7 +1549,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_WARNING, "Skipped editing library object data"); } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C)); WM_event_add_notifier(C, NC_ANIMATION | ND_NLA_ACTCHANGE, CTX_wm_view3d(C)); WM_event_add_notifier(C, NC_OBJECT, NULL); @@ -1781,7 +1783,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, SceneLayer *sl, const id = ob->data; if (id && id->us > 1 && !ID_IS_LINKED_DATABLOCK(id)) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); switch (ob->type) { case OB_LAMP: @@ -1819,7 +1821,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, SceneLayer *sl, const BKE_animdata_copy_id_action((ID *)lat->key, false); break; case OB_ARMATURE: - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); ob->data = ID_NEW_SET(ob->data, BKE_armature_copy(bmain, ob->data)); BKE_pose_rebuild(ob, ob->data); break; @@ -1856,7 +1858,7 @@ static void single_object_action_users(Scene *scene, SceneLayer *sl, const int f { FOREACH_OBJECT_FLAG(scene, sl, flag, ob) if (!ID_IS_LINKED_DATABLOCK(ob)) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); BKE_animdata_copy_id_action(&ob->id, false); } FOREACH_OBJECT_FLAG_END @@ -2048,7 +2050,7 @@ void ED_object_single_users(Main *bmain, Scene *scene, const bool full, const bo } } BKE_main_id_clear_newpoins(bmain); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } /******************************* Make Local ***********************************/ @@ -2148,7 +2150,7 @@ static bool make_local_all__instance_indirect_unused(Main *bmain, Scene *scene, base = BKE_scene_layer_base_find(sl, ob); base->flag |= BASE_SELECTED; BKE_scene_object_base_flag_sync_from_base(base); - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); changed = true; } @@ -2355,7 +2357,7 @@ static int make_single_user_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_WINDOW, NULL); if (update_deps) { - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } return OPERATOR_FINISHED; @@ -2405,7 +2407,7 @@ static int drop_named_material_invoke(bContext *C, wmOperator *op, const wmEvent assign_material(base->object, ma, 1, BKE_MAT_ASSIGN_USERPREF); - DAG_id_tag_update(&base->object->id, OB_RECALC_OB); + DEG_id_tag_update(&base->object->id, OB_RECALC_OB); WM_event_add_notifier(C, NC_OBJECT | ND_OB_SHADING, base->object); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C)); diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c index e04114761e4..b7c0a2679bc 100644 --- a/source/blender/editors/object/object_shapekey.c +++ b/source/blender/editors/object/object_shapekey.c @@ -51,7 +51,6 @@ #include "DNA_object_types.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_key.h" #include "BKE_library.h" #include "BKE_main.h" @@ -59,6 +58,9 @@ #include "BKE_lattice.h" #include "BKE_curve.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "BLI_sys_types.h" // for intptr_t support #include "ED_object.h" @@ -213,7 +215,7 @@ static bool object_shape_key_mirror(bContext *C, Object *ob, *r_totmirr = totmirr; *r_totfail = totfail; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); return 1; @@ -264,8 +266,8 @@ static int shape_key_add_exec(bContext *C, wmOperator *op) ED_object_shape_key_add(C, ob, from_mix); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_relations_tag_update(CTX_data_main(C)); return OPERATOR_FINISHED; } @@ -302,8 +304,8 @@ static int shape_key_remove_exec(bContext *C, wmOperator *op) } if (changed) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_relations_tag_update(CTX_data_main(C)); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); return OPERATOR_FINISHED; @@ -343,7 +345,7 @@ static int shape_key_clear_exec(bContext *C, wmOperator *UNUSED(op)) for (kb = key->block.first; kb; kb = kb->next) kb->curval = 0.0f; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); return OPERATOR_FINISHED; @@ -378,7 +380,7 @@ static int shape_key_retime_exec(bContext *C, wmOperator *UNUSED(op)) for (kb = key->block.first; kb; kb = kb->next) kb->pos = (cfra += 0.1f); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); return OPERATOR_FINISHED; @@ -469,7 +471,7 @@ static int shape_key_move_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 4d7d7df0d2f..8733b3c1b06 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -46,7 +46,6 @@ #include "BKE_context.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_main.h" #include "BKE_idcode.h" #include "BKE_mball.h" @@ -59,6 +58,8 @@ #include "BKE_lattice.h" #include "BKE_tracking.h" +#include "DEG_depsgraph.h" + #include "RNA_define.h" #include "RNA_access.h" @@ -265,7 +266,7 @@ static int object_clear_transform_generic_exec(bContext *C, wmOperator *op, ED_autokeyframe_object(C, scene, ob, ks); /* tag for updates */ - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } } CTX_DATA_END; @@ -371,7 +372,7 @@ static int object_origin_clear_exec(bContext *C, wmOperator *UNUSED(op)) mul_m3_v3(mat, v3); } - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } CTX_DATA_END; @@ -617,7 +618,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, bool apply_l ignore_parent_tx(bmain, scene, ob); - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); changed = true; } @@ -644,7 +645,7 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op)) BKE_object_where_is_calc(scene, ob); /* update for any children that may get moved */ - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); changed = true; } @@ -784,7 +785,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) EDBM_mesh_normals_update(em); tot_change++; - DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DEG_id_tag_update(&obedit->id, OB_RECALC_DATA); } } @@ -898,7 +899,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) if (obedit) { if (centermode == GEOMETRY_TO_ORIGIN) { - DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DEG_id_tag_update(&obedit->id, OB_RECALC_DATA); } break; } @@ -976,7 +977,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) if (obedit) { if (centermode == GEOMETRY_TO_ORIGIN) { - DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DEG_id_tag_update(&obedit->id, OB_RECALC_DATA); } break; } @@ -1034,7 +1035,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) (ob->transflag | ob_other->transflag) & OB_DUPLIGROUP))) { ob_other->flag |= OB_DONE; - DAG_id_tag_update(&ob_other->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&ob_other->id, OB_RECALC_OB | OB_RECALC_DATA); mul_v3_mat3_m4v3(centn, ob_other->obmat, cent); /* omit translation part */ add_v3_v3(ob_other->loc, centn); @@ -1054,7 +1055,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) for (tob = bmain->object.first; tob; tob = tob->id.next) if (tob->data && (((ID *)tob->data)->tag & LIB_TAG_DOIT)) - DAG_id_tag_update(&tob->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&tob->id, OB_RECALC_OB | OB_RECALC_DATA); if (tot_change) { WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index d93275a353e..51723ac14d3 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -56,7 +56,6 @@ #include "BKE_context.h" #include "BKE_customdata.h" #include "BKE_deform.h" -#include "BKE_depsgraph.h" #include "BKE_mesh_mapping.h" #include "BKE_editmesh.h" #include "BKE_layer.h" @@ -67,6 +66,8 @@ #include "BKE_object.h" #include "BKE_lattice.h" +#include "DEG_depsgraph.h" + #include "DNA_armature_types.h" #include "RNA_access.h" #include "RNA_define.h" @@ -2582,7 +2583,7 @@ static int vertex_group_add_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob = ED_object_context(C); BKE_object_defgroup_add(ob); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_VERTEX_GROUP, ob->data); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); @@ -2615,7 +2616,7 @@ static int vertex_group_remove_exec(bContext *C, wmOperator *op) else vgroup_delete_active(ob); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_VERTEX_GROUP, ob->data); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); @@ -2650,7 +2651,7 @@ static int vertex_group_assign_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob = ED_object_context(C); vgroup_assign_verts(ob, ts->vgroup_weight); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); return OPERATOR_FINISHED; @@ -2723,7 +2724,7 @@ static int vertex_group_remove_from_exec(bContext *C, wmOperator *op) } } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); return OPERATOR_FINISHED; @@ -2812,7 +2813,7 @@ static int vertex_group_copy_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob = ED_object_context(C); vgroup_duplicate(ob); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM | ND_VERTEX_GROUP, ob->data); @@ -2848,7 +2849,7 @@ static int vertex_group_levels_exec(bContext *C, wmOperator *op) vgroup_levels_subset(ob, vgroup_validmap, vgroup_tot, subset_count, offset, gain); MEM_freeN((void *)vgroup_validmap); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -2882,7 +2883,7 @@ static int vertex_group_normalize_exec(bContext *C, wmOperator *UNUSED(op)) changed = vgroup_normalize(ob); if (changed) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -2921,7 +2922,7 @@ static int vertex_group_normalize_all_exec(bContext *C, wmOperator *op) MEM_freeN((void *)vgroup_validmap); if (changed) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -2976,7 +2977,7 @@ static int vertex_group_fix_exec(bContext *C, wmOperator *op) } vgroup_fix(scene, ob, distToBe, strength, cp); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3048,7 +3049,7 @@ static int vertex_group_invert_exec(bContext *C, wmOperator *op) vgroup_invert_subset(ob, vgroup_validmap, vgroup_tot, subset_count, auto_assign, auto_remove); MEM_freeN((void *)vgroup_validmap); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3091,7 +3092,7 @@ static int vertex_group_smooth_exec(bContext *C, wmOperator *op) vgroup_smooth_subset(ob, vgroup_validmap, vgroup_tot, subset_count, fac, repeat, fac_expand, source); MEM_freeN((void *)vgroup_validmap); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3141,7 +3142,7 @@ static int vertex_group_clean_exec(bContext *C, wmOperator *op) vgroup_clean_subset(ob, vgroup_validmap, vgroup_tot, subset_count, limit, keep_single); MEM_freeN((void *)vgroup_validmap); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3182,7 +3183,7 @@ static int vertex_group_quantize_exec(bContext *C, wmOperator *op) vgroup_quantize_subset(ob, vgroup_validmap, vgroup_tot, subset_count, steps); MEM_freeN((void *)vgroup_validmap); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3223,7 +3224,7 @@ static int vertex_group_limit_total_exec(bContext *C, wmOperator *op) BKE_reportf(op->reports, remove_tot ? RPT_INFO : RPT_WARNING, "%d vertex weights limited", remove_tot); if (remove_tot) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3268,7 +3269,7 @@ static int vertex_group_mirror_exec(bContext *C, wmOperator *op) ED_mesh_report_mirror(op, totmirr, totfail); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3312,7 +3313,7 @@ static int vertex_group_copy_to_linked_exec(bContext *C, wmOperator *UNUSED(op)) BLI_duplicatelist(&ob_iter->defbase, &ob_active->defbase); ob_iter->actdef = ob_active->actdef; - DAG_id_tag_update(&ob_iter->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_iter->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob_iter); WM_event_add_notifier(C, NC_GEOM | ND_VERTEX_GROUP, ob_iter->data); @@ -3350,7 +3351,7 @@ static int vertex_group_copy_to_selected_exec(bContext *C, wmOperator *op) { if (obact != ob) { if (ED_vgroup_array_copy(ob, obact)) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_VERTEX_GROUP, ob); changed_tot++; } @@ -3393,7 +3394,7 @@ static int set_active_group_exec(bContext *C, wmOperator *op) BLI_assert(nr + 1 >= 0); ob->actdef = nr + 1; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_VERTEX_GROUP, ob); return OPERATOR_FINISHED; @@ -3607,7 +3608,7 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op) ret = vgroup_do_remap(ob, name_array, op); if (ret != OPERATOR_CANCELLED) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_VERTEX_GROUP, ob); } @@ -3657,7 +3658,7 @@ static int vgroup_move_exec(bContext *C, wmOperator *op) ret = vgroup_do_remap(ob, name_array, op); if (ret != OPERATOR_CANCELLED) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_VERTEX_GROUP, ob); } } @@ -3786,7 +3787,7 @@ static int vertex_weight_paste_exec(bContext *C, wmOperator *op) vgroup_copy_active_to_sel_single(ob, def_nr); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); return OPERATOR_FINISHED; @@ -3823,7 +3824,7 @@ static int vertex_weight_delete_exec(bContext *C, wmOperator *op) vgroup_remove_weight(ob, def_nr); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); return OPERATOR_FINISHED; @@ -3856,7 +3857,7 @@ static int vertex_weight_set_active_exec(bContext *C, wmOperator *op) if (wg_index != -1) { ob->actdef = wg_index + 1; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -3893,7 +3894,7 @@ static int vertex_weight_normalize_active_vertex_exec(bContext *C, wmOperator *U changed = vgroup_normalize_active_vertex(ob, subset_type); if (changed) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); return OPERATOR_FINISHED; @@ -3926,7 +3927,7 @@ static int vertex_weight_copy_exec(bContext *C, wmOperator *UNUSED(op)) vgroup_copy_active_to_sel(ob, subset_type); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt index 898422dac51..3cecdccd758 100644 --- a/source/blender/editors/physics/CMakeLists.txt +++ b/source/blender/editors/physics/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index af2dc31e34f..a5e78e116c6 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -42,7 +42,6 @@ #include "BKE_context.h" #include "BKE_deform.h" #include "BKE_object_deform.h" -#include "BKE_depsgraph.h" #include "BKE_dynamicpaint.h" #include "BKE_global.h" #include "BKE_main.h" @@ -50,6 +49,9 @@ #include "BKE_report.h" #include "BKE_screen.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "ED_mesh.h" #include "ED_screen.h" #include "ED_object.h" @@ -135,7 +137,7 @@ static int surface_slot_remove_exec(bContext *C, wmOperator *UNUSED(op)) } dynamicPaint_resetPreview(canvas); - DAG_id_tag_update(&obj_ctx->id, OB_RECALC_DATA); + DEG_id_tag_update(&obj_ctx->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, obj_ctx); return OPERATOR_FINISHED; @@ -181,8 +183,8 @@ static int type_toggle_exec(bContext *C, wmOperator *op) } /* update dependency */ - DAG_id_tag_update(&cObject->id, OB_RECALC_DATA); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_id_tag_update(&cObject->id, OB_RECALC_DATA); + DEG_relations_tag_update(CTX_data_main(C)); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, cObject); return OPERATOR_FINISHED; diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c index 14b12497c4a..681ac75e847 100644 --- a/source/blender/editors/physics/particle_boids.c +++ b/source/blender/editors/physics/particle_boids.c @@ -39,10 +39,12 @@ #include "BKE_boids.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_main.h" #include "BKE_particle.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "RNA_access.h" #include "RNA_enum_types.h" #include "RNA_define.h" @@ -75,7 +77,7 @@ static int rule_add_exec(bContext *C, wmOperator *op) BLI_addtail(&state->rules, rule); - DAG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); + DEG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); return OPERATOR_FINISHED; } @@ -121,8 +123,8 @@ static int rule_del_exec(bContext *C, wmOperator *UNUSED(op)) if (rule) rule->flag |= BOIDRULE_CURRENT; - DAG_relations_tag_update(bmain); - DAG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); return OPERATOR_FINISHED; } @@ -158,7 +160,7 @@ static int rule_move_up_exec(bContext *C, wmOperator *UNUSED(op)) BLI_remlink(&state->rules, rule); BLI_insertlinkbefore(&state->rules, rule->prev, rule); - DAG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); + DEG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); break; } } @@ -194,7 +196,7 @@ static int rule_move_down_exec(bContext *C, wmOperator *UNUSED(op)) BLI_remlink(&state->rules, rule); BLI_insertlinkafter(&state->rules, rule->next, rule); - DAG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); + DEG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); break; } } @@ -277,8 +279,8 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op)) state->flag |= BOIDSTATE_CURRENT; - DAG_relations_tag_update(bmain); - DAG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); return OPERATOR_FINISHED; } @@ -349,7 +351,7 @@ static int state_move_down_exec(bContext *C, wmOperator *UNUSED(op)) if (state->flag & BOIDSTATE_CURRENT && state->next) { BLI_remlink(&boids->states, state); BLI_insertlinkafter(&boids->states, state->next, state); - DAG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); + DEG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); break; } } diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index a77a7d271d9..27ea7e09fd6 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -53,7 +53,6 @@ #include "BLI_utildefines.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" #include "BKE_global.h" #include "BKE_object.h" @@ -64,6 +63,8 @@ #include "BKE_bvhutils.h" #include "BKE_pointcache.h" +#include "DEG_depsgraph.h" + #include "BIF_gl.h" #include "ED_object.h" @@ -2619,7 +2620,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op) BKE_reportf(op->reports, RPT_INFO, "Removed %d double particles", totremoved); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); return OPERATOR_FINISHED; @@ -2672,7 +2673,7 @@ static int weight_set_exec(bContext *C, wmOperator *op) } } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); return OPERATOR_FINISHED; @@ -2781,7 +2782,7 @@ static int delete_exec(bContext *C, wmOperator *op) recalc_lengths(data.edit); } - DAG_id_tag_update(&data.ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&data.ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, data.ob); return OPERATOR_FINISHED; @@ -2967,7 +2968,7 @@ static int mirror_exec(bContext *C, wmOperator *UNUSED(op)) update_world_cos(ob, edit); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -3976,7 +3977,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) update_world_cos(ob, edit); psys_free_path_cache(NULL, edit); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } else PE_update_object(scene, sl, ob, 1); @@ -3986,7 +3987,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); } else { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); } @@ -4237,7 +4238,7 @@ static int shape_cut_exec(bContext *C, wmOperator *UNUSED(op)) if (removed) { update_world_cos(ob, edit); psys_free_path_cache(NULL, edit); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } else PE_update_object(scene, sl, ob, 1); @@ -4246,7 +4247,7 @@ static int shape_cut_exec(bContext *C, wmOperator *UNUSED(op)) WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); } else { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); } @@ -4487,7 +4488,7 @@ void PE_undo_step(Scene *scene, SceneLayer *sl, int step) } } - DAG_id_tag_update(&OBACT_NEW->id, OB_RECALC_DATA); + DEG_id_tag_update(&OBACT_NEW->id, OB_RECALC_DATA); } bool PE_undo_is_valid(Scene *scene, SceneLayer *sl) @@ -4761,7 +4762,7 @@ static int particle_edit_toggle_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL); } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -4802,7 +4803,7 @@ static int clear_edited_exec(bContext *C, wmOperator *UNUSED(op)) psys_reset(psys, PSYS_RESET_DEPSGRAPH); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } } else { /* some operation might have protected hair from editing so let's clear the flag */ @@ -4810,7 +4811,7 @@ static int clear_edited_exec(bContext *C, wmOperator *UNUSED(op)) psys->flag &= ~PSYS_GLOBAL_HAIR; psys->flag &= ~PSYS_EDITED; WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -4926,7 +4927,7 @@ static int unify_length_exec(bContext *C, wmOperator *UNUSED(op)) WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); } else { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); } diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 782e0253267..cd7bb8640b5 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -43,7 +43,6 @@ #include "BLI_string.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" #include "BKE_cdderivedmesh.h" #include "BKE_global.h" @@ -55,6 +54,9 @@ #include "BKE_pointcache.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -209,8 +211,8 @@ static int new_particle_settings_exec(bContext *C, wmOperator *UNUSED(op)) psys_check_boid_data(psys); - DAG_relations_tag_update(bmain); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); @@ -257,8 +259,8 @@ static int new_particle_target_exec(bContext *C, wmOperator *UNUSED(op)) BLI_addtail(&psys->targets, pt); - DAG_relations_tag_update(bmain); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); @@ -305,8 +307,8 @@ static int remove_particle_target_exec(bContext *C, wmOperator *UNUSED(op)) if (pt) pt->flag |= PTARGET_CURRENT; - DAG_relations_tag_update(bmain); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); @@ -345,7 +347,7 @@ static int target_move_up_exec(bContext *C, wmOperator *UNUSED(op)) BLI_remlink(&psys->targets, pt); BLI_insertlinkbefore(&psys->targets, pt->prev, pt); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); break; } @@ -383,7 +385,7 @@ static int target_move_down_exec(bContext *C, wmOperator *UNUSED(op)) BLI_remlink(&psys->targets, pt); BLI_insertlinkafter(&psys->targets, pt->next, pt); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); break; } @@ -636,7 +638,7 @@ static int disconnect_hair_exec(bContext *C, wmOperator *op) disconnect_hair(scene, sl, ob, psys); } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); return OPERATOR_FINISHED; @@ -891,7 +893,7 @@ static int connect_hair_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); return OPERATOR_FINISHED; @@ -1126,7 +1128,7 @@ static bool copy_particle_systems_to_object(Main *bmain, #undef PSYS_FROM_FIRST #undef PSYS_FROM_NEXT - DAG_id_tag_update(&ob_to->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_to->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, ob_to); return true; } diff --git a/source/blender/editors/physics/rigidbody_constraint.c b/source/blender/editors/physics/rigidbody_constraint.c index fb75e27131b..d93eb95243e 100644 --- a/source/blender/editors/physics/rigidbody_constraint.c +++ b/source/blender/editors/physics/rigidbody_constraint.c @@ -38,13 +38,15 @@ #include "DNA_scene_types.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_group.h" #include "BKE_main.h" #include "BKE_report.h" #include "BKE_rigidbody.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -91,8 +93,8 @@ bool ED_rigidbody_constraint_add(Main *bmain, Scene *scene, Object *ob, int type /* add constraint to rigid body constraint group */ BKE_group_object_add(rbw->constraints, ob); - DAG_relations_tag_update(bmain); - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); return true; } @@ -104,8 +106,8 @@ void ED_rigidbody_constraint_remove(Main *bmain, Scene *scene, Object *ob) if (rbw) BKE_group_object_unlink(rbw->constraints, ob); - DAG_relations_tag_update(bmain); - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } /* ********************************************** */ diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c index c9e32fa5194..cf9dc8ff2a3 100644 --- a/source/blender/editors/physics/rigidbody_object.c +++ b/source/blender/editors/physics/rigidbody_object.c @@ -43,13 +43,15 @@ #include "BLT_translation.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_group.h" #include "BKE_main.h" #include "BKE_report.h" #include "BKE_rigidbody.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -121,8 +123,8 @@ bool ED_rigidbody_object_add(Main *bmain, Scene *scene, Object *ob, int type, Re /* add object to rigid body group */ BKE_group_object_add(rbw->group, ob); - DAG_relations_tag_update(bmain); - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); return true; } @@ -135,8 +137,8 @@ void ED_rigidbody_object_remove(Main *bmain, Scene *scene, Object *ob) if (rbw) BKE_group_object_unlink(rbw->group, ob); - DAG_relations_tag_update(bmain); - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } /* ********************************************** */ @@ -345,7 +347,7 @@ static int rigidbody_objects_shape_change_exec(bContext *C, wmOperator *op) RNA_pointer_create(&ob->id, &RNA_RigidBodyObject, ob->rigidbody_object, &ptr); RNA_enum_set(&ptr, "collision_shape", shape); - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); changed = true; } @@ -527,7 +529,7 @@ static int rigidbody_objects_calc_mass_exec(bContext *C, wmOperator *op) RNA_pointer_create(&ob->id, &RNA_RigidBodyObject, ob->rigidbody_object, &ptr); RNA_float_set(&ptr, "mass", mass); - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); changed = true; } diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index bdfbac3dba7..193fac63050 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -54,7 +54,6 @@ #include "BKE_camera.h" #include "BKE_context.h" #include "BKE_colortools.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_image.h" #include "BKE_library.h" @@ -66,6 +65,8 @@ #include "BKE_screen.h" #include "BKE_scene.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" #include "WM_types.h" @@ -722,7 +723,7 @@ static void render_endjob(void *rjv) scene->lay_updated = 0; } - DAG_on_visible_update(G.main, false); + DEG_on_visible_update(G.main, false); } } diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 1caec1cca2c..ae938c3fa30 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -64,7 +64,6 @@ #include "BKE_brush.h" #include "BKE_context.h" #include "BKE_colortools.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_idprop.h" #include "BKE_image.h" @@ -80,6 +79,7 @@ #include "BKE_texture.h" #include "BKE_world.h" +#include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" #include "IMB_imbuf.h" @@ -587,7 +587,7 @@ static Scene *preview_prepare_scene(Main *bmain, Scene *scene, ID *id, int id_ty } /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(&sce->id, 0); + DEG_id_tag_update(&sce->id, 0); DEG_relations_tag_update(pr_main); BKE_scene_update_tagged(pr_main->eval_ctx, pr_main, sce); diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index e031e9a641c..5da3da98e6d 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -50,7 +50,6 @@ #include "BKE_animsys.h" #include "BKE_context.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_font.h" #include "BKE_global.h" #include "BKE_image.h" @@ -66,7 +65,8 @@ #include "BKE_world.h" #include "BKE_editmesh.h" - +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" #ifdef WITH_FREESTYLE # include "BKE_freestyle.h" @@ -154,7 +154,7 @@ static int material_slot_remove_exec(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, NULL); } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); WM_event_add_notifier(C, NC_OBJECT | ND_OB_SHADING, ob); WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING_PREVIEW, ob); @@ -220,7 +220,7 @@ static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op)) } } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); return OPERATOR_FINISHED; @@ -360,7 +360,7 @@ static int material_slot_copy_exec(bContext *C, wmOperator *UNUSED(op)) if (ob_iter->totcol == ob->totcol) { ob_iter->actcol = ob->actcol; - DAG_id_tag_update(&ob_iter->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_iter->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob_iter); } } @@ -425,7 +425,7 @@ static int material_slot_move_exec(bContext *C, wmOperator *op) MEM_freeN(slot_remap); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW | ND_DATA, ob); return OPERATOR_FINISHED; @@ -630,8 +630,8 @@ static int render_layer_add_exec(bContext *C, wmOperator *UNUSED(op)) BKE_scene_layer_add(scene, NULL); scene->active_layer = BLI_listbase_count(&scene->render_layers) - 1; - DAG_id_tag_update(&scene->id, 0); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_id_tag_update(&scene->id, 0); + DEG_relations_tag_update(CTX_data_main(C)); WM_event_add_notifier(C, NC_SCENE | ND_LAYER, scene); return OPERATOR_FINISHED; @@ -660,8 +660,8 @@ static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_CANCELLED; } - DAG_id_tag_update(&scene->id, 0); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_id_tag_update(&scene->id, 0); + DEG_relations_tag_update(CTX_data_main(C)); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; @@ -804,7 +804,7 @@ static int freestyle_module_remove_exec(bContext *C, wmOperator *UNUSED(op)) BKE_freestyle_module_delete(&srl->freestyleConfig, module); - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; @@ -834,7 +834,7 @@ static int freestyle_module_move_exec(bContext *C, wmOperator *op) int dir = RNA_enum_get(op->ptr, "direction"); if (BKE_freestyle_module_move(&srl->freestyleConfig, module, dir)) { - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); } @@ -874,7 +874,7 @@ static int freestyle_lineset_add_exec(bContext *C, wmOperator *UNUSED(op)) BKE_freestyle_lineset_add(bmain, &srl->freestyleConfig, NULL); - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; @@ -938,7 +938,7 @@ static int freestyle_lineset_paste_exec(bContext *C, wmOperator *UNUSED(op)) FRS_paste_active_lineset(&srl->freestyleConfig); - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; @@ -966,7 +966,7 @@ static int freestyle_lineset_remove_exec(bContext *C, wmOperator *UNUSED(op)) FRS_delete_active_lineset(&srl->freestyleConfig); - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; @@ -994,7 +994,7 @@ static int freestyle_lineset_move_exec(bContext *C, wmOperator *op) int dir = RNA_enum_get(op->ptr, "direction"); if (FRS_move_active_lineset(&srl->freestyleConfig, dir)) { - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); } @@ -1044,7 +1044,7 @@ static int freestyle_linestyle_new_exec(bContext *C, wmOperator *op) else { lineset->linestyle = BKE_linestyle_new(bmain, "LineStyle"); } - DAG_id_tag_update(&lineset->linestyle->id, 0); + DEG_id_tag_update(&lineset->linestyle->id, 0); WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; @@ -1080,7 +1080,7 @@ static int freestyle_color_modifier_add_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "Unknown line color modifier type"); return OPERATOR_CANCELLED; } - DAG_id_tag_update(&lineset->linestyle->id, 0); + DEG_id_tag_update(&lineset->linestyle->id, 0); WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; @@ -1120,7 +1120,7 @@ static int freestyle_alpha_modifier_add_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "Unknown alpha transparency modifier type"); return OPERATOR_CANCELLED; } - DAG_id_tag_update(&lineset->linestyle->id, 0); + DEG_id_tag_update(&lineset->linestyle->id, 0); WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; @@ -1160,7 +1160,7 @@ static int freestyle_thickness_modifier_add_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "Unknown line thickness modifier type"); return OPERATOR_CANCELLED; } - DAG_id_tag_update(&lineset->linestyle->id, 0); + DEG_id_tag_update(&lineset->linestyle->id, 0); WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; @@ -1200,7 +1200,7 @@ static int freestyle_geometry_modifier_add_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "Unknown stroke geometry modifier type"); return OPERATOR_CANCELLED; } - DAG_id_tag_update(&lineset->linestyle->id, 0); + DEG_id_tag_update(&lineset->linestyle->id, 0); WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; @@ -1267,7 +1267,7 @@ static int freestyle_modifier_remove_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier"); return OPERATOR_CANCELLED; } - DAG_id_tag_update(&lineset->linestyle->id, 0); + DEG_id_tag_update(&lineset->linestyle->id, 0); WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; @@ -1317,7 +1317,7 @@ static int freestyle_modifier_copy_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "The object the data pointer refers to is not a valid modifier"); return OPERATOR_CANCELLED; } - DAG_id_tag_update(&lineset->linestyle->id, 0); + DEG_id_tag_update(&lineset->linestyle->id, 0); WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); return OPERATOR_FINISHED; @@ -1371,7 +1371,7 @@ static int freestyle_modifier_move_exec(bContext *C, wmOperator *op) } if (changed) { - DAG_id_tag_update(&lineset->linestyle->id, 0); + DEG_id_tag_update(&lineset->linestyle->id, 0); WM_event_add_notifier(C, NC_LINESTYLE, lineset->linestyle); } @@ -1492,7 +1492,7 @@ static int texture_slot_move_exec(bContext *C, wmOperator *op) } } - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); WM_event_add_notifier(C, NC_TEXTURE, CTX_data_scene(C)); } diff --git a/source/blender/editors/scene/CMakeLists.txt b/source/blender/editors/scene/CMakeLists.txt index 72199ca5c1f..9fbebbc58cc 100644 --- a/source/blender/editors/scene/CMakeLists.txt +++ b/source/blender/editors/scene/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../makesdna ../../makesrna ../../windowmanager diff --git a/source/blender/editors/scene/scene_edit.c b/source/blender/editors/scene/scene_edit.c index 6956793435c..776e96bac2c 100644 --- a/source/blender/editors/scene/scene_edit.c +++ b/source/blender/editors/scene/scene_edit.c @@ -25,13 +25,14 @@ #include #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_library_remap.h" #include "BKE_main.h" #include "BKE_scene.h" #include "BKE_workspace.h" +#include "DEG_depsgraph.h" + #include "BLI_compiler_attrs.h" #include "BLI_listbase.h" @@ -117,7 +118,7 @@ void ED_scene_changed_update(Main *bmain, bContext *C, Scene *scene_new, const b CTX_data_scene_set(C, scene_new); BKE_workspace_render_layer_set(CTX_wm_workspace(C), layer_new); BKE_scene_set_background(bmain, scene_new); - DAG_on_visible_update(bmain, false); + DEG_on_visible_update(bmain, false); ED_screen_update_after_scene_change(active_screen, scene_new); ED_render_engine_changed(bmain); diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 65b783463a9..a33019ce621 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -41,7 +41,6 @@ #include "BLI_utildefines.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_icons.h" #include "BKE_image.h" #include "BKE_global.h" diff --git a/source/blender/editors/sculpt_paint/CMakeLists.txt b/source/blender/editors/sculpt_paint/CMakeLists.txt index 46753df4e13..ead420b1faa 100644 --- a/source/blender/editors/sculpt_paint/CMakeLists.txt +++ b/source/blender/editors/sculpt_paint/CMakeLists.txt @@ -25,6 +25,7 @@ set(INC ../../blenlib ../../blentranslation ../../bmesh + ../../depsgraph ../../gpu ../../imbuf ../../makesdna diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 64bd866c0db..f31b5984c61 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -51,7 +51,6 @@ #include "DNA_object_types.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" #include "BKE_brush.h" #include "BKE_image.h" @@ -61,6 +60,8 @@ #include "BKE_paint.h" #include "BKE_texture.h" +#include "DEG_depsgraph.h" + #include "UI_interface.h" #include "UI_view2d.h" @@ -372,7 +373,7 @@ void ED_image_undo_restore(bContext *C, ListBase *lb) ibuf->userflags |= IB_MIPMAP_INVALID; /* force mipmap recreatiom */ ibuf->userflags |= IB_DISPLAY_BUFFER_INVALID; - DAG_id_tag_update(&ima->id, 0); + DEG_id_tag_update(&ima->id, 0); BKE_image_release_ibuf(ima, ibuf, NULL); } @@ -1520,7 +1521,7 @@ void ED_imapaint_bucket_fill(struct bContext *C, float color[3], wmOperator *op) ED_undo_paint_push_end(UNDO_PAINT_IMAGE); - DAG_id_tag_update(&ima->id, 0); + DEG_id_tag_update(&ima->id, 0); } diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index 4f93c12385d..eb6eebf3c54 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -45,13 +45,14 @@ #include "BLI_task.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_brush.h" #include "BKE_image.h" #include "BKE_paint.h" #include "BKE_report.h" #include "BKE_texture.h" +#include "DEG_depsgraph.h" + #include "ED_paint.h" #include "ED_screen.h" @@ -1355,7 +1356,7 @@ void paint_2d_redraw(const bContext *C, void *ps, bool final) /* compositor listener deals with updating */ WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, s->image); - DAG_id_tag_update(&s->image->id, 0); + DEG_id_tag_update(&s->image->id, 0); } else { if (!s->sima || !s->sima->lock) diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index e743607b75b..d47c96bf22c 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -64,7 +64,6 @@ #include "BKE_camera.h" #include "BKE_context.h" #include "BKE_colortools.h" -#include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" #include "BKE_idprop.h" #include "BKE_brush.h" @@ -80,6 +79,8 @@ #include "BKE_scene.h" #include "BKE_texture.h" +#include "DEG_depsgraph.h" + #include "UI_interface.h" #include "ED_mesh.h" @@ -3934,7 +3935,7 @@ static void project_paint_end(ProjPaintState *ps) ProjPaintImage *projIma; for (a = 0, projIma = ps->projImages; a < ps->image_tot; a++, projIma++) { BKE_image_release_ibuf(projIma->ima, projIma->ibuf, NULL); - DAG_id_tag_update(&projIma->ima->id, 0); + DEG_id_tag_update(&projIma->ima->id, 0); } } @@ -5739,7 +5740,7 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op) BKE_texpaint_slot_refresh_cache(scene, ma); BKE_image_signal(ima, NULL, IMA_SIGNAL_USER_NEW_IMAGE); WM_event_add_notifier(C, NC_IMAGE | NA_ADDED, ima); - DAG_id_tag_update(&ma->id, 0); + DEG_id_tag_update(&ma->id, 0); ED_area_tag_redraw(CTX_wm_area(C)); BKE_paint_proj_mesh_data_check(scene, ob, NULL, NULL, NULL, NULL); @@ -5855,7 +5856,7 @@ static int texture_paint_delete_texture_paint_slot_exec(bContext *C, wmOperator ma->mtex[slot->index] = NULL; BKE_texpaint_slot_refresh_cache(scene, ma); - DAG_id_tag_update(&ma->id, 0); + DEG_id_tag_update(&ma->id, 0); WM_event_add_notifier(C, NC_MATERIAL, ma); /* we need a notifier for data change since we change the displayed modifier uvs */ WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -5913,7 +5914,7 @@ static int add_simple_uvs_exec(bContext *C, wmOperator *UNUSED(op)) BKE_paint_proj_mesh_data_check(scene, ob, NULL, NULL, NULL, NULL); - DAG_id_tag_update(ob->data, 0); + DEG_id_tag_update(ob->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, scene); return OPERATOR_FINISHED; diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index efd1f0914c7..98bf0aa0a66 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -57,7 +57,6 @@ #include "BKE_action.h" #include "BKE_brush.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_deform.h" #include "BKE_mesh.h" #include "BKE_mesh_mapping.h" @@ -67,6 +66,8 @@ #include "BKE_report.h" #include "BKE_colortools.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" #include "WM_types.h" @@ -262,7 +263,7 @@ static bool make_vertexcol(Object *ob) /* single ob */ BKE_mesh_update_customdata_pointers(me, true); } - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); return (me->mloopcol != NULL); } @@ -365,7 +366,7 @@ bool ED_vpaint_fill(Object *ob, unsigned int paintcol) /* remove stale me->mcol, will be added later */ BKE_mesh_tessface_clear(me); - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); return true; } @@ -450,7 +451,7 @@ bool ED_wpaint_fill(VPaint *wp, Object *ob, float paintweight) copy_wpaint_prev(wp, NULL, 0); - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); return true; } @@ -496,7 +497,7 @@ bool ED_vpaint_smooth(Object *ob) MEM_freeN(mlooptag); - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); return true; } @@ -541,7 +542,7 @@ bool ED_vpaint_color_transform( /* remove stale me->mcol, will be added later */ BKE_mesh_tessface_clear(me); - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); return true; } @@ -1212,7 +1213,7 @@ static int weight_sample_group_exec(bContext *C, wmOperator *op) BLI_assert(type + 1 >= 0); vc.obact->actdef = type + 1; - DAG_id_tag_update(&vc.obact->id, OB_RECALC_DATA); + DEG_id_tag_update(&vc.obact->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, vc.obact); return OPERATOR_FINISHED; } @@ -1829,7 +1830,7 @@ static int wpaint_mode_toggle_exec(bContext *C, wmOperator *op) * exit (exit needs doing regardless because we * should redeform). */ - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene); @@ -2386,7 +2387,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P BKE_mesh_batch_cache_dirty(ob->data, BKE_MESH_BATCH_DIRTY_PAINT); - DAG_id_tag_update(ob->data, 0); + DEG_id_tag_update(ob->data, 0); ED_region_tag_redraw(vc->ar); } @@ -2443,7 +2444,7 @@ static void wpaint_stroke_done(const bContext *C, struct PaintStroke *stroke) } } - DAG_id_tag_update(ob->data, 0); + DEG_id_tag_update(ob->data, 0); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -2594,7 +2595,7 @@ static int vpaint_mode_toggle_exec(bContext *C, wmOperator *op) BKE_mesh_batch_cache_dirty(ob->data, BKE_MESH_BATCH_DIRTY_PAINT); /* update modifier stack for mapping requirements */ - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene); @@ -2872,7 +2873,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P if (vpd->use_fast_update == false) { /* recalculate modifier stack to get new colors, slow, * avoid this if we can! */ - DAG_id_tag_update(ob->data, 0); + DEG_id_tag_update(ob->data, 0); } else { /* If using new VBO drawing, mark mcol as dirty to force colors gpu buffer refresh! */ @@ -2898,7 +2899,7 @@ static void vpaint_stroke_done(const bContext *C, struct PaintStroke *stroke) MEM_freeN(vpd->mlooptag); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); - DAG_id_tag_update(&me->id, 0); + DEG_id_tag_update(&me->id, 0); MEM_freeN(vpd); } @@ -2981,7 +2982,7 @@ static int weight_from_bones_exec(bContext *C, wmOperator *op) create_vgroups_from_armature(op->reports, scene, ob, armob, type, (me->editflag & ME_EDIT_MIRROR_X)); - 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; @@ -3170,7 +3171,7 @@ static int paint_weight_gradient_modal(bContext *C, wmOperator *op, const wmEven free_wpaint_prev(wp); } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } else if (ret & OPERATOR_FINISHED) { @@ -3264,7 +3265,7 @@ static int paint_weight_gradient_exec(bContext *C, wmOperator *op) dm->foreachMappedVert(dm, gradientVertUpdate__mapFunc, &data, DM_FOREACH_NOP); } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); if (is_interactive == false) { diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index d1965d93172..b8e2724f786 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -57,7 +57,6 @@ #include "BKE_brush.h" #include "BKE_ccg.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_image.h" #include "BKE_key.h" @@ -73,6 +72,8 @@ #include "BKE_subsurf.h" #include "BKE_colortools.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" #include "WM_types.h" @@ -4611,7 +4612,7 @@ static void sculpt_flush_update(bContext *C) GPU_drawobject_free(ob->derivedFinal); if (ss->kb || ss->modifiers_active) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); ED_region_tag_redraw(ar); } else { @@ -4795,7 +4796,7 @@ static void sculpt_stroke_done(const bContext *C, struct PaintStroke *UNUSED(str /* try to avoid calling this, only for e.g. linked duplicates now */ if (((Mesh *)ob->data)->id.us > 1) - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -5368,7 +5369,7 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op) * a consistent state. */ if (true || flush_recalc || (ob->sculpt && ob->sculpt->bm)) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } if (me->flag & ME_SCULPT_DYNAMIC_TOPOLOGY) { @@ -5393,7 +5394,7 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op) ob->mode |= mode_flag; if (flush_recalc) - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* Create persistent sculpt mode data */ if (!ts->sculpt) { diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 44bd872d107..9d55cc1369e 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -51,12 +51,12 @@ #include "BKE_ccg.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_multires.h" #include "BKE_paint.h" #include "BKE_key.h" #include "BKE_mesh.h" #include "BKE_subsurf.h" +#include "DEG_depsgraph.h" #include "WM_api.h" #include "WM_types.h" @@ -555,7 +555,7 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb) } if (tag_update) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } else { sculpt_update_object_bounding_box(ob); diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c index b9b808e529d..28beb2c3f8d 100644 --- a/source/blender/editors/sculpt_paint/sculpt_uv.c +++ b/source/blender/editors/sculpt_paint/sculpt_uv.c @@ -46,11 +46,12 @@ #include "BKE_paint.h" #include "BKE_colortools.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_mesh_mapping.h" #include "BKE_customdata.h" #include "BKE_editmesh.h" +#include "DEG_depsgraph.h" + #include "ED_screen.h" #include "ED_image.h" #include "ED_mesh.h" @@ -898,7 +899,7 @@ static int uv_sculpt_stroke_modal(bContext *C, wmOperator *op, const wmEvent *ev ED_region_tag_redraw(CTX_wm_region(C)); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); return OPERATOR_RUNNING_MODAL; } diff --git a/source/blender/editors/space_action/action_buttons.c b/source/blender/editors/space_action/action_buttons.c index bfc808f6d83..80ec9107984 100644 --- a/source/blender/editors/space_action/action_buttons.c +++ b/source/blender/editors/space_action/action_buttons.c @@ -48,7 +48,6 @@ #include "BKE_context.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_main.h" #include "BKE_global.h" diff --git a/source/blender/editors/space_clip/CMakeLists.txt b/source/blender/editors/space_clip/CMakeLists.txt index 32d48c9c564..8fa4a0de53f 100644 --- a/source/blender/editors/space_clip/CMakeLists.txt +++ b/source/blender/editors/space_clip/CMakeLists.txt @@ -27,6 +27,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../imbuf ../../gpu ../../makesdna diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index 0378c68d12c..eb9aadd2e72 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -47,11 +47,12 @@ #include "BLT_translation.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_screen.h" #include "BKE_movieclip.h" #include "BKE_tracking.h" +#include "DEG_depsgraph.h" + #include "ED_gpencil.h" #include "UI_interface.h" @@ -236,7 +237,7 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event) marker->pos[1] = cb->marker_pos[1] / height; /* to update position of "parented" objects */ - DAG_id_tag_update(&cb->clip->id, 0); + DEG_id_tag_update(&cb->clip->id, 0); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL); ok = true; @@ -321,7 +322,7 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event) sub_v2_v2(cb->track->markers[i].pos, delta); /* to update position of "parented" objects */ - DAG_id_tag_update(&cb->clip->id, 0); + DEG_id_tag_update(&cb->clip->id, 0); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL); ok = true; diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c index e781d199d35..edac128d18b 100644 --- a/source/blender/editors/space_clip/clip_graph_ops.c +++ b/source/blender/editors/space_clip/clip_graph_ops.c @@ -37,7 +37,8 @@ #include "BKE_context.h" #include "BKE_tracking.h" -#include "BKE_depsgraph.h" + +#include "DEG_depsgraph.h" #include "WM_api.h" #include "WM_types.h" @@ -691,7 +692,7 @@ static int graph_disable_markers_exec(bContext *C, wmOperator *op) } } - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip); diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c index 272d99c2b0e..5d02f02167b 100644 --- a/source/blender/editors/space_clip/clip_utils.c +++ b/source/blender/editors/space_clip/clip_utils.c @@ -41,7 +41,8 @@ #include "BKE_context.h" #include "BKE_movieclip.h" #include "BKE_tracking.h" -#include "BKE_depsgraph.h" + +#include "DEG_depsgraph.h" #include "GPU_immediate.h" #include "GPU_matrix.h" @@ -210,7 +211,7 @@ void clip_delete_track(bContext *C, MovieClip *clip, MovieTrackingTrack *track) WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip); } - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); if (has_bundle) WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL); diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 56c240c3d20..ea7ede46887 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -42,10 +42,11 @@ #include "BKE_context.h" #include "BKE_movieclip.h" #include "BKE_tracking.h" -#include "BKE_depsgraph.h" #include "BKE_report.h" #include "BKE_sound.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" #include "WM_types.h" @@ -905,7 +906,7 @@ static int slide_marker_modal(bContext *C, wmOperator *op, const wmEvent *event) } WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); - DAG_id_tag_update(&sc->clip->id, 0); + DEG_id_tag_update(&sc->clip->id, 0); } else if (data->area == TRACK_AREA_PAT) { if (data->action == SLIDE_ACTION_SIZE) { @@ -1200,7 +1201,7 @@ static int disable_markers_exec(bContext *C, wmOperator *op) } } - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip); diff --git a/source/blender/editors/space_clip/tracking_ops_orient.c b/source/blender/editors/space_clip/tracking_ops_orient.c index 7b44e9317ba..671825ef7c3 100644 --- a/source/blender/editors/space_clip/tracking_ops_orient.c +++ b/source/blender/editors/space_clip/tracking_ops_orient.c @@ -43,11 +43,12 @@ #include "BKE_constraint.h" #include "BKE_tracking.h" #include "BKE_global.h" -#include "BKE_depsgraph.h" #include "BKE_layer.h" #include "BKE_object.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" #include "WM_types.h" @@ -248,8 +249,8 @@ static int set_origin_exec(bContext *C, wmOperator *op) copy_v3_v3(object->loc, vec); } - DAG_id_tag_update(&clip->id, 0); - DAG_id_tag_update(&object->id, OB_RECALC_OB); + DEG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&object->id, OB_RECALC_OB); WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); @@ -494,8 +495,8 @@ static int set_plane_exec(bContext *C, wmOperator *op) BKE_object_where_is_calc(scene, object); set_axis(scene, object, clip, tracking_object, axis_track, 'X'); - DAG_id_tag_update(&clip->id, 0); - DAG_id_tag_update(&object->id, OB_RECALC_OB); + DEG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&object->id, OB_RECALC_OB); WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); @@ -568,8 +569,8 @@ static int set_axis_exec(bContext *C, wmOperator *op) set_axis(scene, object, clip, tracking_object, track, axis == 0 ? 'X' : 'Y'); - DAG_id_tag_update(&clip->id, 0); - DAG_id_tag_update(&object->id, OB_RECALC_OB); + DEG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&object->id, OB_RECALC_OB); WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); @@ -695,10 +696,10 @@ static int do_set_scale(bContext *C, tracking_object->scale = scale; } - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); if (object) - DAG_id_tag_update(&object->id, OB_RECALC_OB); + DEG_id_tag_update(&object->id, OB_RECALC_OB); WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); diff --git a/source/blender/editors/space_clip/tracking_ops_plane.c b/source/blender/editors/space_clip/tracking_ops_plane.c index aa8518befaa..6c85bdfc4ec 100644 --- a/source/blender/editors/space_clip/tracking_ops_plane.c +++ b/source/blender/editors/space_clip/tracking_ops_plane.c @@ -39,9 +39,10 @@ #include "BKE_context.h" #include "BKE_tracking.h" -#include "BKE_depsgraph.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" #include "WM_types.h" @@ -372,7 +373,7 @@ static int slide_plane_marker_modal(bContext *C, data->previous_mval[1] = event->mval[1]; copy_v2_v2(data->previous_corner, data->corner); - DAG_id_tag_update(&sc->clip->id, 0); + DEG_id_tag_update(&sc->clip->id, 0); WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, NULL); @@ -390,7 +391,7 @@ static int slide_plane_marker_modal(bContext *C, clip_tracking_show_cursor(C); - DAG_id_tag_update(&sc->clip->id, 0); + DEG_id_tag_update(&sc->clip->id, 0); WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_clip/tracking_ops_solve.c b/source/blender/editors/space_clip/tracking_ops_solve.c index 5c74c1947e3..89dfadc8974 100644 --- a/source/blender/editors/space_clip/tracking_ops_solve.c +++ b/source/blender/editors/space_clip/tracking_ops_solve.c @@ -43,10 +43,11 @@ #include "BKE_movieclip.h" #include "BKE_tracking.h" #include "BKE_global.h" -#include "BKE_depsgraph.h" #include "BKE_report.h" #include "BKE_library.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" #include "WM_types.h" @@ -180,7 +181,7 @@ static void solve_camera_freejob(void *scv) MEM_freeN(tracking->stats); tracking->stats = NULL; - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); WM_main_add_notifier(NC_MOVIECLIP | NA_EVALUATED, clip); WM_main_add_notifier(NC_OBJECT | ND_TRANSFORM, NULL); @@ -327,7 +328,7 @@ static int clear_solution_exec(bContext *C, wmOperator *UNUSED(op)) reconstruction->camnr = 0; reconstruction->flag &= ~TRACKING_RECONSTRUCTED; - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL); diff --git a/source/blender/editors/space_clip/tracking_ops_stabilize.c b/source/blender/editors/space_clip/tracking_ops_stabilize.c index 35b1aead343..4eb6a4fbb24 100644 --- a/source/blender/editors/space_clip/tracking_ops_stabilize.c +++ b/source/blender/editors/space_clip/tracking_ops_stabilize.c @@ -38,7 +38,8 @@ #include "BKE_context.h" #include "BKE_tracking.h" -#include "BKE_depsgraph.h" + +#include "DEG_depsgraph.h" #include "WM_api.h" #include "WM_types.h" @@ -84,7 +85,7 @@ static int stabilize_2d_add_exec(bContext *C, wmOperator *UNUSED(op)) } if (update) { - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip); } @@ -138,7 +139,7 @@ static int stabilize_2d_remove_exec(bContext *C, wmOperator *UNUSED(op)) } if (update) { - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip); } @@ -227,7 +228,7 @@ static int stabilize_2d_rotation_add_exec(bContext *C, wmOperator *UNUSED(op)) } if (update) { - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip); } @@ -281,7 +282,7 @@ static int stabilize_2d_rotation_remove_exec(bContext *C, wmOperator *UNUSED(op) } if (update) { - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip); } diff --git a/source/blender/editors/space_graph/CMakeLists.txt b/source/blender/editors/space_graph/CMakeLists.txt index 40a196fa95b..64ce1704b07 100644 --- a/source/blender/editors/space_graph/CMakeLists.txt +++ b/source/blender/editors/space_graph/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../gpu ../../makesdna ../../makesrna diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index cbb8e98e7e0..d6843cc959d 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -48,13 +48,13 @@ #include "BKE_context.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_main.h" #include "BKE_global.h" #include "BKE_screen.h" #include "BKE_unit.h" +#include "DEG_depsgraph_build.h" #include "WM_api.h" #include "WM_types.h" @@ -475,7 +475,7 @@ static void do_graph_region_driver_buttons(bContext *C, void *UNUSED(arg), int e case B_IPO_DEPCHANGE: { /* rebuild depsgraph for the new deps */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); break; } } diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index f38d36853d7..09e38579c21 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -54,13 +54,14 @@ #include "BLT_translation.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_global.h" #include "BKE_nla.h" #include "BKE_context.h" #include "BKE_report.h" +#include "DEG_depsgraph_build.h" + #include "UI_view2d.h" #include "ED_anim_api.h" @@ -2714,7 +2715,7 @@ static int graph_driver_vars_paste_exec(bContext *C, wmOperator *op) /* successful or not? */ if (ok) { /* rebuild depsgraph, now that there are extra deps here */ - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); /* set notifier that keyframes have changed */ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, CTX_data_scene(C)); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 69597a390d6..eecf841898c 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -56,7 +56,6 @@ #include "BKE_colortools.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" #include "BKE_icons.h" #include "BKE_image.h" @@ -70,6 +69,8 @@ #include "BKE_sound.h" #include "BKE_scene.h" +#include "DEG_depsgraph.h" + #include "GPU_draw.h" #include "GPU_buffers.h" @@ -2338,7 +2339,7 @@ static int image_reload_exec(bContext *C, wmOperator *UNUSED(op)) // XXX other users? BKE_image_signal(ima, (sima) ? &sima->iuser : NULL, IMA_SIGNAL_RELOAD); - DAG_id_tag_update(&ima->id, 0); + DEG_id_tag_update(&ima->id, 0); WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ima); diff --git a/source/blender/editors/space_node/CMakeLists.txt b/source/blender/editors/space_node/CMakeLists.txt index 41843927587..80e677368a2 100644 --- a/source/blender/editors/space_node/CMakeLists.txt +++ b/source/blender/editors/space_node/CMakeLists.txt @@ -24,6 +24,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../imbuf ../../gpu ../../makesdna diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 4fc9f08ff02..02adc064f88 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -44,11 +44,12 @@ #include "BLT_translation.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_library.h" #include "BKE_main.h" #include "BKE_node.h" +#include "DEG_depsgraph.h" + #include "BLF_api.h" #include "BIF_glutil.h" @@ -132,10 +133,10 @@ void ED_node_tag_update_id(ID *id) * all the users of this tree will have update * flushed from the tree, */ - DAG_id_tag_update(&ntree->id, 0); + DEG_id_tag_update(&ntree->id, 0); if (ntree->type == NTREE_SHADER) { - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); if (GS(id->name) == ID_MA) WM_main_add_notifier(NC_MATERIAL | ND_SHADING, id); @@ -148,12 +149,12 @@ void ED_node_tag_update_id(ID *id) WM_main_add_notifier(NC_SCENE | ND_NODES, id); } else if (ntree->type == NTREE_TEXTURE) { - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); WM_main_add_notifier(NC_TEXTURE | ND_NODES, id); } else if (id == &ntree->id) { /* node groups */ - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); } } diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 8568b0a676d..2c2329fc44f 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -41,7 +41,6 @@ #include "BLI_blenlib.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_image.h" #include "BKE_library.h" @@ -50,6 +49,8 @@ #include "BKE_report.h" #include "BKE_scene.h" +#include "DEG_depsgraph.h" + #include "RE_engine.h" #include "RE_pipeline.h" @@ -328,11 +329,11 @@ void snode_dag_update(bContext *C, SpaceNode *snode) if (snode->edittree != snode->nodetree) { FOREACH_NODETREE(bmain, tntree, id) { if (ntreeHasTree(tntree, snode->edittree)) - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); } FOREACH_NODETREE_END } - DAG_id_tag_update(snode->id, 0); + DEG_id_tag_update(snode->id, 0); } void snode_notify(bContext *C, SpaceNode *snode) diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt index a9d630c31e5..96d27c6fd89 100644 --- a/source/blender/editors/space_outliner/CMakeLists.txt +++ b/source/blender/editors/space_outliner/CMakeLists.txt @@ -23,6 +23,7 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation + ../../depsgraph ../../imbuf ../../gpu ../../makesdna diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c index 97b03693ca6..315a3af1898 100644 --- a/source/blender/editors/space_outliner/outliner_collections.c +++ b/source/blender/editors/space_outliner/outliner_collections.c @@ -26,10 +26,12 @@ #include "BKE_context.h" #include "BKE_collection.h" -#include "BKE_depsgraph.h" #include "BKE_layer.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "BLI_listbase.h" #include "ED_screen.h" @@ -121,10 +123,10 @@ static int collection_link_exec(bContext *C, wmOperator *op) BKE_collection_link(sl, sc); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); return OPERATOR_FINISHED; @@ -223,10 +225,10 @@ static int collection_unlink_exec(bContext *C, wmOperator *op) SceneLayer *sl = CTX_data_scene_layer(C); BKE_collection_unlink(sl, lc); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(&CTX_data_scene(C)->id, 0); + DEG_id_tag_update(&CTX_data_scene(C)->id, 0); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); return OPERATOR_FINISHED; @@ -255,7 +257,7 @@ static int collection_new_exec(bContext *C, wmOperator *UNUSED(op)) SceneCollection *sc = BKE_collection_add(scene, NULL, NULL); BKE_collection_link(sl, sc); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); return OPERATOR_FINISHED; } @@ -346,10 +348,10 @@ static int collection_delete_exec(bContext *C, wmOperator *UNUSED(op)) TODO_LAYER_OVERRIDE; /* handle overrides */ outliner_tree_traverse(soops, &soops->tree, 0, TSE_SELECTED, collection_delete_cb, &data); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 1755370a5d6..b6a2e6f60fb 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -48,7 +48,6 @@ #include "BKE_context.h" #include "BKE_deform.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_global.h" #include "BKE_layer.h" @@ -59,6 +58,8 @@ #include "BKE_scene.h" #include "BKE_object.h" +#include "DEG_depsgraph.h" + #include "ED_armature.h" #include "ED_keyframing.h" #include "ED_object.h" @@ -181,7 +182,7 @@ static void restrictbutton_modifier_cb(bContext *C, void *UNUSED(poin), void *po { Object *ob = (Object *)poin2; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); } @@ -250,7 +251,7 @@ static void restrictbutton_collection_flag_cb(bContext *C, void *poin, void *UNU Scene *scene = poin; /* hide and deselect bases that are directly influenced by this LayerCollection */ /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, NULL); } diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 6a3e53281da..49d7c6856b9 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -51,7 +51,6 @@ #include "BKE_animsys.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_idcode.h" #include "BKE_layer.h" @@ -65,6 +64,8 @@ #include "BKE_material.h" #include "BKE_group.h" +#include "DEG_depsgraph_build.h" + #include "../blenloader/BLO_readfile.h" #include "ED_object.h" @@ -492,7 +493,7 @@ static int outliner_id_remap_exec(bContext *C, wmOperator *op) BKE_main_lib_objects_recalc_all(bmain); /* recreate dependency graph to include new objects */ - DAG_scene_relations_rebuild(bmain, scene); + DEG_scene_relations_rebuild(bmain, scene); /* free gpu materials, some materials depend on existing objects, such as lamps so freeing correctly refreshes */ GPU_materials_free(); @@ -1904,7 +1905,7 @@ static int parent_drop_exec(bContext *C, wmOperator *op) ED_object_parent_set(op->reports, bmain, scene, ob, par, partype, false, false, NULL); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); WM_event_add_notifier(C, NC_OBJECT | ND_PARENT, NULL); @@ -1941,7 +1942,7 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, const wmEvent *event) ob = (Object *)BKE_libblock_find_name(ID_OB, childname); BKE_collection_object_add(scene, sc, ob); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_SCENE | ND_LAYER, scene); } else if (te) { @@ -1977,7 +1978,7 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, const wmEvent *event) if ((par->type != OB_ARMATURE) && (par->type != OB_CURVE) && (par->type != OB_LATTICE)) { if (ED_object_parent_set(op->reports, bmain, scene, ob, par, partype, false, false, NULL)) { - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); WM_event_add_notifier(C, NC_OBJECT | ND_PARENT, NULL); } @@ -2105,7 +2106,7 @@ static int parent_clear_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE ED_object_parent_clear(ob, RNA_enum_get(op->ptr, "type")); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); WM_event_add_notifier(C, NC_OBJECT | ND_PARENT, NULL); return OPERATOR_FINISHED; @@ -2180,7 +2181,7 @@ static int scene_drop_invoke(bContext *C, wmOperator *op, const wmEvent *event) } } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_OB_SELECT, scene); diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 400a01a2908..9bdc6cb59f3 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -44,13 +44,14 @@ #include "BLI_listbase.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_object.h" #include "BKE_layer.h" #include "BKE_scene.h" #include "BKE_sequencer.h" #include "BKE_armature.h" +#include "DEG_depsgraph.h" + #include "ED_armature.h" #include "ED_object.h" #include "ED_screen.h" @@ -245,7 +246,7 @@ static eOLDrawState tree_element_active_material( /* Tagging object for update seems a bit stupid here, but looks like we have to do it * for render views to update. See T42973. * Note that RNA material update does it too, see e.g. rna_MaterialSlot_update(). */ - DAG_id_tag_update((ID *)ob, OB_RECALC_OB); + DEG_id_tag_update((ID *)ob, OB_RECALC_OB); WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING_LINKS, NULL); } return OL_DRAWSEL_NONE; @@ -418,7 +419,7 @@ static eOLDrawState tree_element_active_defgroup( BLI_assert(te->index + 1 >= 0); ob->actdef = te->index + 1; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob); } else { diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 159a00ae0ed..9ada1243c49 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -53,7 +53,6 @@ #include "BKE_animsys.h" #include "BKE_context.h" #include "BKE_constraint.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_group.h" #include "BKE_layer.h" @@ -65,6 +64,9 @@ #include "BKE_scene.h" #include "BKE_sequencer.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "ED_armature.h" #include "ED_object.h" #include "ED_scene.h" @@ -802,12 +804,12 @@ static void modifier_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem if (event == OL_MODIFIER_OP_TOGVIS) { md->mode ^= eModifierMode_Realtime; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); } else if (event == OL_MODIFIER_OP_TOGREN) { md->mode ^= eModifierMode_Render; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); } else if (event == OL_MODIFIER_OP_DELETE) { @@ -858,13 +860,13 @@ static void collection_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tsel } else { BKE_collection_unlink(sl, lc); - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); WM_event_add_notifier(C, NC_SCENE | ND_LAYER, scene); } } else if (event == OL_COLLECTION_OP_COLLECTION_DEL) { if (BKE_collection_remove(scene, sc)) { - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); WM_event_add_notifier(C, NC_SCENE | ND_LAYER, scene); } else { @@ -1040,7 +1042,7 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op) * cleanup tree here to prevent such cases. */ outliner_cleanup_tree(soops); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); str = "Delete Objects"; WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); } @@ -1050,7 +1052,7 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op) /* XXX: See OL_OP_DELETE comment above. */ outliner_cleanup_tree(soops); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); str = "Delete Object Hierarchy"; WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); } @@ -1149,7 +1151,7 @@ static int outliner_group_operation_exec(bContext *C, wmOperator *op) case OL_GROUPOP_INSTANCE: outliner_do_libdata_operation(C, op->reports, scene, soops, &soops->tree, group_instance_cb, NULL); /* works without this except if you try render right after, see: 22027 */ - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); break; case OL_GROUPOP_DELETE: outliner_do_libdata_operation(C, op->reports, scene, soops, &soops->tree, id_delete_cb, NULL); @@ -1678,7 +1680,7 @@ static int outliner_animdata_operation_exec(bContext *C, wmOperator *op) /* update dependencies */ if (updateDeps) { /* rebuild depsgraph for the new deps */ - DAG_relations_tag_update(CTX_data_main(C)); + DEG_relations_tag_update(CTX_data_main(C)); } return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index e7a866524fd..ef208eaba58 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -61,7 +61,6 @@ #include "BLT_translation.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_main.h" #include "BKE_layer.h" @@ -71,6 +70,8 @@ #include "BKE_idcode.h" #include "BKE_outliner_treehash.h" +#include "DEG_depsgraph_build.h" + #include "ED_armature.h" #include "ED_screen.h" @@ -1353,7 +1354,7 @@ static void outliner_layer_collections_reorder( BLI_assert(0); } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } static bool outliner_layer_collections_reorder_poll( const Scene *UNUSED(scene), const TreeElement *UNUSED(insert_element), @@ -1409,7 +1410,7 @@ static void outliner_scene_collections_reorder( BLI_assert(0); } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } static bool outliner_scene_collections_reorder_poll( const Scene *scene, const TreeElement *UNUSED(insert_element), diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index f603fa1b0f1..548cf157c0f 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -694,7 +694,7 @@ static int text_refresh_pyconstraints_exec(bContext *UNUSED(C), wmOperator *UNUS } if (update) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } } #endif diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 33121291935..65740fe6794 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -44,7 +44,6 @@ #include "BKE_context.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_icons.h" #include "BKE_lattice.h" #include "BKE_library.h" @@ -309,7 +308,7 @@ void ED_view3d_shade_update(Main *bmain, Scene *scene, View3D *v3d, ScrArea *sa) } else if (scene->obedit != NULL && scene->obedit->type == OB_MESH) { /* Tag mesh to load edit data. */ - DAG_id_tag_update(scene->obedit->data, 0); + DEG_id_tag_update(scene->obedit->data, 0); } } diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index c19fdb0d4b1..a8e5e1ad536 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -55,13 +55,14 @@ #include "BKE_context.h" #include "BKE_curve.h" #include "BKE_customdata.h" -#include "BKE_depsgraph.h" #include "BKE_screen.h" #include "BKE_editmesh.h" #include "BKE_deform.h" #include "BKE_object.h" #include "BKE_object_deform.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" #include "WM_types.h" @@ -779,7 +780,7 @@ static void do_view3d_vgroup_buttons(bContext *C, void *UNUSED(arg), int event) SceneLayer *sl = CTX_data_scene_layer(C); Object *ob = sl->basact->object; ED_vgroup_vert_active_mirror(ob, event - B_VGRP_PNL_EDIT_SINGLE); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); } } @@ -1109,7 +1110,7 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event case B_OBJECTPANELMEDIAN: if (ob) { v3d_editvertex_buts(NULL, v3d, ob, 1.0); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } break; } diff --git a/source/blender/editors/space_view3d/view3d_camera_control.c b/source/blender/editors/space_view3d/view3d_camera_control.c index f717f1c0a43..8beb0ff84b0 100644 --- a/source/blender/editors/space_view3d/view3d_camera_control.c +++ b/source/blender/editors/space_view3d/view3d_camera_control.c @@ -55,7 +55,7 @@ #include "BKE_object.h" -#include "BKE_depsgraph.h" /* for object updating */ +#include "DEG_depsgraph.h" #include "ED_screen.h" @@ -242,7 +242,7 @@ void ED_view3d_cameracontrol_update( ob_update = v3d->camera->parent; while (ob_update) { - DAG_id_tag_update(&ob_update->id, OB_RECALC_OB); + DEG_id_tag_update(&ob_update->id, OB_RECALC_OB); ob_update = ob_update->parent; } @@ -264,7 +264,7 @@ void ED_view3d_cameracontrol_update( BKE_object_apply_mat4(v3d->camera, view_mat, true, true); - DAG_id_tag_update(&v3d->camera->id, OB_RECALC_OB); + DEG_id_tag_update(&v3d->camera->id, OB_RECALC_OB); copy_v3_v3(v3d->camera->size, size_back); @@ -299,7 +299,7 @@ void ED_view3d_cameracontrol_release( /* store the original camera loc and rot */ BKE_object_tfm_restore(ob_back, vctrl->obtfm); - DAG_id_tag_update(&ob_back->id, OB_RECALC_OB); + DEG_id_tag_update(&ob_back->id, OB_RECALC_OB); } else { /* Non Camera we need to reset the view back to the original location bacause the user canceled*/ @@ -311,7 +311,7 @@ void ED_view3d_cameracontrol_release( rv3d->dist = vctrl->dist_backup; } else if (vctrl->persp_backup == RV3D_CAMOB) { /* camera */ - DAG_id_tag_update((ID *)view3d_cameracontrol_object(vctrl), OB_RECALC_OB); + DEG_id_tag_update((ID *)view3d_cameracontrol_object(vctrl), OB_RECALC_OB); /* always, is set to zero otherwise */ copy_v3_v3(rv3d->ofs, vctrl->ofs_backup); diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index adbdc1a6908..9ac86d4e13a 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -58,7 +58,8 @@ #include "BKE_scene.h" #include "BKE_screen.h" #include "BKE_action.h" -#include "BKE_depsgraph.h" /* for ED_view3d_camera_lock_sync */ + +#include "DEG_depsgraph.h" #include "BIF_gl.h" @@ -163,7 +164,7 @@ bool ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d) ob_update = v3d->camera; while (ob_update) { - DAG_id_tag_update(&ob_update->id, OB_RECALC_OB); + DEG_id_tag_update(&ob_update->id, OB_RECALC_OB); WM_main_add_notifier(NC_OBJECT | ND_TRANSFORM, ob_update); ob_update = ob_update->parent; } @@ -175,7 +176,7 @@ bool ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d) ED_view3d_to_object(v3d->camera, rv3d->ofs, rv3d->viewquat, rv3d->dist); BKE_object_tfm_protected_restore(v3d->camera, &obtfm, v3d->camera->protectflag | protect_scale_all); - DAG_id_tag_update(&v3d->camera->id, OB_RECALC_OB); + DEG_id_tag_update(&v3d->camera->id, OB_RECALC_OB); WM_main_add_notifier(NC_OBJECT | ND_TRANSFORM, v3d->camera); } diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 31677e08207..7acc67bc241 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -41,11 +41,12 @@ #include "BLT_translation.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_main.h" #include "BKE_screen.h" #include "BKE_editmesh.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -167,7 +168,7 @@ static int view3d_layers_exec(bContext *C, wmOperator *op) if (v3d->scenelock) handle_view3d_lock(C); - DAG_on_visible_update(CTX_data_main(C), false); + DEG_on_visible_update(CTX_data_main(C), false); ED_area_tag_redraw(sa); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 1686a08654d..770e4050fd9 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -63,7 +63,6 @@ #include "BKE_armature.h" #include "BKE_context.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_layer.h" #include "BKE_mball.h" #include "BKE_mesh.h" @@ -74,6 +73,8 @@ #include "BKE_tracking.h" #include "BKE_utildefines.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" #include "WM_types.h" @@ -369,7 +370,7 @@ static void do_lasso_select_pose(ViewContext *vc, Object *ob, const int mcords[] bArmature *arm = ob->data; if (arm->flag & ARM_HAS_VIZ_DEPS) { /* mask modifier ('armature' mode), etc. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } } } @@ -2106,7 +2107,7 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, b if (arm && (arm->flag & ARM_HAS_VIZ_DEPS)) { /* mask modifier ('armature' mode), etc. */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } } } @@ -2664,7 +2665,7 @@ static void pose_circle_select(ViewContext *vc, const bool select, const int mva if (arm->flag & ARM_HAS_VIZ_DEPS) { /* mask modifier ('armature' mode), etc. */ - DAG_id_tag_update(&vc->obact->id, OB_RECALC_DATA); + DEG_id_tag_update(&vc->obact->id, OB_RECALC_DATA); } } } diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 5dd69cc66eb..8e566b8da1a 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -40,13 +40,14 @@ #include "BKE_action.h" #include "BKE_armature.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_main.h" #include "BKE_mball.h" #include "BKE_object.h" #include "BKE_report.h" #include "BKE_tracking.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" #include "WM_types.h" @@ -153,7 +154,7 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) } ob->pose->flag |= (POSE_LOCKED | POSE_DO_UNLOCK); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } else { vec[0] = -ob->obmat[3][0] + gridf * floorf(0.5f + ob->obmat[3][0] / gridf); @@ -177,7 +178,7 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) /* auto-keyframing */ ED_autokeyframe_object(C, scene, ob, ks); - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } } CTX_DATA_END; @@ -329,7 +330,7 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global obact->pose->flag |= (POSE_LOCKED | POSE_DO_UNLOCK); - DAG_id_tag_update(&obact->id, OB_RECALC_DATA); + DEG_id_tag_update(&obact->id, OB_RECALC_DATA); } else { struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); @@ -385,7 +386,7 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global /* auto-keyframing */ ED_autokeyframe_object(C, scene, ob, ks); - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } } diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 53f343ed071..11b011dbc73 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -43,7 +43,6 @@ #include "BKE_action.h" #include "BKE_camera.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_object.h" #include "BKE_global.h" #include "BKE_main.h" @@ -493,7 +492,7 @@ static int view3d_camera_to_view_exec(bContext *C, wmOperator *UNUSED(op)) BKE_object_tfm_protected_restore(v3d->camera, &obtfm, v3d->camera->protectflag); - DAG_id_tag_update(&v3d->camera->id, OB_RECALC_OB); + DEG_id_tag_update(&v3d->camera->id, OB_RECALC_OB); rv3d->persp = RV3D_CAMOB; WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, v3d->camera); @@ -571,7 +570,7 @@ static int view3d_camera_to_view_selected_exec(bContext *C, wmOperator *op) BKE_object_tfm_protected_restore(camera_ob, &obtfm, OB_LOCK_SCALE | OB_LOCK_ROT4D); /* notifiers */ - DAG_id_tag_update(&camera_ob->id, OB_RECALC_OB); + DEG_id_tag_update(&camera_ob->id, OB_RECALC_OB); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, camera_ob); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 54c943661c0..7c45eaef51c 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -68,7 +68,6 @@ #include "BKE_context.h" #include "BKE_crazyspace.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_global.h" #include "BKE_gpencil.h" @@ -119,6 +118,7 @@ #include "RNA_access.h" #include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" #include "transform.h" #include "bmesh.h" @@ -858,7 +858,7 @@ static void pose_grab_with_ik_clear(Object *ob) } /* TODO(sergey): Consider doing partial update only. */ - DAG_relations_tag_update(G.main); + DEG_relations_tag_update(G.main); } /* adds the IK to pchan - returns if added */ @@ -1012,7 +1012,7 @@ static short pose_grab_with_ik(Object *ob) if (tot_ik) { BIK_clear_data(ob->pose); /* TODO(sergey): Consuder doing partial update only. */ - DAG_relations_tag_update(G.main); + DEG_relations_tag_update(G.main); } return (tot_ik) ? 1 : 0; @@ -5448,7 +5448,7 @@ static void set_trans_object_base_flags(TransInfo *t) BKE_scene_base_flag_to_objects(t->scene_layer); /* Make sure depsgraph is here. */ - DAG_scene_relations_update(G.main, t->scene); + DEG_scene_relations_update(G.main, t->scene); /* handle pending update events, otherwise they got copied below */ for (base = sl->object_bases.first; base; base = base->next) { @@ -5490,7 +5490,7 @@ static void set_trans_object_base_flags(TransInfo *t) base->flag_legacy |= BA_WAS_SEL; } } - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } } @@ -5563,7 +5563,7 @@ static int count_proportional_objects(TransInfo *t) (BASE_EDITABLE_BGMODE_NEW(base))) { - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); total += 1; } @@ -5571,7 +5571,7 @@ static int count_proportional_objects(TransInfo *t) /* all recalc flags get flushed to all layers, so a layer flip later on works fine */ - DAG_scene_relations_update(G.main, t->scene); + DEG_scene_relations_update(G.main, t->scene); /* and we store them temporal in base (only used for transform code) */ /* this because after doing updates, the object->recalc is cleared */ @@ -6156,9 +6156,9 @@ void special_aftertrans_update(bContext *C, TransInfo *t) // fixme... some of this stuff is not good if (ob) { if (ob->pose || BKE_key_from_object(ob)) - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); else - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); } /* 3 cases here for curve cleanups: @@ -6368,15 +6368,15 @@ void special_aftertrans_update(bContext *C, TransInfo *t) /* automatic inserting of keys and unkeyed tagging - only if transform wasn't canceled (or TFM_DUMMY) */ if (!canceled && (t->mode != TFM_DUMMY)) { autokeyframe_pose_cb_func(C, t->scene, (View3D *)t->view, ob, t->mode, targetless_ik); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } else if (arm->flag & ARM_DELAYDEFORM) { /* old optimize trick... this enforces to bypass the depgraph */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); ob->recalc = 0; // is set on OK position already by recalcData() } else - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } else if (t->options & CTX_PAINT_CURVE) { @@ -6416,13 +6416,13 @@ void special_aftertrans_update(bContext *C, TransInfo *t) /* pointcache refresh */ if (BKE_ptcache_object_reset(t->scene, ob, PTCACHE_RESET_OUTDATED)) - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* Needed for proper updating of "quick cached" dynamics. */ /* Creates troubles for moving animated objects without */ /* autokey though, probably needed is an anim sys override? */ /* Please remove if some other solution is found. -jahka */ - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); /* Set autokey if necessary */ if (!canceled) { diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index adff98cc99b..e0f295b3696 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -71,7 +71,6 @@ #include "BKE_action.h" #include "BKE_armature.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_lattice.h" #include "BKE_library.h" @@ -85,6 +84,8 @@ #include "BKE_utildefines.h" #include "BKE_workspace.h" +#include "DEG_depsgraph.h" + #include "ED_anim_api.h" #include "ED_armature.h" #include "ED_image.h" @@ -640,7 +641,7 @@ static void recalcData_mask_common(TransInfo *t) flushTransMasking(t); - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); } /* helper for recalcData() - for Image Editor transforms */ @@ -659,7 +660,7 @@ static void recalcData_image(TransInfo *t) if (sima->flag & SI_LIVE_UNWRAP) ED_uvedit_live_unwrap_re_solve(); - DAG_id_tag_update(t->obedit->data, 0); + DEG_id_tag_update(t->obedit->data, 0); } } @@ -702,7 +703,7 @@ static void recalcData_spaceclip(TransInfo *t) track = track->next; } - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); } else if (t->options & CTX_MASK) { recalcData_mask_common(t); @@ -725,7 +726,7 @@ static void recalcData_objects(TransInfo *t) applyProject(t); } - DAG_id_tag_update(t->obedit->data, 0); /* sets recalc flags */ + DEG_id_tag_update(t->obedit->data, 0); /* sets recalc flags */ if (t->state == TRANS_CANCEL) { while (nu) { @@ -749,7 +750,7 @@ static void recalcData_objects(TransInfo *t) applyProject(t); } - DAG_id_tag_update(t->obedit->data, 0); /* sets recalc flags */ + DEG_id_tag_update(t->obedit->data, 0); /* sets recalc flags */ if (la->editlatt->latt->flag & LT_OUTSIDE) outside_lattice(la->editlatt->latt); } @@ -771,7 +772,7 @@ static void recalcData_objects(TransInfo *t) projectVertSlideData(t, false); } - DAG_id_tag_update(t->obedit->data, 0); /* sets recalc flags */ + DEG_id_tag_update(t->obedit->data, 0); /* sets recalc flags */ EDBM_mesh_normals_update(em); BKE_editmesh_tessface_calc(em); @@ -869,7 +870,7 @@ static void recalcData_objects(TransInfo *t) if (t->state != TRANS_CANCEL) { applyProject(t); } - DAG_id_tag_update(t->obedit->data, 0); /* sets recalc flags */ + DEG_id_tag_update(t->obedit->data, 0); /* sets recalc flags */ } } else if ((t->flag & T_POSE) && t->poseobj) { @@ -892,7 +893,7 @@ static void recalcData_objects(TransInfo *t) /* old optimize trick... this enforces to bypass the depgraph */ if (!(arm->flag & ARM_DELAYDEFORM)) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ /* transformation of pose may affect IK tree, make sure it is rebuilt */ BIK_clear_data(ob->pose); } @@ -935,10 +936,10 @@ static void recalcData_objects(TransInfo *t) /* sets recalc flags fully, instead of flushing existing ones * otherwise proxies don't function correctly */ - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); if (t->flag & T_TEXTURE) - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } } } diff --git a/source/blender/editors/util/CMakeLists.txt b/source/blender/editors/util/CMakeLists.txt index 3612aab468f..71a3322cb50 100644 --- a/source/blender/editors/util/CMakeLists.txt +++ b/source/blender/editors/util/CMakeLists.txt @@ -24,6 +24,7 @@ set(INC ../../blenlib ../../blentranslation ../../bmesh + ../../depsgraph ../../imbuf ../../gpu ../../makesdna diff --git a/source/blender/editors/util/ed_transverts.c b/source/blender/editors/util/ed_transverts.c index b0970cdfd48..872810c5cf2 100644 --- a/source/blender/editors/util/ed_transverts.c +++ b/source/blender/editors/util/ed_transverts.c @@ -39,12 +39,13 @@ #include "BLI_math.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_lattice.h" #include "BKE_editmesh.h" #include "BKE_DerivedMesh.h" #include "BKE_context.h" +#include "DEG_depsgraph.h" + #include "ED_armature.h" #include "ED_transverts.h" /* own include */ @@ -56,7 +57,7 @@ void ED_transverts_update_obedit(TransVertStore *tvs, Object *obedit) const int mode = tvs->mode; BLI_assert(ED_transverts_check_obedit(obedit) == true); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); if (obedit->type == OB_MESH) { BMEditMesh *em = BKE_editmesh_from_object(obedit); diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c index 441fd446cd6..d9f777771a8 100644 --- a/source/blender/editors/util/editmode_undo.c +++ b/source/blender/editors/util/editmode_undo.c @@ -42,9 +42,10 @@ #include "BKE_blender_undo.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" +#include "DEG_depsgraph.h" + #include "ED_util.h" #include "ED_mesh.h" @@ -269,7 +270,7 @@ void undo_editmode_step(bContext *C, int step) EDBM_selectmode_to_scene(C); } - DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DEG_id_tag_update(&obedit->id, OB_RECALC_DATA); /* XXX notifiers */ } diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 9d1c36aff31..ced84e04f25 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -57,7 +57,6 @@ #include "BKE_context.h" #include "BKE_customdata.h" -#include "BKE_depsgraph.h" #include "BKE_image.h" #include "BKE_library.h" #include "BKE_main.h" @@ -68,6 +67,8 @@ #include "BKE_scene.h" #include "BKE_editmesh.h" +#include "DEG_depsgraph.h" + #include "ED_image.h" #include "ED_mesh.h" #include "ED_node.h" @@ -259,7 +260,7 @@ void ED_uvedit_assign_image(Main *UNUSED(bmain), Scene *scene, Object *obedit, I /* and update depdency graph */ if (update) { - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); } } @@ -1603,7 +1604,7 @@ static void uv_weld_align(bContext *C, int tool) uvedit_live_unwrap_update(sima, scene, obedit); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); } @@ -1777,7 +1778,7 @@ static int uv_remove_doubles_exec(bContext *C, wmOperator *op) } uvedit_live_unwrap_update(sima, scene, obedit); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -2199,7 +2200,7 @@ static int uv_mouse_select(bContext *C, const float co[2], bool extend, bool loo #endif } - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_PASS_THROUGH | OPERATOR_FINISHED; @@ -2338,7 +2339,7 @@ static int uv_select_linked_internal(bContext *C, wmOperator *op, const wmEvent uv_select_linked(scene, ima, em, limit, hit_p, extend, select_faces); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_FINISHED; @@ -3353,7 +3354,7 @@ static int uv_snap_selection_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; uvedit_live_unwrap_update(sima, scene, obedit); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -3919,7 +3920,7 @@ static int uv_seams_from_islands_exec(bContext *C, wmOperator *op) BM_uv_vert_map_free(vmap); - 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; @@ -3974,7 +3975,7 @@ static int uv_mark_seam_exec(bContext *C, wmOperator *op) if (scene->toolsettings->edge_mode_live_unwrap) ED_unwrap_lscm(scene, ob, false); - 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; diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index d6e77e3081e..f3191581d49 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -52,10 +52,11 @@ #include "BKE_context.h" #include "BKE_customdata.h" -#include "BKE_depsgraph.h" #include "BKE_mesh_mapping.h" #include "BKE_editmesh.h" +#include "DEG_depsgraph.h" + #include "UI_interface.h" #include "ED_mesh.h" @@ -2081,7 +2082,7 @@ static void stitch_exit(bContext *C, wmOperator *op, int finished) ED_region_draw_cb_exit(CTX_wm_region(C)->type, state->draw_handle); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); state_delete(state); diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 0cb117da341..b700c992a01 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -55,7 +55,6 @@ #include "BKE_subsurf.h" #include "BKE_context.h" #include "BKE_customdata.h" -#include "BKE_depsgraph.h" #include "BKE_image.h" #include "BKE_main.h" #include "BKE_material.h" @@ -63,6 +62,8 @@ #include "BKE_scene.h" #include "BKE_editmesh.h" +#include "DEG_depsgraph.h" + #include "PIL_time.h" #include "UI_interface.h" @@ -570,7 +571,7 @@ static void minimize_stretch_iteration(bContext *C, wmOperator *op, bool interac ms->lasttime = PIL_check_seconds_timer(); - DAG_id_tag_update(ms->obedit->data, 0); + DEG_id_tag_update(ms->obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ms->obedit->data); } } @@ -593,7 +594,7 @@ static void minimize_stretch_exit(bContext *C, wmOperator *op, bool cancel) param_stretch_end(ms->handle); param_delete(ms->handle); - DAG_id_tag_update(ms->obedit->data, 0); + DEG_id_tag_update(ms->obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ms->obedit->data); MEM_freeN(ms); @@ -741,7 +742,7 @@ static int pack_islands_exec(bContext *C, wmOperator *op) ED_uvedit_pack_islands(scene, obedit, em->bm, true, true, do_rotate); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -784,7 +785,7 @@ static int average_islands_scale_exec(bContext *C, wmOperator *UNUSED(op)) param_flush(handle); param_delete(handle); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -1227,7 +1228,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) /* execute unwrap */ ED_unwrap_lscm(scene, obedit, true); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -1354,7 +1355,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op) uv_map_clip_correct(scene, obedit, em, op); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -1407,7 +1408,7 @@ static int reset_exec(bContext *C, wmOperator *UNUSED(op)) ED_mesh_uv_loop_reset(C, me); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -1509,7 +1510,7 @@ static int sphere_project_exec(bContext *C, wmOperator *op) uv_map_clip_correct(scene, obedit, em, op); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -1586,7 +1587,7 @@ static int cylinder_project_exec(bContext *C, wmOperator *op) uv_map_clip_correct(scene, obedit, em, op); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -1673,7 +1674,7 @@ static int cube_project_exec(bContext *C, wmOperator *op) ED_uvedit_unwrap_cube_project(obedit, em->bm, cube_size, true); uv_map_clip_correct(scene, obedit, em, op); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index 743e6ceb7cf..6191461a5d6 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -677,7 +677,7 @@ void BlenderStrokeRenderer::GenerateStrokeMesh(StrokeGroup *group, bool hasTex) { #if 0 Object *object_mesh = BKE_object_add(freestyle_bmain, freestyle_scene, (SceneLayer *)freestyle_scene->render_layers.first, OB_MESH); - DAG_relations_tag_update(freestyle_bmain); + DEG_relations_tag_update(freestyle_bmain); #else Object *object_mesh = NewMesh(); #endif diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index f36c8d0cc0d..57a98c1e825 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -99,9 +99,11 @@ EnumPropertyItem rna_enum_id_type_items[] = { #include "BKE_library_remap.h" #include "BKE_animsys.h" #include "BKE_material.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" /* XXX, remove me */ +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "WM_api.h" /* name functions that ignore the first two ID characters */ @@ -334,7 +336,7 @@ static void rna_ID_update_tag(ID *id, ReportList *reports, int flag) } } - DAG_id_tag_update(id, flag); + DEG_id_tag_update(id, flag); } static void rna_ID_user_clear(ID *id) @@ -370,14 +372,14 @@ static struct ID *rna_ID_make_local(struct ID *self, Main *bmain, int clear_prox static AnimData * rna_ID_animation_data_create(ID *id, Main *bmain) { AnimData *adt = BKE_animdata_add_id(id); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); return adt; } static void rna_ID_animation_data_free(ID *id, Main *bmain) { BKE_animdata_free(id, true); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } static void rna_IDPArray_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) @@ -435,7 +437,7 @@ static Material *rna_IDMaterials_pop_id(ID *id, Main *bmain, ReportList *reports return NULL; } - DAG_id_tag_update(id, OB_RECALC_DATA); + DEG_id_tag_update(id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_DRAW, id); WM_main_add_notifier(NC_OBJECT | ND_OB_SHADING, id); @@ -446,7 +448,7 @@ static void rna_IDMaterials_clear_id(ID *id, int remove_material_slot) { BKE_material_clear_id(G.main, id, remove_material_slot); - DAG_id_tag_update(id, OB_RECALC_DATA); + DEG_id_tag_update(id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_DRAW, id); WM_main_add_notifier(NC_OBJECT | ND_OB_SHADING, id); } diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index facb7116b67..8d7ad46630c 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -54,6 +54,8 @@ #include "BKE_main.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -62,7 +64,6 @@ /* flush updates */ #include "DNA_object_types.h" -#include "BKE_depsgraph.h" #include "WM_types.h" #include "rna_internal.h" @@ -1817,7 +1818,7 @@ static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerR if (!is_rna || (prop->flag & PROP_IDPROPERTY)) { /* WARNING! This is so property drivers update the display! * not especially nice */ - DAG_id_tag_update(ptr->id.data, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(ptr->id.data, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); WM_main_add_notifier(NC_WINDOW, NULL); /* Not nice as well, but the only way to make sure material preview * is updated with custom nodes. diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index f271bccd326..f49d4717ad6 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -73,10 +73,11 @@ EnumPropertyItem rna_enum_keying_flag_items[] = { #include "BLI_math_base.h" #include "BKE_animsys.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_nla.h" +#include "DEG_depsgraph.h" + #include "DNA_object_types.h" #include "WM_api.h" @@ -88,7 +89,7 @@ static void rna_AnimData_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point /* tag for refresh so that scheduled updates (e.g. action changed) will * get computed and reflected in the scene [#34869] */ - DAG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA); } static int rna_AnimData_action_editable(PointerRNA *ptr, const char **UNUSED(r_info)) @@ -114,7 +115,7 @@ static void rna_AnimData_action_set(PointerRNA *ptr, PointerRNA value) adt = BKE_animdata_from_id(ownerId); if (adt) { adt->recalc |= ADT_RECALC_ANIM; - DAG_id_tag_update(ownerId, OB_RECALC_TIME); + DEG_id_tag_update(ownerId, OB_RECALC_TIME); } } diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 891f5c43ca6..014a08b70ce 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -44,18 +44,19 @@ #ifdef RNA_RUNTIME #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_idprop.h" #include "BKE_main.h" #include "ED_armature.h" #include "BKE_armature.h" +#include "DEG_depsgraph.h" + static void rna_Armature_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { ID *id = ptr->id.data; - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); WM_main_add_notifier(NC_GEOM | ND_DATA, id); /*WM_main_add_notifier(NC_OBJECT|ND_POSE, NULL); */ } @@ -173,7 +174,7 @@ static void rna_Bone_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po bArmature *arm = (bArmature *)id; if (arm->flag & ARM_HAS_VIZ_DEPS) { - DAG_id_tag_update(id, OB_RECALC_DATA); + DEG_id_tag_update(id, OB_RECALC_DATA); } } else if (GS(id->name) == ID_OB) { @@ -181,7 +182,7 @@ static void rna_Bone_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po bArmature *arm = (bArmature *)ob->data; if (arm->flag & ARM_HAS_VIZ_DEPS) { - DAG_id_tag_update(id, OB_RECALC_DATA); + DEG_id_tag_update(id, OB_RECALC_DATA); } } } diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c index 72f67b86c23..cee2b7ed9bc 100644 --- a/source/blender/makesrna/intern/rna_boid.c +++ b/source/blender/makesrna/intern/rna_boid.c @@ -87,9 +87,11 @@ static EnumPropertyItem boidruleset_type_items[] = { #include "BLI_math_base.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_particle.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + static void rna_Boids_reset(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { if (ptr->type == &RNA_ParticleSystem) { @@ -97,10 +99,10 @@ static void rna_Boids_reset(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN psys->recalc = PSYS_RECALC_RESET; - DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } else - DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA | PSYS_RECALC_RESET); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); } @@ -111,12 +113,12 @@ static void rna_Boids_reset_deps(Main *bmain, Scene *UNUSED(scene), PointerRNA * psys->recalc = PSYS_RECALC_RESET; - DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } else - DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA | PSYS_RECALC_RESET); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); } diff --git a/source/blender/makesrna/intern/rna_cachefile.c b/source/blender/makesrna/intern/rna_cachefile.c index a3b1d584ef5..bfe419ca8e3 100644 --- a/source/blender/makesrna/intern/rna_cachefile.c +++ b/source/blender/makesrna/intern/rna_cachefile.c @@ -35,7 +35,6 @@ #ifdef RNA_RUNTIME #include "BKE_cachefile.h" -#include "BKE_depsgraph.h" #include "BLI_string.h" @@ -52,7 +51,7 @@ static void rna_CacheFile_update(Main *bmain, Scene *scene, PointerRNA *ptr) { CacheFile *cache_file = (CacheFile *)ptr->data; - DAG_id_tag_update(&cache_file->id, 0); + DEG_id_tag_update(&cache_file->id, 0); WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL); UNUSED_VARS(bmain, scene); diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c index 078ba13d76d..1127940de44 100644 --- a/source/blender/makesrna/intern/rna_camera.c +++ b/source/blender/makesrna/intern/rna_camera.c @@ -40,7 +40,9 @@ #include "BKE_camera.h" #include "BKE_object.h" -#include "BKE_depsgraph.h" + +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" static float rna_Camera_angle_get(PointerRNA *ptr) { @@ -84,14 +86,14 @@ static void rna_Camera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointer { Camera *camera = (Camera *)ptr->id.data; - DAG_id_tag_update(&camera->id, 0); + DEG_id_tag_update(&camera->id, 0); } static void rna_Camera_dependency_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { Camera *camera = (Camera *)ptr->id.data; - DAG_relations_tag_update(bmain); - DAG_id_tag_update(&camera->id, 0); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&camera->id, 0); } #else diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c index d8bcbc2cc72..effd140ab15 100644 --- a/source/blender/makesrna/intern/rna_cloth.c +++ b/source/blender/makesrna/intern/rna_cloth.c @@ -46,19 +46,20 @@ #ifdef RNA_RUNTIME #include "BKE_context.h" -#include "BKE_depsgraph.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" static void rna_cloth_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { Object *ob = (Object *)ptr->id.data; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); } static void rna_cloth_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) { - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); rna_cloth_update(bmain, scene, ptr); } @@ -70,7 +71,7 @@ static void rna_cloth_pinning_changed(Main *UNUSED(bmain), Scene *UNUSED(scene), cloth_free_modifier(clmd); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); } diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 5339df34a38..4d9dcdf0fce 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -53,7 +53,6 @@ #include "MEM_guardedalloc.h" #include "BKE_colortools.h" -#include "BKE_depsgraph.h" #include "BKE_image.h" #include "BKE_movieclip.h" #include "BKE_node.h" @@ -61,6 +60,8 @@ #include "BKE_texture.h" #include "BKE_linestyle.h" +#include "DEG_depsgraph.h" + #include "ED_node.h" #include "IMB_colormanagement.h" @@ -315,7 +316,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA * { Material *ma = ptr->id.data; - DAG_id_tag_update(&ma->id, 0); + DEG_id_tag_update(&ma->id, 0); WM_main_add_notifier(NC_MATERIAL | ND_SHADING_DRAW, ma); break; } @@ -335,7 +336,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA * { Tex *tex = ptr->id.data; - DAG_id_tag_update(&tex->id, 0); + DEG_id_tag_update(&tex->id, 0); WM_main_add_notifier(NC_TEXTURE, tex); break; } @@ -350,7 +351,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA * { ParticleSettings *part = ptr->id.data; - DAG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO); + DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, part); } default: @@ -446,7 +447,7 @@ static void rna_ColorManagedDisplaySettings_display_device_update(Main *UNUSED(b IMB_colormanagement_validate_settings(&scene->display_settings, &scene->view_settings); - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL); } } @@ -581,7 +582,7 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *UNUSED(bmain) if (GS(id->name) == ID_IM) { Image *ima = (Image *) id; - DAG_id_tag_update(&ima->id, 0); + DEG_id_tag_update(&ima->id, 0); BKE_image_signal(ima, NULL, IMA_SIGNAL_COLORMANAGE); @@ -664,7 +665,7 @@ static void rna_ColorManagement_update(Main *UNUSED(bmain), Scene *UNUSED(scene) return; if (GS(id->name) == ID_SCE) { - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL); } } diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index de1a0f24c31..8ecbd438c2e 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -154,7 +154,6 @@ static EnumPropertyItem space_object_items[] = { #include "BKE_action.h" #include "BKE_constraint.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #ifdef WITH_ALEMBIC # include "ABC_alembic.h" diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 7787533d311..50938eb75dc 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -124,9 +124,11 @@ static const EnumPropertyItem curve2d_fill_mode_items[] = { #include "DNA_object_types.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_main.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "WM_api.h" #include "MEM_guardedalloc.h" @@ -338,7 +340,7 @@ static void rna_BPoint_array_begin(CollectionPropertyIterator *iter, PointerRNA static void rna_Curve_update_data_id(Main *UNUSED(bmain), Scene *UNUSED(scene), ID *id) { - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); WM_main_add_notifier(NC_GEOM | ND_DATA, id); } @@ -349,7 +351,7 @@ static void rna_Curve_update_data(Main *bmain, Scene *scene, PointerRNA *ptr) static void rna_Curve_update_deps(Main *bmain, Scene *scene, PointerRNA *ptr) { - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); rna_Curve_update_data(bmain, scene, ptr); } @@ -638,7 +640,7 @@ static void rna_Curve_spline_remove(Curve *cu, ReportList *reports, PointerRNA * BKE_nurb_free(nu); RNA_POINTER_INVALIDATE(nu_ptr); - DAG_id_tag_update(&cu->id, OB_RECALC_DATA); + DEG_id_tag_update(&cu->id, OB_RECALC_DATA); WM_main_add_notifier(NC_GEOM | ND_DATA, NULL); } @@ -648,7 +650,7 @@ static void rna_Curve_spline_clear(Curve *cu) BKE_nurbList_free(nurbs); - DAG_id_tag_update(&cu->id, OB_RECALC_DATA); + DEG_id_tag_update(&cu->id, OB_RECALC_DATA); WM_main_add_notifier(NC_GEOM | ND_DATA, NULL); } diff --git a/source/blender/makesrna/intern/rna_curve_api.c b/source/blender/makesrna/intern/rna_curve_api.c index b4b3aa84ec5..5a123603ed5 100644 --- a/source/blender/makesrna/intern/rna_curve_api.c +++ b/source/blender/makesrna/intern/rna_curve_api.c @@ -47,7 +47,7 @@ static void rna_Curve_transform(Curve *cu, float *mat, int shape_keys) { BKE_curve_transform(cu, (float (*)[4])mat, shape_keys); - DAG_id_tag_update(&cu->id, 0); + DEG_id_tag_update(&cu->id, 0); } #else diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c index b995347856b..5047bee6b45 100644 --- a/source/blender/makesrna/intern/rna_depsgraph.c +++ b/source/blender/makesrna/intern/rna_depsgraph.c @@ -36,8 +36,6 @@ #include "DEG_depsgraph.h" -#include "BKE_depsgraph.h" - #include "DNA_object_types.h" #ifdef RNA_RUNTIME @@ -46,6 +44,7 @@ #include "BKE_report.h" #include "DNA_object_types.h" +#include "DEG_depsgraph_build.h" #include "DEG_depsgraph_debug.h" #include "DEG_depsgraph_query.h" @@ -135,9 +134,9 @@ static void rna_Depsgraph_debug_graphviz(Depsgraph *graph, const char *filename) static void rna_Depsgraph_debug_rebuild(Depsgraph *UNUSED(graph), Main *bmain) { Scene *sce; - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); for (sce = bmain->scene.first; sce; sce = sce->id.next) { - DAG_scene_relations_rebuild(bmain, sce); + DEG_scene_relations_rebuild(bmain, sce); DEG_graph_on_visible_update(bmain, sce); } } diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index 4bb7f3a9ffd..f51bd9d93cc 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -55,9 +55,10 @@ EnumPropertyItem rna_enum_prop_dynamicpaint_type_items[] = { #ifdef RNA_RUNTIME #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_particle.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" static char *rna_DynamicPaintCanvasSettings_path(PointerRNA *ptr) { @@ -98,7 +99,7 @@ static char *rna_DynamicPaintSurface_path(PointerRNA *ptr) static void rna_DynamicPaint_redoModifier(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } static void rna_DynamicPaintSurfaces_updateFrames(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) @@ -160,7 +161,7 @@ static void rna_DynamicPaintSurfaces_changeFormat(Main *bmain, Scene *scene, Poi static void rna_DynamicPaint_reset_dependency(Main *bmain, Scene *scene, PointerRNA *ptr) { rna_DynamicPaintSurface_reset(bmain, scene, ptr); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } static PointerRNA rna_PaintSurface_active_get(PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index bccc47aa95d..476008f5b04 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -127,9 +127,11 @@ static StructRNA *rna_FModifierType_refine(struct PointerRNA *ptr) /* ****************************** */ #include "BKE_fcurve.h" -#include "BKE_depsgraph.h" #include "BKE_animsys.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + static void rna_ChannelDriver_update_data(Main *bmain, Scene *scene, PointerRNA *ptr) { ID *id = ptr->id.data; @@ -138,8 +140,8 @@ static void rna_ChannelDriver_update_data(Main *bmain, Scene *scene, PointerRNA driver->flag &= ~DRIVER_FLAG_INVALID; /* TODO: this really needs an update guard... */ - DAG_relations_tag_update(bmain); - DAG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA); WM_main_add_notifier(NC_SCENE | ND_FRAME, scene); } @@ -587,7 +589,7 @@ static void rna_FModifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin { ID *id = ptr->id.data; AnimData *adt = BKE_animdata_from_id(id); - DAG_id_tag_update(id, (GS(id->name) == ID_OB) ? OB_RECALC_OB : OB_RECALC_DATA); + DEG_id_tag_update(id, (GS(id->name) == ID_OB) ? OB_RECALC_OB : OB_RECALC_DATA); if (adt != NULL) { adt->recalc |= ADT_RECALC_ANIM; } diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c index 8c3984e4b29..de2076868ec 100644 --- a/source/blender/makesrna/intern/rna_fluidsim.c +++ b/source/blender/makesrna/intern/rna_fluidsim.c @@ -46,7 +46,6 @@ #include "DNA_scene_types.h" #include "DNA_particle_types.h" -#include "BKE_depsgraph.h" #include "BKE_fluidsim.h" #include "BKE_global.h" #include "BKE_main.h" @@ -54,6 +53,8 @@ #include "BKE_particle.h" #include "BKE_pointcache.h" +#include "DEG_depsgraph.h" + static StructRNA *rna_FluidSettings_refine(struct PointerRNA *ptr) { FluidsimSettings *fss = (FluidsimSettings *)ptr->data; @@ -82,7 +83,7 @@ static void rna_fluid_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR { Object *ob = ptr->id.data; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); } diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index b6e84cf8ac3..686e830f1ba 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -32,9 +32,10 @@ #include "BLI_utildefines.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_image.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -104,7 +105,7 @@ static void rna_Image_source_set(PointerRNA *ptr, int value) if (value != ima->source) { ima->source = value; BKE_image_signal(ima, NULL, IMA_SIGNAL_SRC_CHANGE); - DAG_id_tag_update(&ima->id, 0); + DEG_id_tag_update(&ima->id, 0); } } @@ -134,7 +135,7 @@ static void rna_Image_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), P Image *ima = ptr->id.data; BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD); WM_main_add_notifier(NC_IMAGE | NA_EDITED, &ima->id); - DAG_id_tag_update(&ima->id, 0); + DEG_id_tag_update(&ima->id, 0); } static void rna_Image_generated_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) @@ -147,7 +148,7 @@ static void rna_Image_colormanage_update(Main *UNUSED(bmain), Scene *UNUSED(scen { Image *ima = ptr->id.data; BKE_image_signal(ima, NULL, IMA_SIGNAL_COLORMANAGE); - DAG_id_tag_update(&ima->id, 0); + DEG_id_tag_update(&ima->id, 0); WM_main_add_notifier(NC_IMAGE | ND_DISPLAY, &ima->id); WM_main_add_notifier(NC_IMAGE | NA_EDITED, &ima->id); } diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index a5abc8a3be2..5cf7e7238e0 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -51,10 +51,11 @@ #include "DNA_object_types.h" #include "BKE_animsys.h" -#include "BKE_depsgraph.h" #include "BKE_key.h" #include "BKE_main.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" #include "WM_types.h" @@ -484,7 +485,7 @@ static void rna_Key_update_data(Main *bmain, Scene *UNUSED(scene), PointerRNA *p for (ob = bmain->object.first; ob; ob = ob->id.next) { if (BKE_key_from_object(ob) == key) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); } } diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index 83c373d151d..76f5044a95c 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -45,10 +45,11 @@ #include "MEM_guardedalloc.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_main.h" #include "BKE_texture.h" +#include "DEG_depsgraph.h" + #include "ED_node.h" #include "WM_api.h" #include "WM_types.h" @@ -134,7 +135,7 @@ static void rna_Lamp_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN { Lamp *la = ptr->id.data; - DAG_id_tag_update(&la->id, 0); + DEG_id_tag_update(&la->id, 0); WM_main_add_notifier(NC_LAMP | ND_LIGHTING, la); } @@ -142,7 +143,7 @@ static void rna_Lamp_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin { Lamp *la = ptr->id.data; - DAG_id_tag_update(&la->id, 0); + DEG_id_tag_update(&la->id, 0); WM_main_add_notifier(NC_LAMP | ND_LIGHTING_DRAW, la); } @@ -150,7 +151,7 @@ static void rna_Lamp_sky_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point { Lamp *la = ptr->id.data; - DAG_id_tag_update(&la->id, 0); + DEG_id_tag_update(&la->id, 0); WM_main_add_notifier(NC_LAMP | ND_SKY, la); } diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c index 9424ddf7d0e..904a6289fc1 100644 --- a/source/blender/makesrna/intern/rna_lattice.c +++ b/source/blender/makesrna/intern/rna_lattice.c @@ -43,11 +43,12 @@ #include "DNA_scene_types.h" #include "BLI_string.h" -#include "BKE_depsgraph.h" #include "BKE_lattice.h" #include "BKE_main.h" #include "BKE_deform.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" #include "WM_types.h" #include "ED_lattice.h" @@ -97,7 +98,7 @@ static void rna_Lattice_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), P { ID *id = ptr->id.data; - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); WM_main_add_notifier(NC_GEOM | ND_DATA, id); } @@ -119,7 +120,7 @@ static void rna_Lattice_update_data_editlatt(Main *UNUSED(bmain), Scene *UNUSED( BLI_strncpy(lt_em->vgroup, lt->vgroup, sizeof(lt_em->vgroup)); } - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); WM_main_add_notifier(NC_GEOM | ND_DATA, id); } diff --git a/source/blender/makesrna/intern/rna_lattice_api.c b/source/blender/makesrna/intern/rna_lattice_api.c index 2ea59d31262..4784332db3f 100644 --- a/source/blender/makesrna/intern/rna_lattice_api.c +++ b/source/blender/makesrna/intern/rna_lattice_api.c @@ -45,7 +45,7 @@ static void rna_Lattice_transform(Lattice *lt, float *mat, int shape_keys) { BKE_lattice_transform(lt, (float (*)[4])mat, shape_keys); - DAG_id_tag_update(<->id, 0); + DEG_id_tag_update(<->id, 0); } #else diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c index 1199cccc4e6..787e6dce088 100644 --- a/source/blender/makesrna/intern/rna_linestyle.c +++ b/source/blender/makesrna/intern/rna_linestyle.c @@ -101,7 +101,8 @@ EnumPropertyItem rna_enum_linestyle_geometry_modifier_type_items[] = { #include "BKE_linestyle.h" #include "BKE_texture.h" -#include "BKE_depsgraph.h" + +#include "DEG_depsgraph.h" #include "ED_node.h" @@ -323,7 +324,7 @@ static void rna_LineStyle_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin { FreestyleLineStyle *linestyle = ptr->id.data; - DAG_id_tag_update(&linestyle->id, 0); + DEG_id_tag_update(&linestyle->id, 0); WM_main_add_notifier(NC_LINESTYLE, linestyle); } @@ -347,7 +348,7 @@ static LineStyleModifier *rna_LineStyle_color_modifier_add(FreestyleLineStyle *l return NULL; } - DAG_id_tag_update(&linestyle->id, 0); + DEG_id_tag_update(&linestyle->id, 0); WM_main_add_notifier(NC_LINESTYLE, linestyle); return modifier; @@ -365,7 +366,7 @@ static void rna_LineStyle_color_modifier_remove(FreestyleLineStyle *linestyle, R RNA_POINTER_INVALIDATE(modifier_ptr); - DAG_id_tag_update(&linestyle->id, 0); + DEG_id_tag_update(&linestyle->id, 0); WM_main_add_notifier(NC_LINESTYLE, linestyle); } @@ -379,7 +380,7 @@ static LineStyleModifier *rna_LineStyle_alpha_modifier_add(FreestyleLineStyle *l return NULL; } - DAG_id_tag_update(&linestyle->id, 0); + DEG_id_tag_update(&linestyle->id, 0); WM_main_add_notifier(NC_LINESTYLE, linestyle); return modifier; @@ -397,7 +398,7 @@ static void rna_LineStyle_alpha_modifier_remove(FreestyleLineStyle *linestyle, R RNA_POINTER_INVALIDATE(modifier_ptr); - DAG_id_tag_update(&linestyle->id, 0); + DEG_id_tag_update(&linestyle->id, 0); WM_main_add_notifier(NC_LINESTYLE, linestyle); } @@ -411,7 +412,7 @@ static LineStyleModifier *rna_LineStyle_thickness_modifier_add(FreestyleLineStyl return NULL; } - DAG_id_tag_update(&linestyle->id, 0); + DEG_id_tag_update(&linestyle->id, 0); WM_main_add_notifier(NC_LINESTYLE, linestyle); return modifier; @@ -429,7 +430,7 @@ static void rna_LineStyle_thickness_modifier_remove(FreestyleLineStyle *linestyl RNA_POINTER_INVALIDATE(modifier_ptr); - DAG_id_tag_update(&linestyle->id, 0); + DEG_id_tag_update(&linestyle->id, 0); WM_main_add_notifier(NC_LINESTYLE, linestyle); } @@ -443,7 +444,7 @@ static LineStyleModifier *rna_LineStyle_geometry_modifier_add(FreestyleLineStyle return NULL; } - DAG_id_tag_update(&linestyle->id, 0); + DEG_id_tag_update(&linestyle->id, 0); WM_main_add_notifier(NC_LINESTYLE, linestyle); return modifier; @@ -461,7 +462,7 @@ static void rna_LineStyle_geometry_modifier_remove(FreestyleLineStyle *linestyle RNA_POINTER_INVALIDATE(modifier_ptr); - DAG_id_tag_update(&linestyle->id, 0); + DEG_id_tag_update(&linestyle->id, 0); WM_main_add_notifier(NC_LINESTYLE, linestyle); } diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index cd0fe461428..7d7cd9f90f0 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -78,7 +78,6 @@ #include "BKE_paint.h" #include "BKE_font.h" #include "BKE_node.h" -#include "BKE_depsgraph.h" #include "BKE_speaker.h" #include "BKE_movieclip.h" #include "BKE_mask.h" @@ -86,6 +85,8 @@ #include "BKE_linestyle.h" #include "BKE_workspace.h" +#include "DEG_depsgraph_query.h" + #include "DNA_armature_types.h" #include "DNA_camera_types.h" #include "DNA_curve_types.h" @@ -578,7 +579,7 @@ static FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char *name BKE_main_id_tag_listbase(&bmain->_listbase_name, LIB_TAG_DOIT, value); \ } \ static int rna_Main_##_func_name##_is_updated_get(PointerRNA *ptr) { \ - return DAG_id_type_tagged(ptr->data, _id_type) != 0; \ + return DEG_id_type_tagged(ptr->data, _id_type) != 0; \ } RNA_MAIN_ID_TAG_FUNCS_DEF(cameras, camera, ID_CA) diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index 24dfff89832..12f8a584c2c 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -54,9 +54,10 @@ #include "DNA_movieclip_types.h" -#include "BKE_depsgraph.h" #include "BKE_mask.h" +#include "DEG_depsgraph.h" + #include "BLI_math.h" #include "RNA_access.h" @@ -68,7 +69,7 @@ static void rna_Mask_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin Mask *mask = ptr->id.data; WM_main_add_notifier(NC_MASK | ND_DATA, mask); - DAG_id_tag_update( &mask->id, 0); + DEG_id_tag_update( &mask->id, 0); } static void rna_Mask_update_parent(Main *bmain, Scene *scene, PointerRNA *ptr) @@ -448,7 +449,7 @@ static void rna_MaskLayer_spline_remove(ID *id, MaskLayer *mask_layer, ReportLis RNA_POINTER_INVALIDATE(spline_ptr); - DAG_id_tag_update(&mask->id, OB_RECALC_DATA); + DEG_id_tag_update(&mask->id, OB_RECALC_DATA); } static void rna_Mask_start_frame_set(PointerRNA *ptr, int value) @@ -522,7 +523,7 @@ static void rna_MaskSpline_points_add(ID *id, MaskSpline *spline, int count) } WM_main_add_notifier(NC_MASK | ND_DATA, mask); - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); } static void rna_MaskSpline_point_remove(ID *id, MaskSpline *spline, ReportList *reports, PointerRNA *point_ptr) @@ -582,7 +583,7 @@ static void rna_MaskSpline_point_remove(ID *id, MaskSpline *spline, ReportList * BKE_mask_layer_shape_changed_remove(layer, BKE_mask_layer_shape_spline_to_index(layer, spline) + point_index, 1); WM_main_add_notifier(NC_MASK | ND_DATA, mask); - DAG_id_tag_update(&mask->id, 0); + DEG_id_tag_update(&mask->id, 0); RNA_POINTER_INVALIDATE(point_ptr); } diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 8779d2b65e7..e60832d86e6 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -86,13 +86,14 @@ EnumPropertyItem rna_enum_ramp_blend_items[] = { #include "DNA_space_types.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_main.h" #include "BKE_material.h" #include "BKE_texture.h" #include "BKE_node.h" #include "BKE_paint.h" +#include "DEG_depsgraph.h" + #include "ED_node.h" #include "ED_image.h" #include "BKE_scene.h" @@ -101,7 +102,7 @@ static void rna_Material_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point { Material *ma = ptr->id.data; - DAG_id_tag_update(&ma->id, 0); + DEG_id_tag_update(&ma->id, 0); WM_main_add_notifier(NC_MATERIAL | ND_SHADING, ma); } @@ -119,7 +120,7 @@ static void rna_Material_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), { Material *ma = ptr->id.data; - DAG_id_tag_update(&ma->id, 0); + DEG_id_tag_update(&ma->id, 0); WM_main_add_notifier(NC_MATERIAL | ND_SHADING_DRAW, ma); } @@ -213,7 +214,7 @@ static void rna_Material_active_paint_texture_index_update(Main *bmain, Scene *s } } - DAG_id_tag_update(&ma->id, 0); + DEG_id_tag_update(&ma->id, 0); WM_main_add_notifier(NC_MATERIAL | ND_SHADING, ma); } @@ -427,7 +428,7 @@ void rna_mtex_texture_slots_clear(ID *self_id, struct bContext *C, ReportList *r id_us_min((ID *)mtex_ar[index]->tex); MEM_freeN(mtex_ar[index]); mtex_ar[index] = NULL; - DAG_id_tag_update(self_id, 0); + DEG_id_tag_update(self_id, 0); } /* for redraw only */ diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 004c6f4c5f5..e78bdb7520f 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -67,11 +67,12 @@ EnumPropertyItem rna_enum_mesh_delimit_mode_items[] = { #include "BLI_math.h" #include "BKE_customdata.h" -#include "BKE_depsgraph.h" #include "BKE_main.h" #include "BKE_mesh.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "ED_mesh.h" /* XXX Bad level call */ #include "WM_api.h" @@ -223,7 +224,7 @@ static void rna_Mesh_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin /* cheating way for importers to avoid slow updates */ if (id->us > 0) { - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); WM_main_add_notifier(NC_GEOM | ND_DATA, id); } } diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c index 677397eb859..5dbb7cb0d29 100644 --- a/source/blender/makesrna/intern/rna_mesh_api.c +++ b/source/blender/makesrna/intern/rna_mesh_api.c @@ -173,7 +173,7 @@ static void rna_Mesh_normals_split_custom_set(Mesh *mesh, ReportList *reports, i rna_Mesh_normals_split_custom_do(mesh, loopnors, false); - DAG_id_tag_update(&mesh->id, 0); + DEG_id_tag_update(&mesh->id, 0); } static void rna_Mesh_normals_split_custom_set_from_vertices( @@ -191,14 +191,14 @@ static void rna_Mesh_normals_split_custom_set_from_vertices( rna_Mesh_normals_split_custom_do(mesh, vertnors, true); - DAG_id_tag_update(&mesh->id, 0); + DEG_id_tag_update(&mesh->id, 0); } static void rna_Mesh_transform(Mesh *mesh, float *mat, int shape_keys) { BKE_mesh_transform(mesh, (float (*)[4])mat, shape_keys); - DAG_id_tag_update(&mesh->id, 0); + DEG_id_tag_update(&mesh->id, 0); } static void rna_Mesh_flip_normals(Mesh *mesh) @@ -207,7 +207,7 @@ static void rna_Mesh_flip_normals(Mesh *mesh) BKE_mesh_tessface_clear(mesh); BKE_mesh_calc_normals(mesh); - DAG_id_tag_update(&mesh->id, 0); + DEG_id_tag_update(&mesh->id, 0); } static void rna_Mesh_split_faces(Mesh *mesh, int free_loop_normals) diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c index 91a65c7ccc5..9c91bea7c45 100644 --- a/source/blender/makesrna/intern/rna_meta.c +++ b/source/blender/makesrna/intern/rna_meta.c @@ -47,9 +47,10 @@ #include "DNA_object_types.h" #include "BKE_mball.h" -#include "BKE_depsgraph.h" #include "BKE_main.h" +#include "DEG_depsgraph.h" + #include "WM_types.h" #include "WM_api.h" @@ -103,7 +104,7 @@ static void rna_MetaBall_update_data(Main *bmain, Scene *scene, PointerRNA *ptr) if (ob->data == mb) BKE_mball_properties_copy(scene, ob); - DAG_id_tag_update(&mb->id, 0); + DEG_id_tag_update(&mb->id, 0); WM_main_add_notifier(NC_GEOM | ND_DATA, mb); } } @@ -121,7 +122,7 @@ static MetaElem *rna_MetaBall_elements_new(MetaBall *mb, int type) /* cheating way for importers to avoid slow updates */ if (mb->id.us > 0) { - DAG_id_tag_update(&mb->id, 0); + DEG_id_tag_update(&mb->id, 0); WM_main_add_notifier(NC_GEOM | ND_DATA, &mb->id); } @@ -142,7 +143,7 @@ static void rna_MetaBall_elements_remove(MetaBall *mb, ReportList *reports, Poin /* cheating way for importers to avoid slow updates */ if (mb->id.us > 0) { - DAG_id_tag_update(&mb->id, 0); + DEG_id_tag_update(&mb->id, 0); WM_main_add_notifier(NC_GEOM | ND_DATA, &mb->id); } } @@ -153,7 +154,7 @@ static void rna_MetaBall_elements_clear(MetaBall *mb) /* cheating way for importers to avoid slow updates */ if (mb->id.us > 0) { - DAG_id_tag_update(&mb->id, 0); + DEG_id_tag_update(&mb->id, 0); WM_main_add_notifier(NC_GEOM | ND_DATA, &mb->id); } } diff --git a/source/blender/makesrna/intern/rna_meta_api.c b/source/blender/makesrna/intern/rna_meta_api.c index 3d8f375fd88..117162babd5 100644 --- a/source/blender/makesrna/intern/rna_meta_api.c +++ b/source/blender/makesrna/intern/rna_meta_api.c @@ -47,7 +47,7 @@ static void rna_Meta_transform(struct MetaBall *mb, float *mat) { BKE_mball_transform(mb, (float (*)[4])mat); - DAG_id_tag_update(&mb->id, 0); + DEG_id_tag_update(&mb->id, 0); } #else diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 333ff895e58..03340c6c356 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -286,12 +286,14 @@ EnumPropertyItem rna_enum_axis_flag_xyz_items[] = { #include "BKE_cachefile.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_library.h" #include "BKE_modifier.h" #include "BKE_object.h" #include "BKE_particle.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #ifdef WITH_ALEMBIC # include "ABC_alembic.h" #endif @@ -453,14 +455,14 @@ static char *rna_Modifier_path(PointerRNA *ptr) static void rna_Modifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ptr->id.data); } static void rna_Modifier_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) { rna_Modifier_update(bmain, scene, ptr); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } /* Vertex Groups */ @@ -793,11 +795,11 @@ static void rna_CurveModifier_dependency_update(Main *bmain, Scene *scene, Point { CurveModifierData *cmd = (CurveModifierData *)ptr->data; rna_Modifier_update(bmain, scene, ptr); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); if (cmd->object != NULL) { Curve *curve = cmd->object->data; if ((curve->flag & CU_PATH) == 0) { - DAG_id_tag_update(&curve->id, OB_RECALC_DATA); + DEG_id_tag_update(&curve->id, OB_RECALC_DATA); } } } @@ -806,11 +808,11 @@ static void rna_ArrayModifier_dependency_update(Main *bmain, Scene *scene, Point { ArrayModifierData *amd = (ArrayModifierData *)ptr->data; rna_Modifier_update(bmain, scene, ptr); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); if (amd->curve_ob != NULL) { Curve *curve = amd->curve_ob->data; if ((curve->flag & CU_PATH) == 0) { - DAG_id_tag_update(&curve->id, OB_RECALC_DATA); + DEG_id_tag_update(&curve->id, OB_RECALC_DATA); } } } diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c index 15411f85ba3..925bc048bc3 100644 --- a/source/blender/makesrna/intern/rna_movieclip.c +++ b/source/blender/makesrna/intern/rna_movieclip.c @@ -47,7 +47,7 @@ #ifdef RNA_RUNTIME -#include "BKE_depsgraph.h" +#include "DEG_depsgraph.h" #include "ED_clip.h" @@ -59,7 +59,7 @@ static void rna_MovieClip_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene MovieClip *clip = (MovieClip *)ptr->id.data; BKE_movieclip_reload(clip); - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); } static void rna_MovieClip_size_get(PointerRNA *ptr, int *values) diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c index e44a6420045..62e3bd5cacb 100644 --- a/source/blender/makesrna/intern/rna_nla.c +++ b/source/blender/makesrna/intern/rna_nla.c @@ -50,7 +50,6 @@ /* needed for some of the validation stuff... */ #include "BKE_animsys.h" -#include "BKE_depsgraph.h" #include "BKE_fcurve.h" #include "BKE_nla.h" diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 7bae2d64474..f4712cbf0a6 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -182,7 +182,6 @@ EnumPropertyItem rna_enum_object_axis_items[] = { #include "BKE_constraint.h" #include "BKE_context.h" #include "BKE_curve.h" -#include "BKE_depsgraph.h" #include "BKE_effect.h" #include "BKE_global.h" #include "BKE_key.h" @@ -193,6 +192,9 @@ EnumPropertyItem rna_enum_object_axis_items[] = { #include "BKE_scene.h" #include "BKE_deform.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "ED_object.h" #include "ED_particle.h" #include "ED_curve.h" @@ -200,7 +202,7 @@ EnumPropertyItem rna_enum_object_axis_items[] = { static void rna_Object_internal_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DAG_id_tag_update(ptr->id.data, OB_RECALC_OB); + DEG_id_tag_update(ptr->id.data, OB_RECALC_OB); } static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA *ptr) @@ -212,7 +214,7 @@ static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA static void rna_Object_hide_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) { - DAG_id_type_tag(bmain, ID_OB); + DEG_id_type_tag(bmain, ID_OB); } static void rna_Object_matrix_local_get(PointerRNA *ptr, float values[16]) @@ -255,7 +257,7 @@ static void rna_Object_matrix_basis_set(PointerRNA *ptr, const float values[16]) void rna_Object_internal_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ptr->id.data); } @@ -270,7 +272,7 @@ static void rna_Object_active_shape_update(Main *bmain, Scene *scene, PointerRNA EDBM_mesh_load(ob); EDBM_mesh_make(scene->toolsettings, ob, true); - DAG_id_tag_update(ob->data, 0); + DEG_id_tag_update(ob->data, 0); EDBM_mesh_normals_update(((Mesh *)ob->data)->edit_btmesh); BKE_editmesh_tessface_calc(((Mesh *)ob->data)->edit_btmesh); @@ -292,8 +294,8 @@ static void rna_Object_active_shape_update(Main *bmain, Scene *scene, PointerRNA static void rna_Object_dependency_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { - DAG_id_tag_update(ptr->id.data, OB_RECALC_OB); - DAG_relations_tag_update(bmain); + DEG_id_tag_update(ptr->id.data, OB_RECALC_OB); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_OBJECT | ND_PARENT, ptr->id.data); } @@ -318,10 +320,10 @@ static void rna_Object_layer_update__internal(Main *bmain, Scene *scene, BaseLeg /* pass */ } else { - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } - DAG_id_type_tag(bmain, ID_OB); + DEG_id_type_tag(bmain, ID_OB); } static void rna_Object_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr) @@ -778,7 +780,7 @@ static void rna_Object_active_material_set(PointerRNA *ptr, PointerRNA value) { Object *ob = (Object *)ptr->id.data; - DAG_id_tag_update(value.data, 0); + DEG_id_tag_update(value.data, 0); assign_material(ob, value.data, ob->actcol, BKE_MAT_ASSIGN_EXISTING); } @@ -1011,7 +1013,7 @@ static void rna_MaterialSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr) WM_main_add_notifier(NC_OBJECT | ND_OB_SHADING, ptr->id.data); WM_main_add_notifier(NC_MATERIAL | ND_SHADING_LINKS, NULL); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } static char *rna_MaterialSlot_path(PointerRNA *ptr) @@ -1138,7 +1140,7 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value) if ((gameflag_prev & OB_NAVMESH) != (ob->gameflag & OB_NAVMESH)) { if (ob->type == OB_MESH) { /* this is needed to refresh the derived meshes draw func */ - DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } } diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index feaf44acba0..1e2d4d6ab18 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -44,7 +44,6 @@ #include "DNA_modifier_types.h" #include "DNA_object_types.h" -#include "BKE_depsgraph.h" #include "BKE_layer.h" #include "DEG_depsgraph.h" @@ -319,7 +318,7 @@ static void rna_Object_shape_key_remove( return; } - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob); RNA_POINTER_INVALIDATE(kb_ptr); diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 3bfa2da9fc1..2ae674ea961 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -98,7 +98,9 @@ static EnumPropertyItem empty_vortex_shape_items[] = { #include "BKE_context.h" #include "BKE_modifier.h" #include "BKE_pointcache.h" -#include "BKE_depsgraph.h" + +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" #include "ED_object.h" @@ -116,7 +118,7 @@ static void rna_Cache_change(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); for (pid = pidlist.first; pid; pid = pid->next) { if (pid->cache == cache) @@ -185,7 +187,7 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P BKE_ptcache_load_external(pid); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_POINTCACHE, ob); } else { @@ -500,7 +502,7 @@ static void rna_FieldSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scene), part->pd2->tex = NULL; } - DAG_id_tag_update(&part->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME | PSYS_RECALC_RESET); + DEG_id_tag_update(&part->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME | PSYS_RECALC_RESET); WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL); } @@ -512,7 +514,7 @@ static void rna_FieldSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scene), ob->pd->tex = NULL; } - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob); } } @@ -548,7 +550,7 @@ static void rna_FieldSettings_type_set(PointerRNA *ptr, int value) static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) { if (particle_id_check(ptr)) { - DAG_id_tag_update((ID *)ptr->id.data, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME | PSYS_RECALC_RESET); + DEG_id_tag_update((ID *)ptr->id.data, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME | PSYS_RECALC_RESET); } else { Object *ob = (Object *)ptr->id.data; @@ -564,12 +566,12 @@ static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, Point rna_FieldSettings_shape_update(bmain, scene, ptr); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); if (ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE) - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); else - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_OB); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob); } @@ -613,16 +615,16 @@ static void rna_EffectorWeight_update(Main *UNUSED(bmain), Scene *UNUSED(scene), FOREACH_SCENE_OBJECT_END } else { - DAG_id_tag_update(id, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update(id, OB_RECALC_DATA | PSYS_RECALC_RESET); WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL); } } static void rna_EffectorWeight_dependency_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); - DAG_id_tag_update((ID *)ptr->id.data, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update((ID *)ptr->id.data, OB_RECALC_DATA | PSYS_RECALC_RESET); WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL); } @@ -719,7 +721,7 @@ static void rna_CollisionSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scen { Object *ob = (Object *)ptr->id.data; - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob); } @@ -727,13 +729,13 @@ static void rna_softbody_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point { Object *ob = (Object *)ptr->id.data; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); } static void rna_softbody_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) { - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); rna_softbody_update(bmain, scene, ptr); } diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 4a4d8582894..53c40996b51 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -135,7 +135,6 @@ static EnumPropertyItem part_hair_ren_as_items[] = { #include "BKE_cloth.h" #include "BKE_colortools.h" #include "BKE_deform.h" -#include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" #include "BKE_cdderivedmesh.h" #include "BKE_effect.h" @@ -145,6 +144,9 @@ static EnumPropertyItem part_hair_ren_as_items[] = { #include "BKE_pointcache.h" #include "BKE_texture.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + /* use for object space hair get/set */ static void rna_ParticleHairKey_location_object_info(PointerRNA *ptr, ParticleSystemModifierData **psmd_pt, ParticleData **pa_pt) @@ -609,10 +611,10 @@ static void particle_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN psys->recalc = flag; - DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } else - DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA | flag); + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA | flag); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); } @@ -623,7 +625,7 @@ static void rna_Particle_redo(Main *bmain, Scene *scene, PointerRNA *ptr) static void rna_Particle_redo_dependency(Main *bmain, Scene *scene, PointerRNA *ptr) { - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); rna_Particle_redo(bmain, scene, ptr); } @@ -634,7 +636,7 @@ static void rna_Particle_reset(Main *bmain, Scene *scene, PointerRNA *ptr) static void rna_Particle_reset_dependency(Main *bmain, Scene *scene, PointerRNA *ptr) { - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); rna_Particle_reset(bmain, scene, ptr); } @@ -657,7 +659,7 @@ static void rna_Particle_cloth_update(Main *UNUSED(bmain), Scene *UNUSED(scene), { Object *ob = (Object *)ptr->id.data; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); } @@ -702,8 +704,8 @@ static void rna_Particle_target_reset(Main *bmain, Scene *UNUSED(scene), Pointer psys->recalc = PSYS_RECALC_RESET; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - DAG_relations_tag_update(bmain); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_relations_tag_update(bmain); } WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); @@ -718,7 +720,7 @@ static void rna_Particle_target_redo(Main *UNUSED(bmain), Scene *UNUSED(scene), psys->recalc = PSYS_RECALC_REDO; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); } } @@ -738,7 +740,7 @@ static void rna_Particle_hair_dynamics(Main *bmain, Scene *scene, PointerRNA *pt else WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } static PointerRNA rna_particle_settings_get(PointerRNA *ptr) { diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 8d161466d56..d8ed9800b4c 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -106,9 +106,11 @@ EnumPropertyItem rna_enum_color_sets_items[] = { #include "BKE_context.h" #include "BKE_constraint.h" -#include "BKE_depsgraph.h" #include "BKE_idprop.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "ED_object.h" #include "ED_armature.h" @@ -120,7 +122,7 @@ static void rna_Pose_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN { /* XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); */ - DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } static void rna_Pose_IK_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) @@ -128,7 +130,7 @@ static void rna_Pose_IK_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe /* XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); */ Object *ob = ptr->id.data; - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); BIK_clear_data(ob->pose); } @@ -233,13 +235,13 @@ static void rna_Pose_ik_solver_update(Main *bmain, Scene *UNUSED(scene), Pointer bPose *pose = ptr->data; BKE_pose_tag_recalc(bmain, pose); /* checks & sorts pose channels */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); BKE_pose_update_constraint_flags(pose); object_test_constraints(ob); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB); } /* rotation - axis-angle */ @@ -349,7 +351,7 @@ static void rna_Itasc_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR itasc->maxvel = 100.f; BIK_update_param(ob->pose); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } static void rna_Itasc_update_rebuild(Main *bmain, Scene *scene, PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index a1a7efdaba5..1ed375706df 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -91,7 +91,6 @@ static EnumPropertyItem rigidbody_mesh_source_items[] = { # include "RBI_api.h" #endif -#include "BKE_depsgraph.h" #include "BKE_rigidbody.h" #include "WM_api.h" diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 9326d169776..e0c43dafda5 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -470,7 +470,6 @@ EnumPropertyItem rna_enum_layer_collection_mode_settings_type_items[] = { #include "BKE_node.h" #include "BKE_pointcache.h" #include "BKE_scene.h" -#include "BKE_depsgraph.h" #include "BKE_idprop.h" #include "BKE_mesh.h" #include "BKE_sound.h" @@ -480,6 +479,9 @@ EnumPropertyItem rna_enum_layer_collection_mode_settings_type_items[] = { #include "BKE_freestyle.h" #include "BKE_gpencil.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "ED_info.h" #include "ED_node.h" #include "ED_view3d.h" @@ -668,11 +670,11 @@ static BaseLegacy *rna_Scene_object_link(Scene *scene, bContext *C, ReportList * ob->lay = base->lay; /* TODO(sergey): Only update relations for the current scene. */ - DAG_relations_tag_update(CTX_data_main(C)); - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_relations_tag_update(CTX_data_main(C)); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); /* slows down importers too much, run scene.update() */ - /* DAG_srelations_tag_update(G.main); */ + /* DEG_srelations_tag_update(G.main); */ WM_main_add_notifier(NC_SCENE | ND_OB_ACTIVE, scene); @@ -700,7 +702,7 @@ static void rna_Scene_object_unlink(Scene *scene, ReportList *reports, Object *o id_us_min(&ob->id); /* needed otherwise the depgraph will contain freed objects which can crash, see [#20958] */ - DAG_relations_tag_update(G.main); + DEG_relations_tag_update(G.main); WM_main_add_notifier(NC_SCENE | ND_OB_ACTIVE, scene); } @@ -775,7 +777,7 @@ static void rna_Scene_layer_update(Main *bmain, Scene *UNUSED(scene), PointerRNA * However, this has too much drawbacks (like slower layer switch, undesired updates...). * That's TODO for future DAG updates. */ - DAG_on_visible_update(bmain, false); + DEG_on_visible_update(bmain, false); /* No need to sync scene data here (WM_windows_scene_data_sync), handled through notifier. */ } @@ -1474,7 +1476,7 @@ static SceneRenderLayer *rna_RenderLayer_new(ID *id, RenderData *UNUSED(rd), con Scene *scene = (Scene *)id; SceneRenderLayer *srl = BKE_scene_add_render_layer(scene, name); - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); return srl; @@ -1494,7 +1496,7 @@ static void rna_RenderLayer_remove( RNA_POINTER_INVALIDATE(srl_ptr); - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); } @@ -1614,14 +1616,14 @@ static void rna_Scene_glsl_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi { Scene *scene = (Scene *)ptr->id.data; - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); } static void rna_Scene_freestyle_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { Scene *scene = (Scene *)ptr->id.data; - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); } static void rna_Scene_use_view_map_cache_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) @@ -1825,7 +1827,7 @@ static void object_simplify_update(Object *ob) for (md = ob->modifiers.first; md; md = md->next) { if (ELEM(md->type, eModifierType_Subsurf, eModifierType_Multires, eModifierType_ParticleSystem)) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } } @@ -1851,7 +1853,7 @@ static void rna_Scene_use_simplify_update(Main *bmain, Scene *scene, PointerRNA object_simplify_update(base->object); WM_main_add_notifier(NC_GEOM | ND_DATA, NULL); - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); } static void rna_Scene_simplify_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) @@ -2111,7 +2113,7 @@ static void rna_EditMesh_update(Main *UNUSED(bmain), bContext *C, Scene *UNUSED( } if (me) { - DAG_id_tag_update(&me->id, OB_RECALC_DATA); + DEG_id_tag_update(&me->id, OB_RECALC_DATA); WM_main_add_notifier(NC_GEOM | ND_DATA, me); } } @@ -2132,7 +2134,7 @@ static void rna_Scene_update_active_object_data(bContext *C, PointerRNA *UNUSED( Object *ob = OBACT_NEW; if (ob) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_DRAW, &ob->id); } } @@ -2143,7 +2145,7 @@ static void rna_SceneCamera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po Object *camera = scene->camera; if (camera) - DAG_id_tag_update(&camera->id, 0); + DEG_id_tag_update(&camera->id, 0); } static void rna_SceneSequencer_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) @@ -2180,7 +2182,7 @@ static FreestyleLineSet *rna_FreestyleSettings_lineset_add( Scene *scene = (Scene *)id; FreestyleLineSet *lineset = BKE_freestyle_lineset_add(bmain, (FreestyleConfig *)config, name); - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); return lineset; @@ -2199,7 +2201,7 @@ static void rna_FreestyleSettings_lineset_remove( RNA_POINTER_INVALIDATE(lineset_ptr); - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); } @@ -2236,7 +2238,7 @@ static FreestyleModuleConfig *rna_FreestyleSettings_module_add(ID *id, Freestyle Scene *scene = (Scene *)id; FreestyleModuleConfig *module = BKE_freestyle_module_add((FreestyleConfig *)config); - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); return module; @@ -2258,7 +2260,7 @@ static void rna_FreestyleSettings_module_remove( RNA_POINTER_INVALIDATE(module_ptr); - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL); } @@ -2355,7 +2357,7 @@ static int rna_SceneCollection_move_above(ID *id, SceneCollection *sc_src, Main return 0; } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); return 1; @@ -2369,7 +2371,7 @@ static int rna_SceneCollection_move_below(ID *id, SceneCollection *sc_src, Main return 0; } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); return 1; @@ -2383,7 +2385,7 @@ static int rna_SceneCollection_move_into(ID *id, SceneCollection *sc_src, Main * return 0; } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); return 1; @@ -2395,7 +2397,7 @@ static SceneCollection *rna_SceneCollection_new( Scene *scene = (Scene *)id; SceneCollection *sc = BKE_collection_add(scene, sc_parent, name); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); return sc; @@ -2422,7 +2424,7 @@ static void rna_SceneCollection_remove( RNA_POINTER_INVALIDATE(sc_ptr); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); } @@ -2459,12 +2461,12 @@ void rna_SceneCollection_object_link( BKE_collection_object_add(scene, sc, ob); /* TODO(sergey): Only update relations for the current scene. */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); WM_main_add_notifier(NC_SCENE | ND_LAYER | ND_OB_ACTIVE, scene); } @@ -2482,7 +2484,7 @@ static void rna_SceneCollection_object_unlink( BKE_collection_object_remove(bmain, scene, sc, ob, false); /* needed otherwise the depgraph will contain freed objects which can crash, see [#20958] */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_LAYER | ND_OB_ACTIVE, scene); } @@ -2624,14 +2626,14 @@ static void rna_SceneLayerEngineSettings_update(bContext *C, PointerRNA *UNUSED( { Scene *scene = CTX_data_scene(C); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); } static void rna_LayerCollectionEngineSettings_update(bContext *C, PointerRNA *UNUSED(ptr)) { Scene *scene = CTX_data_scene(C); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); } static void rna_LayerCollectionEngineSettings_wire_update(bContext *C, PointerRNA *UNUSED(ptr)) @@ -2645,7 +2647,7 @@ static void rna_LayerCollectionEngineSettings_wire_update(bContext *C, PointerRN } /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); } /***********************************/ @@ -2711,7 +2713,7 @@ static void rna_SceneLayerSettings_use(ID *id, IDProperty *props, const char *id engine_settings_use(props, scene_props, &scene_props_ptr, identifier); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); } static void rna_SceneLayerSettings_unuse(ID *id, IDProperty *props, const char *identifier) @@ -2720,7 +2722,7 @@ static void rna_SceneLayerSettings_unuse(ID *id, IDProperty *props, const char * IDP_FreeFromGroup(props, prop_to_remove); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); } static void rna_LayerCollectionSettings_name_get(PointerRNA *ptr, char *value) @@ -2746,7 +2748,7 @@ static void rna_LayerCollectionSettings_use(ID *id, IDProperty *props, const cha engine_settings_use(props, scene_props, &scene_props_ptr, identifier); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); } static void rna_LayerCollectionSettings_unuse(ID *id, IDProperty *props, const char *identifier) @@ -2755,7 +2757,7 @@ static void rna_LayerCollectionSettings_unuse(ID *id, IDProperty *props, const c IDP_FreeFromGroup(props, prop_to_remove); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); } static void rna_LayerCollection_name_get(PointerRNA *ptr, char *value) @@ -2792,7 +2794,7 @@ static int rna_LayerCollection_move_above(ID *id, LayerCollection *lc_src, Main return 0; } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); return 1; @@ -2806,7 +2808,7 @@ static int rna_LayerCollection_move_below(ID *id, LayerCollection *lc_src, Main return 0; } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); return 1; @@ -2820,7 +2822,7 @@ static int rna_LayerCollection_move_into(ID *id, LayerCollection *lc_src, Main * return 0; } - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); return 1; @@ -2830,7 +2832,7 @@ static void rna_LayerCollection_flag_update(bContext *C, PointerRNA *UNUSED(ptr) { Scene *scene = CTX_data_scene(C); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(&scene->id, 0); + DEG_id_tag_update(&scene->id, 0); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); } @@ -2876,9 +2878,9 @@ LayerCollection * rna_SceneLayer_collection_link( Scene *scene = (Scene *)id; LayerCollection *lc = BKE_collection_link(sl, sc); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); WM_main_add_notifier(NC_SCENE | ND_LAYER, scene); return lc; @@ -2896,9 +2898,9 @@ static void rna_SceneLayer_collection_unlink( BKE_collection_unlink(sl, lc); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); /* TODO(sergey): Use proper flag for tagging here. */ - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); WM_main_add_notifier(NC_SCENE | ND_LAYER | ND_OB_ACTIVE, scene); } @@ -3077,8 +3079,8 @@ static SceneLayer *rna_SceneLayer_new( Scene *scene = (Scene *)id; SceneLayer *sl = BKE_scene_layer_add(scene, name); - DAG_id_tag_update(&scene->id, 0); - DAG_relations_tag_update(bmain); + DEG_id_tag_update(&scene->id, 0); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); return sl; @@ -3098,8 +3100,8 @@ static void rna_SceneLayer_remove( RNA_POINTER_INVALIDATE(sl_ptr); - DAG_id_tag_update(&scene->id, 0); - DAG_relations_tag_update(bmain); + DEG_id_tag_update(&scene->id, 0); + DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); } diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index f9f4e1dcdb4..921e751fef6 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -60,7 +60,6 @@ EnumPropertyItem rna_enum_abc_compression_items[] = { #ifdef RNA_RUNTIME #include "BKE_animsys.h" -#include "BKE_depsgraph.h" #include "BKE_editmesh.h" #include "BKE_global.h" #include "BKE_image.h" diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index a145ac95d6b..2cda1558ec9 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -56,9 +56,10 @@ EnumPropertyItem rna_enum_region_type_items[] = { #ifdef RNA_RUNTIME #include "BKE_global.h" -#include "BKE_depsgraph.h" #include "BKE_workspace.h" +#include "DEG_depsgraph.h" + #include "UI_view2d.h" #ifdef WITH_PYTHON @@ -170,7 +171,7 @@ static void rna_Area_type_update(bContext *C, PointerRNA *ptr) /* It is possible that new layers becomes visible. */ if (sa->spacetype == SPACE_VIEW3D) { - DAG_on_visible_update(CTX_data_main(C), false); + DEG_on_visible_update(CTX_data_main(C), false); } CTX_wm_window_set(C, prevwin); diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 418527b85f2..6ff7df92312 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -102,9 +102,10 @@ EnumPropertyItem rna_enum_symmetrize_direction_items[] = { #include "BKE_DerivedMesh.h" #include "BKE_pointcache.h" #include "BKE_particle.h" -#include "BKE_depsgraph.h" #include "BKE_pbvh.h" +#include "DEG_depsgraph.h" + #include "GPU_buffers.h" #include "ED_particle.h" @@ -166,7 +167,7 @@ static void rna_ParticleEdit_update(Main *UNUSED(bmain), Scene *UNUSED(scene), b SceneLayer *sl = CTX_data_scene_layer(C); Object *ob = OBACT_NEW; - if (ob) DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + if (ob) DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value) @@ -177,7 +178,7 @@ static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value) if ((pset->brushtype == PE_BRUSH_WEIGHT || value == PE_BRUSH_WEIGHT) && pset->scene_layer) { Object *ob = (pset->scene_layer->basact) ? pset->scene_layer->basact->object : NULL; if (ob) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); } } @@ -264,7 +265,7 @@ static void rna_Sculpt_update(bContext *C, Scene *scene, PointerRNA *UNUSED(ptr) Object *ob = OBACT_NEW; if (ob) { - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); if (ob->sculpt) { diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index c12937bd2bf..687541b96b0 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -52,22 +52,24 @@ #ifdef RNA_RUNTIME #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_particle.h" #include "BKE_texture.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "smoke_API.h" static void rna_Smoke_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } static void rna_Smoke_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) { rna_Smoke_update(bmain, scene, ptr); - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } static void rna_Smoke_resetCache(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) @@ -75,7 +77,7 @@ static void rna_Smoke_resetCache(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin SmokeDomainSettings *settings = (SmokeDomainSettings *)ptr->data; if (settings->smd && settings->smd->domain) settings->point_cache[0]->flag |= PTCACHE_OUTDATED; - DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } static void rna_Smoke_cachetype_set(struct PointerRNA *ptr, int value) diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 65217cfcc4d..c3a6438286a 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -254,7 +254,6 @@ EnumPropertyItem rna_enum_file_sort_items[] = { #include "BKE_brush.h" #include "BKE_colortools.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_layer.h" #include "BKE_global.h" #include "BKE_nla.h" @@ -264,6 +263,9 @@ EnumPropertyItem rna_enum_file_sort_items[] = { #include "BKE_icons.h" #include "BKE_workspace.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_build.h" + #include "ED_buttons.h" #include "ED_fileselect.h" #include "ED_image.h" @@ -560,7 +562,7 @@ static int rna_SpaceView3D_active_layer_get(PointerRNA *ptr) static void rna_SpaceView3D_layer_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) { - DAG_on_visible_update(bmain, false); + DEG_on_visible_update(bmain, false); } static void rna_SpaceView3D_viewport_shade_update(Main *bmain, Scene *scene, PointerRNA *ptr) @@ -1371,9 +1373,9 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *bmain, bContext *C, Sce } /* force depsgraph flush too */ - DAG_id_tag_update(&obact->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&obact->id, OB_RECALC_OB | OB_RECALC_DATA); /* Update relations as well, so new time source dependency is added. */ - DAG_relations_tag_update(bmain); + DEG_relations_tag_update(bmain); } } diff --git a/source/blender/makesrna/intern/rna_speaker.c b/source/blender/makesrna/intern/rna_speaker.c index f47b54c2d95..f37b75b3db2 100644 --- a/source/blender/makesrna/intern/rna_speaker.c +++ b/source/blender/makesrna/intern/rna_speaker.c @@ -41,7 +41,6 @@ #include "MEM_guardedalloc.h" -#include "BKE_depsgraph.h" #include "BKE_main.h" #include "WM_api.h" diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index a05cc8edb11..8a8fcb8d119 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -113,11 +113,12 @@ static EnumPropertyItem blend_type_items[] = { #include "RNA_access.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_image.h" #include "BKE_texture.h" #include "BKE_main.h" +#include "DEG_depsgraph.h" + #include "ED_node.h" #include "ED_render.h" @@ -168,7 +169,7 @@ static void rna_Texture_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *pt if (GS(id->name) == ID_TE) { Tex *tex = ptr->id.data; - DAG_id_tag_update(&tex->id, 0); + DEG_id_tag_update(&tex->id, 0); WM_main_add_notifier(NC_TEXTURE, tex); WM_main_add_notifier(NC_MATERIAL | ND_SHADING_DRAW, NULL); } @@ -214,7 +215,7 @@ static void rna_Texture_nodes_update(Main *UNUSED(bmain), Scene *UNUSED(scene), { Tex *tex = ptr->id.data; - DAG_id_tag_update(&tex->id, 0); + DEG_id_tag_update(&tex->id, 0); WM_main_add_notifier(NC_TEXTURE | ND_NODES, tex); } @@ -229,7 +230,7 @@ void rna_TextureSlot_update(bContext *C, PointerRNA *ptr) { ID *id = ptr->id.data; - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); switch (GS(id->name)) { case ID_MA: @@ -265,7 +266,7 @@ void rna_TextureSlot_update(bContext *C, PointerRNA *ptr) if (mtex->mapto & PAMAP_CHILD) recalc |= PSYS_RECALC_CHILD; - DAG_id_tag_update(id, recalc); + DEG_id_tag_update(id, recalc); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); break; } diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 7a01e3a4f6b..ea45b08458c 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -48,9 +48,10 @@ #ifdef RNA_RUNTIME -#include "BKE_depsgraph.h" #include "BKE_node.h" +#include "DEG_depsgraph.h" + #include "IMB_imbuf.h" #include "WM_api.h" @@ -466,7 +467,7 @@ static void rna_tracking_flushUpdate(Main *UNUSED(bmain), Scene *scene, PointerR WM_main_add_notifier(NC_SCENE | ND_NODES, NULL); WM_main_add_notifier(NC_SCENE, NULL); - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); } static void rna_tracking_resetIntrinsics(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) @@ -555,7 +556,7 @@ static void rna_trackingObject_flushUpdate(Main *UNUSED(bmain), Scene *UNUSED(sc MovieClip *clip = (MovieClip *)ptr->id.data; WM_main_add_notifier(NC_OBJECT | ND_TRANSFORM, NULL); - DAG_id_tag_update(&clip->id, 0); + DEG_id_tag_update(&clip->id, 0); } static void rna_trackingMarker_frame_set(PointerRNA *ptr, int value) diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index a0fb398ee3a..ae77f64497e 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -98,13 +98,14 @@ static EnumPropertyItem rna_enum_language_default_items[] = { #include "DNA_screen_types.h" #include "BKE_blender.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_main.h" #include "BKE_idprop.h" #include "BKE_pbvh.h" #include "BKE_paint.h" +#include "DEG_depsgraph.h" + #include "GPU_draw.h" #include "GPU_select.h" @@ -363,7 +364,7 @@ static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRN for (ob = bmain->object.first; ob; ob = ob->id.next) { if (ob->mode & OB_MODE_WEIGHT_PAINT) - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); } rna_userdef_update(bmain, scene, ptr); @@ -502,7 +503,7 @@ static void rna_userdef_opensubdiv_update(Main *bmain, Scene *UNUSED(scene), Poi if (object->derivedFinal != NULL && object->derivedFinal->type == DM_TYPE_CCGDM) { - DAG_id_tag_update(&object->id, OB_RECALC_OB); + DEG_id_tag_update(&object->id, OB_RECALC_OB); } } } diff --git a/source/blender/makesrna/intern/rna_vfont.c b/source/blender/makesrna/intern/rna_vfont.c index c743751649c..78d46d35246 100644 --- a/source/blender/makesrna/intern/rna_vfont.c +++ b/source/blender/makesrna/intern/rna_vfont.c @@ -38,9 +38,10 @@ #ifdef RNA_RUNTIME #include "BKE_font.h" -#include "BKE_depsgraph.h" #include "DNA_object_types.h" +#include "DEG_depsgraph.h" + #include "WM_api.h" /* matching fnction in rna_ID.c */ @@ -60,7 +61,7 @@ static void rna_VectorFont_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scen /* update */ WM_main_add_notifier(NC_GEOM | ND_DATA, NULL); - DAG_id_tag_update(&vf->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&vf->id, OB_RECALC_OB | OB_RECALC_DATA); } #else diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c index 202ba63c850..8e3e5b67a76 100644 --- a/source/blender/makesrna/intern/rna_world.c +++ b/source/blender/makesrna/intern/rna_world.c @@ -43,10 +43,11 @@ #include "MEM_guardedalloc.h" #include "BKE_context.h" -#include "BKE_depsgraph.h" #include "BKE_main.h" #include "BKE_texture.h" +#include "DEG_depsgraph.h" + #include "ED_node.h" #include "WM_api.h" @@ -88,7 +89,7 @@ static void rna_World_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR { World *wo = ptr->id.data; - DAG_id_tag_update(&wo->id, 0); + DEG_id_tag_update(&wo->id, 0); WM_main_add_notifier(NC_WORLD | ND_WORLD, wo); } @@ -97,7 +98,7 @@ static void rna_World_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi { World *wo = ptr->id.data; - DAG_id_tag_update(&wo->id, 0); + DEG_id_tag_update(&wo->id, 0); WM_main_add_notifier(NC_WORLD | ND_WORLD_DRAW, wo); } #endif @@ -106,7 +107,7 @@ static void rna_World_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi { World *wo = ptr->id.data; - DAG_id_tag_update(&wo->id, 0); + DEG_id_tag_update(&wo->id, 0); WM_main_add_notifier(NC_WORLD | ND_WORLD_DRAW, wo); WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL); } -- cgit v1.2.3