Depsgraph: Remove duplicated sets of recalc/update flags
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 6 Dec 2018 16:52:37 +0000 (17:52 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 7 Dec 2018 10:37:38 +0000 (11:37 +0100)
There were at least three copies of those:

- OB_RECALC* family of flags, which are rudiment of an old
  dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
  as a separate set since the graph itself did not handle
  particle systems.
- DEG_TAG_* which was used to tag IDs.

Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.

Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.

Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.

Fixes T58632: Particle don't update rotation settings

181 files changed:
source/blender/alembic/intern/alembic_capi.cc
source/blender/blenkernel/intern/collection.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/gpencil.c
source/blender/blenkernel/intern/layer.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/library_remap.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mesh_validate.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/paint.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/scene.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_270.c
source/blender/blenloader/intern/versioning_legacy.c
source/blender/collada/AnimationImporter.cpp
source/blender/collada/ArmatureImporter.cpp
source/blender/collada/DocumentImporter.cpp
source/blender/collada/SkinInfo.cpp
source/blender/collada/collada_utils.cpp
source/blender/depsgraph/DEG_depsgraph.h
source/blender/depsgraph/intern/builder/deg_builder.cc
source/blender/depsgraph/intern/depsgraph_tag.cc
source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
source/blender/depsgraph/intern/eval/deg_eval_flush.cc
source/blender/depsgraph/intern/nodes/deg_node_component.cc
source/blender/draw/engines/eevee/eevee_lightcache.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_deps.c
source/blender/editors/animation/anim_markers.c
source/blender/editors/animation/drivers.c
source/blender/editors/animation/keyframing.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/armature_naming.c
source/blender/editors/armature/armature_relations.c
source/blender/editors/armature/editarmature_undo.c
source/blender/editors/armature/pose_edit.c
source/blender/editors/armature/pose_group.c
source/blender/editors/armature/pose_lib.c
source/blender/editors/armature/pose_select.c
source/blender/editors/armature/pose_transform.c
source/blender/editors/armature/pose_utils.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editcurve_add.c
source/blender/editors/curve/editcurve_select.c
source/blender/editors/curve/editcurve_undo.c
source/blender/editors/curve/editfont.c
source/blender/editors/curve/editfont_undo.c
source/blender/editors/gpencil/annotate_paint.c
source/blender/editors/gpencil/gpencil_add_monkey.c
source/blender/editors/gpencil/gpencil_add_stroke.c
source/blender/editors/gpencil/gpencil_armature.c
source/blender/editors/gpencil/gpencil_brush.c
source/blender/editors/gpencil/gpencil_convert.c
source/blender/editors/gpencil/gpencil_data.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_fill.c
source/blender/editors/gpencil/gpencil_interpolate.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/gpencil/gpencil_primitive.c
source/blender/editors/gpencil/gpencil_select.c
source/blender/editors/gpencil/gpencil_undo.c
source/blender/editors/interface/interface_eyedropper_driver.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/io/io_collada.c
source/blender/editors/lattice/editlattice_select.c
source/blender/editors/lattice/editlattice_tools.c
source/blender/editors/lattice/editlattice_undo.c
source/blender/editors/mask/mask_shapekey.c
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/editmesh_loopcut.c
source/blender/editors/mesh/editmesh_polybuild.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/editmesh_undo.c
source/blender/editors/mesh/editmesh_utils.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/metaball/editmball_undo.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_collection.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_data_transfer.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_facemap_ops.c
source/blender/editors/object/object_gpencil_modifier.c
source/blender/editors/object/object_hook.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/object/object_shader_fx.c
source/blender/editors/object/object_shapekey.c
source/blender/editors/object/object_transform.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/physics/particle_boids.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/particle_edit_undo.c
source/blender/editors/physics/particle_object.c
source/blender/editors/physics/rigidbody_constraint.c
source/blender/editors/physics/rigidbody_object.c
source/blender/editors/physics/rigidbody_world.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/paint_vertex_color_ops.c
source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_undo.c
source/blender/editors/space_clip/tracking_ops_orient.c
source/blender/editors/space_clip/tracking_select.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_nla/nla_channels.c
source/blender/editors/space_outliner/outliner_collections.c
source/blender/editors/space_outliner/outliner_dragdrop.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_camera_control.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_gizmo_empty.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/editors/space_view3d/view3d_utils.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_particle_types.h
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_animation.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_boid.c
source/blender/makesrna/intern/rna_cloth.c
source/blender/makesrna/intern/rna_collection.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_dynamicpaint.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_fluidsim.c
source/blender/makesrna/intern/rna_gpencil.c
source/blender/makesrna/intern/rna_gpencil_modifier.c
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_key.c
source/blender/makesrna/intern/rna_layer.c
source/blender/makesrna/intern/rna_lightprobe.c
source/blender/makesrna/intern/rna_mask.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nla.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/makesrna/intern/rna_shader_fx.c
source/blender/makesrna/intern/rna_smoke.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_vfont.c
source/blender/modifiers/intern/MOD_correctivesmooth.c
source/blender/modifiers/intern/MOD_particlesystem.c
source/blender/python/bmesh/bmesh_py_types.c
source/blender/render/intern/source/pipeline.c

index e1d4eb3..c0daf9c 100644 (file)
@@ -818,12 +818,12 @@ static void import_endjob(void *user_data)
                        /* TODO: is setting active needed? */
                        BKE_view_layer_base_select_and_set_active(view_layer, base);
 
-                       DEG_id_tag_update(&lc->collection->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&lc->collection->id, ID_RECALC_COPY_ON_WRITE);
                        DEG_id_tag_update_ex(data->bmain, &ob->id,
-                                            OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME | DEG_TAG_BASE_FLAGS_UPDATE);
+                                            ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION | ID_RECALC_BASE_FLAGS);
                }
 
-               DEG_id_tag_update(&data->scene->id, DEG_TAG_BASE_FLAGS_UPDATE);
+               DEG_id_tag_update(&data->scene->id, ID_RECALC_BASE_FLAGS);
                DEG_relations_tag_update(data->bmain);
        }
 
index 7b78983..763c0d5 100644 (file)
@@ -512,7 +512,7 @@ static bool collection_object_add(Main *bmain, Collection *collection, Object *o
        }
 
        if ((flag & LIB_ID_CREATE_NO_MAIN) == 0) {
-               DEG_id_tag_update_ex(bmain, &collection->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update_ex(bmain, &collection->id, ID_RECALC_COPY_ON_WRITE);
        }
 
        return true;
@@ -535,7 +535,7 @@ static bool collection_object_remove(Main *bmain, Collection *collection, Object
                id_us_min(&ob->id);
        }
 
-       DEG_id_tag_update_ex(bmain, &collection->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update_ex(bmain, &collection->id, ID_RECALC_COPY_ON_WRITE);
 
        return true;
 }
index 1a5b73a..a1bc7ac 100644 (file)
@@ -5157,7 +5157,7 @@ static bConstraint *constraint_find_original_for_update(bConstraintOb *cob, bCon
        bConstraint *orig_con = constraint_find_original(cob->ob, cob->pchan, con, &orig_ob);
 
        if (orig_con != NULL) {
-               DEG_id_tag_update(&orig_ob->id, DEG_TAG_COPY_ON_WRITE | DEG_TAG_TRANSFORM);
+               DEG_id_tag_update(&orig_ob->id, ID_RECALC_COPY_ON_WRITE | ID_RECALC_TRANSFORM);
        }
 
        return orig_con;
index a4f3485..527b950 100644 (file)
@@ -5296,7 +5296,7 @@ bool BKE_curve_material_index_validate(Curve *cu)
        }
 
        if (!is_valid) {
-               DEG_id_tag_update(&cu->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&cu->id, ID_RECALC_GEOMETRY);
                return true;
        }
        else {
index e694c12..dd1a252 100644 (file)
@@ -78,7 +78,7 @@ void(*BKE_gpencil_batch_cache_free_cb)(bGPdata *gpd) = NULL;
 void BKE_gpencil_batch_cache_dirty_tag(bGPdata *gpd)
 {
        if (gpd) {
-               DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
                BKE_gpencil_batch_cache_dirty_tag_cb(gpd);
        }
 }
@@ -1219,7 +1219,7 @@ void BKE_gpencil_vgroup_remove(Object *ob, bDeformGroup *defgroup)
 
        /* Remove the group */
        BLI_freelinkN(&ob->defbase, defgroup);
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 }
 
 
index 1f2e54a..bee9155 100644 (file)
@@ -861,7 +861,7 @@ void BKE_main_collection_sync_remap(const Main *bmain)
 
        for (Collection *collection = bmain->collection.first; collection; collection = collection->id.next) {
                BKE_collection_object_cache_free(collection);
-               DEG_id_tag_update_ex((Main *)bmain, &collection->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update_ex((Main *)bmain, &collection->id, ID_RECALC_COPY_ON_WRITE);
        }
 
        BKE_main_collection_sync(bmain);
index e631803..b77b2f1 100644 (file)
@@ -787,8 +787,8 @@ bool id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop)
 
                                /* tag grease pencil datablock and disable onion */
                                if (GS(id->name) == ID_GD) {
-                                       DEG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA);
-                                       DEG_id_tag_update(newid, OB_RECALC_OB | OB_RECALC_DATA);
+                                       DEG_id_tag_update(id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
+                                       DEG_id_tag_update(newid, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                                        bGPdata *gpd = (bGPdata *)newid;
                                        gpd->flag &= ~GP_DATA_SHOW_ONIONSKINS;
                                }
@@ -979,7 +979,7 @@ void BKE_main_lib_objects_recalc_all(Main *bmain)
        /* flag for full recalc */
        for (ob = bmain->object.first; ob; ob = ob->id.next) {
                if (ID_IS_LINKED(ob)) {
-                       DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+                       DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
                }
        }
 
index e5d313e..458d723 100644 (file)
@@ -242,7 +242,7 @@ static int foreach_libblock_remap_callback(void *user_data, ID *id_self, ID **id
                        if (!is_never_null) {
                                *id_p = new_id;
                                DEG_id_tag_update_ex(id_remap_data->bmain, id_self,
-                                                    DEG_TAG_COPY_ON_WRITE | DEG_TAG_TRANSFORM | DEG_TAG_GEOMETRY);
+                                                    ID_RECALC_COPY_ON_WRITE | ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                        }
                        if (cb_flag & IDWALK_CB_USER) {
                                id_us_min(old_id);
@@ -307,14 +307,14 @@ static void libblock_remap_data_postprocess_object_update(Main *bmain, Object *o
        if (old_ob == NULL) {
                for (Object *ob = bmain->object.first; ob != NULL; ob = ob->id.next) {
                        if (ob->type == OB_MBALL && BKE_mball_is_basis(ob)) {
-                               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                        }
                }
        }
        else {
                for (Object *ob = bmain->object.first; ob != NULL; ob = ob->id.next) {
                        if (ob->type == OB_MBALL && BKE_mball_is_basis_for(ob, old_ob)) {
-                               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                                break;  /* There is only one basis... */
                        }
                }
index d45b19b..1664083 100644 (file)
@@ -425,7 +425,7 @@ void BKE_material_resize_id(Main *bmain, ID *id, short totcol, bool do_id_user)
        }
        *totcolp = totcol;
 
-       DEG_id_tag_update(id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(id, ID_RECALC_COPY_ON_WRITE);
        DEG_relations_tag_update(bmain);
 }
 
@@ -444,7 +444,7 @@ void BKE_material_append_id(Main *bmain, ID *id, Material *ma)
                id_us_plus((ID *)ma);
                test_all_objects_materials(bmain, id);
 
-               DEG_id_tag_update(id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(id, ID_RECALC_COPY_ON_WRITE);
                DEG_relations_tag_update(bmain);
        }
 }
@@ -479,7 +479,7 @@ Material *BKE_material_pop_id(Main *bmain, ID *id, int index_i, bool update_data
                                material_data_index_remove_id(id, index);
                        }
 
-                       DEG_id_tag_update(id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(id, ID_RECALC_COPY_ON_WRITE);
                        DEG_relations_tag_update(bmain);
                }
        }
@@ -507,7 +507,7 @@ void BKE_material_clear_id(Main *bmain, ID *id, bool update_data)
                        material_data_index_clear_id(id);
                }
 
-               DEG_id_tag_update(id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(id, ID_RECALC_COPY_ON_WRITE);
                DEG_relations_tag_update(bmain);
        }
 }
@@ -618,7 +618,7 @@ void BKE_material_resize_object(Main *bmain, Object *ob, const short totcol, boo
        if (ob->totcol && ob->actcol == 0) ob->actcol = 1;
        if (ob->actcol > ob->totcol) ob->actcol = ob->totcol;
 
-       DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE | DEG_TAG_GEOMETRY);
+       DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE | ID_RECALC_GEOMETRY);
        DEG_relations_tag_update(bmain);
 }
 
index bb86e4b..8ecb47c 100644 (file)
@@ -958,7 +958,7 @@ bool BKE_mesh_validate(Mesh *me, const bool do_verbose, const bool cddata_check_
                &changed);
 
        if (changed) {
-               DEG_id_tag_update(&me->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&me->id, ID_RECALC_GEOMETRY);
                return true;
        }
        else {
@@ -1025,7 +1025,7 @@ bool BKE_mesh_validate_material_indices(Mesh *me)
        }
 
        if (!is_valid) {
-               DEG_id_tag_update(&me->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&me->id, ID_RECALC_GEOMETRY);
                return true;
        }
        else {
index 694dae7..b694696 100644 (file)
@@ -517,7 +517,7 @@ void BKE_object_free_caches(Object *object)
                     psys = psys->next)
                {
                        psys_free_path_cache(psys, psys->edit);
-                       update_flag |= PSYS_RECALC_REDO;
+                       update_flag |= ID_RECALC_PSYS_REDO;
                }
        }
 
@@ -533,7 +533,7 @@ void BKE_object_free_caches(Object *object)
                                        psmd->mesh_original = NULL;
                                }
                                psmd->flag |= eParticleSystemFlag_file_loaded;
-                               update_flag |= OB_RECALC_DATA;
+                               update_flag |= ID_RECALC_GEOMETRY;
                        }
                }
        }
@@ -544,7 +544,7 @@ void BKE_object_free_caches(Object *object)
         */
        if ((object->base_flag & BASE_FROMDUPLI) == 0) {
                BKE_object_free_derived_caches(object);
-               update_flag |= OB_RECALC_DATA;
+               update_flag |= ID_RECALC_GEOMETRY;
        }
 
        /* Tag object for update, so once memory critical operation is over and
@@ -904,7 +904,7 @@ static Object *object_add_common(Main *bmain, ViewLayer *view_layer, int type, c
        ob->data = BKE_object_obdata_add_from_type(bmain, type, name);
        BKE_view_layer_base_deselect_all(view_layer);
 
-       DEG_id_tag_update_ex(bmain, &ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+       DEG_id_tag_update_ex(bmain, &ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
        return ob;
 }
 
@@ -978,7 +978,7 @@ Object *BKE_object_add_for_data(
        if (do_id_user) id_us_plus(data);
 
        BKE_view_layer_base_deselect_all(view_layer);
-       DEG_id_tag_update_ex(bmain, &ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+       DEG_id_tag_update_ex(bmain, &ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
 
        layer_collection = BKE_layer_collection_get_active(view_layer);
        BKE_collection_object_add(bmain, layer_collection->collection, ob);
@@ -1567,8 +1567,8 @@ void BKE_object_make_proxy(Main *bmain, Object *ob, Object *target, Object *cob)
        ob->proxy_group = cob;
        id_lib_extern(&target->id);
 
-       DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
-       DEG_id_tag_update(&target->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+       DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
+       DEG_id_tag_update(&target->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
 
        /* copy transform
         * - cob means this proxy comes from a collection, just apply the matrix
@@ -2856,7 +2856,7 @@ void BKE_object_handle_update_ex(Depsgraph *depsgraph,
                                  const bool do_proxy_update)
 {
        const ID *object_data = ob->data;
-       const bool recalc_object = (ob->id.recalc & ID_RECALC) != 0;
+       const bool recalc_object = (ob->id.recalc & ID_RECALC_ALL) != 0;
        const bool recalc_data =
                (object_data != NULL) ? ((object_data->recalc & ID_RECALC_ALL) != 0)
                                      : 0;
@@ -2883,9 +2883,9 @@ void BKE_object_handle_update_ex(Depsgraph *depsgraph,
                        }
                }
        }
-       /* XXX new animsys warning: depsgraph tag OB_RECALC_DATA should not skip drivers,
+       /* XXX new animsys warning: depsgraph tag ID_RECALC_GEOMETRY should not skip drivers,
         * which is only in BKE_object_where_is_calc now */
-       /* XXX: should this case be OB_RECALC_OB instead? */
+       /* XXX: should this case be ID_RECALC_TRANSFORM instead? */
        if (recalc_object || recalc_data) {
                if (G.debug & G_DEBUG_DEPSGRAPH_EVAL) {
                        printf("recalcob %s\n", ob->id.name + 2);
@@ -3695,7 +3695,7 @@ void BKE_object_groups_clear(Main *bmain, Object *ob)
        Collection *collection = NULL;
        while ((collection = BKE_collection_object_find(bmain, collection, ob))) {
                BKE_collection_object_remove(bmain, collection, ob, false);
-               DEG_id_tag_update(&collection->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&collection->id, ID_RECALC_COPY_ON_WRITE);
        }
 }
 
@@ -4016,7 +4016,7 @@ bool BKE_object_modifier_update_subframe(
                }
        }
 
-       /* was originally OB_RECALC_ALL - TODO - which flags are really needed??? */
+       /* was originally ID_RECALC_ALL - TODO - which flags are really needed??? */
        /* TODO(sergey): What about animation? */
        ob->id.recalc |= ID_RECALC_ALL;
        BKE_animsys_evaluate_animdata(depsgraph, scene, &ob->id, ob->adt, frame, ADT_RECALC_ANIM);
