diff options
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 48 | ||||
-rw-r--r-- | source/blender/editors/object/object_collection.c | 16 | ||||
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 24 | ||||
-rw-r--r-- | source/blender/editors/object/object_data_transfer.c | 6 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 38 | ||||
-rw-r--r-- | source/blender/editors/object/object_facemap_ops.c | 14 | ||||
-rw-r--r-- | source/blender/editors/object/object_gpencil_modifier.c | 18 | ||||
-rw-r--r-- | source/blender/editors/object/object_hook.c | 12 | ||||
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 56 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 50 | ||||
-rw-r--r-- | source/blender/editors/object/object_select.c | 22 | ||||
-rw-r--r-- | source/blender/editors/object/object_shader_fx.c | 12 | ||||
-rw-r--r-- | source/blender/editors/object/object_shapekey.c | 12 | ||||
-rw-r--r-- | source/blender/editors/object/object_transform.c | 24 | ||||
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 54 |
15 files changed, 203 insertions, 203 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 785ca542e9d..a760086abae 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -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); diff --git a/source/blender/editors/object/object_collection.c b/source/blender/editors/object/object_collection.c index 078b705a2fd..5e1773bf3c2 100644 --- a/source/blender/editors/object/object_collection.c +++ b/source/blender/editors/object/object_collection.c @@ -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; diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 4aedd6a55d4..93ff94edc75 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -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); diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c index 3533e4fe55c..ad47e07b2e9 100644 --- a/source/blender/editors/object/object_data_transfer.c +++ b/source/blender/editors/object/object_data_transfer.c @@ -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); diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index e19283debce..efbea1ee30e 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -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; @@ -1915,7 +1915,7 @@ static int move_to_collection_exec(bContext *C, wmOperator *op) collection->id.name + 2); 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_LAYER, scene); WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); diff --git a/source/blender/editors/object/object_facemap_ops.c b/source/blender/editors/object/object_facemap_ops.c index ab710b21817..a111a73a42c 100644 --- a/source/blender/editors/object/object_facemap_ops.c +++ b/source/blender/editors/object/object_facemap_ops.c @@ -190,7 +190,7 @@ static int face_map_add_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob = ED_object_context(C); BKE_object_facemap_add(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_GEOM | ND_DATA, ob->data); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); @@ -219,7 +219,7 @@ static int face_map_remove_exec(bContext *C, wmOperator *UNUSED(op)) if (fmap) { BKE_object_facemap_remove(ob, fmap); - 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); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -267,7 +267,7 @@ static int face_map_assign_exec(bContext *C, wmOperator *UNUSED(op)) } } - 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); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -316,7 +316,7 @@ static int face_map_remove_from_exec(bContext *C, wmOperator *UNUSED(op)) } } - 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); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -370,7 +370,7 @@ static int face_map_select_exec(bContext *C, wmOperator *UNUSED(op)) if (fmap) { fmap_select(ob, true); - 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); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -400,7 +400,7 @@ static int face_map_deselect_exec(bContext *C, wmOperator *UNUSED(op)) if (fmap) { fmap_select(ob, false); - 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); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -470,7 +470,7 @@ static int face_map_move_exec(bContext *C, wmOperator *op) ob->actfmap = pos2 + 1; - 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_VERTEX_GROUP, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_gpencil_modifier.c b/source/blender/editors/object/object_gpencil_modifier.c index d67b79375e2..1523cafa928 100644 --- a/source/blender/editors/object/object_gpencil_modifier.c +++ b/source/blender/editors/object/object_gpencil_modifier.c @@ -102,9 +102,9 @@ GpencilModifierData *ED_object_gpencil_modifier_add( 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); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); DEG_relations_tag_update(bmain); return new_md; @@ -158,7 +158,7 @@ bool ED_object_gpencil_modifier_remove(ReportList *reports, Main *bmain, Object return 0; } - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); DEG_relations_tag_update(bmain); return 1; @@ -182,7 +182,7 @@ void ED_object_gpencil_modifier_clear(Main *bmain, Object *ob) md = next_md; } - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); DEG_relations_tag_update(bmain); } @@ -225,7 +225,7 @@ static int gpencil_modifier_apply_obdata( return 0; } mti->bakeModifier(bmain, depsgraph, md, ob); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } else { BKE_report(reports, RPT_ERROR, "Cannot apply modifier for this object type"); @@ -488,7 +488,7 @@ static int gpencil_modifier_move_up_exec(bContext *C, wmOperator *op) if (!md || !ED_object_gpencil_modifier_move_up(op->reports, ob, md)) return OPERATOR_CANCELLED; - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -527,7 +527,7 @@ static int gpencil_modifier_move_down_exec(bContext *C, wmOperator *op) if (!md || !ED_object_gpencil_modifier_move_down(op->reports, ob, md)) return OPERATOR_CANCELLED; - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -570,7 +570,7 @@ static int gpencil_modifier_apply_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -617,7 +617,7 @@ static int gpencil_modifier_copy_exec(bContext *C, wmOperator *op) if (!md || !ED_object_gpencil_modifier_copy(op->reports, ob, md)) return OPERATOR_CANCELLED; - 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_MODIFIER, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index ff9cc65180b..995f62f3cd8 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -617,7 +617,7 @@ static int object_add_hook_newob_exec(bContext *C, wmOperator *op) Object *obedit = CTX_data_edit_object(C); if (add_hook_object(C, bmain, scene, view_layer, obedit, NULL, OBJECT_ADDHOOK_NEWOB, op->reports)) { - 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_OBJECT | ND_MODIFIER, obedit); return OPERATOR_FINISHED; @@ -659,7 +659,7 @@ static int object_hook_remove_exec(bContext *C, wmOperator *op) BLI_remlink(&ob->modifiers, (ModifierData *)hmd); modifier_free((ModifierData *)hmd); - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -733,7 +733,7 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op) BKE_object_modifier_hook_reset(ob, hmd); - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -783,7 +783,7 @@ static int object_hook_recenter_exec(bContext *C, wmOperator *op) sub_v3_v3v3(hmd->cent, scene->cursor.location, ob->obmat[3]); mul_m3_v3(imat, hmd->cent); - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -842,7 +842,7 @@ static int object_hook_assign_exec(bContext *C, wmOperator *op) hmd->indexar = indexar; hmd->totindex = tot; - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -888,7 +888,7 @@ static int object_hook_select_exec(bContext *C, wmOperator *op) /* select functionality */ object_hook_select(ob, hmd); - 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); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 200ff1ab0d6..45dcf5a2f62 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -194,7 +194,7 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc } } - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); DEG_relations_tag_update(bmain); return new_md; @@ -277,7 +277,7 @@ bool ED_object_multires_update_totlevels_cb(Object *ob, void *totlevel_v) for (md = ob->modifiers.first; md; md = md->next) { if (md->type == eModifierType_Multires) { multires_set_tot_level(ob, (MultiresModifierData *)md, totlevel); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } } return false; @@ -362,7 +362,7 @@ bool ED_object_modifier_remove(ReportList *reports, Main *bmain, Object *ob, Mod return 0; } - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); DEG_relations_tag_update(bmain); return 1; @@ -386,7 +386,7 @@ void ED_object_modifier_clear(Main *bmain, Object *ob) md = next_md; } - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); DEG_relations_tag_update(bmain); } @@ -662,7 +662,7 @@ static int modifier_apply_obdata(ReportList *reports, Depsgraph *depsgraph, Scen MEM_freeN(vertexCos); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } else { BKE_report(reports, RPT_ERROR, "Cannot apply modifier for this object type"); @@ -961,7 +961,7 @@ static int modifier_move_up_exec(bContext *C, wmOperator *op) if (!md || !ED_object_modifier_move_up(op->reports, ob, md)) return OPERATOR_CANCELLED; - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1000,7 +1000,7 @@ static int modifier_move_down_exec(bContext *C, wmOperator *op) if (!md || !ED_object_modifier_move_down(op->reports, ob, md)) return OPERATOR_CANCELLED; - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1044,7 +1044,7 @@ static int modifier_apply_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1094,7 +1094,7 @@ static int modifier_convert_exec(bContext *C, wmOperator *op) if (!md || !ED_object_modifier_convert(op->reports, bmain, scene, view_layer, ob, md)) return OPERATOR_CANCELLED; - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1133,7 +1133,7 @@ static int modifier_copy_exec(bContext *C, wmOperator *op) if (!md || !ED_object_modifier_copy(op->reports, ob, md)) return OPERATOR_CANCELLED; - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1229,7 +1229,7 @@ static int multires_subdivide_exec(bContext *C, wmOperator *op) ED_object_multires_update_totlevels_cb, &mmd->totlvl); - 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_MODIFIER, ob); if (ob->mode & OB_MODE_SCULPT) { @@ -1298,7 +1298,7 @@ static int multires_reshape_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1448,7 +1448,7 @@ static int multires_base_apply_exec(bContext *C, wmOperator *op) multiresModifier_base_apply(mmd, scene, 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1554,7 +1554,7 @@ static int skin_root_mark_exec(bContext *C, wmOperator *UNUSED(op)) BLI_gset_free(visited, 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_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1609,7 +1609,7 @@ static int skin_loose_mark_clear_exec(bContext *C, wmOperator *op) } } - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1659,7 +1659,7 @@ static int skin_radii_equalize_exec(bContext *C, wmOperator *UNUSED(op)) } } - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1837,7 +1837,7 @@ static int skin_armature_create_exec(bContext *C, wmOperator *op) arm_md->object = arm_ob; arm_md->deformflag = ARM_DEF_VGROUP | ARM_DEF_QUATERNION; DEG_relations_tag_update(bmain); - 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_MODIFIER, ob); @@ -1904,7 +1904,7 @@ static int correctivesmooth_bind_exec(bContext *C, wmOperator *op) csmd->bind_coords_num = (unsigned int)-1; } - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1976,8 +1976,8 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op) mmd->bindfunc = NULL; } - /* We need DEG_TAG_COPY_ON_WRITE to ensure (un)binding is flushed to CoW copies of the object... */ - DEG_id_tag_update(&ob->id, DEG_TAG_GEOMETRY | DEG_TAG_COPY_ON_WRITE); + /* We need ID_RECALC_COPY_ON_WRITE to ensure (un)binding is flushed to CoW copies of the object... */ + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; } @@ -2024,7 +2024,7 @@ static int explode_refresh_exec(bContext *C, wmOperator *op) emd->flag |= eExplodeFlag_CalcFaces; - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -2132,7 +2132,7 @@ static void oceanbake_endjob(void *customdata) oj->omd->cached = true; Object *ob = oj->owner; - DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE); } static int ocean_bake_exec(bContext *C, wmOperator *op) @@ -2154,7 +2154,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op) if (free) { BKE_ocean_free_modifier_cache(omd); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA | DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; } @@ -2204,7 +2204,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op) scene->r.cfra = cfra; - 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_MODIFIER, ob); #endif @@ -2289,8 +2289,8 @@ static int laplaciandeform_bind_exec(bContext *C, wmOperator *op) object_force_modifier_update_for_bind(depsgraph, scene, ob); lmd->modifier.mode = mode; - /* We need DEG_TAG_COPY_ON_WRITE to ensure (un)binding is flushed to CoW copies of the object... */ - DEG_id_tag_update(&ob->id, DEG_TAG_GEOMETRY | DEG_TAG_COPY_ON_WRITE); + /* We need ID_RECALC_COPY_ON_WRITE to ensure (un)binding is flushed to CoW copies of the object... */ + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; } @@ -2351,8 +2351,8 @@ static int surfacedeform_bind_exec(bContext *C, wmOperator *op) object_force_modifier_update_for_bind(depsgraph, scene, ob); smd->modifier.mode = mode; - /* We need DEG_TAG_COPY_ON_WRITE to ensure (un)binding is flushed to CoW copies of the object... */ - DEG_id_tag_update(&ob->id, DEG_TAG_GEOMETRY | DEG_TAG_COPY_ON_WRITE); + /* We need ID_RECALC_COPY_ON_WRITE to ensure (un)binding is flushed to CoW copies of the object... */ + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE); WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 5121f1534bd..ead000819b7 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -236,7 +236,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) { if (ob != obedit) { - 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); par = obedit->parent; if (BKE_object_parent_loop_check(par, ob)) { @@ -373,7 +373,7 @@ static int make_proxy_exec(bContext *C, wmOperator *op) /* depsgraph flushes are needed for the new data */ DEG_relations_tag_update(bmain); - DEG_id_tag_update(&newob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&newob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, newob); } else { @@ -529,7 +529,7 @@ void ED_object_parent_clear(Object *ob, const int type) /* Always clear parentinv matrix for sake of consistency, see T41950. */ unit_m4(ob->parentinv); - 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); } /* note, poll should check for editable scene */ @@ -620,7 +620,7 @@ bool ED_object_parent_set(ReportList *reports, const bContext *C, Scene *scene, bPoseChannel *pchan = NULL; const bool pararm = ELEM(partype, PAR_ARMATURE, PAR_ARMATURE_NAME, PAR_ARMATURE_ENVELOPE, PAR_ARMATURE_AUTO); - DEG_id_tag_update(&par->id, OB_RECALC_OB); + DEG_id_tag_update(&par->id, ID_RECALC_TRANSFORM); /* preconditions */ if (partype == PAR_FOLLOW || partype == PAR_PATH_CONST) { @@ -717,7 +717,7 @@ bool ED_object_parent_set(ReportList *reports, const bContext *C, Scene *scene, ((CurveModifierData *)md)->object = par; } if (par->runtime.curve_cache && par->runtime.curve_cache->path == NULL) { - DEG_id_tag_update(&par->id, OB_RECALC_DATA); + DEG_id_tag_update(&par->id, ID_RECALC_GEOMETRY); } } break; @@ -819,7 +819,7 @@ bool ED_object_parent_set(ReportList *reports, const bContext *C, Scene *scene, invert_m4_m4(ob->parentinv, workob.obmat); } - DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); } } @@ -1010,7 +1010,7 @@ static int parent_noinv_set_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); Object *par = ED_object_active_context(C); - DEG_id_tag_update(&par->id, OB_RECALC_OB); + DEG_id_tag_update(&par->id, ID_RECALC_TRANSFORM); /* context iterator */ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) @@ -1025,7 +1025,7 @@ static int parent_noinv_set_exec(bContext *C, wmOperator *op) memset(ob->loc, 0, 3 * sizeof(float)); /* set recalc flags */ - DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); /* set parenting type for object - object only... */ ob->parent = par; @@ -1071,7 +1071,7 @@ static int object_slow_parent_clear_exec(bContext *C, wmOperator *UNUSED(op)) ob->partype -= PARSLOW; BKE_object_where_is_calc(depsgraph, scene, ob); ob->partype |= PARSLOW; - DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); } } } @@ -1109,7 +1109,7 @@ static int object_slow_parent_set_exec(bContext *C, wmOperator *UNUSED(op)) if (ob->parent) ob->partype |= PARSLOW; - DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); } CTX_DATA_END; @@ -1163,7 +1163,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op) /* remove track-object for old track */ ob->track = NULL; - 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); /* also remove all tracking constraints */ for (con = ob->constraints.last; con; con = pcon) { @@ -1237,7 +1237,7 @@ static int track_set_exec(bContext *C, wmOperator *op) data = con->data; data->tar = obact; - 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); /* Lamp, Camera and Speaker track differently by default */ if (ELEM(ob->type, OB_LAMP, OB_CAMERA, OB_SPEAKER)) { @@ -1260,7 +1260,7 @@ static int track_set_exec(bContext *C, wmOperator *op) data = con->data; data->tar = obact; - 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); /* Lamp, Camera and Speaker track differently by default */ if (ELEM(ob->type, OB_LAMP, OB_CAMERA, OB_SPEAKER)) { @@ -1284,7 +1284,7 @@ static int track_set_exec(bContext *C, wmOperator *op) data = con->data; data->tar = obact; - 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); /* Lamp, Camera and Speaker track differently by default */ if (ELEM(ob->type, OB_LAMP, OB_CAMERA, OB_SPEAKER)) { @@ -1462,7 +1462,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) /* if amount of material indices changed: */ test_object_materials(bmain, ob_dst, ob_dst->data); - DEG_id_tag_update(&ob_dst->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_dst->id, ID_RECALC_GEOMETRY); break; case MAKE_LINKS_MATERIALS: /* new approach, using functions from kernel */ @@ -1470,7 +1470,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) Material *ma = give_current_material(ob_src, a + 1); assign_material(bmain, ob_dst, ma, a + 1, BKE_MAT_ASSIGN_USERPREF); /* also works with ma==NULL */ } - DEG_id_tag_update(&ob_dst->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob_dst->id, ID_RECALC_GEOMETRY); break; case MAKE_LINKS_ANIMDATA: BKE_animdata_copy_id(bmain, (ID *)ob_dst, (ID *)ob_src, 0); @@ -1481,7 +1481,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) } BKE_animdata_copy_id(bmain, (ID *)ob_dst->data, (ID *)ob_src->data, 0); } - DEG_id_tag_update(&ob_dst->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob_dst->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); break; case MAKE_LINKS_GROUP: { @@ -1510,7 +1510,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) break; case MAKE_LINKS_MODIFIERS: BKE_object_link_modifiers(scene, ob_dst, ob_src); - DEG_id_tag_update(&ob_dst->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob_dst->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); break; case MAKE_LINKS_FONTS: { @@ -1539,7 +1539,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) cu_dst->vfontbi = cu_src->vfontbi; id_us_plus((ID *)cu_dst->vfontbi); - DEG_id_tag_update(&ob_dst->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DEG_id_tag_update(&ob_dst->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); break; } } @@ -1769,7 +1769,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer id = ob->data; if (id && id->us > 1 && !ID_IS_LINKED(id)) { - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); switch (ob->type) { case OB_LAMP: @@ -1802,7 +1802,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer BKE_animdata_copy_id_action(bmain, (ID *)lat->key, false); break; case OB_ARMATURE: - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); ob->data = ID_NEW_SET(ob->data, BKE_armature_copy(bmain, ob->data)); BKE_pose_rebuild(bmain, ob, ob->data, true); break; @@ -1849,7 +1849,7 @@ static void single_object_action_users(Main *bmain, Scene *scene, ViewLayer *vie FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, ob) { if (!ID_IS_LINKED(ob)) { - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); BKE_animdata_copy_id_action(bmain, &ob->id, false); } } @@ -2046,7 +2046,7 @@ static bool make_local_all__instance_indirect_unused(Main *bmain, ViewLayer *vie base = BKE_view_layer_base_find(view_layer, ob); base->flag |= BASE_SELECTED; 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); changed = true; } @@ -2333,7 +2333,7 @@ static int make_override_static_exec(bContext *C, wmOperator *op) if ((base = BKE_view_layer_base_find(view_layer, new_ob)) == NULL) { BKE_collection_object_add_from(bmain, scene, obcollection, new_ob); base = BKE_view_layer_base_find(view_layer, new_ob); - DEG_id_tag_update_ex(bmain, &new_ob->id, DEG_TAG_TRANSFORM | DEG_TAG_BASE_FLAGS_UPDATE); + DEG_id_tag_update_ex(bmain, &new_ob->id, ID_RECALC_TRANSFORM | ID_RECALC_BASE_FLAGS); } /* parent to 'collection' empty */ if (new_ob->parent == NULL) { @@ -2521,7 +2521,7 @@ static int drop_named_material_invoke(bContext *C, wmOperator *op, const wmEvent assign_material(CTX_data_main(C), base->object, ma, 1, BKE_MAT_ASSIGN_USERPREF); - DEG_id_tag_update(&base->object->id, OB_RECALC_OB); + DEG_id_tag_update(&base->object->id, ID_RECALC_TRANSFORM); WM_event_add_notifier(C, NC_OBJECT | ND_OB_SHADING, base->object); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C)); diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 9f2b1a1a0d9..0b032a3111a 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -131,7 +131,7 @@ void ED_object_base_activate(bContext *C, Base *base) view_layer->basact = base; WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); - DEG_id_tag_update(&CTX_data_scene(C)->id, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(&CTX_data_scene(C)->id, ID_RECALC_SELECT); } bool ED_object_base_deselect_all_ex(ViewLayer *view_layer, View3D *v3d, int action, bool *r_any_visible) @@ -410,7 +410,7 @@ static int object_select_by_type_exec(bContext *C, wmOperator *op) CTX_DATA_END; Scene *scene = CTX_data_scene(C); - 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); return OPERATOR_FINISHED; @@ -605,7 +605,7 @@ void ED_object_select_linked_by_id(bContext *C, ID *id) if (changed) { Scene *scene = CTX_data_scene(C); - 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); } } @@ -677,7 +677,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; if (changed) { - 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); return OPERATOR_FINISHED; } @@ -1046,7 +1046,7 @@ static int object_select_grouped_exec(bContext *C, wmOperator *op) } if (changed) { - 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); return OPERATOR_FINISHED; } @@ -1087,7 +1087,7 @@ static int object_select_all_exec(bContext *C, wmOperator *op) if (changed) { Scene *scene = CTX_data_scene(C); - 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); return OPERATOR_FINISHED; @@ -1150,7 +1150,7 @@ static int object_select_same_collection_exec(bContext *C, wmOperator *op) CTX_DATA_END; Scene *scene = CTX_data_scene(C); - 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); return OPERATOR_FINISHED; @@ -1207,7 +1207,7 @@ static int object_select_mirror_exec(bContext *C, wmOperator *op) CTX_DATA_END; /* undo? */ - 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); return OPERATOR_FINISHED; @@ -1296,7 +1296,7 @@ static int object_select_more_exec(bContext *C, wmOperator *UNUSED(op)) if (changed) { Scene *scene = CTX_data_scene(C); - 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); return OPERATOR_FINISHED; } @@ -1326,7 +1326,7 @@ static int object_select_less_exec(bContext *C, wmOperator *UNUSED(op)) if (changed) { Scene *scene = CTX_data_scene(C); - 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); return OPERATOR_FINISHED; } @@ -1374,7 +1374,7 @@ static int object_select_random_exec(bContext *C, wmOperator *op) BLI_rng_free(rng); Scene *scene = CTX_data_scene(C); - 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); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_shader_fx.c b/source/blender/editors/object/object_shader_fx.c index 47cf9f6c20b..a7505c4b2cc 100644 --- a/source/blender/editors/object/object_shader_fx.c +++ b/source/blender/editors/object/object_shader_fx.c @@ -99,9 +99,9 @@ ShaderFxData *ED_object_shaderfx_add(ReportList *reports, Main *bmain, Scene *UN BKE_shaderfx_unique_name(&ob->shader_fx, new_fx); 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); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); DEG_relations_tag_update(bmain); return new_fx; @@ -155,7 +155,7 @@ bool ED_object_shaderfx_remove(ReportList *reports, Main *bmain, Object *ob, Sha return 0; } - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); DEG_relations_tag_update(bmain); return 1; @@ -179,7 +179,7 @@ void ED_object_shaderfx_clear(Main *bmain, Object *ob) fx = next_fx; } - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); DEG_relations_tag_update(bmain); } @@ -401,7 +401,7 @@ static int shaderfx_move_up_exec(bContext *C, wmOperator *op) if (!fx || !ED_object_shaderfx_move_up(op->reports, ob, fx)) return OPERATOR_CANCELLED; - 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_MODIFIER, ob); return OPERATOR_FINISHED; @@ -440,7 +440,7 @@ static int shaderfx_move_down_exec(bContext *C, wmOperator *op) if (!fx || !ED_object_shaderfx_move_down(op->reports, ob, fx)) return OPERATOR_CANCELLED; - 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_MODIFIER, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c index 7d16898c2a2..cafb3a50202 100644 --- a/source/blender/editors/object/object_shapekey.c +++ b/source/blender/editors/object/object_shapekey.c @@ -215,7 +215,7 @@ static bool object_shape_key_mirror(bContext *C, Object *ob, *r_totmirr = totmirr; *r_totfail = totfail; - 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); return 1; @@ -266,7 +266,7 @@ static int shape_key_add_exec(bContext *C, wmOperator *op) ED_object_shape_key_add(C, ob, from_mix); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); DEG_relations_tag_update(CTX_data_main(C)); return OPERATOR_FINISHED; @@ -304,7 +304,7 @@ static int shape_key_remove_exec(bContext *C, wmOperator *op) } if (changed) { - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); DEG_relations_tag_update(CTX_data_main(C)); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); @@ -345,7 +345,7 @@ static int shape_key_clear_exec(bContext *C, wmOperator *UNUSED(op)) for (kb = key->block.first; kb; kb = kb->next) kb->curval = 0.0f; - 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); return OPERATOR_FINISHED; @@ -382,7 +382,7 @@ static int shape_key_retime_exec(bContext *C, wmOperator *UNUSED(op)) cfra += 0.1f; } - 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); return OPERATOR_FINISHED; @@ -473,7 +473,7 @@ static int shape_key_move_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - 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); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index e2574cf3813..5c0bd51bcca 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -273,7 +273,7 @@ static int object_clear_transform_generic_exec(bContext *C, wmOperator *op, ED_autokeyframe_object(C, scene, ob, ks); /* tag for updates */ - DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); } } CTX_DATA_END; @@ -379,7 +379,7 @@ static int object_origin_clear_exec(bContext *C, wmOperator *UNUSED(op)) mul_m3_v3(mat, v3); } - DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); } CTX_DATA_END; @@ -699,7 +699,7 @@ static int apply_objects_internal( ignore_parent_tx(C, bmain, scene, ob); - DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); changed = true; } @@ -727,7 +727,7 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op)) BKE_object_where_is_calc(depsgraph, scene, ob); /* update for any children that may get moved */ - DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); changed = true; } @@ -872,7 +872,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) EDBM_mesh_normals_update(em); tot_change++; - DEG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY); } } @@ -997,7 +997,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) if (obedit) { if (centermode == GEOMETRY_TO_ORIGIN) { - DEG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY); } break; } @@ -1075,7 +1075,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) if (obedit) { if (centermode == GEOMETRY_TO_ORIGIN) { - DEG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY); } break; } @@ -1143,7 +1143,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) } } } - DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); tot_change++; if (centermode == ORIGIN_TO_GEOMETRY) { @@ -1196,7 +1196,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) (ob->transflag | ob_other->transflag) & OB_DUPLICOLLECTION))) { ob_other->flag |= OB_DONE; - DEG_id_tag_update(&ob_other->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&ob_other->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); mul_v3_mat3_m4v3(centn, ob_other->obmat, cent); /* omit translation part */ add_v3_v3(ob_other->loc, centn); @@ -1217,7 +1217,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) for (tob = bmain->object.first; tob; tob = tob->id.next) { if (tob->data && (((ID *)tob->data)->tag & LIB_TAG_DOIT)) { BKE_object_batch_cache_dirty_tag(tob); - DEG_id_tag_update(&tob->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&tob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); } } @@ -1389,7 +1389,7 @@ static void object_orient_to_location( object_apply_rotation(ob, final_rot); - DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); } } } @@ -1400,7 +1400,7 @@ static void object_transform_axis_target_cancel(bContext *C, wmOperator *op) struct XFormAxisItem *item = xfd->object_data; for (int i = 0; i < xfd->object_data_len; i++, item++) { BKE_object_tfm_restore(item->ob, item->obtfm); - DEG_id_tag_update(&item->ob->id, OB_RECALC_OB); + DEG_id_tag_update(&item->ob->id, ID_RECALC_TRANSFORM); WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, item->ob); } diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 1a0c129e23a..599ab0d7301 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -2621,7 +2621,7 @@ static int vertex_group_add_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob = ED_object_context(C); BKE_object_defgroup_add(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_GEOM | ND_VERTEX_GROUP, ob->data); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); @@ -2654,7 +2654,7 @@ static int vertex_group_remove_exec(bContext *C, wmOperator *op) else vgroup_delete_active(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_GEOM | ND_VERTEX_GROUP, ob->data); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); @@ -2689,7 +2689,7 @@ static int vertex_group_assign_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob = ED_object_context(C); vgroup_assign_verts(ob, ts->vgroup_weight); - 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); return OPERATOR_FINISHED; @@ -2762,7 +2762,7 @@ static int vertex_group_remove_from_exec(bContext *C, wmOperator *op) } } - 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); return OPERATOR_FINISHED; @@ -2801,7 +2801,7 @@ static int vertex_group_select_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_CANCELLED; vgroup_select_verts(ob, 1); - 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); return OPERATOR_FINISHED; @@ -2827,7 +2827,7 @@ static int vertex_group_deselect_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob = ED_object_context(C); vgroup_select_verts(ob, 0); - 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); return OPERATOR_FINISHED; @@ -2853,7 +2853,7 @@ static int vertex_group_copy_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob = ED_object_context(C); vgroup_duplicate(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_DRAW, ob); WM_event_add_notifier(C, NC_GEOM | ND_VERTEX_GROUP, ob->data); @@ -2889,7 +2889,7 @@ static int vertex_group_levels_exec(bContext *C, wmOperator *op) vgroup_levels_subset(ob, vgroup_validmap, vgroup_tot, subset_count, offset, gain); MEM_freeN((void *)vgroup_validmap); - 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); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -2923,7 +2923,7 @@ static int vertex_group_normalize_exec(bContext *C, wmOperator *UNUSED(op)) changed = vgroup_normalize(ob); if (changed) { - 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); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -2962,7 +2962,7 @@ static int vertex_group_normalize_all_exec(bContext *C, wmOperator *op) MEM_freeN((void *)vgroup_validmap); if (changed) { - 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); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3017,7 +3017,7 @@ static int vertex_group_fix_exec(bContext *C, wmOperator *op) } vgroup_fix(C, scene, ob, distToBe, strength, cp); - 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); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3089,7 +3089,7 @@ static int vertex_group_invert_exec(bContext *C, wmOperator *op) vgroup_invert_subset(ob, vgroup_validmap, vgroup_tot, subset_count, auto_assign, auto_remove); MEM_freeN((void *)vgroup_validmap); - 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); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3140,7 +3140,7 @@ static int vertex_group_smooth_exec(bContext *C, wmOperator *op) vgroup_smooth_subset(ob, vgroup_validmap, vgroup_tot, subset_count, fac, repeat, fac_expand); MEM_freeN((void *)vgroup_validmap); - 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); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); } @@ -3184,7 +3184,7 @@ static int vertex_group_clean_exec(bContext *C, wmOperator *op) vgroup_clean_subset(ob, vgroup_validmap, vgroup_tot, subset_count, limit, keep_single); MEM_freeN((void *)vgroup_validmap); - 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); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3225,7 +3225,7 @@ static int vertex_group_quantize_exec(bContext *C, wmOperator *op) vgroup_quantize_subset(ob, vgroup_validmap, vgroup_tot, subset_count, steps); MEM_freeN((void *)vgroup_validmap); - 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); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3266,7 +3266,7 @@ static int vertex_group_limit_total_exec(bContext *C, wmOperator *op) BKE_reportf(op->reports, remove_tot ? RPT_INFO : RPT_WARNING, "%d vertex weights limited", remove_tot); if (remove_tot) { - 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); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3312,7 +3312,7 @@ static int vertex_group_mirror_exec(bContext *C, wmOperator *op) ED_mesh_report_mirror(op, totmirr, totfail); - 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); WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); @@ -3356,7 +3356,7 @@ static int vertex_group_copy_to_linked_exec(bContext *C, wmOperator *UNUSED(op)) BLI_duplicatelist(&ob_iter->defbase, &ob_active->defbase); ob_iter->actdef = ob_active->actdef; - 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_DRAW, ob_iter); WM_event_add_notifier(C, NC_GEOM | ND_VERTEX_GROUP, ob_iter->data); @@ -3394,7 +3394,7 @@ static int vertex_group_copy_to_selected_exec(bContext *C, wmOperator *op) { if (obact != ob) { if (ED_vgroup_array_copy(ob, obact)) { - 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_VERTEX_GROUP, ob); changed_tot++; } @@ -3437,7 +3437,7 @@ static int set_active_group_exec(bContext *C, wmOperator *op) BLI_assert(nr + 1 >= 0); ob->actdef = nr + 1; - 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_VERTEX_GROUP, ob); return OPERATOR_FINISHED; @@ -3651,7 +3651,7 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op) ret = vgroup_do_remap(ob, name_array, op); if (ret != OPERATOR_CANCELLED) { - 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_VERTEX_GROUP, ob); } @@ -3701,7 +3701,7 @@ static int vgroup_move_exec(bContext *C, wmOperator *op) ret = vgroup_do_remap(ob, name_array, op); if (ret != OPERATOR_CANCELLED) { - 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_VERTEX_GROUP, ob); } } @@ -3830,7 +3830,7 @@ static int vertex_weight_paste_exec(bContext *C, wmOperator *op) vgroup_copy_active_to_sel_single(ob, def_nr); - 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); return OPERATOR_FINISHED; @@ -3867,7 +3867,7 @@ static int vertex_weight_delete_exec(bContext *C, wmOperator *op) vgroup_remove_weight(ob, def_nr); - 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); return OPERATOR_FINISHED; @@ -3900,7 +3900,7 @@ static int vertex_weight_set_active_exec(bContext *C, wmOperator *op) if (wg_index != -1) { ob->actdef = wg_index + 1; - 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); } @@ -3937,7 +3937,7 @@ static int vertex_weight_normalize_active_vertex_exec(bContext *C, wmOperator *U changed = vgroup_normalize_active_vertex(ob, subset_type); if (changed) { - 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); return OPERATOR_FINISHED; @@ -3970,7 +3970,7 @@ static int vertex_weight_copy_exec(bContext *C, wmOperator *UNUSED(op)) vgroup_copy_active_to_sel(ob, subset_type); - 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); return OPERATOR_FINISHED; |