index 0311d7f..e7c10f0 100644 (file)
@@ -921,7 +921,7 @@ void BKE_sculptsession_bm_to_me(Object *ob, bool reorder)
                sculptsession_bm_to_me_update_data_only(ob, reorder);
 
                /* ensure the objects evaluated mesh doesn't hold onto arrays now realloc'd in the mesh [#34473] */
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
        }
 }
 
@@ -1098,7 +1098,7 @@ void BKE_sculpt_update_mesh_elements(
 #else                  /* if we wanted to support adding mask data while multi-res painting, we would need to do this */
                                if ((ED_sculpt_mask_layers_ensure(ob, mmd) & ED_SCULPT_MASK_LAYER_CALC_LOOP)) {
                                        /* remake the derived mesh */
-                                       ob->recalc |= OB_RECALC_DATA;
+                                       ob->recalc |= ID_RECALC_GEOMETRY;
                                        BKE_object_handle_update(scene, ob);
                                }
 #endif
index f86fe27..5bfadd9 100644 (file)
@@ -3088,7 +3088,7 @@ ModifierData *object_add_particle_system(Main *bmain, Scene *scene, Object *ob,
        psys->cfra = BKE_scene_frame_get_from_ctime(scene, CFRA + 1);
 
        DEG_relations_tag_update(bmain);
-       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
 
        return md;
 }
@@ -3134,10 +3134,10 @@ void object_remove_particle_system(Main *bmain, Scene *UNUSED(scene), Object *ob
                ob->mode &= ~OB_MODE_PARTICLE_EDIT;
 
        DEG_relations_tag_update(bmain);
-       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
 
        /* Flush object mode. */
-       DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
 }
 
 static void default_particle_settings(ParticleSettings *part)
index bcaebc9..2cb9dd0 100644 (file)
@@ -2916,10 +2916,10 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra, cons
        ParticleEditSettings *pset = &sim->scene->toolsettings->particle;
        int distr=0, alloc=0, skip=0;
 
-       if ((psys->part->childtype && psys->totchild != psys_get_tot_child(sim->scene, psys, use_render_params)) || psys->recalc&PSYS_RECALC_RESET)
+       if ((psys->part->childtype && psys->totchild != psys_get_tot_child(sim->scene, psys, use_render_params)) || psys->recalc&ID_RECALC_PSYS_RESET)
                alloc=1;
 
-       if (alloc || psys->recalc&PSYS_RECALC_CHILD || (psys->vgroup[PSYS_VG_DENSITY] && (sim->ob && sim->ob->mode & OB_MODE_WEIGHT_PAINT)))
+       if (alloc || psys->recalc&ID_RECALC_PSYS_CHILD || (psys->vgroup[PSYS_VG_DENSITY] && (sim->ob && sim->ob->mode & OB_MODE_WEIGHT_PAINT)))
                distr=1;
 
        if (distr) {
@@ -3248,7 +3248,7 @@ static void hair_step(ParticleSimulationData *sim, float cfra, const bool use_re
                        pa->flag &= ~PARS_NO_DISP;
        }
 
-       if (psys->recalc & PSYS_RECALC_RESET) {
+       if (psys->recalc & ID_RECALC_PSYS_RESET) {
                /* need this for changing subsurf levels */
                psys_calc_dmcache(sim->ob, sim->psmd->mesh_final, sim->psmd->mesh_original, psys);
 
@@ -3964,7 +3964,7 @@ static void system_step(ParticleSimulationData *sim, float cfra, const bool use_
                BKE_ptcache_id_time(pid, sim->scene, 0.0f, &startframe, &endframe, NULL);
 
                /* clear everything on start frame, or when psys needs full reset! */
-               if ((cfra == startframe) || (psys->recalc & PSYS_RECALC_RESET)) {
+               if ((cfra == startframe) || (psys->recalc & ID_RECALC_PSYS_RESET)) {
                        BKE_ptcache_id_reset(sim->scene, pid, PTCACHE_RESET_OUTDATED);
                        BKE_ptcache_validate(cache, startframe);
                        cache->flag &= ~PTCACHE_REDO_NEEDED;
@@ -3975,7 +3975,7 @@ static void system_step(ParticleSimulationData *sim, float cfra, const bool use_
 
 /* 1. emit particles and redo particles if needed */
        oldtotpart = psys->totpart;
-       if (emit_particles(sim, pid, cfra) || psys->recalc & PSYS_RECALC_RESET) {
+       if (emit_particles(sim, pid, cfra) || psys->recalc & ID_RECALC_PSYS_RESET) {
                distribute_particles(sim, part->from);
                initialize_all_particles(sim);
                /* reset only just created particles (on startframe all particles are recreated) */
@@ -4200,7 +4200,7 @@ static void psys_prepare_physics(ParticleSimulationData *sim)
 static int hair_needs_recalc(ParticleSystem *psys)
 {
        if (!(psys->flag & PSYS_EDITED) && (!psys->edit || !psys->edit->edited) &&
-           ((psys->flag & PSYS_HAIR_DONE)==0 || psys->recalc & PSYS_RECALC_RESET || (psys->part->flag & PART_HAIR_REGROW && !psys->edit)))
+           ((psys->flag & PSYS_HAIR_DONE)==0 || psys->recalc & ID_RECALC_PSYS_RESET || (psys->part->flag & PART_HAIR_REGROW && !psys->edit)))
        {
                return 1;
        }
@@ -4253,7 +4253,7 @@ void particle_system_update(struct Depsgraph *depsgraph, Scene *scene, Object *o
        /* to verify if we need to restore object afterwards */
        psys->flag &= ~PSYS_OB_ANIM_RESTORE;
 
-       if (psys->recalc & PSYS_RECALC_RESET)
+       if (psys->recalc & ID_RECALC_PSYS_RESET)
                psys->totunexist = 0;
 
        /* setup necessary physics type dependent additional data if it doesn't yet exist */
@@ -4320,10 +4320,10 @@ void particle_system_update(struct Depsgraph *depsgraph, Scene *scene, Object *o
                                        bool free_unexisting = false;
 
                                        /* Particles without dynamics haven't been reset yet because they don't use pointcache */
-                                       if (psys->recalc & PSYS_RECALC_RESET)
+                                       if (psys->recalc & ID_RECALC_PSYS_RESET)
                                                psys_reset(psys, PSYS_RESET_ALL);
 
-                                       if (emit_particles(&sim, NULL, cfra) || (psys->recalc & PSYS_RECALC_RESET)) {
+                                       if (emit_particles(&sim, NULL, cfra) || (psys->recalc & ID_RECALC_PSYS_RESET)) {
                                                free_keyed_keys(psys);
                                                distribute_particles(&sim, part->from);
                                                initialize_all_particles(&sim);
@@ -4436,7 +4436,7 @@ void BKE_particle_system_eval_init(struct Depsgraph *depsgraph,
             psys != NULL;
             psys = psys->next)
        {
-               psys->recalc |= (psys->part->id.recalc & DEG_TAG_PSYS_ALL);
+               psys->recalc |= (psys->part->id.recalc & ID_RECALC_PSYS_ALL);
        }
        BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH);
 }
index f336b7d..9f9f470 100644 (file)
@@ -3389,7 +3389,7 @@ int  BKE_ptcache_object_reset(Scene *scene, Object *ob, int mode)
 
        for (psys=ob->particlesystem.first; psys; psys=psys->next) {
                /* children or just redo can be calculated without resetting anything */
-               if (psys->recalc & PSYS_RECALC_REDO || psys->recalc & PSYS_RECALC_CHILD)
+               if (psys->recalc & ID_RECALC_PSYS_REDO || psys->recalc & ID_RECALC_PSYS_CHILD)
                        skip = 1;
                /* Baked cloth hair has to be checked too, because we don't want to reset */
                /* particles or cloth in that case -jahka */
index 053ca38..36b75d9 100644 (file)
@@ -1201,7 +1201,7 @@ int BKE_scene_camera_switch_update(Scene *scene)
        Object *camera = BKE_scene_camera_switch_find(scene);
        if (camera) {
                scene->camera = camera;
-               DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE);
                return 1;
        }
 #else
index 10da606..360f836 100644 (file)
@@ -3607,7 +3607,7 @@ static void lib_link_pose(FileData *fd, Main *bmain, Object *ob, bPose *pose)
 
 
        if (rebuild) {
-               DEG_id_tag_update_ex(bmain, &ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+               DEG_id_tag_update_ex(bmain, &ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
                BKE_pose_tag_recalc(bmain, pose);
        }
 }
@@ -10384,7 +10384,7 @@ static void add_collections_to_scene(
                                }
 
                                BKE_scene_object_base_flag_sync_from_base(base);
-                               DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+                               DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
                                view_layer->basact = base;
 
                                /* Assign the collection. */
index 568b3c5..8613ffc 100644 (file)
@@ -864,7 +864,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
                        for (ob = bmain->object.first; ob; ob = ob->id.next) {
                                for (psys = ob->particlesystem.first; psys; psys = psys->next) {
                                        if ((psys->pointcache->flag & PTCACHE_BAKED) == 0) {
-                                               psys->recalc |= PSYS_RECALC_RESET;
+                                               psys->recalc |= ID_RECALC_PSYS_RESET;
                                        }
                                }
                        }
index 3c8e69a..3b4e351 100644 (file)
@@ -2267,7 +2267,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
 
                                                part->draw_as = PART_DRAW_PATH;
                                                part->type = PART_HAIR;
-                                               psys->recalc |= PSYS_RECALC_REDO;
+                                               psys->recalc |= ID_RECALC_PSYS_REDO;
 
                                                part->normfac *= fac;
                                                part->randfac *= fac;
index e3a8e51..a4b14d9 100644 (file)
@@ -1945,7 +1945,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);
-               DEG_id_tag_update(&job->id, OB_RECALC_OB);
+               DEG_id_tag_update(&job->id, ID_RECALC_TRANSFORM);
 
                verify_adt_action((ID *)&job->id, 1);
 
@@ -1966,7 +1966,7 @@ Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root, COLLADAFW::No
                if (par_job) {
                        job->parent = par_job;
 
-                       DEG_id_tag_update(&par_job->id, OB_RECALC_OB);
+                       DEG_id_tag_update(&par_job->id, ID_RECALC_TRANSFORM);
                        job->parsubstr[0] = 0;
                }
 
index 2644eef..cfafa50 100644 (file)
@@ -499,7 +499,7 @@ void ArmatureImporter::create_armature_bones(Main *bmain, std::vector<Object *>
                        ob_arms.push_back(ob_arm);
                }
 
-               DEG_id_tag_update(&ob_arm->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&ob_arm->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        }
 }
 
@@ -632,7 +632,7 @@ Object *ArmatureImporter::create_armature_bones(Main *bmain, SkinInfo& skin)
        ED_armature_from_edit(bmain, armature);
        ED_armature_edit_free(armature);
 
-       DEG_id_tag_update(&ob_arm->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&ob_arm->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 
        return ob_arm;
 }
index afd50c1..e59483f 100644 (file)
@@ -269,7 +269,7 @@ void DocumentImporter::finish()
        delete objects_to_scale;
 
        // update scene
-       DEG_id_tag_update(&sce->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&sce->id, ID_RECALC_COPY_ON_WRITE);
        DEG_relations_tag_update(bmain);
        WM_event_add_notifier(mContext, NC_OBJECT | ND_TRANSFORM, NULL);
 }
@@ -406,7 +406,7 @@ Object *DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Nod
 
        Main *bmain = CTX_data_main(mContext);
        Object *obn = BKE_object_copy(bmain, source_ob);
-       DEG_id_tag_update(&obn->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+       DEG_id_tag_update(&obn->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
        BKE_collection_object_add_from(bmain, sce, source_ob, obn);
 
        if (instance_node) {
index c55aca7..317d39c 100644 (file)
@@ -244,7 +244,7 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::map<COLLADAFW::Unique
        BKE_object_workob_calc_parent(scene, ob, &workob);
        invert_m4_m4(ob->parentinv, workob.obmat);
 
-       DEG_id_tag_update(&obn->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&obn->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 #endif
        copy_m4_m4(ob->obmat, bind_shape_matrix);
        BKE_object_apply_mat4(ob, ob->obmat, 0, 0);
index c7aed84..3716f33 100644 (file)
@@ -183,8 +183,8 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
        BKE_object_workob_calc_parent(depsgraph, sce, ob, &workob);
        invert_m4_m4(ob->parentinv, workob.obmat);
 
-       DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
-       DEG_id_tag_update(&par->id, OB_RECALC_OB);
+       DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
+       DEG_id_tag_update(&par->id, ID_RECALC_TRANSFORM);
 
        return true;
 }
@@ -243,7 +243,7 @@ Object *bc_add_object(Main *bmain, Scene *scene, ViewLayer *view_layer, int type
 
        ob->data = BKE_object_obdata_add_from_type(bmain, type, name);
        ob->lay = scene->lay;
-       DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+       DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
 
        LayerCollection *layer_collection = BKE_layer_collection_get_active(view_layer);
        BKE_collection_object_add(bmain, layer_collection->collection, ob);
index 4cfeb20..410f555 100644 (file)
@@ -55,6 +55,8 @@
 #ifndef __DEG_DEPSGRAPH_H__
 #define __DEG_DEPSGRAPH_H__
 
+#include "DNA_ID.h"
+
 /* Dependency Graph */
 typedef struct Depsgraph Depsgraph;
 
@@ -122,39 +124,7 @@ void DEG_graph_on_visible_update(struct Main *bmain, Depsgraph *depsgraph);
 /* Update all dependency graphs when visible scenes/layers changes. */
 void DEG_on_visible_update(struct Main *bmain, const bool do_time);
 
-/* Tag given ID for an update in all the dependency graphs. */
-typedef enum eDepsgraph_Tag {
-       /* Object transformation changed, corresponds to OB_RECALC_OB. */
-       DEG_TAG_TRANSFORM   = (1 << 0),
-       /* Object geometry changed, corresponds to OB_RECALC_DATA. */
-       DEG_TAG_GEOMETRY    = (1 << 1),
-       /* Time changed and animation is to be re-evaluated, OB_RECALC_TIME. */
-       DEG_TAG_TIME        = (1 << 2),
-       /* Particle system changed; values are aligned with PSYS_RECALC_xxx. */
-       DEG_TAG_PSYS_REDO   = (1 << 3),
-       DEG_TAG_PSYS_RESET  = (1 << 4),
-       DEG_TAG_PSYS_TYPE   = (1 << 5),
-       DEG_TAG_PSYS_CHILD  = (1 << 6),
-       DEG_TAG_PSYS_PHYS   = (1 << 7),
-       DEG_TAG_PSYS_ALL    = (DEG_TAG_PSYS_REDO |
-                              DEG_TAG_PSYS_RESET |
-                              DEG_TAG_PSYS_TYPE |
-                              DEG_TAG_PSYS_CHILD |
-                              DEG_TAG_PSYS_PHYS),
-       /* Update copy on write component without flushing down the road. */
-       DEG_TAG_COPY_ON_WRITE = (1 << 8),
-       /* Tag shading components for update.
-        * Only parameters of material changed).
-        */
-       DEG_TAG_SHADING_UPDATE       = (1 << 9),
-       DEG_TAG_SELECT_UPDATE        = (1 << 10),
-       DEG_TAG_BASE_FLAGS_UPDATE    = (1 << 11),
-       DEG_TAG_POINT_CACHE_UPDATE   = (1 << 12),
-       /* Only inform editors about the change. Don't modify datablock itself. */
-       DEG_TAG_EDITORS_UPDATE = (1 << 13),
-} eDepsgraph_Tag;
-
-const char *DEG_update_tag_as_string(eDepsgraph_Tag flag);
+const char *DEG_update_tag_as_string(IDRecalcFlag flag);
 
 void DEG_id_tag_update(struct ID *id, int flag);
 void DEG_id_tag_update_ex(struct Main *bmain, struct ID *id, int flag);
@@ -166,8 +136,7 @@ void DEG_graph_id_tag_update(struct Main *bmain,
 
 /* Mark 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.
- */
+ * example a datablock was removed. */
 void DEG_id_type_tag(struct Main *bmain, short id_type);
 
 void DEG_ids_clear_recalc(struct Main *bmain, Depsgraph *depsgraph);
index 3fc54fe..ab3ca9f 100644 (file)
@@ -135,24 +135,24 @@ void deg_graph_build_finalize(Main *bmain, Depsgraph *graph)
                if ((id->recalc & ID_RECALC_ALL)) {
                        AnimData *adt = BKE_animdata_from_id(id);
                        if (adt != NULL && (adt->recalc & ADT_RECALC_ANIM) != 0) {
-                               flag |= DEG_TAG_TIME;
+                               flag |= ID_RECALC_ANIMATION;
                        }
                }
                /* Tag rebuild if special evaluation flags changed. */
                if (id_node->eval_flags != id_node->previous_eval_flags) {
-                       flag |= DEG_TAG_TRANSFORM | DEG_TAG_GEOMETRY;
+                       flag |= ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY;
                }
                /* Tag rebuild if the custom data mask changed. */
                if (id_node->customdata_mask != id_node->previous_customdata_mask) {
-                       flag |= DEG_TAG_GEOMETRY;
+                       flag |= ID_RECALC_GEOMETRY;
                }
                if (!deg_copy_on_write_is_expanded(id_node->id_cow)) {
-                       flag |= DEG_TAG_COPY_ON_WRITE;
+                       flag |= ID_RECALC_COPY_ON_WRITE;
                        /* This means ID is being added to the dependency graph first
                         * time, which is similar to "ob-visible-change"
                         */
                        if (GS(id->name) == ID_OB) {
-                               flag |= OB_RECALC_OB | OB_RECALC_DATA;
+                               flag |= ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY;
                        }
                }
                if (flag != 0) {
index 6374354..491548e 100644 (file)
@@ -143,7 +143,7 @@ void depsgraph_base_flags_tag_to_component_opcode(
 }
 
 void depsgraph_tag_to_component_opcode(const ID *id,
-                                       eDepsgraph_Tag tag,
+                                       IDRecalcFlag tag,
                                        eDepsNode_Type *component_type,
                                        eDepsOperation_Code *operation_code)
 {
@@ -157,20 +157,20 @@ void depsgraph_tag_to_component_opcode(const ID *id,
                return;
        }
        switch (tag) {
-               case DEG_TAG_TRANSFORM:
+               case ID_RECALC_TRANSFORM:
                        *component_type = DEG_NODE_TYPE_TRANSFORM;
                        break;
-               case DEG_TAG_GEOMETRY:
+               case ID_RECALC_GEOMETRY:
                        depsgraph_geometry_tag_to_component(id, component_type);
                        break;
-               case DEG_TAG_TIME:
+               case ID_RECALC_ANIMATION:
                        *component_type = DEG_NODE_TYPE_ANIMATION;
                        break;
-               case DEG_TAG_PSYS_REDO:
-               case DEG_TAG_PSYS_RESET:
-               case DEG_TAG_PSYS_TYPE:
-               case DEG_TAG_PSYS_CHILD:
-               case DEG_TAG_PSYS_PHYS:
+               case ID_RECALC_PSYS_REDO:
+               case ID_RECALC_PSYS_RESET:
+               case ID_RECALC_PSYS_YPE:
+               case ID_RECALC_PSYS_CHILD:
+               case ID_RECALC_PSYS_PHYS:
                        if (id_type == ID_PA) {
                                /* NOTES:
                                 * - For particle settings node we need to use different
@@ -184,10 +184,10 @@ void depsgraph_tag_to_component_opcode(const ID *id,
                                *component_type = DEG_NODE_TYPE_EVAL_PARTICLES;
                        }
                        break;
-               case DEG_TAG_COPY_ON_WRITE:
+               case ID_RECALC_COPY_ON_WRITE:
                        *component_type = DEG_NODE_TYPE_COPY_ON_WRITE;
                        break;
-               case DEG_TAG_SHADING_UPDATE:
+               case ID_RECALC_SHADING:
                        if (id_type == ID_NT) {
                                *component_type = DEG_NODE_TYPE_SHADING_PARAMETERS;
                        }
@@ -195,25 +195,26 @@ void depsgraph_tag_to_component_opcode(const ID *id,
                                *component_type = DEG_NODE_TYPE_SHADING;
                        }
                        break;
-               case DEG_TAG_SELECT_UPDATE:
+               case ID_RECALC_SELECT:
                        depsgraph_select_tag_to_component_opcode(id,
                                                                 component_type,
                                                                 operation_code);
                        break;
-               case DEG_TAG_BASE_FLAGS_UPDATE:
+               case ID_RECALC_BASE_FLAGS:
                        depsgraph_base_flags_tag_to_component_opcode(id,
                                                                     component_type,
                                                                     operation_code);
                        break;
-               case DEG_TAG_POINT_CACHE_UPDATE:
+               case ID_RECALC_POINT_CACHE:
                        *component_type = DEG_NODE_TYPE_POINT_CACHE;
                        break;
-               case DEG_TAG_EDITORS_UPDATE:
+               case ID_RECALC_EDITORS:
                        /* There is no such node in depsgraph, this tag is to be handled
                         * separately.
                         */
                        break;
-               case DEG_TAG_PSYS_ALL:
+               case ID_RECALC_ALL:
+               case ID_RECALC_PSYS_ALL:
                        BLI_assert(!"Should not happen");
                        break;
        }
@@ -273,16 +274,16 @@ void depsgraph_tag_component(Depsgraph *graph,
 
 /* This is a tag compatibility with legacy code.
  *
- * Mainly, old code was tagging object with OB_RECALC_DATA tag to inform
+ * Mainly, old code was tagging object with ID_RECALC_GEOMETRY tag to inform
  * that object's data datablock changed. Now API expects that ID is given
  * explicitly, but not all areas are aware of this yet.
  */
 void deg_graph_id_tag_legacy_compat(Main *bmain,
                                     Depsgraph *depsgraph,
                                     ID *id,
-                                    eDepsgraph_Tag tag)
+                                    IDRecalcFlag tag)
 {
-       if (tag == DEG_TAG_GEOMETRY || tag == 0) {
+       if (tag == ID_RECALC_GEOMETRY || tag == 0) {
                switch (GS(id->name)) {
                        case ID_OB:
                        {
@@ -334,9 +335,9 @@ static void deg_graph_id_tag_update_single_flag(Main *bmain,
                                                 Depsgraph *graph,
                                                 ID *id,
                                                 IDDepsNode *id_node,
-                                                eDepsgraph_Tag tag)
+                                                IDRecalcFlag tag)
 {
-       if (tag == DEG_TAG_EDITORS_UPDATE) {
+       if (tag == ID_RECALC_EDITORS) {
                if (graph != NULL) {
                        depsgraph_update_editors_tag(bmain, graph, id);
                }
@@ -380,7 +381,7 @@ static void deg_graph_id_tag_update_single_flag(Main *bmain,
 
 }
 
-string stringify_append_bit(const string& str, eDepsgraph_Tag tag)
+string stringify_append_bit(const string& str, IDRecalcFlag tag)
 {
        string result = str;
        if (!result.empty()) {
@@ -400,13 +401,13 @@ string stringify_update_bitfield(int flag)
        /* Special cases to avoid ALL flags form being split into
         * individual bits.
         */
-       if ((current_flag & DEG_TAG_PSYS_ALL) == DEG_TAG_PSYS_ALL) {
-               result = stringify_append_bit(result, DEG_TAG_PSYS_ALL);
+       if ((current_flag & ID_RECALC_PSYS_ALL) == ID_RECALC_PSYS_ALL) {
+               result = stringify_append_bit(result, ID_RECALC_PSYS_ALL);
        }
        /* Handle all the rest of the flags. */
        while (current_flag != 0) {
-               eDepsgraph_Tag tag =
-                       (eDepsgraph_Tag)(1 << bitscan_forward_clear_i(&current_flag));
+               IDRecalcFlag tag =
+                       (IDRecalcFlag)(1 << bitscan_forward_clear_i(&current_flag));
                result = stringify_append_bit(result, tag);
        }
        return result;
@@ -425,7 +426,7 @@ void deg_graph_node_tag_zero(Main *bmain, Depsgraph *graph, IDDepsNode *id_node)
        }
        ID *id = id_node->id_orig;
        /* TODO(sergey): Which recalc flags to set here? */
-       id->recalc |= ID_RECALC_ALL & ~(DEG_TAG_PSYS_ALL | ID_RECALC_ANIMATION);
+       id->recalc |= ID_RECALC_ALL & ~(ID_RECALC_PSYS_ALL | ID_RECALC_ANIMATION);
        GHASH_FOREACH_BEGIN(ComponentDepsNode *, comp_node, id_node->components)
        {
                if (comp_node->type == DEG_NODE_TYPE_ANIMATION) {
@@ -434,7 +435,7 @@ void deg_graph_node_tag_zero(Main *bmain, Depsgraph *graph, IDDepsNode *id_node)
                comp_node->tag_update(graph, DEG_UPDATE_SOURCE_USER_EDIT);
        }
        GHASH_FOREACH_END();
-       deg_graph_id_tag_legacy_compat(bmain, graph, id, (eDepsgraph_Tag)0);
+       deg_graph_id_tag_legacy_compat(bmain, graph, id, (IDRecalcFlag)0);
 }
 
 void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag)
@@ -454,11 +455,11 @@ void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag)
        if (flag == 0) {
                deg_graph_node_tag_zero(bmain, graph, id_node);
        }
-       id->recalc |= (flag & PSYS_RECALC);
+       id->recalc |= flag;
        int current_flag = flag;
        while (current_flag != 0) {
-               eDepsgraph_Tag tag =
-                       (eDepsgraph_Tag)(1 << bitscan_forward_clear_i(&current_flag));
+               IDRecalcFlag tag =
+                       (IDRecalcFlag)(1 << bitscan_forward_clear_i(&current_flag));
                deg_graph_id_tag_update_single_flag(bmain,
                                                    graph,
                                                    id,
@@ -471,7 +472,7 @@ void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag)
         * physics did change and that cache is to be invalidated.
         */
        deg_graph_id_tag_update_single_flag(
-               bmain, graph, id, id_node, DEG_TAG_POINT_CACHE_UPDATE);
+               bmain, graph, id, id_node, ID_RECALC_POINT_CACHE);
 }
 
 void deg_id_tag_update(Main *bmain, ID *id, int flag)
@@ -509,7 +510,7 @@ void deg_graph_on_visible_update(Main *bmain, Depsgraph *graph)
                }
                int flag = 0;
                if (!DEG::deg_copy_on_write_is_expanded(id_node->id_cow)) {
-                       flag |= DEG_TAG_COPY_ON_WRITE;
+                       flag |= ID_RECALC_COPY_ON_WRITE;
                }
                /* We only tag components which needs an update. Tagging everything is
                 * not a good idea because that might reset particles cache (or any
@@ -519,7 +520,7 @@ void deg_graph_on_visible_update(Main *bmain, Depsgraph *graph)
                 */
                const ID_Type id_type = GS(id_node->id_orig->name);
                if (id_type == ID_OB) {
-                       flag |= OB_RECALC_OB | OB_RECALC_DATA;
+                       flag |= ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY;
                }
                deg_graph_id_tag_update(bmain, graph, id_node->id_orig, flag);
                if (id_type == ID_SCE) {
@@ -583,24 +584,25 @@ eDepsNode_Type deg_geometry_tag_to_component(const ID *id)
 
 }  // namespace DEG
 
-const char *DEG_update_tag_as_string(eDepsgraph_Tag flag)
+const char *DEG_update_tag_as_string(IDRecalcFlag flag)
 {
        switch (flag) {
-               case DEG_TAG_TRANSFORM: return "TRANSFORM";
-               case DEG_TAG_GEOMETRY: return "GEOMETRY";
-               case DEG_TAG_TIME: return "TIME";
-               case DEG_TAG_PSYS_REDO: return "PSYS_REDO";
-               case DEG_TAG_PSYS_RESET: return "PSYS_RESET";
-               case DEG_TAG_PSYS_TYPE: return "PSYS_TYPE";
-               case DEG_TAG_PSYS_CHILD: return "PSYS_CHILD";
-               case DEG_TAG_PSYS_PHYS: return "PSYS_PHYS";
-               case DEG_TAG_PSYS_ALL: return "PSYS_ALL";
-               case DEG_TAG_COPY_ON_WRITE: return "COPY_ON_WRITE";
-               case DEG_TAG_SHADING_UPDATE: return "SHADING_UPDATE";
-               case DEG_TAG_SELECT_UPDATE: return "SELECT_UPDATE";
-               case DEG_TAG_BASE_FLAGS_UPDATE: return "BASE_FLAGS_UPDATE";
-               case DEG_TAG_POINT_CACHE_UPDATE: return "POINT_CACHE_UPDATE";
-               case DEG_TAG_EDITORS_UPDATE: return "EDITORS_UPDATE";
+               case ID_RECALC_TRANSFORM: return "TRANSFORM";
+               case ID_RECALC_GEOMETRY: return "GEOMETRY";
+               case ID_RECALC_ANIMATION: return "ANIMATION";
+               case ID_RECALC_PSYS_REDO: return "PSYS_REDO";
+               case ID_RECALC_PSYS_RESET: return "PSYS_RESET";
+               case ID_RECALC_PSYS_YPE: return "PSYS_TYPE";
+               case ID_RECALC_PSYS_CHILD: return "PSYS_CHILD";
+               case ID_RECALC_PSYS_PHYS: return "PSYS_PHYS";
+               case ID_RECALC_PSYS_ALL: return "PSYS_ALL";
+               case ID_RECALC_COPY_ON_WRITE: return "COPY_ON_WRITE";
+               case ID_RECALC_SHADING: return "SHADING";
+               case ID_RECALC_SELECT: return "SELECT";
+               case ID_RECALC_BASE_FLAGS: return "BASE_FLAGS";
+               case ID_RECALC_POINT_CACHE: return "POINT_CACHE";
+               case ID_RECALC_EDITORS: return "EDITORS";
+               case ID_RECALC_ALL: return "ALL";
        }
        BLI_assert(!"Unhandled update flag, should never happen!");
        return "UNKNOWN";
index f8754c5..aa02862 100644 (file)
@@ -930,7 +930,7 @@ ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph,
                                 * everything is done by node tree update function which
                                 * only copies socket values.
                                 */
-                               const int ignore_flag = (ID_RECALC_DRAW |
+                               const int ignore_flag = (ID_RECALC_SHADING |
                                                         ID_RECALC_ANIMATION |
                                                         ID_RECALC_COPY_ON_WRITE);
                                if ((id_cow->recalc & ~ignore_flag) == 0) {
index 61edc1e..fef3282 100644 (file)
@@ -345,10 +345,10 @@ void invalidate_tagged_evaluated_data(Depsgraph *graph)
                                continue;
                        }
                        switch (comp_node->type) {
-                               case DEG_TAG_TRANSFORM:
+                               case ID_RECALC_TRANSFORM:
                                        invalidate_tagged_evaluated_transform(id_cow);
                                        break;
-                               case DEG_TAG_GEOMETRY:
+                               case ID_RECALC_GEOMETRY:
                                        invalidate_tagged_evaluated_geometry(id_cow);
                                        break;
                                default:
index dc4661c..6840aa0 100644 (file)
@@ -384,22 +384,23 @@ void BoneComponentDepsNode::init(const ID *id, const char *subdata)
 /* Register all components. =============================== */
 
 DEG_COMPONENT_NODE_DEFINE(Animation,         ANIMATION,          ID_RECALC_ANIMATION);
-DEG_COMPONENT_NODE_DEFINE(BatchCache,        BATCH_CACHE,        ID_RECALC_DRAW_CACHE);
+/* TODO(sergey): Is this a correct tag? */
+DEG_COMPONENT_NODE_DEFINE(BatchCache,        BATCH_CACHE,        ID_RECALC_SHADING);
 DEG_COMPONENT_NODE_DEFINE(Bone,              BONE,               ID_RECALC_GEOMETRY);
-DEG_COMPONENT_NODE_DEFINE(Cache,             CACHE,              ID_RECALC);
+DEG_COMPONENT_NODE_DEFINE(Cache,             CACHE,              0);
 DEG_COMPONENT_NODE_DEFINE(CopyOnWrite,       COPY_ON_WRITE,      ID_RECALC_COPY_ON_WRITE);
 DEG_COMPONENT_NODE_DEFINE(Geometry,          GEOMETRY,           ID_RECALC_GEOMETRY);
 DEG_COMPONENT_NODE_DEFINE(LayerCollections,  LAYER_COLLECTIONS,  0);
-DEG_COMPONENT_NODE_DEFINE(Parameters,        PARAMETERS,         ID_RECALC);
+DEG_COMPONENT_NODE_DEFINE(Parameters,        PARAMETERS,         0);
 DEG_COMPONENT_NODE_DEFINE(Particles,         EVAL_PARTICLES,     ID_RECALC_GEOMETRY);
 DEG_COMPONENT_NODE_DEFINE(PointCache,        POINT_CACHE,        0);
 DEG_COMPONENT_NODE_DEFINE(Pose,              EVAL_POSE,          ID_RECALC_GEOMETRY);
 DEG_COMPONENT_NODE_DEFINE(Proxy,             PROXY,              ID_RECALC_GEOMETRY);
-DEG_COMPONENT_NODE_DEFINE(Sequencer,         SEQUENCER,          ID_RECALC);
-DEG_COMPONENT_NODE_DEFINE(Shading,           SHADING,            ID_RECALC_DRAW);
-DEG_COMPONENT_NODE_DEFINE(ShadingParameters, SHADING_PARAMETERS, ID_RECALC_DRAW);
+DEG_COMPONENT_NODE_DEFINE(Sequencer,         SEQUENCER,          0);
+DEG_COMPONENT_NODE_DEFINE(Shading,           SHADING,            ID_RECALC_SHADING);
+DEG_COMPONENT_NODE_DEFINE(ShadingParameters, SHADING_PARAMETERS, ID_RECALC_SHADING);
 DEG_COMPONENT_NODE_DEFINE(Transform,         TRANSFORM,          ID_RECALC_TRANSFORM);
-DEG_COMPONENT_NODE_DEFINE(ObjectFromLayer,   OBJECT_FROM_LAYER,  ID_RECALC);
+DEG_COMPONENT_NODE_DEFINE(ObjectFromLayer,   OBJECT_FROM_LAYER,  0);
 DEG_COMPONENT_NODE_DEFINE(Dupli,             DUPLI,              0);
 DEG_COMPONENT_NODE_DEFINE(Synchronize,       SYNCHRONIZE,        0);
 DEG_COMPONENT_NODE_DEFINE(GenericDatablock,  GENERIC_DATABLOCK,  0);
index 451e717..7108226 100644 (file)
@@ -1050,7 +1050,7 @@ void EEVEE_lightbake_update(void *custom_data)
 
        EEVEE_lightcache_info_update(&lbake->scene->eevee);
 
-       DEG_id_tag_update(&scene_orig->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&scene_orig->id, ID_RECALC_COPY_ON_WRITE);
 }
 
 static bool lightbake_do_sample(EEVEE_LightBake *lbake, void (*render_callback)(void *ved, void *user_data))
index 8896de7..9bd7e27 100644 (file)
@@ -4055,7 +4055,7 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
                /* draw cache updates for settings that affect the visible strokes */
                if (setting == ACHANNEL_SETTING_VISIBLE) {
                        bGPdata *gpd = (bGPdata *)ale_setting->id;
-                       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+                       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                }
 
                /* UI updates */
@@ -4064,11 +4064,11 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
 
        /* tag copy-on-write flushing (so that the settings will have an effect) */
        if (ale_setting->id) {
-               DEG_id_tag_update(ale_setting->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(ale_setting->id, ID_RECALC_COPY_ON_WRITE);
        }
        if (ale_setting->adt && ale_setting->adt->action) {
                /* action is it's own datablock, so has to be tagged specifically... */
-               DEG_id_tag_update(&ale_setting->adt->action->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&ale_setting->adt->action->id, ID_RECALC_COPY_ON_WRITE);
        }
 
        /* verify animation context */
index c9b3936..b69d93a 100644 (file)
@@ -78,15 +78,15 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale)
        adt = BKE_animdata_from_id(id);
        if (adt) {
                adt->recalc |= ADT_RECALC_ANIM;
-               DEG_id_tag_update(id, OB_RECALC_TIME);
+               DEG_id_tag_update(id, ID_RECALC_ANIMATION);
                if (adt->action != NULL) {
-                       DEG_id_tag_update(&adt->action->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE);
                }
        }
 
        /* Tag copy on the main object if updating anything directly inside AnimData */
        if (ELEM(ale->type, ANIMTYPE_ANIMDATA, ANIMTYPE_NLAACTION, ANIMTYPE_NLATRACK, ANIMTYPE_NLACURVE)) {
-               DEG_id_tag_update(id, DEG_TAG_TIME | DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE);
                return;
        }
 
@@ -108,7 +108,7 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale)
        else {
                /* in other case we do standard depsgraph update, ideally
                 * we'd be calling property update functions here too ... */
-               DEG_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, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); // XXX or do we want something more restrictive?
        }
 }
 
@@ -124,7 +124,7 @@ void ANIM_id_update(Main *bmain, ID *id)
                        adt->recalc |= ADT_RECALC_ANIM;
 
                /* set recalc flags */
-               DEG_id_tag_update_ex(bmain, id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX or do we want something more restrictive?
+               DEG_id_tag_update_ex(bmain, id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); // XXX or do we want something more restrictive?
        }
 }
 
index f82250d..9144c0b 100644 (file)
@@ -1201,7 +1201,7 @@ static int ed_marker_select(bContext *C, const wmEvent *event, bool extend, bool
                        }
                }
 
-               DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
        }
 #else
index 85e5852..ac57f77 100644 (file)
@@ -944,7 +944,7 @@ static int add_driver_button_invoke(bContext *C, wmOperator *op, const wmEvent *
                if (success) {
                        /* send updates */
                        UI_context_update_anim_flag(C);
-                       DEG_id_tag_update(ptr.id.data, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(ptr.id.data, ID_RECALC_COPY_ON_WRITE);
                        DEG_relations_tag_update(CTX_data_main(C));
                        WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL);
                }
@@ -1126,7 +1126,7 @@ static int paste_driver_button_exec(bContext *C, wmOperator *op)
                        UI_context_update_anim_flag(C);
 
                        DEG_relations_tag_update(CTX_data_main(C));
-                       DEG_id_tag_update(ptr.id.data, OB_RECALC_OB | OB_RECALC_DATA);
+                       DEG_id_tag_update(ptr.id.data, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 
                        WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL);  // XXX
 
index 254569a..3e573d0 100644 (file)
@@ -165,7 +165,7 @@ bAction *verify_adt_action(Main *bmain, ID *id, short add)
                DEG_relations_tag_update(bmain);
        }
 
-       DEG_id_tag_update(&adt->action->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE);
 
        /* return the action */
        return adt->action;
@@ -1178,10 +1178,10 @@ short insert_keyframe(
 
        if (ret) {
                if (act != NULL) {
-                       DEG_id_tag_update(&act->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&act->id, ID_RECALC_COPY_ON_WRITE);
                }
                if (adt != NULL && adt->action != NULL && adt->action != act) {
-                       DEG_id_tag_update(&adt->action->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE);
                }
        }
 
@@ -1306,7 +1306,7 @@ short delete_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *act,
         * about relations update, since it needs to get rid of animation operation
         * for this datablock. */
        if (ret && adt->action == NULL) {
-               DEG_id_tag_update_ex(bmain, id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update_ex(bmain, id, ID_RECALC_COPY_ON_WRITE);
                DEG_relations_tag_update(bmain);
        }
        /* return success/failure */
@@ -1402,7 +1402,7 @@ static short clear_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *a
         * about relations update, since it needs to get rid of animation operation
         * for this datablock. */
        if (ret && adt->action == NULL) {
-               DEG_id_tag_update_ex(bmain, id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update_ex(bmain, id, ID_RECALC_COPY_ON_WRITE);
                DEG_relations_tag_update(bmain);
        }
        /* return success/failure */
@@ -1731,7 +1731,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);
-                                       DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+                                       DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
                                        changed = true;
                                }
                        }
@@ -1838,7 +1838,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);
 
-               DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+               DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
        }
        CTX_DATA_END;
 
index d8e9c5a..1fe8a34 100644 (file)
@@ -1051,11 +1051,11 @@ int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSe
                                Object *ob = (Object *)ksp->id;
 
                                // XXX: only object transforms?
-                               DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
+                               DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                                break;
                        }
                        default:
-                               DEG_id_tag_update(ksp->id, DEG_TAG_COPY_ON_WRITE);
+                               DEG_id_tag_update(ksp->id, ID_RECALC_COPY_ON_WRITE);
                                break;
                }
 
index 629daf1..a027b00 100644 (file)
@@ -182,7 +182,7 @@ void ED_armature_bone_rename(Main *bmain, bArmature *arm, const char *oldnamep,
                }
 
                /* force copy on write to update database */
-               DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
 
                /* do entire dbase - objects */
                for (ob = bmain->object.first; ob; ob = ob->id.next) {
@@ -313,7 +313,7 @@ void ED_armature_bone_rename(Main *bmain, bArmature *arm, const char *oldnamep,
                                        }
                                }
                        }
-                       DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
                }
 
                /* Fix all animdata that may refer to this bone - we can't just do the ones attached to objects, since
@@ -447,7 +447,7 @@ static int armature_flip_names_exec(bContext *C, wmOperator *op)
                BLI_freelistN(&bones_names);
 
                /* since we renamed stuff... */
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
 
                /* copied from #rna_Bone_update_renamed */
                /* redraw view */
@@ -532,7 +532,7 @@ static int armature_autoside_names_exec(bContext *C, wmOperator *op)
                changed_multi = true;
 
                /* Since we renamed stuff... */
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
 
                /* Note, notifier might evolve. */
                WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
index 16eb67c..aadb805 100644 (file)
@@ -403,7 +403,7 @@ int join_armature_exec(bContext *C, wmOperator *op)
        ED_armature_from_edit(bmain, arm);
        ED_armature_edit_free(arm);
 
-       DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
 
        return OPERATOR_FINISHED;
@@ -638,8 +638,8 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
                /* 4) fix links before depsgraph flushes */ // err... or after?
                separated_armature_fix_links(bmain, oldob, newob);
 
-               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 */
+               DEG_id_tag_update(&oldob->id, ID_RECALC_GEOMETRY);  /* this is the original one */
+               DEG_id_tag_update(&newob->id, ID_RECALC_GEOMETRY);  /* this is the separated one */
 
 
                /* 5) restore original conditions */
index 4346c75..0fd94f6 100644 (file)
@@ -192,7 +192,7 @@ static void armature_undosys_step_decode(struct bContext *C, UndoStep *us_p, int
                        continue;
                }
                undoarm_to_editarm(&elem->data, arm);
-               DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
        }
 
        /* The first element is always active */
index 4864f00..4b069de 100644 (file)
@@ -110,7 +110,7 @@ bool ED_object_posemode_enter_ex(struct Main *bmain, Object *ob)
                        ob->restore_mode = ob->mode;
                        ob->mode |= OB_MODE_POSE;
                        /* Inform all CoW versions that we changed the mode. */
-                       DEG_id_tag_update_ex(bmain, &ob->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update_ex(bmain, &ob->id, ID_RECALC_COPY_ON_WRITE);
                        ok = true;
 
                        break;
@@ -143,7 +143,7 @@ bool ED_object_posemode_exit_ex(struct Main *bmain, Object *ob)
                ob->mode &= ~OB_MODE_POSE;
 
                /* Inform all CoW versions that we changed the mode. */
-               DEG_id_tag_update_ex(bmain, &ob->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update_ex(bmain, &ob->id, ID_RECALC_COPY_ON_WRITE);
                ok = true;
        }
        return ok;
@@ -257,7 +257,7 @@ void ED_pose_recalculate_paths(bContext *C, Scene *scene, Object *ob, bool curre
        if (!current_frame_only) {
                /* Tag armature object for copy on write - so paths will draw/redraw.
                 * For currently frame only we update evaluated object directly. */
-               DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
        }
 
        /* Free temporary depsgraph instance */
@@ -442,7 +442,7 @@ static void ED_pose_clear_paths(Object *ob, bool only_selected)
                ob->pose->avs.path_bakeflag &= ~MOTIONPATH_BAKE_HAS_PATHS;
 
        /* tag armature object for copy on write - so removed paths don't still show */
-       DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
 }
 
 /* operator callback - wrapper for the backend function  */
@@ -510,7 +510,7 @@ static int pose_update_paths_range_exec(bContext *C, wmOperator *UNUSED(op))
        ob->pose->avs.path_ef = PEFRA;
 
        /* tag for updates */
-       DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
 
        return OPERATOR_FINISHED;
@@ -728,7 +728,7 @@ static void pose_copy_menu(Scene *scene)
                        BKE_pose_tag_recalc(bmain, ob->pose);
        }
 
-       DEG_id_tag_update(&ob->id, OB_RECALC_DATA); // and all its relations
+       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); // and all its relations
 
        BIF_undo_push("Copy Pose Attributes");
 
@@ -760,7 +760,7 @@ static int pose_flip_names_exec(bContext *C, wmOperator *op)
                BLI_freelistN(&bones_names);
 
                /* since we renamed stuff... */
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
 
                /* note, notifier might evolve */
                WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
@@ -809,7 +809,7 @@ static int pose_autoside_names_exec(bContext *C, wmOperator *op)
 
                if (ob_prev != ob) {
                        /* since we renamed stuff... */
-                       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
 
                        /* note, notifier might evolve */
                        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
@@ -861,7 +861,7 @@ static int pose_bone_rotmode_exec(bContext *C, wmOperator *op)
 
                if (prev_ob != ob) {
                        /* Notifiers and updates. */
-                       DEG_id_tag_update((ID *)ob, OB_RECALC_DATA);
+                       DEG_id_tag_update((ID *)ob, ID_RECALC_GEOMETRY);
                        WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob);
                        WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
                        prev_ob = ob;
@@ -946,7 +946,7 @@ static int pose_armature_layers_showall_exec(bContext *C, wmOperator *op)
 
        /* note, notifier might evolve */
        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
-       DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
 
        /* done */
        return OPERATOR_FINISHED;
@@ -1014,7 +1014,7 @@ static int armature_layers_exec(bContext *C, wmOperator *op)
 
        /* note, notifier might evolve */
        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
-       DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
 
        return OPERATOR_FINISHED;
 }
@@ -1085,7 +1085,7 @@ static int pose_bone_layers_exec(bContext *C, wmOperator *op)
                if (prev_ob != ob) {
                        /* Note, notifier might evolve. */
                        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
-                       DEG_id_tag_update((ID *)ob->data, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update((ID *)ob->data, ID_RECALC_COPY_ON_WRITE);
                        prev_ob = ob;
                }
        }
@@ -1229,7 +1229,7 @@ static int pose_hide_exec(bContext *C, wmOperator *op)
                if (changed) {
                        changed_multi = true;
                        WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob_iter);
-                       DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
                }
        }
        MEM_freeN(objects);
@@ -1292,7 +1292,7 @@ static int pose_reveal_exec(bContext *C, wmOperator *op)
                if (changed) {
                        changed_multi = true;
                        WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob_iter);
-                       DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
                }
        }
        MEM_freeN(objects);
@@ -1346,7 +1346,7 @@ static int pose_flip_quats_exec(bContext *C, wmOperator *UNUSED(op))
                if (changed) {
                        changed_multi = true;
                        /* notifiers and updates */
-                       DEG_id_tag_update(&ob_iter->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&ob_iter->id, ID_RECALC_GEOMETRY);
                        WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob_iter);
                }
        } FOREACH_OBJECT_IN_MODE_END;
index 3a619f7..543645b 100644 (file)
@@ -107,7 +107,7 @@ static int pose_group_remove_exec(bContext *C, wmOperator *UNUSED(op))
 
        /* notifiers for updates */
        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
-       DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
 
        return OPERATOR_FINISHED;
 }
@@ -217,7 +217,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op)
 
        /* notifiers for updates */
        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
-       DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
 
        /* report done status */
        if (done)
@@ -267,7 +267,7 @@ static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op))
 
        /* notifiers for updates */
        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
-       DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
 
        /* report done status */
        if (done)
@@ -419,7 +419,7 @@ static int group_sort_exec(bContext *C, wmOperator *UNUSED(op))
 
        /* notifiers for updates */
        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
-       DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
 
        return OPERATOR_FINISHED;
 }
index 18ce647..14706f8 100644 (file)
@@ -503,7 +503,7 @@ static int poselib_add_exec(bContext *C, wmOperator *op)
 
        /* store new 'active' pose number */
        act->active_marker = BLI_listbase_count(&act->markers);
-       DEG_id_tag_update(&act->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&act->id, ID_RECALC_COPY_ON_WRITE);
 
        /* done */
        return OPERATOR_FINISHED;
@@ -618,7 +618,7 @@ static int poselib_remove_exec(bContext *C, wmOperator *op)
         * may be being shown in anim editors as active action
         */
        WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
-       DEG_id_tag_update(&act->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&act->id, ID_RECALC_COPY_ON_WRITE);
 
        /* done */
        return OPERATOR_FINISHED;
@@ -1106,7 +1106,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)
-                       DEG_id_tag_update(&pld->ob->id, OB_RECALC_DATA);  /* sets recalc flags */
+                       DEG_id_tag_update(&pld->ob->id, ID_RECALC_GEOMETRY);  /* sets recalc flags */
                else
                        BKE_pose_where_is(CTX_data_depsgraph(C), pld->scene, pld->ob);
        }
@@ -1613,7 +1613,7 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op)
                 * - note: code copied from transform_generics.c -> recalcData()
                 */
                if ((arm->flag & ARM_DELAYDEFORM) == 0)
-                       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);  /* sets recalc flags */
+                       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);  /* sets recalc flags */
                else
                        BKE_pose_where_is(CTX_data_depsgraph(C), scene, ob);
        }
@@ -1626,7 +1626,7 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op)
                action_set_activemarker(act, marker, NULL);
 
                /* Update event for pose and deformation children */
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
 
                /* updates */
                if (IS_AUTOKEY_MODE(scene, NORMAL)) {
index 111a7b2..184c09f 100644 (file)
@@ -104,11 +104,11 @@ void ED_pose_bone_select_tag_update(Object *ob)
 
        if (arm->flag & ARM_HAS_VIZ_DEPS) {
                /* mask modifier ('armature' mode), etc. */
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
        }
 
        /* copy on write tag is needed (for the armature), or else no refresh happens */
-       DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
 }
 
 
@@ -217,7 +217,7 @@ bool ED_armature_pose_select_pick_with_buffer(
                        if (ob_act->mode & OB_MODE_WEIGHT_PAINT) {
                                if (nearBone == arm->act_bone) {
                                        ED_vgroup_select_by_name(ob_act, nearBone->name);
-                                       DEG_id_tag_update(&ob_act->id, OB_RECALC_DATA);
+                                       DEG_id_tag_update(&ob_act->id, ID_RECALC_GEOMETRY);
                                }
                        }
                        /* if there are some dependencies for visualizing armature state
@@ -227,11 +227,11 @@ bool ED_armature_pose_select_pick_with_buffer(
                                /* NOTE: ob not ob_act here is intentional - it's the source of the
                                 *       bones being selected  [T37247]
                                 */
-                               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                        }
 
                        /* tag armature for copy-on-write update (since act_bone is in armature not object) */
-                       DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
                }
        }
 
@@ -424,10 +424,10 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op)
                if (ob_prev != ob) {
                        /* weightpaint or mask modifiers need depsgraph updates */
                        if (multipaint || (arm->flag & ARM_HAS_VIZ_DEPS)) {
-                               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                        }
                        /* need to tag armature for cow updates, or else selection doesn't update */
-                       DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
                        ob_prev = ob;
                }
        }
@@ -1066,14 +1066,14 @@ static int pose_select_mirror_exec(bContext *C, wmOperator *op)
                        /* In weightpaint we select the associated vertex group too. */
                        if (is_weight_paint) {
                                ED_vgroup_select_by_name(ob, pchan_mirror_act->name);
-                               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                        }
                }
 
                WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
 
                /* Need to tag armature for cow updates, or else selection doesn't update. */
-               DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
        }
        MEM_freeN(objects);
 
index 0f21f15..18a9b54 100644 (file)
@@ -207,7 +207,7 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op)
 
        /* note, notifier might evolve */
        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
-       DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
 
        return OPERATOR_FINISHED;
 }
@@ -261,7 +261,7 @@ static int pose_visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
                }
                FOREACH_PCHAN_SELECTED_IN_OBJECT_END;
 
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
 
                /* note, notifier might evolve */
                WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
@@ -581,7 +581,7 @@ static int pose_paste_exec(bContext *C, wmOperator *op)
        BKE_main_free(tmp_bmain);
 
        /* Update event for pose and deformation children. */
-       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
 
        /* Recalculate paths if any of the bones have paths... */
        if ((ob->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS)) {
@@ -835,7 +835,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op,
                                BLI_freelistN(&dsources);
                        }
 
-                       DEG_id_tag_update(&ob_iter->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&ob_iter->id, ID_RECALC_GEOMETRY);
 
                        /* note, notifier might evolve */
                        WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob_iter);
@@ -988,7 +988,7 @@ static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op)
                }
 
                /* notifiers and updates */
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob);
        }
        FOREACH_OBJECT_IN_MODE_END;
index 8085aad..051940d 100644 (file)
@@ -240,11 +240,11 @@ void poseAnim_mapping_refresh(bContext *C, Scene *scene, Object *ob)
         */
        /* FIXME: shouldn't this use the builtin stuff? */
        if ((arm->flag & ARM_DELAYDEFORM) == 0)
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);  /* sets recalc flags */
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);  /* sets recalc flags */
        else
                BKE_pose_where_is(depsgraph, scene, ob);
 
-       DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE); /* otherwise animation doesn't get updated */
+       DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE); /* otherwise animation doesn't get updated */
        WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
 }
 
index 8ec79ff..8c725dc 100644 (file)
@@ -1356,8 +1356,8 @@ static int separate_exec(bContext *C, wmOperator *op)
                ED_curve_editnurb_free(newob);
                curve_delete_segments(oldob, v3d, true);
 
-               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. */
+               DEG_id_tag_update(&oldob->id, ID_RECALC_GEOMETRY);  /* This is the original one. */
+               DEG_id_tag_update(&newob->id, ID_RECALC_GEOMETRY);  /* 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);
@@ -3006,7 +3006,7 @@ static int hide_exec(bContext *C, wmOperator *op)
                        }
                }
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_COPY_ON_WRITE | DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
                BKE_curve_nurb_vert_active_validate(obedit->data);
        }
@@ -3080,7 +3080,7 @@ static int reveal_exec(bContext *C, wmOperator *op)
                }
 
                if (changed) {
-                       DEG_id_tag_update(obedit->data, DEG_TAG_COPY_ON_WRITE | DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(obedit->data, ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT);
                        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
                        changed_multi = true;
                }
@@ -4579,7 +4579,7 @@ bool ED_curve_editnurb_select_pick(bContext *C, const int mval[2], bool extend,
 
                                ED_curve_deselect_all(((Curve *)ob_iter->data)->editnurb);
 
-                               DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE);
+                               DEG_id_tag_update(ob_iter->data, ID_RECALC_SELECT);
                                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob_iter->data);
                        }
                        MEM_freeN(objects);
@@ -4678,7 +4678,7 @@ bool ED_curve_editnurb_select_pick(bContext *C, const int mval[2], bool extend,
                        ED_object_base_activate(C, basact);
                }
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
 
                return true;
@@ -5640,7 +5640,7 @@ static int duplicate_exec(bContext *C, wmOperator *op)
 
                ok = 1;
                BLI_movelisttolist(object_editcurve_get(obedit), &newnurb);
-               DEG_id_tag_update(&cu->id, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(&cu->id, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, &cu->id);
        }
        MEM_freeN(objects);
@@ -6534,8 +6534,8 @@ int join_curve_exec(bContext *C, wmOperator *op)
 
        DEG_relations_tag_update(bmain);   // because we removed object(s), call before editmode!
 
-       DEG_id_tag_update(&ob_active->id, OB_RECALC_OB | OB_RECALC_DATA);
-       DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(&ob_active->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
+       DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
 
        WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
 
index eef3df9..5308660 100644 (file)
@@ -502,7 +502,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
                                cu->flag |= CU_PATH | CU_3D;
                }
                else {
-                       DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
                }
        }
        else { /* adding surface */
@@ -512,7 +512,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
                        newob = true;
                }
                else {
-                       DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
                }
        }
 
index 992c88a..cafc3cb 100644 (file)
@@ -434,7 +434,7 @@ static int de_select_first_exec(bContext *C, wmOperator *UNUSED(op))
        for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
                Object *obedit = objects[ob_index];
                selectend_nurb(obedit, FIRST, true, DESELECT);
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
                BKE_curve_nurb_vert_active_validate(obedit->data);
        }
@@ -466,7 +466,7 @@ static int de_select_last_exec(bContext *C, wmOperator *UNUSED(op))
        for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
                Object *obedit = objects[ob_index];
                selectend_nurb(obedit, LAST, true, DESELECT);
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
                BKE_curve_nurb_vert_active_validate(obedit->data);
        }
@@ -528,7 +528,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op)
                                break;
                }
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
                BKE_curve_nurb_vert_active_validate(cu);
        }
@@ -582,7 +582,7 @@ static int select_linked_exec(bContext *C, wmOperator *UNUSED(op))
                }
 
                if (changed) {
-                       DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
                }
        }
@@ -654,7 +654,7 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent
 
        Object *obedit = basact->object;
 
-       DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
 
        if (!select) {
@@ -718,7 +718,7 @@ static int select_row_exec(bContext *C, wmOperator *UNUSED(op))
                }
        }
 
-       DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
 
        return OPERATOR_FINISHED;
@@ -751,7 +751,7 @@ static int select_next_exec(bContext *C, wmOperator *UNUSED(op))
                Object *obedit = objects[ob_index];
                ListBase *editnurb = object_editcurve_get(obedit);
                select_adjacent_cp(editnurb, 1, 0, SELECT);
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
@@ -785,7 +785,7 @@ static int select_previous_exec(bContext *C, wmOperator *UNUSED(op))
                Object *obedit = objects[ob_index];
                ListBase *editnurb = object_editcurve_get(obedit);
                select_adjacent_cp(editnurb, -1, 0, SELECT);
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
@@ -883,7 +883,7 @@ static int curve_select_more_exec(bContext *C, wmOperator *UNUSED(op))
        for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
                Object *obedit = objects[ob_index];
                curve_select_more(obedit);
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
@@ -1080,7 +1080,7 @@ static int curve_select_less_exec(bContext *C, wmOperator *UNUSED(op))
        for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
                Object *obedit = objects[ob_index];
                curve_select_less(obedit);
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
@@ -1167,7 +1167,7 @@ static int curve_select_random_exec(bContext *C, wmOperator *op)
                curve_select_random(editnurb, randfac, seed_iter, select);
                BKE_curve_nurb_vert_active_validate(obedit->data);
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
 
@@ -1282,7 +1282,7 @@ static int select_nth_exec(bContext *C, wmOperator *op)
 
                if (ed_curve_select_nth(obedit->data, &op_params) == true) {
                        changed = true;
-                       DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
                }
        }
@@ -1637,7 +1637,7 @@ static int curve_select_similar_exec(bContext *C, wmOperator *op)
                }
 
                if (changed) {
-                       DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
                }
        }
@@ -1890,7 +1890,7 @@ static int edcu_shortest_path_pick_invoke(bContext *C, wmOperator *op, const wmE
                ED_object_base_activate(C, basact);
        }
 
-       DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        return OPERATOR_FINISHED;
 }
index ecc4ed8..9163272 100644 (file)
@@ -256,7 +256,7 @@ static void curve_undosys_step_decode(struct bContext *C, UndoStep *us_p, int UN
                        continue;
                }
                undocurve_to_editcurve(&elem->data, obedit->data, &obedit->shapenr);
-               DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
        }
 
        /* The first element is always active */
index b87584d..b6b0100 100644 (file)
@@ -276,7 +276,7 @@ static void text_update_edited(bContext *C, Object *obedit, int mode)
                }
        }
 
-       DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
 }
 
index d4d48e9..85e361b 100644 (file)
@@ -359,7 +359,7 @@ static void font_undosys_step_decode(struct bContext *C, UndoStep *us_p, int UNU
        Object *obedit = us->obedit_ref.ptr;
        Curve *cu = obedit->data;
        undofont_to_editfont(&us->data, cu);
-       DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GEOM | ND_DATA, NULL);
 }
 
index 19697ed..905bb36 100644 (file)
@@ -1883,12 +1883,12 @@ static int gpencil_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event
                        ob->mode = OB_MODE_OBJECT;
                        bGPdata *gpd = (bGPdata *)ob->data;
                        ED_gpencil_setup_modes(C, gpd, 0);
-                       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
                        ViewLayer *view_layer = CTX_data_view_layer(C);
                        BKE_view_layer_base_deselect_all(view_layer);
                        view_layer->basact = NULL;
-                       DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
                        WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
                }
        }
index 048e933..f296719 100644 (file)
@@ -1561,7 +1561,7 @@ void ED_gpencil_create_monkey(bContext *C, float mat[4][4])
        BKE_gpencil_stroke_add_points(gps, data35, 261, mat);
 
        /* update depsgraph */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
 }
 
index 6c3107c..ccab4e3 100644 (file)
@@ -246,6 +246,6 @@ void ED_gpencil_create_stroke(bContext *C, float mat[4][4])
        BKE_gpencil_stroke_add_points(gps, data0, 175, mat);
 
        /* update depsgraph */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
 }
index d629840..85c175d 100644 (file)
@@ -502,7 +502,7 @@ bool ED_gpencil_add_armature_weights(
                                   "Unable to add a new Armature modifier to object");
                        return false;
                }
-               DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        }
 
        /* verify armature */
@@ -600,7 +600,7 @@ static int gpencil_generate_weights_exec(bContext *C, wmOperator *op)
        gpencil_object_vgroup_calc_from_armature(C, ob, ob_arm, mode, ratio, decay);
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
index e6ceac0..1e9538e 100644 (file)
@@ -1756,7 +1756,7 @@ static void gpsculpt_brush_apply(bContext *C, wmOperator *op, PointerRNA *itempt
 
        /* Updates */
        if (changed) {
-               DEG_id_tag_update(&gso->gpd->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&gso->gpd->id, ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
        }
 
@@ -2107,7 +2107,7 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even
 
        /* Redraw toolsettings (brush settings)? */
        if (redraw_toolsettings) {
-               DEG_id_tag_update(&gso->gpd->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&gso->gpd->id, ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, NULL);
        }
 
index 013b5ff..915e678 100644 (file)
@@ -1395,7 +1395,7 @@ static int gp_convert_layer_exec(bContext *C, wmOperator *op)
        }
 
        /* notifiers */
-       DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_OBJECT | NA_ADDED, NULL);
        WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
 
index 236d696..a2cb961 100644 (file)
@@ -259,7 +259,7 @@ static int gp_layer_add_exec(bContext *C, wmOperator *op)
 
        /* notifiers */
        bGPdata *gpd = *gpd_ptr;
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA | DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -308,7 +308,7 @@ static int gp_layer_remove_exec(bContext *C, wmOperator *op)
        BKE_gpencil_layer_delete(gpd, gpl);
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -348,7 +348,7 @@ static int gp_layer_move_exec(bContext *C, wmOperator *op)
 
        BLI_assert(ELEM(direction, -1, 0, 1)); /* we use value below */
        if (BLI_listbase_link_move(&gpd->layers, gpl, direction)) {
-               DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
        }
 
@@ -399,7 +399,7 @@ static int gp_layer_copy_exec(bContext *C, wmOperator *UNUSED(op))
        BKE_gpencil_layer_setactive(gpd, new_layer);
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -524,8 +524,8 @@ static int gp_layer_duplicate_object_exec(bContext *C, wmOperator *op)
        }
 
        /* notifiers */
-       DEG_id_tag_update(&gpd_dst->id, OB_RECALC_OB | OB_RECALC_DATA | DEG_TAG_COPY_ON_WRITE);
-       DEG_id_tag_update(&ob_dst->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd_dst->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
+       DEG_id_tag_update(&ob_dst->id, ID_RECALC_COPY_ON_WRITE);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -588,7 +588,7 @@ static int gp_frame_duplicate_exec(bContext *C, wmOperator *op)
 
        }
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -674,7 +674,7 @@ static int gp_frame_clean_fill_exec(bContext *C, wmOperator *op)
 
        /* notifiers */
        if (changed) {
-               DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
        }
 
@@ -762,7 +762,7 @@ static int gp_frame_clean_loose_exec(bContext *C, wmOperator *op)
 
        /* notifiers */
        if (changed) {
-               DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
        }
 
@@ -814,7 +814,7 @@ static int gp_hide_exec(bContext *C, wmOperator *op)
        }
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -902,7 +902,7 @@ static int gp_reveal_exec(bContext *C, wmOperator *op)
        }
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -943,7 +943,7 @@ static int gp_lock_all_exec(bContext *C, wmOperator *UNUSED(op))
        }
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -981,7 +981,7 @@ static int gp_unlock_all_exec(bContext *C, wmOperator *UNUSED(op))
        }
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -1054,7 +1054,7 @@ static int gp_isolate_layer_exec(bContext *C, wmOperator *op)
        }
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -1119,7 +1119,7 @@ static int gp_merge_layer_exec(bContext *C, wmOperator *op)
        BLI_ghash_free(gh_frames_cur, NULL, NULL);
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -1181,7 +1181,7 @@ static int gp_layer_change_exec(bContext *C, wmOperator *op)
        BKE_gpencil_layer_setactive(gpd, gpl);
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -1318,7 +1318,7 @@ static int gp_stroke_arrange_exec(bContext *C, wmOperator *op)
        }
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -1424,7 +1424,7 @@ static int gp_stroke_change_color_exec(bContext *C, wmOperator *op)
        CTX_DATA_END;
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -1466,7 +1466,7 @@ static int gp_stroke_lock_color_exec(bContext *C, wmOperator *UNUSED(op))
        for (short i = 0; i < *totcol; i++) {
                Material *tmp_ma = give_current_material(ob, i + 1);
                tmp_ma->gp_style->flag |= GP_STYLE_COLOR_LOCKED;
-               DEG_id_tag_update(&tmp_ma->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&tmp_ma->id, ID_RECALC_COPY_ON_WRITE);
        }
 
        /* loop all selected strokes and unlock any color */
@@ -1484,19 +1484,19 @@ static int gp_stroke_lock_color_exec(bContext *C, wmOperator *UNUSED(op))
                                        Material *tmp_ma = give_current_material(ob, gps->mat_nr + 1);
 
                                        tmp_ma->gp_style->flag &= ~GP_STYLE_COLOR_LOCKED;
-                                       DEG_id_tag_update(&tmp_ma->id, DEG_TAG_COPY_ON_WRITE);
+                                       DEG_id_tag_update(&tmp_ma->id, ID_RECALC_COPY_ON_WRITE);
                                }
                        }
                }
        }
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -1594,7 +1594,7 @@ static int gpencil_vertex_group_assign_exec(bContext *C, wmOperator *UNUSED(op))
 
        /* notifiers */
        bGPdata *gpd = ob->data;
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
 
        return OPERATOR_FINISHED;
@@ -1628,7 +1628,7 @@ static int gpencil_vertex_group_remove_from_exec(bContext *C, wmOperator *UNUSED
 
        /* notifiers */
        bGPdata *gpd = ob->data;
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
 
        return OPERATOR_FINISHED;
@@ -1662,7 +1662,7 @@ static int gpencil_vertex_group_select_exec(bContext *C, wmOperator *UNUSED(op))
 
        /* notifiers */
        bGPdata *gpd = ob->data;
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
 
        return OPERATOR_FINISHED;
@@ -1695,7 +1695,7 @@ static int gpencil_vertex_group_deselect_exec(bContext *C, wmOperator *UNUSED(op
 
        /* notifiers */
        bGPdata *gpd = ob->data;
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
 
        return OPERATOR_FINISHED;
@@ -1751,7 +1751,7 @@ static int gpencil_vertex_group_invert_exec(bContext *C, wmOperator *UNUSED(op))
 
        /* notifiers */
        bGPdata *gpd = ob->data;
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
 
        return OPERATOR_FINISHED;
@@ -1836,7 +1836,7 @@ static int gpencil_vertex_group_smooth_exec(bContext *C, wmOperator *op)
 
        /* notifiers */
        bGPdata *gpd = ob->data;
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
 
        return OPERATOR_FINISHED;
@@ -2189,7 +2189,7 @@ static int gpencil_lock_layer_exec(bContext *C, wmOperator *UNUSED(op))
                gp_style = ma->gp_style;
                gp_style->flag |= GP_STYLE_COLOR_LOCKED;
                gp_style->flag |= GP_STYLE_COLOR_HIDE;
-               DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
        }
 
        /* loop all selected strokes and unlock any color used in active layer */
@@ -2202,7 +2202,7 @@ static int gpencil_lock_layer_exec(bContext *C, wmOperator *UNUSED(op))
                                        continue;
 
                                ma = give_current_material(ob, gps->mat_nr + 1);
-                               DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
+                               DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
 
                                gp_style = ma->gp_style;
                                /* unlock/unhide color if not unlocked before */
@@ -2214,13 +2214,13 @@ static int gpencil_lock_layer_exec(bContext *C, wmOperator *UNUSED(op))
                }
        }
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -2288,7 +2288,7 @@ static int gpencil_color_isolate_exec(bContext *C, wmOperator *op)
                                continue;
                        else
                                gp_style->flag |= flags;
-                       DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
                }
        }
        else {
@@ -2297,15 +2297,15 @@ static int gpencil_color_isolate_exec(bContext *C, wmOperator *op)
                        ma = give_current_material(ob, i + 1);
                        gp_style = ma->gp_style;
                        gp_style->flag &= ~flags;
-                       DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
                }
        }
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
@@ -2354,7 +2354,7 @@ static int gpencil_color_hide_exec(bContext *C, wmOperator *op)
                        color = ma->gp_style;
                        if (active_color != color) {
                                color->flag |= GP_STYLE_COLOR_HIDE;
-                               DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
+                               DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
                        }
                }
        }
@@ -2364,10 +2364,10 @@ static int gpencil_color_hide_exec(bContext *C, wmOperator *op)
        }
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        /* notifiers */
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
@@ -2412,14 +2412,14 @@ static int gpencil_color_reveal_exec(bContext *C, wmOperator *UNUSED(op))
                ma = give_current_material(ob, i + 1);
                gp_style = ma->gp_style;
                gp_style->flag &= ~GP_STYLE_COLOR_HIDE;
-               DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
        }
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        /* notifiers */
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
@@ -2462,14 +2462,14 @@ static int gpencil_color_lock_all_exec(bContext *C, wmOperator *UNUSED(op))
                ma = give_current_material(ob, i + 1);
                gp_style = ma->gp_style;
                gp_style->flag |= GP_STYLE_COLOR_LOCKED;
-               DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
        }
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        /* notifiers */
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
@@ -2511,14 +2511,14 @@ static int gpencil_color_unlock_all_exec(bContext *C, wmOperator *UNUSED(op))
                ma = give_current_material(ob, i + 1);
                gp_style = ma->gp_style;
                gp_style->flag &= ~GP_STYLE_COLOR_LOCKED;
-               DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
        }
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        /* notifiers */
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
@@ -2607,7 +2607,7 @@ static int gpencil_color_select_exec(bContext *C, wmOperator *op)
        CTX_DATA_END;
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        /* notifiers */
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
index 89c1409..57fac1d 100644 (file)
@@ -190,7 +190,7 @@ static int gpencil_editmode_toggle_exec(bContext *C, wmOperator *op)
        /* setup other modes */
        ED_gpencil_setup_modes(C, gpd, mode);
        /* set cache as dirty */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
        WM_event_add_notifier(C, NC_GPENCIL | ND_GPENCIL_EDITMODE, NULL);
@@ -238,7 +238,7 @@ static int gpencil_selectmode_toggle_exec(bContext *C, wmOperator *op)
        ts->gpencil_selectmode = mode;
 
        WM_main_add_notifier(NC_SCENE | ND_TOOLSETTINGS, NULL);
-       DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE);
 
        return OPERATOR_FINISHED;
 }
@@ -330,7 +330,7 @@ static int gpencil_paintmode_toggle_exec(bContext *C, wmOperator *op)
        /* setup other modes */
        ED_gpencil_setup_modes(C, gpd, mode);
        /* set cache as dirty */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | ND_GPENCIL_EDITMODE, NULL);
        WM_event_add_notifier(C, NC_SCENE | ND_MODE, NULL);
@@ -418,7 +418,7 @@ static int gpencil_sculptmode_toggle_exec(bContext *C, wmOperator *op)
        /* setup other modes */
        ED_gpencil_setup_modes(C, gpd, mode);
        /* set cache as dirty */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | ND_GPENCIL_EDITMODE, NULL);
        WM_event_add_notifier(C, NC_SCENE | ND_MODE, NULL);
@@ -506,7 +506,7 @@ static int gpencil_weightmode_toggle_exec(bContext *C, wmOperator *op)
        /* setup other modes */
        ED_gpencil_setup_modes(C, gpd, mode);
        /* set cache as dirty */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | ND_GPENCIL_EDITMODE, NULL);
        WM_event_add_notifier(C, NC_SCENE | ND_MODE, NULL);
@@ -739,7 +739,7 @@ static int gp_duplicate_exec(bContext *C, wmOperator *op)
        CTX_DATA_END;
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -1135,7 +1135,7 @@ static int gp_strokes_paste_exec(bContext *C, wmOperator *op)
        BLI_ghash_free(new_colors, NULL, NULL);
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -1250,7 +1250,7 @@ static int gp_move_to_layer_exec(bContext *C, wmOperator *op)
        }
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -1337,7 +1337,7 @@ static int gp_blank_frame_add_exec(bContext *C, wmOperator *op)
        CTX_DATA_END;
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -1396,7 +1396,7 @@ static int gp_actframe_delete_exec(bContext *C, wmOperator *op)
        BKE_gpencil_layer_delframe(gpl, gpf);
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -1454,7 +1454,7 @@ static int gp_actframe_delete_all_exec(bContext *C, wmOperator *op)
 
        /* updates */
        if (success) {
-               DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
                return OPERATOR_FINISHED;
        }
@@ -1551,7 +1551,7 @@ static int gp_delete_selected_strokes(bContext *C)
        CTX_DATA_END;
 
        if (changed) {
-               DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
                return OPERATOR_FINISHED;
        }
@@ -1665,7 +1665,7 @@ static int gp_dissolve_selected_points(bContext *C, eGP_DissolveMode mode)
                                                                MEM_freeN(gps->triangles);
                                                        }
                                                        BLI_freelinkN(&gpf->strokes, gps);
-                                                       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+                                                       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                                                }
                                                else {
                                                        /* just copy all points to keep into a smaller buffer */
@@ -1794,7 +1794,7 @@ static int gp_dissolve_selected_points(bContext *C, eGP_DissolveMode mode)
        CTX_DATA_END;
 
        if (changed) {
-               DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
                return OPERATOR_FINISHED;
        }
@@ -2004,7 +2004,7 @@ static int gp_delete_selected_points(bContext *C)
        CTX_DATA_END;
 
        if (changed) {
-               DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
                return OPERATOR_FINISHED;
        }
@@ -2168,8 +2168,8 @@ static int gp_snap_to_grid(bContext *C, wmOperator *UNUSED(op))
                }
        }
 
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
-       DEG_id_tag_update(&obact->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
+       DEG_id_tag_update(&obact->id, ID_RECALC_COPY_ON_WRITE);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
        return OPERATOR_FINISHED;
 }
@@ -2251,8 +2251,8 @@ static int gp_snap_to_cursor(bContext *C, wmOperator *op)
                }
        }
 
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
-       DEG_id_tag_update(&obact->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
+       DEG_id_tag_update(&obact->id, ID_RECALC_COPY_ON_WRITE);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
        return OPERATOR_FINISHED;
 }
@@ -2344,7 +2344,7 @@ static int gp_snap_cursor_to_sel(bContext *C, wmOperator *UNUSED(op))
        }
 
 
-       DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE);
        WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
 
        return OPERATOR_FINISHED;
@@ -2393,7 +2393,7 @@ static int gp_stroke_apply_thickness_exec(bContext *C, wmOperator *UNUSED(op))
        gpl->line_change = 0;
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -2468,7 +2468,7 @@ static int gp_stroke_cyclical_set_exec(bContext *C, wmOperator *op)
        CTX_DATA_END;
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -2747,7 +2747,7 @@ static int gp_stroke_join_exec(bContext *C, wmOperator *op)
        }
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -2815,7 +2815,7 @@ static int gp_stroke_flip_exec(bContext *C, wmOperator *UNUSED(op))
        CTX_DATA_END;
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -2971,7 +2971,7 @@ static int gp_strokes_reproject_exec(bContext *C, wmOperator *op)
        }
        GP_EDITABLE_STROKES_END(gpstroke_iter);
 
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
        return OPERATOR_FINISHED;
 }
@@ -3152,7 +3152,7 @@ static int gp_stroke_subdivide_exec(bContext *C, wmOperator *op)
        GP_EDITABLE_STROKES_END(gpstroke_iter);
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -3202,7 +3202,7 @@ static int gp_stroke_simplify_exec(bContext *C, wmOperator *op)
        GP_EDITABLE_STROKES_END(gpstroke_iter);
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -3252,7 +3252,7 @@ static int gp_stroke_simplify_fixed_exec(bContext *C, wmOperator *op)
        GP_EDITABLE_STROKES_END(gpstroke_iter);
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -3453,8 +3453,8 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op)
                        BLI_addtail(&gpd_dst->layers, gpl);
                }
        }
-       DEG_id_tag_update(&gpd_src->id, OB_RECALC_OB | OB_RECALC_DATA);
-       DEG_id_tag_update(&gpd_dst->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd_src->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
+       DEG_id_tag_update(&gpd_dst->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 
        DEG_relations_tag_update(bmain);
        WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, NULL);
@@ -3570,7 +3570,7 @@ static int gp_stroke_split_exec(bContext *C, wmOperator *UNUSED(op))
        }
        CTX_DATA_END;
 
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
index 50b7d25..98603f6 100644 (file)
@@ -1099,7 +1099,7 @@ static void gpencil_fill_exit(bContext *C, wmOperator *op)
        /* drawing batch cache is dirty now */
        if ((ob) && (ob->type == OB_GPENCIL) && (ob->data)) {
                bGPdata *gpd2 = ob->data;
-               DEG_id_tag_update(&gpd2->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd2->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                gpd2->flag |= GP_DATA_CACHE_IS_DIRTY;
        }
 
@@ -1160,7 +1160,7 @@ static int gpencil_fill_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
 
        gpencil_fill_status_indicators(C, tgpf);
 
-       DEG_id_tag_update(&tgpf->gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&tgpf->gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
 
        /* add a modal handler for this operator*/
index ae1d145..06659a6 100644 (file)
@@ -167,7 +167,7 @@ static void gp_interpolate_update_strokes(bContext *C, tGPDinterpolate *tgpi)
                }
        }
 
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
 }
 
@@ -433,7 +433,7 @@ static void gpencil_interpolate_exit(bContext *C, wmOperator *op)
                BLI_freelistN(&tgpi->ilayers);
                MEM_freeN(tgpi);
        }
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
 
        /* clear pointer */
@@ -548,7 +548,7 @@ static int gpencil_interpolate_invoke(bContext *C, wmOperator *op, const wmEvent
 
        /* update shift indicator in header */
        gpencil_interpolate_status_indicators(C, tgpi);
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
 
        /* add a modal handler for this operator */
@@ -1046,7 +1046,7 @@ static int gpencil_interpolate_seq_exec(bContext *C, wmOperator *op)
        }
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
@@ -1158,7 +1158,7 @@ static int gpencil_interpolate_reverse_exec(bContext *C, wmOperator *UNUSED(op))
        CTX_DATA_END;
 
        /* notifiers */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 
        return OPERATOR_FINISHED;
index 1562929..261d19e 100644 (file)
@@ -208,7 +208,7 @@ typedef struct tGPsdata {
 static void gp_update_cache(bGPdata *gpd)
 {
        if (gpd) {
-               DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
        }
 }
@@ -1710,7 +1710,7 @@ static void gp_init_drawing_brush(bContext *C, tGPsdata *p)
         * Maybe this update can be removed when the new tool system
         * will be in place, but while, we need this to keep drawing working.
         */
-       DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE);
 }
 
 
index 9d36c1f..b67e68a 100644 (file)
@@ -426,8 +426,8 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
        /* free temp data */
        MEM_SAFE_FREE(points2D);
 
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
 }
 
@@ -478,7 +478,7 @@ static void gpencil_primitive_exit(bContext *C, wmOperator *op)
                MEM_freeN(tgpi->gpf);
                MEM_freeN(tgpi);
        }
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
 
        /* clear pointer */
@@ -576,7 +576,7 @@ static int gpencil_primitive_invoke(bContext *C, wmOperator *op, const wmEvent *
 
        /* update sindicator in header */
        gpencil_primitive_status_indicators(C, tgpi);
-       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
 
        /* add a modal handler for this operator */
@@ -628,8 +628,8 @@ static void gpencil_primitive_interaction_end(bContext *C, wmOperator *op, wmWin
                }
        }
 
-       DEG_id_tag_update(&tgpi->gpd->id, DEG_TAG_COPY_ON_WRITE);
-       DEG_id_tag_update(&tgpi->gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&tgpi->gpd->id, ID_RECALC_COPY_ON_WRITE);
+       DEG_id_tag_update(&tgpi->gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 
        /* clean up temp data */
        gpencil_primitive_exit(C, op);
index ad943a3..769f3d9 100644 (file)
@@ -194,10 +194,10 @@ static int gpencil_select_all_exec(bContext *C, wmOperator *op)
        }
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
        return OPERATOR_FINISHED;
@@ -255,10 +255,10 @@ static int gpencil_select_linked_exec(bContext *C, wmOperator *op)
        CTX_DATA_END;
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
        return OPERATOR_FINISHED;
@@ -335,10 +335,10 @@ static int gpencil_select_alternate_exec(bContext *C, wmOperator *op)
        CTX_DATA_END;
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
        return OPERATOR_FINISHED;
@@ -491,10 +491,10 @@ static int gpencil_select_grouped_exec(bContext *C, wmOperator *op)
        }
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
        return OPERATOR_FINISHED;
@@ -569,10 +569,10 @@ static int gpencil_select_first_exec(bContext *C, wmOperator *op)
        CTX_DATA_END;
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
        return OPERATOR_FINISHED;
@@ -643,10 +643,10 @@ static int gpencil_select_last_exec(bContext *C, wmOperator *op)
        CTX_DATA_END;
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
        return OPERATOR_FINISHED;
@@ -733,10 +733,10 @@ static int gpencil_select_more_exec(bContext *C, wmOperator *UNUSED(op))
        CTX_DATA_END;
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
        return OPERATOR_FINISHED;
@@ -818,10 +818,10 @@ static int gpencil_select_less_exec(bContext *C, wmOperator *UNUSED(op))
        CTX_DATA_END;
 
        /* updates */
-       DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
        /* copy on write tag is needed, or else no refresh happens */
-       DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
        WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
        return OPERATOR_FINISHED;
@@ -1010,10 +1010,10 @@ static int gpencil_circle_select_exec(bContext *C, wmOperator *op)
 
        /* updates */
        if (changed) {
-               DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
                /* copy on write tag is needed, or else no refresh happens */
-               DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
                WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
        }
@@ -1152,15 +1152,15 @@ static int gpencil_generic_select_exec(
        if (gpd->flag & GP_DATA_STROKE_PAINTMODE) {
                gp_delete_selected_point_wrap(C);
                changed = true;
-               DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
        }
 
        /* updates */
        if (changed) {
-               DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
                /* copy on write tag is needed, or else no refresh happens */
-               DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
                WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
        }
@@ -1401,8 +1401,8 @@ static int gpencil_select_exec(bContext *C, wmOperator *op)
                deselect_all_selected(C);
 
                /* copy on write tag is needed, or else no refresh happens */
-               DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
-               DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
                WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
 
                return OPERATOR_CANCELLED;
@@ -1455,10 +1455,10 @@ static int gpencil_select_exec(bContext *C, wmOperator *op)
 
        /* updates */
        if (hit_point != NULL) {
-               DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
 
                /* copy on write tag is needed, or else no refresh happens */
-               DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
 
                WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
        }
index 1dc46d2..212a119 100644 (file)
@@ -115,7 +115,7 @@ int ED_undo_gpencil_step(bContext *C, int step, const char *name)
                        }
                }
                /* drawing batch cache is dirty now */
-               DEG_id_tag_update(&new_gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&new_gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                new_gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
        }
 
index 852f7ea..9371952 100644 (file)
@@ -133,7 +133,7 @@ static void driverdropper_sample(bContext *C, wmOperator *op, const wmEvent *eve
                                /* send updates */
                                UI_context_update_anim_flag(C);
                                DEG_relations_tag_update(CTX_data_main(C));
-                               DEG_id_tag_update(ddr->ptr.id.data, OB_RECALC_OB | OB_RECALC_DATA);
+                               DEG_id_tag_update(ddr->ptr.id.data, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                                WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL);  // XXX
                        }
                }
index 5b9f9b1..d675f36 100644 (file)
@@ -504,7 +504,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
                                        Main *bmain = CTX_data_main(C);
                                        Scene *scene = CTX_data_scene(C);
                                        ED_object_single_user(bmain, scene, (struct Object *)id);
-                                       DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+                                       DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
                                        WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
                                        DEG_relations_tag_update(bmain);
                                }
@@ -1335,7 +1335,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);
-       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
 
        ED_undo_push(C, "Modifier convert to real");
 }
@@ -1942,8 +1942,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) DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
-       else DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+       if (ob->type == OB_ARMATURE) DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_TRANSFORM);
+       else DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
 
        WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob);
 }
index 1b42981..a022d75 100644 (file)
@@ -579,7 +579,7 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op)
        import_settings.keep_bind_info = keep_bind_info != 0;
 
        if (collada_import(C, &import_settings)) {
-               DEG_id_tag_update(&CTX_data_scene(C)->id, DEG_TAG_BASE_FLAGS_UPDATE);
+               DEG_id_tag_update(&CTX_data_scene(C)->id, ID_RECALC_BASE_FLAGS);
                return OPERATOR_FINISHED;
        }
        else {
index bf5844c..9a50c5b 100644 (file)
@@ -122,7 +122,7 @@ static int lattice_select_random_exec(bContext *C, wmOperator *op)
 
                BLI_rng_free(rng);
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
 
        }
@@ -214,7 +214,7 @@ static int lattice_select_mirror_exec(bContext *C, wmOperator *op)
                }
 
                /* TODO, only notify changes */
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
@@ -308,7 +308,7 @@ static int lattice_select_more_less(bContext *C, const bool select)
                MEM_freeN(selpoints);
 
                changed = true;
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
@@ -428,7 +428,7 @@ static int lattice_select_all_exec(bContext *C, wmOperator *op)
                                }
                                break;
                }
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
@@ -495,7 +495,7 @@ static int lattice_select_ungrouped_exec(bContext *C, wmOperator *op)
                }
 
                changed = true;
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
@@ -605,7 +605,7 @@ bool ED_lattice_select_pick(bContext *C, const int mval[2], bool extend, bool de
                                Object *ob = objects[ob_index];
                                ED_lattice_flags_set(ob, 0);
 
-                               DEG_id_tag_update(ob->data, DEG_TAG_SELECT_UPDATE);
+                               DEG_id_tag_update(ob->data, ID_RECALC_SELECT);
                                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
                        }
                        MEM_freeN(objects);
@@ -636,7 +636,7 @@ bool ED_lattice_select_pick(bContext *C, const int mval[2], bool extend, bool de
                        ED_object_base_activate(C, basact);
                }
 
-               DEG_id_tag_update(vc.obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(vc.obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data);
 
                return true;
index 8cb3666..2f8dc37 100644 (file)
@@ -89,7 +89,7 @@ static int make_regular_exec(bContext *C, wmOperator *UNUSED(op))
 
                        BKE_lattice_resize(lt->editlatt->latt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
 
-                       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                        WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
                }
                MEM_freeN(objects);
@@ -103,7 +103,7 @@ static int make_regular_exec(bContext *C, wmOperator *UNUSED(op))
                        Lattice *lt = ob->data;
                        BKE_lattice_resize(lt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
 
-                       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                        WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
                } FOREACH_SELECTED_OBJECT_END;
        }
@@ -336,7 +336,7 @@ static int lattice_flip_exec(bContext *C, wmOperator *op)
                }
 
                /* updates */
-               DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
                changed = true;
        }
index c1a1084..744f353 100644 (file)
@@ -194,7 +194,7 @@ static void lattice_undosys_step_decode(struct bContext *C, UndoStep *us_p, int
                        continue;
                }
                undolatt_to_editlatt(&elem->data, lt->editlatt);
-               DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
        }
 
        /* The first element is always active */
index 4337ff7..d64963d 100644 (file)
@@ -124,7 +124,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);
-               DEG_id_tag_update(&mask->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&mask->id, ID_RECALC_GEOMETRY);
 
                return OPERATOR_FINISHED;
        }
index 7cfd00d..8e64ed9 100644 (file)
@@ -130,10 +130,10 @@ void paintface_flush_flags(struct bContext *C, Object *ob, short flag)
                        BKE_mesh_batch_cache_dirty_tag(me_eval, BKE_MESH_BATCH_DIRTY_SELECT);
                }
 
-               DEG_id_tag_update(ob->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(ob->data, ID_RECALC_SELECT);
        }
        else {
-               DEG_id_tag_update(ob->data, DEG_TAG_COPY_ON_WRITE | DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(ob->data, ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT);
        }
 
        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
@@ -544,7 +544,7 @@ void paintvert_flush_flags(Object *ob)
 
 void paintvert_tag_select_update(struct bContext *C, struct Object *ob)
 {
-       DEG_id_tag_update(ob->data, DEG_TAG_COPY_ON_WRITE | DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(ob->data, ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
 }
 
index 8efec7f..9c5372c 100644 (file)
@@ -123,7 +123,7 @@ static void edgering_select(RingSelOpData *lcd)
                        Object *ob_iter = lcd->objects[ob_index];
                        BMEditMesh *em = BKE_editmesh_from_object(ob_iter);
                        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
-                       DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(ob_iter->data, ID_RECALC_SELECT);
                        WM_main_add_notifier(NC_GEOM | ND_SELECT, ob_iter->data);
                }
        }
@@ -227,7 +227,7 @@ static void ringsel_finish(bContext *C, wmOperator *op)
                                BM_select_history_store(em->bm, lcd->eed);
 
                        EDBM_selectmode_flush(lcd->em);
-                       DEG_id_tag_update(lcd->ob->data, DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(lcd->ob->data, ID_RECALC_SELECT);
                        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, lcd->ob->data);
                }
        }
index 292799e..1d0521e 100644 (file)
@@ -81,7 +81,7 @@ static void edbm_flag_disable_all_multi(ViewLayer *view_layer, View3D *v3d, cons
                BMesh *bm_iter = em_iter->bm;
                if (bm_iter->totvertsel) {
                        EDBM_flag_disable_all(em_iter, hflag);
-                       DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(ob_iter->data, ID_RECALC_SELECT);
                }
        }
        MEM_freeN(objects);
index c8c8268..3e97a73 100644 (file)
@@ -1381,7 +1381,7 @@ static int edbm_select_similar_region_exec(bContext *C, wmOperator *op)
        MEM_freeN(group_index);
 
        if (changed) {
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        else {
@@ -1603,7 +1603,7 @@ static int edbm_loop_multiselect_exec(bContext *C, wmOperator *op)
                MEM_freeN(edarray);
                //      if (EM_texFaceCheck())
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
@@ -1765,7 +1765,7 @@ static bool mouse_mesh_loop(bContext *C, const int mval[2], bool extend, bool de
                        }
 
                        EDBM_flag_disable_all(em_iter, BM_ELEM_SELECT);
-                       DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(ob_iter->data, ID_RECALC_SELECT);
                }
        }
 
@@ -1852,7 +1852,7 @@ static bool mouse_mesh_loop(bContext *C, const int mval[2], bool extend, bool de
 
        MEM_freeN(bases);
 
-       DEG_id_tag_update(vc.obedit->data, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(vc.obedit->data, ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data);
 
        return true;
@@ -1959,7 +1959,7 @@ static int edbm_select_all_exec(bContext *C, wmOperator *op)
                                EDBM_selectmode_flush(em);
                                break;
                }
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
 
@@ -2005,7 +2005,7 @@ static int edbm_faces_select_interior_exec(bContext *C, wmOperator *UNUSED(op))
                        continue;
                }
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
@@ -2067,7 +2067,7 @@ bool EDBM_select_pick(bContext *C, const int mval[2], bool extend, bool deselect
                                Object *ob_iter = base_iter->object;
                                EDBM_flag_disable_all(BKE_editmesh_from_object(ob_iter), BM_ELEM_SELECT);
                                if (basact->object != ob_iter) {
-                                       DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE);
+                                       DEG_id_tag_update(ob_iter->data, ID_RECALC_SELECT);
                                        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob_iter->data);
                                }
                        }
@@ -2187,7 +2187,7 @@ bool EDBM_select_pick(bContext *C, const int mval[2], bool extend, bool deselect
                        ED_object_base_activate(C, basact);
                }
 
-               DEG_id_tag_update(vc.obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(vc.obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data);
 
                ok = true;
@@ -2521,11 +2521,11 @@ bool EDBM_selectmode_toggle(
                        BMEditMesh *em_iter = BKE_editmesh_from_object(ob_iter);
                        em_iter->selectmode = ts->selectmode;
                        EDBM_selectmode_set(em_iter);
-                       DEG_id_tag_update(ob_iter->data, DEG_TAG_COPY_ON_WRITE | DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(ob_iter->data, ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT);
                        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob_iter->data);
                }
                WM_main_add_notifier(NC_SCENE | ND_TOOLSETTINGS, NULL);
-               DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE);
        }
 
        MEM_freeN(objects);
@@ -2974,7 +2974,7 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
                        select_linked_delimit_end(em);
                }
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
 
        }
@@ -3194,7 +3194,7 @@ static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmE
         * index selections isn't very common. */
        RNA_int_set(op->ptr, "index", index);
 
-       DEG_id_tag_update(basact->object->data, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(basact->object->data, ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, basact->object->data);
 
        MEM_freeN(bases);
@@ -3225,7 +3225,7 @@ static int edbm_select_linked_pick_exec(bContext *C, wmOperator *op)
 
        edbm_select_linked_pick_ex(em, ele, sel, delimit);
 
-       DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
 
        return OPERATOR_FINISHED;
@@ -3314,7 +3314,7 @@ static int edbm_select_face_by_sides_exec(bContext *C, wmOperator *op)
 
                EDBM_selectmode_flush(em);
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
 
@@ -3412,7 +3412,7 @@ static int edbm_select_loose_exec(bContext *C, wmOperator *op)
 
                EDBM_selectmode_flush(em);
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
 
@@ -3477,7 +3477,7 @@ static int edbm_select_mirror_exec(bContext *C, wmOperator *op)
                if (tot_mirr_iter) {
                        EDBM_selectmode_flush(em);
 
-                       DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
                }
 
@@ -3538,7 +3538,7 @@ static int edbm_select_more_exec(bContext *C, wmOperator *op)
                }
 
                EDBM_select_more(em, use_face_step);
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
 
@@ -3589,7 +3589,7 @@ static int edbm_select_less_exec(bContext *C, wmOperator *op)
                }
 
                EDBM_select_less(em, use_face_step);
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
 
@@ -3915,7 +3915,7 @@ static int edbm_select_sharp_edges_exec(bContext *C, wmOperator *op)
                else {
                        EDBM_selectmode_flush(em);
                }
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
@@ -4014,7 +4014,7 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
 
                BLI_LINKSTACK_FREE(stack);
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
@@ -4111,7 +4111,7 @@ static int edbm_select_non_manifold_exec(bContext *C, wmOperator *op)
                        }
                }
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
 
                EDBM_selectmode_flush(em);
@@ -4215,7 +4215,7 @@ static int edbm_select_random_exec(bContext *C, wmOperator *op)
                        EDBM_deselect_flush(em);
                }
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
 
@@ -4310,7 +4310,7 @@ static int edbm_select_ungrouped_exec(bContext *C, wmOperator *op)
 
                if (changed) {
                        EDBM_selectmode_flush(em);
-                       DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
                }
        }
@@ -4434,7 +4434,7 @@ static int edbm_select_axis_exec(bContext *C, wmOperator *op)
                if (changed) {
                        EDBM_selectmode_flush(em_iter);
                        WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit_iter->data);
-                       DEG_id_tag_update(obedit_iter->data, DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(obedit_iter->data, ID_RECALC_SELECT);
                }
        }
        MEM_freeN(objects);
@@ -4526,7 +4526,7 @@ static int edbm_region_to_loop_exec(bContext *C, wmOperator *UNUSED(op))
                        EDBM_selectmode_to_scene(C);
                }
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
@@ -4734,7 +4734,7 @@ static int edbm_loop_to_region_exec(bContext *C, wmOperator *op)
 
                EDBM_selectmode_flush(em);
 
-               DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
        }
        MEM_freeN(objects);
index c9fc54f..9775125 100644 (file)
@@ -4058,7 +4058,7 @@ static int edbm_separate_exec(bContext *C, wmOperator *op)
                                                            .calc_object_remap = true,
                                                        }));
 
-                                               DEG_id_tag_update(&me->id, OB_RECALC_DATA);
+                                               DEG_id_tag_update(&me->id, ID_RECALC_GEOMETRY);
                                                WM_event_add_notifier(C, NC_GEOM | ND_DATA, me);
                                        }
 
@@ -6048,7 +6048,7 @@ static void sort_bmelem_flag(
        }
 
        BM_mesh_remap(em->bm, map[0], map[1], map[2]);
-       DEG_id_tag_update(ob->data, OB_RECALC_DATA);
+       DEG_id_tag_update(ob->data, ID_RECALC_GEOMETRY);
        WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
 
        for (j = 3; j--; ) {
@@ -6974,7 +6974,7 @@ static int edbm_mark_freestyle_edge_exec(bContext *C, wmOperator *op)
                        }
                }
 
-               DEG_id_tag_update(obedit->data, OB_RECALC_DATA);
+               DEG_id_tag_update(obedit->data, ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
        }
        MEM_freeN(objects);
@@ -7051,7 +7051,7 @@ static int edbm_mark_freestyle_face_exec(bContext *C, wmOperator *op)
                        }
                }
 
-               DEG_id_tag_update(obedit->data, OB_RECALC_DATA);
+               DEG_id_tag_update(obedit->data, ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
        }
        MEM_freeN(objects);
index b4f3ebf..9b24157 100644 (file)
@@ -744,7 +744,7 @@ static void mesh_undosys_step_decode(struct bContext *C, UndoStep *us_p, int UNU
                }
                BMEditMesh *em = me->edit_btmesh;
                undomesh_to_editmesh(&elem->data, em, obedit->data);
-               DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
        }
 
        /* The first element is always active */
index 7fdef86..cb8d4f8 100644 (file)
@@ -174,7 +174,7 @@ bool EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const bool
                }
 
                if (em->ob) {
-                       DEG_id_tag_update(&((Mesh *)em->ob->data)->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&((Mesh *)em->ob->data)->id, ID_RECALC_COPY_ON_WRITE);
                }
 
                return false;
@@ -1333,7 +1333,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 */
-       DEG_id_tag_update(ob->data, OB_RECALC_DATA);
+       DEG_id_tag_update(ob->data, ID_RECALC_GEOMETRY);
        WM_main_add_notifier(NC_GEOM | ND_DATA, ob->data);
 
        if (do_tessface) {
index 0450b1d..cc49beb 100644 (file)
@@ -593,9 +593,9 @@ int join_mesh_exec(bContext *C, wmOperator *op)
 
        DEG_relations_tag_update(bmain);   /* removed objects, need to rebuild dag */
 
-       DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
+       DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 
-       DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
 
        return OPERATOR_FINISHED;
@@ -681,7 +681,7 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op)
        }
        CTX_DATA_END;
 
-       DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
 
        return OPERATOR_FINISHED;
index c85f046..ebf056f 100644 (file)
@@ -199,7 +199,7 @@ static void mball_undosys_step_decode(struct bContext *C, UndoStep *us_p, int UN
                        continue;
                }
                undomball_to_editmball(&elem->data, mb);
-               DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
        }
 
        /* The first element is always active */
index 07a41bd..aedb182 100644 (file)
@@ -155,7 +155,7 @@ static int mball_select_all_exec(bContext *C, wmOperator *op)
        for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
                Object *obedit = objects[ob_index];
                MetaBall *mb = (MetaBall *)obedit->data;
-               DEG_id_tag_update(&mb->id, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(&mb->id, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
        }
 
@@ -384,7 +384,7 @@ static int mball_select_similar_exec(bContext *C, wmOperator *op)
                }
 
                if (changed) {
-                       DEG_id_tag_update(&mb->id, DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(&mb->id, ID_RECALC_SELECT);
                        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
                }
        }
@@ -458,7 +458,7 @@ static int select_random_metaelems_exec(bContext *C, wmOperator *op)
 
                BLI_rng_free(rng);
 
-               DEG_id_tag_update(&mb->id, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(&mb->id, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
        }
        MEM_freeN(objects);
@@ -761,7 +761,7 @@ bool ED_mball_select_pick(bContext *C, const int mval[2], bool extend, bool dese
                                                }
 
                                                BKE_mball_deselect_all((MetaBall *)ob_iter->data);
-                                               DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE);
+                                               DEG_id_tag_update(ob_iter->data, ID_RECALC_SELECT);
                                                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob_iter->data);
                                        }
                                        MEM_freeN(objects);
@@ -789,7 +789,7 @@ bool ED_mball_select_pick(bContext *C, const int mval[2], bool extend, bool dese
 
                                mb->lastelem = ml_act;
 
-                               DEG_id_tag_update(&mb->id, DEG_TAG_SELECT_UPDATE);
+                               DEG_id_tag_update(&mb->id, ID_RECALC_SELECT);
                                WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
 
                                if (vc.view_layer->basact != base) {
index 785ca54..a760086 100644 (file)
@@ -414,7 +414,7 @@ Object *ED_object_add_type(
        DEG_id_type_tag(bmain, ID_OB);
        DEG_relations_tag_update(bmain);
        if (ob->data != NULL) {
-               DEG_id_tag_update_ex(bmain, (ID *)ob->data, DEG_TAG_EDITORS_UPDATE);
+               DEG_id_tag_update_ex(bmain, (ID *)ob->data, ID_RECALC_EDITORS);
        }
 
        if (enter_editmode)
@@ -707,7 +707,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op)
                newob = true;
        }
        else {
-               DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
        }
 
        ED_object_new_primitive_matrix(C, obedit, loc, rot, mat);
@@ -811,7 +811,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op)
                newob = true;
        }
        else {
-               DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
        }
 
        if (obedit == NULL) {
@@ -912,7 +912,7 @@ static int empty_drop_named_image_invoke(bContext *C, wmOperator *op, const wmEv
        /* either change empty under cursor or create a new empty */
        if (ob_cursor && ob_cursor->type == OB_EMPTY) {
                WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
-               DEG_id_tag_update((ID *)ob_cursor, DEG_TAG_TRANSFORM);
+               DEG_id_tag_update((ID *)ob_cursor, ID_RECALC_TRANSFORM);
                ob = ob_cursor;
        }
        else {
@@ -1014,7 +1014,7 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op)
                BKE_object_obdata_size_init(ob, GP_OBGPENCIL_DEFAULT_SIZE * radius);
        }
        else {
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_ADDED, NULL);
        }
 
@@ -1211,7 +1211,7 @@ static int collection_instance_add_exec(bContext *C, wmOperator *op)
 
                /* works without this except if you try render right after, see: 22027 */
                DEG_relations_tag_update(bmain);
-               DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+               DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
                WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
 
                return OPERATOR_FINISHED;
@@ -1317,7 +1317,7 @@ void ED_object_base_free_and_unlink(Main *bmain, Scene *scene, Object *ob)
                return;
        }
 
-       DEG_id_tag_update_ex(bmain, &ob->id, DEG_TAG_BASE_FLAGS_UPDATE);
+       DEG_id_tag_update_ex(bmain, &ob->id, ID_RECALC_BASE_FLAGS);
 
        BKE_scene_collections_object_remove(bmain, scene, ob, true);
 }
@@ -1352,7 +1352,7 @@ static int object_delete_exec(bContext *C, wmOperator *op)
                /* if grease pencil object, set cache as dirty */
                if (ob->type == OB_GPENCIL) {
                        bGPdata *gpd = (bGPdata *)ob->data;
-                       DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+                       DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
                }
 
                /* This is sort of a quick hack to address T51243 - Proper thing to do here would be to nuke most of all this
@@ -1417,7 +1417,7 @@ static int object_delete_exec(bContext *C, wmOperator *op)
 
                        DEG_relations_tag_update(bmain);
 
-                       DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+                       DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
                        WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
                        WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, scene);
                }
@@ -1615,7 +1615,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
                /* Remap new object to itself, and clear again newid pointer of orig object. */
                BKE_libblock_relink_to_newid(&ob_dst->id);
 
-               DEG_id_tag_update(&ob_dst->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&ob_dst->id, ID_RECALC_GEOMETRY);
 
                if (use_hierarchy) {
                        /* original parents */
@@ -1669,7 +1669,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 there's any other discrepancies */
-                       DEG_id_tag_update(&ob_dst->id, OB_RECALC_OB);
+                       DEG_id_tag_update(&ob_dst->id, ID_RECALC_TRANSFORM);
                }
        }
 
@@ -1678,7 +1678,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
                        if (ob->proxy_group == base->object) {
                                ob->proxy = NULL;
                                ob->proxy_from = NULL;
-                               DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+                               DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
                        }
                }
        }
@@ -1693,7 +1693,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
        BKE_main_id_clear_newpoins(bmain);
 
        base->object->transflag &= ~OB_DUPLI;
-       DEG_id_tag_update(&base->object->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&base->object->id, ID_RECALC_COPY_ON_WRITE);
 }
 
 static int object_duplicates_make_real_exec(bContext *C, wmOperator *op)
@@ -1798,7 +1798,7 @@ static Base *duplibase_for_convert(Main *bmain, Scene *scene, ViewLayer *view_la
        }
 
        obn = BKE_object_copy(bmain, ob);
-       DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+       DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
        BKE_collection_object_add_from(bmain, scene, ob, obn);
 
        basen = BKE_view_layer_base_find(view_layer, obn);
@@ -1870,7 +1870,7 @@ static int convert_exec(bContext *C, wmOperator *op)
                                            "Converting some linked object/object data, enforcing 'Keep Original' option to True");
                        }
 
-                       DEG_id_tag_update(&base->object->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&base->object->id, ID_RECALC_GEOMETRY);
                }
 
                uint64_t customdata_mask_prev = scene->customdata_mask;
@@ -1944,7 +1944,7 @@ static int convert_exec(bContext *C, wmOperator *op)
                        }
                        else {
                                newob = ob;
-                               DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+                               DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
                        }
 
                        /* make new mesh data from the original copy */
@@ -2010,7 +2010,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;
-                                                       DEG_id_tag_update(&ob1->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+                                                       DEG_id_tag_update(&ob1->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
                                                }
                                        }
                                }
@@ -2117,7 +2117,7 @@ static int convert_exec(bContext *C, wmOperator *op)
                }
 
                if (!keep_original && (ob->flag & OB_DONE)) {
-                       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                        ((ID *)ob->data)->tag &= ~LIB_TAG_DOIT; /* flag not to convert this datablock again */
                }
        }
@@ -2156,7 +2156,7 @@ static int convert_exec(bContext *C, wmOperator *op)
        }
 
        DEG_relations_tag_update(bmain);
-       DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, scene);
        WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
 
@@ -2211,7 +2211,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, ViewLayer
        }
        else {
                obn = ID_NEW_SET(ob, BKE_object_copy(bmain, ob));
-               DEG_id_tag_update(&obn->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&obn->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 
                base = BKE_view_layer_base_find(view_layer, ob);
                if ((base != NULL) && (base->flag & BASE_VISIBLE)) {
@@ -2345,7 +2345,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, ViewLayer
                                }
                                break;
                        case OB_ARMATURE:
-                               DEG_id_tag_update(&obn->id, OB_RECALC_DATA);
+                               DEG_id_tag_update(&obn->id, ID_RECALC_GEOMETRY);
                                if (obn->pose)
                                        BKE_pose_tag_recalc(bmain, obn->pose);
                                if (dupflag & USER_DUP_ARM) {
@@ -2472,7 +2472,7 @@ Base *ED_object_add_duplicate(Main *bmain, Scene *scene, ViewLayer *view_layer,
        /* DAG_relations_tag_update(bmain); */ /* caller must do */
 
        if (ob->data != NULL) {
-               DEG_id_tag_update_ex(bmain, (ID *)ob->data, DEG_TAG_EDITORS_UPDATE);
+               DEG_id_tag_update_ex(bmain, (ID *)ob->data, ID_RECALC_EDITORS);
        }
 
        BKE_main_id_clear_newpoins(bmain);
@@ -2517,7 +2517,7 @@ static int duplicate_exec(bContext *C, wmOperator *op)
        BKE_main_id_clear_newpoins(bmain);
 
        DEG_relations_tag_update(bmain);
-       DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE | DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT);
 
        WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
 
@@ -2599,7 +2599,7 @@ static int add_named_exec(bContext *C, wmOperator *op)
        /* TODO(sergey): Only update relations for the current scene. */
        DEG_relations_tag_update(bmain);
 
-       DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
        WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
        WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
 
index 078b705..5e1773b 100644 (file)
@@ -154,7 +154,7 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
 
                        if (!BKE_collection_object_cyclic_check(bmain, base->object, collection)) {
                                BKE_collection_object_add(bmain, collection, base->object);
-                               DEG_id_tag_update(&collection->id, DEG_TAG_COPY_ON_WRITE);
+                               DEG_id_tag_update(&collection->id, ID_RECALC_COPY_ON_WRITE);
                                updated = true;
                        }
                        else {
@@ -225,7 +225,7 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
                        CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
                        {
                                BKE_collection_object_remove(bmain, collection, base->object, false);
-                               DEG_id_tag_update(&collection->id, DEG_TAG_COPY_ON_WRITE);
+                               DEG_id_tag_update(&collection->id, ID_RECALC_COPY_ON_WRITE);
                                ok = 1;
                        }
                        CTX_DATA_END;
@@ -318,7 +318,7 @@ static int collection_objects_remove_exec(bContext *C, wmOperator *op)
                CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
                {
                        BKE_collection_object_remove(bmain, collection, base->object, false);
-                       DEG_id_tag_update(&collection->id, DEG_TAG_COPY_ON_WRITE);
+                       DEG_id_tag_update(&collection->id, ID_RECALC_COPY_ON_WRITE);
                        updated = true;
                }
                CTX_DATA_END;
@@ -370,7 +370,7 @@ static int collection_create_exec(bContext *C, wmOperator *op)
        CTX_DATA_BEGIN (C, Base *, base, selected_bases)
        {
                BKE_collection_object_add(bmain, collection, base->object);
-               DEG_id_tag_update(&collection->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&collection->id, ID_RECALC_COPY_ON_WRITE);
        }
        CTX_DATA_END;
 
@@ -411,7 +411,7 @@ static int collection_add_exec(bContext *C, wmOperator *UNUSED(op))
        id_fake_user_set(&collection->id);
        BKE_collection_object_add(bmain, collection, ob);
 
-       DEG_id_tag_update(&collection->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&collection->id, ID_RECALC_COPY_ON_WRITE);
        DEG_relations_tag_update(bmain);
 
        WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
@@ -463,7 +463,7 @@ static int collection_link_exec(bContext *C, wmOperator *op)
 
        BKE_collection_object_add(bmain, collection, ob);
 
-       DEG_id_tag_update(&collection->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&collection->id, ID_RECALC_COPY_ON_WRITE);
        DEG_relations_tag_update(bmain);
 
        WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
@@ -506,7 +506,7 @@ static int collection_remove_exec(bContext *C, wmOperator *UNUSED(op))
 
        BKE_collection_object_remove(bmain, collection, ob, false);
 
-       DEG_id_tag_update(&collection->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&collection->id, ID_RECALC_COPY_ON_WRITE);
        DEG_relations_tag_update(bmain);
 
        WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
@@ -580,7 +580,7 @@ static int select_grouped_exec(bContext *C, wmOperator *UNUSED(op))  /* Select o
        }
        CTX_DATA_END;
 
-       DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
        WM_main_add_notifier(NC_SCENE | ND_OB_SELECT, scene);
 
        return OPERATOR_FINISHED;
index 4aedd6a..93ff94e 100644 (file)
@@ -1228,9 +1228,9 @@ void ED_object_constraint_update(Main *bmain, Object *ob)
        object_test_constraints(bmain, ob);
 
        if (ob->type == OB_ARMATURE)
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_TRANSFORM);
        else
-               DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+               DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
 }
 
 static void object_pose_tag_update(Main *bmain, Object *ob)
@@ -1267,14 +1267,14 @@ void ED_object_constraint_tag_update(Main *bmain, Object *ob, bConstraint *con)
        }
 
        if (ob->type == OB_ARMATURE)
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_TRANSFORM);
        else
-               DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+               DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
 
        /* Do Copy-on-Write tag here too, otherwise constraint
         * influence/mute buttons in UI have no effect
         */
-       DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+       DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
 }
 
 void ED_object_constraint_dependency_tag_update(Main *bmain, Object *ob, bConstraint *con)
@@ -1449,7 +1449,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
                pchan->constflag &= ~(PCHAN_HAS_IK | PCHAN_HAS_SPLINEIK | PCHAN_HAS_CONST);
 
                if (prev_ob != ob) {
-                       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                        WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_REMOVED, ob);
                        prev_ob = ob;
                }
@@ -1485,7 +1485,7 @@ 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);
-               DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+               DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
        }
        CTX_DATA_END;
 
@@ -1536,7 +1536,7 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op)
 
                        if (prev_ob != ob) {
                                BKE_pose_tag_recalc(bmain, ob->pose);
-                               DEG_id_tag_update((ID *)ob, OB_RECALC_DATA);
+                               DEG_id_tag_update((ID *)ob, ID_RECALC_GEOMETRY);
                                prev_ob = ob;
                        }
                }
@@ -1577,7 +1577,7 @@ 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);
-                       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                }
        }
        CTX_DATA_END;
@@ -1856,10 +1856,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;
                }
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_TRANSFORM);
        }
        else
-               DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+               DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
 
        /* notifiers for updates */
        WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_ADDED, ob);
@@ -2100,7 +2100,7 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op))
                        prev_ob = ob;
 
                        /* Refresh depsgraph. */
-                       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
 
                        /* Note, notifier might evolve. */
                        WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_REMOVED, ob);
index 3533e4f..ad47e07 100644 (file)
@@ -428,7 +428,7 @@ static int data_transfer_exec(bContext *C, wmOperator *op)
                        }
                }
 
-               DEG_id_tag_update(&ob_dst->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&ob_dst->id, ID_RECALC_GEOMETRY);
 
                if (reverse_transfer) {
                        SWAP(Object *, ob_src, ob_dst);
@@ -637,7 +637,7 @@ static int datalayout_transfer_exec(bContext *C, wmOperator *op)
                BKE_object_data_transfer_layout(depsgraph, scene_eval, ob_src_eval, ob_dst, dtmd->data_types, use_delete,
                                                dtmd->layers_select_src, dtmd->layers_select_dst);
 
-               DEG_id_tag_update(&ob_dst->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&ob_dst->id, ID_RECALC_GEOMETRY);
        }
        else {
                Object *ob_src = ob_act;
@@ -670,7 +670,7 @@ static int datalayout_transfer_exec(bContext *C, wmOperator *op)
                                                                layers_select_src, layers_select_dst);
                        }
 
-                       DEG_id_tag_update(&ob_dst->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&ob_dst->id, ID_RECALC_GEOMETRY);
                }
 
                BLI_freelistN(&ctx_objects);
index e19283d..efbea1e 100644 (file)
@@ -182,7 +182,7 @@ static int object_hide_view_clear_exec(bContext *C, wmOperator *op)
        }
 
        BKE_layer_collection_sync(scene, view_layer);
-       DEG_id_tag_update(&scene->id, DEG_TAG_BASE_FLAGS_UPDATE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS);
        WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
 
        return OPERATOR_FINISHED;
@@ -248,7 +248,7 @@ static int object_hide_view_set_exec(bContext *C, wmOperator *op)
        }
 
        BKE_layer_collection_sync(scene, view_layer);
-       DEG_id_tag_update(&scene->id, DEG_TAG_BASE_FLAGS_UPDATE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS);
        WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
 
        return OPERATOR_FINISHED;
@@ -295,7 +295,7 @@ static int object_hide_collection_exec(bContext *C, wmOperator *op)
 
        BKE_layer_collection_set_visible(scene, view_layer, lc, extend);
 
-       DEG_id_tag_update(&scene->id, DEG_TAG_BASE_FLAGS_UPDATE);
+       DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS);
        WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
 
        return OPERATOR_FINISHED;
@@ -546,7 +546,7 @@ bool ED_object_editmode_exit_ex(Main *bmain, Scene *scene, Object *obedit, int f
                BKE_ptcache_object_reset(scene, obedit, PTCACHE_RESET_OUTDATED);
 
                /* also flush ob recalc, doesn't take much overhead, but used for particles */
-               DEG_id_tag_update(&obedit->id, OB_RECALC_OB | OB_RECALC_DATA);
+               DEG_id_tag_update(&obedit->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 
                WM_main_add_notifier(NC_SCENE | ND_MODE | NS_MODE_OBJECT, scene);
 
@@ -611,7 +611,7 @@ bool ED_object_editmode_enter_ex(Main *bmain, Scene *scene, Object *ob, int flag
                ok = 1;
                ED_armature_to_edit(ob->data);
                /* to ensure all goes in restposition and without striding */
-               DEG_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, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); /* XXX: should this be ID_RECALC_GEOMETRY? */
 
                WM_main_add_notifier(NC_SCENE | ND_MODE | NS_EDITMODE_ARMATURE, scene);
        }
@@ -641,7 +641,7 @@ bool ED_object_editmode_enter_ex(Main *bmain, Scene *scene, Object *ob, int flag
        }
 
        if (ok) {
-               DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+               DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
        }
        else {
                if ((flag & EM_NO_CONTEXT) == 0) {
@@ -921,7 +921,7 @@ static void copy_attr(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *
        for (base = FIRSTBASE(view_layer); base; base = base->next) {
                if (base != BASACT(view_layer)) {
                        if (TESTBASELIB(v3d, base)) {
-                               DEG_id_tag_update(&base->object->id, OB_RECALC_DATA);
+                               DEG_id_tag_update(&base->object->id, ID_RECALC_GEOMETRY);
 
                                if (event == 1) {  /* loc */
                                        copy_v3_v3(base->object->loc, ob->loc);
@@ -1000,7 +1000,7 @@ static void copy_attr(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *
 
                                                BLI_strncpy(cu1->family, cu->family, sizeof(cu1->family));
 
-                                               DEG_id_tag_update(&base->object->id, OB_RECALC_DATA);
+                                               DEG_id_tag_update(&base->object->id, ID_RECALC_GEOMETRY);
                                        }
                                }
                                else if (event == 19) {   /* bevel settings */
@@ -1016,7 +1016,7 @@ static void copy_attr(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *
                                                cu1->ext1 = cu->ext1;
                                                cu1->ext2 = cu->ext2;
 
-                                               DEG_id_tag_update(&base->object->id, OB_RECALC_DATA);
+                                               DEG_id_tag_update(&base->object->id, ID_RECALC_GEOMETRY);
                                        }
                                }
                                else if (event == 25) {   /* curve resolution */
@@ -1035,7 +1035,7 @@ static void copy_attr(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *
                                                        nu = nu->next;
                                                }
 
-                                               DEG_id_tag_update(&base->object->id, OB_RECALC_DATA);
+                                               DEG_id_tag_update(&base->object->id, ID_RECALC_GEOMETRY);
                                        }
                                }
                                else if (event == 21) {
@@ -1051,14 +1051,14 @@ static void copy_attr(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *
                                                        }
 
                                                        modifier_copyData(md, tmd);
-                                                       DEG_id_tag_update(&base->object->id, OB_RECALC_DATA);
+                                                       DEG_id_tag_update(&base->object->id, ID_RECALC_GEOMETRY);
                                                }
                                        }
                                }
                                else if (event == 22) {
                                        /* Copy the constraint channels over */
                                        BKE_constraints_copy(&base->object->constraints, &ob->constraints, true);
-                                       DEG_id_tag_update(&base->object->id, DEG_TAG_COPY_ON_WRITE);
+                                       DEG_id_tag_update(&base->object->id, ID_RECALC_COPY_ON_WRITE);
                                        DEG_relations_tag_update(bmain);
                                }
                                else if (event == 23) {
@@ -1069,7 +1069,7 @@ static void copy_attr(Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *
                                                BLI_addhead(&base->object->modifiers, modifier_new(eModifierType_Softbody));
                                        }
 
-                                       DEG_id_tag_update(&base->object->id, DEG_TAG_COPY_ON_WRITE);
+                                       DEG_id_tag_update(&base->object->id, ID_RECALC_COPY_ON_WRITE);
                                        DEG_relations_tag_update(bmain);
                                }
                                else if (event == 26) {
@@ -1264,7 +1264,7 @@ void ED_objects_recalculate_paths(bContext *C, Scene *scene, bool current_frame_
                CTX_DATA_BEGIN(C, Object *, ob, selected_editable_objects)
                {
                        if (ob->mpath) {
-                               DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+                               DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
                        }
                }
                CTX_DATA_END;
@@ -1399,7 +1399,7 @@ static void object_clear_mpath(Object *ob)
                ob->avs.path_bakeflag &= ~MOTIONPATH_BAKE_HAS_PATHS;
 
                /* tag object for copy on write - so removed paths don't still show */
-               DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
        }
 }
 
@@ -1482,7 +1482,7 @@ static int object_update_paths_range_exec(bContext *C, wmOperator *UNUSED(op))
                ob->avs.path_ef = PEFRA;
 
                /* tag for updates */
-               DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+               DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
                WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
        }
        CTX_DATA_END;
@@ -1529,7 +1529,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
                        BKE_mesh_smooth_flag_set(ob, !clear);
 
                        BKE_mesh_batch_cache_dirty_tag(ob->data, BKE_MESH_BATCH_DIRTY_ALL);
-                       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                        WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
 
                        done = true;
@@ -1542,7 +1542,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
                                else nu->flag &= ~ME_SMOOTH;
                        }
 
-                       DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+                       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
                        WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
 
                        done = true;
@@