diff options
Diffstat (limited to 'source/blender/makesrna')
35 files changed, 134 insertions, 130 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index b550b4043e3..2221c63d6b7 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -157,7 +157,7 @@ void rna_ID_name_set(PointerRNA *ptr, const char *value) if (GS(id->name) == ID_OB) { Object *ob = (Object *)id; if (ob->type == OB_MBALL) { - DEG_id_tag_update(&ob->id, DEG_TAG_GEOMETRY); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } } } @@ -404,7 +404,11 @@ static void rna_ID_update_tag(ID *id, ReportList *reports, int flag) /* ensure flag us correct for the type */ switch (GS(id->name)) { case ID_OB: - if (flag & ~(OB_RECALC_ALL)) { + /* TODO(sergey): This is kind of difficult to predict since different + * object types supports different flags. Maybe does not worth checking + * for this at all. Or maybe let dependency graph to return whether + * the tag was valid or not. */ + if (flag & ~(ID_RECALC_ALL)) { BKE_report(reports, RPT_ERROR, "'Refresh' incompatible with Object ID type"); return; } @@ -536,7 +540,7 @@ static Material *rna_IDMaterials_pop_id( return NULL; } - DEG_id_tag_update(id, OB_RECALC_DATA); + DEG_id_tag_update(id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_DRAW, id); WM_main_add_notifier(NC_OBJECT | ND_OB_SHADING, id); @@ -547,7 +551,7 @@ static void rna_IDMaterials_clear_id(ID *id, Main *bmain, bool remove_material_s { BKE_material_clear_id(bmain, id, remove_material_slot); - DEG_id_tag_update(id, OB_RECALC_DATA); + DEG_id_tag_update(id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_DRAW, id); WM_main_add_notifier(NC_OBJECT | ND_OB_SHADING, id); } @@ -1154,9 +1158,9 @@ static void rna_def_ID(BlenderRNA *brna) PropertyRNA *prop, *parm; static const EnumPropertyItem update_flag_items[] = { - {OB_RECALC_OB, "OBJECT", 0, "Object", ""}, - {OB_RECALC_DATA, "DATA", 0, "Data", ""}, - {OB_RECALC_TIME, "TIME", 0, "Time", ""}, + {ID_RECALC_TRANSFORM, "OBJECT", 0, "Object", ""}, + {ID_RECALC_GEOMETRY, "DATA", 0, "Data", ""}, + {ID_RECALC_ANIMATION, "TIME", 0, "Time", ""}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index cb6f62d35eb..98f9f37418f 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -2102,7 +2102,7 @@ static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerR if (ptr->id.data != NULL) { const short id_type = GS(((ID *)ptr->id.data)->name); if (ID_TYPE_IS_COW(id_type)) { - DEG_id_tag_update(ptr->id.data, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(ptr->id.data, ID_RECALC_COPY_ON_WRITE); } } /* End message bus. */ @@ -2111,7 +2111,7 @@ static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerR if (!is_rna || (prop->flag & PROP_IDPROPERTY)) { /* WARNING! This is so property drivers update the display! * not especially nice */ - 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_main_add_notifier(NC_WINDOW, NULL); /* Not nice as well, but the only way to make sure material preview * is updated with custom nodes. diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 6c0ce6b124e..e43b62e8a75 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -524,7 +524,7 @@ static NlaTrack *rna_NlaTrack_new(ID *id, AnimData *adt, Main *bmain, bContext * WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_ADDED, NULL); DEG_relations_tag_update(bmain); - DEG_id_tag_update_ex(bmain, id, DEG_TAG_TIME | DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update_ex(bmain, id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE); return new_track; } @@ -544,7 +544,7 @@ static void rna_NlaTrack_remove(ID *id, AnimData *adt, Main *bmain, bContext *C, WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_REMOVED, NULL); DEG_relations_tag_update(bmain); - DEG_id_tag_update_ex(bmain, id, DEG_TAG_TIME | DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update_ex(bmain, id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE); } static PointerRNA rna_NlaTrack_active_get(PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index c3e68cf0869..e07271f3009 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -152,7 +152,7 @@ static void rna_Armature_update_layers(Main *bmain, Scene *UNUSED(scene), Pointe ob->pose->proxy_layer = arm->layer; } - DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE); WM_main_add_notifier(NC_GEOM | ND_DATA, arm); } @@ -160,7 +160,7 @@ static void rna_Armature_redraw_data(Main *UNUSED(bmain), Scene *UNUSED(scene), { ID *id = ptr->id.data; - DEG_id_tag_update(id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(id, ID_RECALC_COPY_ON_WRITE); WM_main_add_notifier(NC_GEOM | ND_DATA, id); } @@ -190,20 +190,20 @@ static void rna_Bone_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po bArmature *arm = (bArmature *)id; if (arm->flag & ARM_HAS_VIZ_DEPS) { - DEG_id_tag_update(id, OB_RECALC_DATA); + DEG_id_tag_update(id, ID_RECALC_GEOMETRY); } - DEG_id_tag_update(id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(id, ID_RECALC_COPY_ON_WRITE); } else if (GS(id->name) == ID_OB) { Object *ob = (Object *)id; bArmature *arm = (bArmature *)ob->data; if (arm->flag & ARM_HAS_VIZ_DEPS) { - DEG_id_tag_update(id, OB_RECALC_DATA); + DEG_id_tag_update(id, ID_RECALC_GEOMETRY); } - DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE); } } @@ -462,7 +462,7 @@ static void rna_Bone_bbone_handle_update(Main *bmain, Scene *scene, PointerRNA * if (pchan && pchan->bone == bone) { BKE_pchan_rebuild_bbone_handles(obt->pose, pchan); - DEG_id_tag_update(&obt->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&obt->id, ID_RECALC_COPY_ON_WRITE); } } } diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c index 413cb10422a..3f472055087 100644 --- a/source/blender/makesrna/intern/rna_boid.c +++ b/source/blender/makesrna/intern/rna_boid.c @@ -97,12 +97,12 @@ static void rna_Boids_reset(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN if (ptr->type == &RNA_ParticleSystem) { ParticleSystem *psys = (ParticleSystem *)ptr->data; - psys->recalc = PSYS_RECALC_RESET; + psys->recalc = ID_RECALC_PSYS_RESET; - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY); } else - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); } @@ -111,12 +111,12 @@ static void rna_Boids_reset_deps(Main *bmain, Scene *UNUSED(scene), PointerRNA * if (ptr->type == &RNA_ParticleSystem) { ParticleSystem *psys = (ParticleSystem *)ptr->data; - psys->recalc = PSYS_RECALC_RESET; + psys->recalc = ID_RECALC_PSYS_RESET; - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY); } else - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET); DEG_relations_tag_update(bmain); diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c index 4d648d8c00b..53efbcb56fa 100644 --- a/source/blender/makesrna/intern/rna_cloth.c +++ b/source/blender/makesrna/intern/rna_cloth.c @@ -55,7 +55,7 @@ static void rna_cloth_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR { Object *ob = (Object *)ptr->id.data; - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); } @@ -73,7 +73,7 @@ static void rna_cloth_pinning_changed(Main *UNUSED(bmain), Scene *UNUSED(scene), cloth_free_modifier(clmd); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); } diff --git a/source/blender/makesrna/intern/rna_collection.c b/source/blender/makesrna/intern/rna_collection.c index 5230157cfad..1506d3e649a 100644 --- a/source/blender/makesrna/intern/rna_collection.c +++ b/source/blender/makesrna/intern/rna_collection.c @@ -90,7 +90,7 @@ static void rna_Collection_objects_link(Collection *collection, Main *bmain, Rep return; } - 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_main_add_notifier(NC_OBJECT | ND_DRAW, &object->id); } @@ -102,7 +102,7 @@ static void rna_Collection_objects_unlink(Collection *collection, Main *bmain, R return; } - 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_main_add_notifier(NC_OBJECT | ND_DRAW, &object->id); } @@ -174,7 +174,7 @@ static void rna_Collection_children_link(Collection *collection, Main *bmain, Re return; } - 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_main_add_notifier(NC_OBJECT | ND_DRAW, &child->id); } @@ -186,7 +186,7 @@ static void rna_Collection_children_unlink(Collection *collection, Main *bmain, return; } - 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_main_add_notifier(NC_OBJECT | ND_DRAW, &child->id); } @@ -241,7 +241,7 @@ static void rna_Collection_flag_update(Main *bmain, Scene *scene, PointerRNA *pt BKE_collection_object_cache_free(collection); BKE_main_collection_sync(bmain); - 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_main_add_notifier(NC_SCENE | ND_OB_SELECT, scene); } diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index fded3d32cc1..780e275a46d 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -330,7 +330,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA * { ParticleSettings *part = ptr->id.data; - DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO); + DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, part); } default: diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 41849f3efe7..17159d15dde 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -640,7 +640,7 @@ static void rna_Curve_spline_remove(Curve *cu, ReportList *reports, PointerRNA * BKE_nurb_free(nu); RNA_POINTER_INVALIDATE(nu_ptr); - DEG_id_tag_update(&cu->id, OB_RECALC_DATA); + DEG_id_tag_update(&cu->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_GEOM | ND_DATA, NULL); } @@ -650,7 +650,7 @@ static void rna_Curve_spline_clear(Curve *cu) BKE_nurbList_free(nurbs); - DEG_id_tag_update(&cu->id, OB_RECALC_DATA); + DEG_id_tag_update(&cu->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_GEOM | ND_DATA, NULL); } diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index 11247fa6797..542d0c35e2c 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -99,7 +99,7 @@ static char *rna_DynamicPaintSurface_path(PointerRNA *ptr) static void rna_DynamicPaint_redoModifier(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY); } static void rna_DynamicPaintSurfaces_updateFrames(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index ef573079116..220b57bff39 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -150,7 +150,7 @@ static void rna_ChannelDriver_update_data(Main *bmain, Scene *scene, PointerRNA /* TODO: this really needs an update guard... */ DEG_relations_tag_update(bmain); - DEG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_SCENE | ND_FRAME, scene); } @@ -497,7 +497,7 @@ static void rna_FCurve_update_eval(Main *UNUSED(bmain), Scene *UNUSED(scene), Po IdAdtTemplate *iat = (IdAdtTemplate *)ptr->id.data; if (iat && iat->adt && iat->adt->action) { /* action is separate datablock, needs separate tag */ - DEG_id_tag_update(&iat->adt->action->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&iat->adt->action->id, ID_RECALC_COPY_ON_WRITE); } } @@ -611,18 +611,18 @@ static void rna_FModifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin FModifier *fcm = (FModifier *)ptr->data; AnimData *adt = BKE_animdata_from_id(id); - DEG_id_tag_update(id, (GS(id->name) == ID_OB) ? OB_RECALC_OB : OB_RECALC_DATA); + DEG_id_tag_update(id, (GS(id->name) == ID_OB) ? ID_RECALC_TRANSFORM : ID_RECALC_GEOMETRY); /* tag datablock for time update so that animation is recalculated, * as FModifiers affect how animation plays... */ - DEG_id_tag_update(id, DEG_TAG_TIME); + DEG_id_tag_update(id, ID_RECALC_ANIMATION); if (adt != NULL) { adt->recalc |= ADT_RECALC_ANIM; if (adt->action != NULL) { /* action is separate datablock, needs separate tag */ - DEG_id_tag_update(&adt->action->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE); } } diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c index 23d9155fccd..c6b9277ea8f 100644 --- a/source/blender/makesrna/intern/rna_fluidsim.c +++ b/source/blender/makesrna/intern/rna_fluidsim.c @@ -83,7 +83,7 @@ static void rna_fluid_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR { Object *ob = ptr->id.data; - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); } diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 0006a8859bf..a54d41c8f03 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -105,7 +105,7 @@ static const EnumPropertyItem rna_enum_layer_blend_modes_items[] = { static void rna_GPencil_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL); } @@ -144,7 +144,7 @@ static void rna_GPencil_autolock(Main *bmain, Scene *scene, PointerRNA *ptr) static void rna_GPencil_editmode_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { bGPdata *gpd = (bGPdata *)ptr->id.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); /* Notify all places where GPencil data lives that the editing state is different */ WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL); @@ -382,7 +382,7 @@ static void rna_GPencil_active_layer_index_set(PointerRNA *ptr, int value) BKE_gpencil_layer_setactive(gpd, gpl); /* Now do standard updates... */ - DEG_id_tag_update(&gpd->id, OB_RECALC_DATA); + DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL); } @@ -698,7 +698,7 @@ static void rna_GPencil_layer_move(bGPdata *gpd, ReportList *reports, PointerRNA const int direction = type * -1; 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_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED, NULL); diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index beba47f33b4..aa1517a96d8 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -205,7 +205,7 @@ static char *rna_GpencilModifier_path(PointerRNA *ptr) static void rna_GpencilModifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ptr->id.data); } diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index e09e86bbfb3..3da9625eda2 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -96,7 +96,7 @@ static void rna_Image_source_set(PointerRNA *ptr, int value) BLI_assert(BKE_id_is_in_global_main(&ima->id)); BKE_image_signal(G_MAIN, ima, NULL, IMA_SIGNAL_SRC_CHANGE); DEG_id_tag_update(&ima->id, 0); - DEG_id_tag_update(&ima->id, DEG_TAG_EDITORS_UPDATE); + DEG_id_tag_update(&ima->id, ID_RECALC_EDITORS); } } @@ -106,7 +106,7 @@ static void rna_Image_reload_update(Main *bmain, Scene *UNUSED(scene), PointerRN BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_RELOAD); WM_main_add_notifier(NC_IMAGE | NA_EDITED, &ima->id); DEG_id_tag_update(&ima->id, 0); - DEG_id_tag_update(&ima->id, DEG_TAG_EDITORS_UPDATE); + DEG_id_tag_update(&ima->id, ID_RECALC_EDITORS); } static void rna_Image_generated_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) @@ -120,7 +120,7 @@ static void rna_Image_colormanage_update(Main *bmain, Scene *UNUSED(scene), Poin Image *ima = ptr->id.data; BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_COLORMANAGE); DEG_id_tag_update(&ima->id, 0); - DEG_id_tag_update(&ima->id, DEG_TAG_EDITORS_UPDATE); + DEG_id_tag_update(&ima->id, ID_RECALC_EDITORS); WM_main_add_notifier(NC_IMAGE | ND_DISPLAY, &ima->id); WM_main_add_notifier(NC_IMAGE | NA_EDITED, &ima->id); } @@ -151,7 +151,7 @@ static void rna_ImageUser_update(Main *UNUSED(bmain), Scene *scene, PointerRNA * if (ptr->id.data) { /* Update material or texture for render preview. */ DEG_id_tag_update(ptr->id.data, 0); - DEG_id_tag_update(ptr->id.data, DEG_TAG_EDITORS_UPDATE); + DEG_id_tag_update(ptr->id.data, ID_RECALC_EDITORS); } } diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index 684756c0b12..5181912f4eb 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -662,7 +662,7 @@ static void rna_Key_update_data(Main *bmain, Scene *UNUSED(scene), PointerRNA *p for (ob = bmain->object.first; ob; ob = ob->id.next) { if (BKE_key_from_object(ob) == key) { - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); } } diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c index 46d1f5bef7d..28b0b686bfc 100644 --- a/source/blender/makesrna/intern/rna_layer.c +++ b/source/blender/makesrna/intern/rna_layer.c @@ -212,7 +212,7 @@ static void rna_LayerCollection_use_update(Main *bmain, Scene *UNUSED(scene), Po 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); DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_SCENE | ND_LAYER_CONTENT, NULL); } diff --git a/source/blender/makesrna/intern/rna_lightprobe.c b/source/blender/makesrna/intern/rna_lightprobe.c index 85df1c5ba72..96a8b53cf29 100644 --- a/source/blender/makesrna/intern/rna_lightprobe.c +++ b/source/blender/makesrna/intern/rna_lightprobe.c @@ -49,7 +49,7 @@ static void rna_LightProbe_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY); } #else diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index 2cd427fbbd8..31d195ebdbd 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -449,7 +449,7 @@ static void rna_MaskLayer_spline_remove(ID *id, MaskLayer *mask_layer, ReportLis RNA_POINTER_INVALIDATE(spline_ptr); - DEG_id_tag_update(&mask->id, OB_RECALC_DATA); + DEG_id_tag_update(&mask->id, ID_RECALC_GEOMETRY); } static void rna_Mask_start_frame_set(PointerRNA *ptr, int value) diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 2ad379f60eb..fb7c0be7c77 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -97,7 +97,7 @@ static void rna_Material_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point { Material *ma = ptr->id.data; - DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE); WM_main_add_notifier(NC_MATERIAL | ND_SHADING, ma); } @@ -131,7 +131,7 @@ static void rna_Material_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), { Material *ma = ptr->id.data; - DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE); WM_main_add_notifier(NC_MATERIAL | ND_SHADING_DRAW, ma); } @@ -202,7 +202,7 @@ static void rna_Material_use_nodes_update(bContext *C, PointerRNA *ptr) if (ma->use_nodes && ma->nodetree == NULL) ED_node_shader_default(C, &ma->id); - DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE); DEG_relations_tag_update(bmain); rna_Material_draw_update(bmain, CTX_data_scene(C), ptr); } diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 6c41deabeb2..9714a6e5484 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -477,7 +477,7 @@ static char *rna_Modifier_path(PointerRNA *ptr) static void rna_Modifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ptr->id.data); } @@ -800,7 +800,7 @@ static void rna_CurveModifier_dependency_update(Main *bmain, Scene *scene, Point if (cmd->object != NULL) { Curve *curve = cmd->object->data; if ((curve->flag & CU_PATH) == 0) { - DEG_id_tag_update(&curve->id, OB_RECALC_DATA); + DEG_id_tag_update(&curve->id, ID_RECALC_GEOMETRY); } } } @@ -813,7 +813,7 @@ static void rna_ArrayModifier_dependency_update(Main *bmain, Scene *scene, Point if (amd->curve_ob != NULL) { Curve *curve = amd->curve_ob->data; if ((curve->flag & CU_PATH) == 0) { - DEG_id_tag_update(&curve->id, OB_RECALC_DATA); + DEG_id_tag_update(&curve->id, ID_RECALC_GEOMETRY); } } } diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c index 121a21293f0..7b5b2f13eef 100644 --- a/source/blender/makesrna/intern/rna_nla.c +++ b/source/blender/makesrna/intern/rna_nla.c @@ -424,7 +424,7 @@ static NlaStrip *rna_NlaStrip_new(ID *id, NlaTrack *track, Main *bmain, bContext WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_ADDED, NULL); DEG_relations_tag_update(bmain); - DEG_id_tag_update_ex(bmain, id, DEG_TAG_TIME | DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update_ex(bmain, id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE); return strip; } @@ -443,7 +443,7 @@ static void rna_NlaStrip_remove(ID *id, NlaTrack *track, Main *bmain, bContext * WM_event_add_notifier(C, NC_ANIMATION | ND_NLA | NA_REMOVED, NULL); DEG_relations_tag_update(bmain); - DEG_id_tag_update_ex(bmain, id, DEG_TAG_TIME | DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update_ex(bmain, id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE); } /* Set the 'solo' setting for the given NLA-track, making sure that it is the only one diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 915156eb9b3..19d758a90e7 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -243,12 +243,12 @@ const EnumPropertyItem rna_enum_object_axis_items[] = { static void rna_Object_internal_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DEG_id_tag_update(ptr->id.data, OB_RECALC_OB); + DEG_id_tag_update(ptr->id.data, ID_RECALC_TRANSFORM); } static void rna_Object_internal_update_draw(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DEG_id_tag_update(ptr->id.data, OB_RECALC_OB); + DEG_id_tag_update(ptr->id.data, ID_RECALC_TRANSFORM); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ptr->id.data); } @@ -263,7 +263,7 @@ static void rna_Object_hide_update(Main *bmain, Scene *UNUSED(scene), PointerRNA { Object *ob = ptr->id.data; BKE_main_collection_sync(bmain); - DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE); DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_OBJECT | ND_DRAW, &ob->id); } @@ -322,7 +322,7 @@ static void rna_Object_matrix_basis_set(PointerRNA *ptr, const float values[16]) void rna_Object_internal_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ptr->id.data); } @@ -361,7 +361,7 @@ static void rna_Object_active_shape_update(bContext *C, PointerRNA *ptr) static void rna_Object_dependency_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { - DEG_id_tag_update(ptr->id.data, OB_RECALC_OB); + DEG_id_tag_update(ptr->id.data, ID_RECALC_TRANSFORM); DEG_relations_tag_update(bmain); WM_main_add_notifier(NC_OBJECT | ND_PARENT, ptr->id.data); } diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index ad375449439..4c8a3db42a2 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -114,7 +114,7 @@ static void rna_Object_select_set( } 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_main_add_notifier(NC_SCENE | ND_OB_SELECT, scene); } @@ -269,7 +269,7 @@ static void rna_Object_shape_key_remove( return; } - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob); RNA_POINTER_INVALIDATE(kb_ptr); diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index aeb9c0fcc43..ee58fff2e78 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -119,7 +119,7 @@ static void rna_Cache_change(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR PTCacheID pid = BKE_ptcache_id_find(ob, NULL, cache); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); if (pid.cache) { /* Just make sure this wasn't changed. */ @@ -164,7 +164,7 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P BKE_ptcache_load_external(&pid); } - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_POINTCACHE, ob); } else { @@ -452,7 +452,7 @@ static void rna_FieldSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scene), part->pd2->tex = NULL; } - DEG_id_tag_update(&part->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME | PSYS_RECALC_RESET); + DEG_id_tag_update(&part->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION | ID_RECALC_PSYS_RESET); WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL); } @@ -464,7 +464,7 @@ static void rna_FieldSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scene), ob->pd->tex = NULL; } - DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob); } } @@ -500,7 +500,7 @@ static void rna_FieldSettings_type_set(PointerRNA *ptr, int value) static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) { if (particle_id_check(ptr)) { - DEG_id_tag_update((ID *)ptr->id.data, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME | PSYS_RECALC_RESET); + DEG_id_tag_update((ID *)ptr->id.data, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION | ID_RECALC_PSYS_RESET); } else { Object *ob = (Object *)ptr->id.data; @@ -519,9 +519,9 @@ static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, Point DEG_relations_tag_update(bmain); if (ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE) - 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); else - DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob); } @@ -565,7 +565,7 @@ static void rna_EffectorWeight_update(Main *UNUSED(bmain), Scene *UNUSED(scene), FOREACH_SCENE_OBJECT_END; } else { - DEG_id_tag_update(id, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update(id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET); WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL); } } @@ -574,7 +574,7 @@ static void rna_EffectorWeight_dependency_update(Main *bmain, Scene *UNUSED(scen { DEG_relations_tag_update(bmain); - DEG_id_tag_update((ID *)ptr->id.data, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update((ID *)ptr->id.data, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET); WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL); } @@ -671,7 +671,7 @@ static void rna_CollisionSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scen { Object *ob = (Object *)ptr->id.data; - 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); WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob); } @@ -679,7 +679,7 @@ static void rna_softbody_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point { Object *ob = (Object *)ptr->id.data; - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); } diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index e5bd55f041c..bc6c6917ed3 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -589,16 +589,16 @@ static void particle_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN psys->recalc = flag; - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } else - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA | flag); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY | flag); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); } static void rna_Particle_redo(Main *bmain, Scene *scene, PointerRNA *ptr) { - particle_recalc(bmain, scene, ptr, PSYS_RECALC_REDO); + particle_recalc(bmain, scene, ptr, ID_RECALC_PSYS_REDO); } static void rna_Particle_redo_dependency(Main *bmain, Scene *scene, PointerRNA *ptr) @@ -612,12 +612,12 @@ static void rna_Particle_redo_count(Main *bmain, Scene *scene, PointerRNA *ptr) ParticleSettings *part = (ParticleSettings *)ptr->data; DEG_relations_tag_update(bmain); psys_check_group_weights(part); - particle_recalc(bmain, scene, ptr, PSYS_RECALC_REDO); + particle_recalc(bmain, scene, ptr, ID_RECALC_PSYS_REDO); } static void rna_Particle_reset(Main *bmain, Scene *scene, PointerRNA *ptr) { - particle_recalc(bmain, scene, ptr, PSYS_RECALC_RESET); + particle_recalc(bmain, scene, ptr, ID_RECALC_PSYS_RESET); } static void rna_Particle_reset_dependency(Main *bmain, Scene *scene, PointerRNA *ptr) @@ -635,8 +635,8 @@ static void rna_Particle_change_type(Main *bmain, Scene *UNUSED(scene), PointerR for (ParticleSystem *psys = ob->particlesystem.first; psys; psys = psys->next) { if (psys->part == part) { psys_changed_type(ob, psys); - psys->recalc |= PSYS_RECALC_RESET; - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + psys->recalc |= ID_RECALC_PSYS_RESET; + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } } } @@ -647,7 +647,7 @@ static void rna_Particle_change_type(Main *bmain, Scene *UNUSED(scene), PointerR static void rna_Particle_change_physics_type(Main *bmain, Scene *scene, PointerRNA *ptr) { - particle_recalc(bmain, scene, ptr, PSYS_RECALC_RESET | PSYS_RECALC_PHYS); + particle_recalc(bmain, scene, ptr, ID_RECALC_PSYS_RESET | ID_RECALC_PSYS_PHYS); ParticleSettings *part = (ParticleSettings *)ptr->data; @@ -674,14 +674,14 @@ static void rna_Particle_change_physics_type(Main *bmain, Scene *scene, PointerR static void rna_Particle_redo_child(Main *bmain, Scene *scene, PointerRNA *ptr) { - particle_recalc(bmain, scene, ptr, PSYS_RECALC_CHILD); + particle_recalc(bmain, scene, ptr, ID_RECALC_PSYS_CHILD); } static void rna_Particle_cloth_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { Object *ob = (Object *)ptr->id.data; - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); } @@ -724,9 +724,9 @@ static void rna_Particle_target_reset(Main *bmain, Scene *UNUSED(scene), Pointer pt->flag &= ~PTARGET_VALID; } - psys->recalc = PSYS_RECALC_RESET; + psys->recalc = ID_RECALC_PSYS_RESET; - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); DEG_relations_tag_update(bmain); } @@ -740,9 +740,9 @@ static void rna_Particle_target_redo(Main *UNUSED(bmain), Scene *UNUSED(scene), ParticleTarget *pt = (ParticleTarget *)ptr->data; ParticleSystem *psys = rna_particle_system_for_target(ob, pt); - psys->recalc = PSYS_RECALC_REDO; + psys->recalc = ID_RECALC_PSYS_REDO; - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); } } @@ -763,7 +763,7 @@ static void rna_Particle_hair_dynamics_update(Main *bmain, Scene *scene, Pointer WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); } - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); DEG_relations_tag_update(bmain); } diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 4b6a19ab063..d86e87f2a1f 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -123,7 +123,7 @@ static void rna_Pose_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN { /* XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); */ - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_POSE, ptr->id.data); } @@ -131,7 +131,7 @@ static void rna_Pose_dependency_update(Main *bmain, Scene *UNUSED(scene), Pointe { DEG_relations_tag_update(bmain); - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_POSE, ptr->id.data); } @@ -140,7 +140,7 @@ static void rna_Pose_IK_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe /* XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); */ Object *ob = ptr->id.data; - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_POSE, ptr->id.data); BIK_clear_data(ob->pose); @@ -253,7 +253,7 @@ static void rna_Pose_ik_solver_update(Main *bmain, Scene *UNUSED(scene), Pointer object_test_constraints(bmain, ob); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_TRANSFORM); } /* rotation - axis-angle */ @@ -365,7 +365,7 @@ static void rna_Itasc_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR itasc->maxvel = 100.f; BIK_update_param(ob->pose); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } static void rna_Itasc_update_rebuild(Main *bmain, Scene *scene, PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 9d6419ae3be..b44bdfc2201 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -551,7 +551,7 @@ static void rna_GPencil_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UN if (ob->type == OB_GPENCIL) { bGPdata *gpd = (bGPdata *)ob->data; gpd->flag |= GP_DATA_CACHE_IS_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); } } FOREACH_COLLECTION_OBJECT_RECURSIVE_END; @@ -1325,7 +1325,7 @@ static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value) if (type) { BLI_strncpy_utf8(rd->engine, type->idname, sizeof(rd->engine)); - DEG_id_tag_update(ptr->id.data, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(ptr->id.data, ID_RECALC_COPY_ON_WRITE); } } @@ -1458,7 +1458,7 @@ static void rna_Physics_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe } FOREACH_SCENE_OBJECT_END; - DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); } static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const bool *value) @@ -1497,7 +1497,7 @@ static void rna_Scene_editmesh_select_mode_update(bContext *C, PointerRNA *UNUSE } if (me) { - DEG_id_tag_update(&me->id, DEG_TAG_SELECT_UPDATE); + DEG_id_tag_update(&me->id, ID_RECALC_SELECT); WM_main_add_notifier(NC_SCENE | ND_TOOLSETTINGS, NULL); } } @@ -1515,12 +1515,12 @@ static void object_simplify_update(Object *ob) for (md = ob->modifiers.first; md; md = md->next) { if (ELEM(md->type, eModifierType_Subsurf, eModifierType_Multires, eModifierType_ParticleSystem)) { - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } } for (psys = ob->particlesystem.first; psys; psys = psys->next) - psys->recalc |= PSYS_RECALC_CHILD; + psys->recalc |= ID_RECALC_PSYS_CHILD; if (ob->dup_group) { CollectionObject *cob; @@ -1724,7 +1724,7 @@ static void rna_EditMesh_update(bContext *C, PointerRNA *UNUSED(ptr)) } if (me) { - DEG_id_tag_update(&me->id, OB_RECALC_DATA); + DEG_id_tag_update(&me->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_GEOM | ND_DATA, me); } } @@ -1745,7 +1745,7 @@ static void rna_Scene_update_active_object_data(bContext *C, PointerRNA *UNUSED( Object *ob = OBACT(view_layer); if (ob) { - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_DRAW, &ob->id); } } @@ -1756,7 +1756,7 @@ static void rna_SceneCamera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po Object *camera = scene->camera; if (camera && (camera->type == OB_CAMERA)) { - DEG_id_tag_update(&camera->id, OB_RECALC_DATA); + DEG_id_tag_update(&camera->id, ID_RECALC_GEOMETRY); } } diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index d106e2db6eb..8cda9677057 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -131,7 +131,7 @@ static void rna_GPencil_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UN if (ob->type == OB_GPENCIL) { bGPdata *gpd = (bGPdata *)ob->data; gpd->flag |= GP_DATA_CACHE_IS_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); } } FOREACH_COLLECTION_OBJECT_RECURSIVE_END; @@ -185,11 +185,11 @@ static void rna_ParticleEdit_redo(bContext *C, PointerRNA *UNUSED(ptr)) if (!edit) return; - if (ob) DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + if (ob) DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); BKE_particle_batch_cache_dirty_tag(edit->psys, BKE_PARTICLE_BATCH_DIRTY_ALL); psys_free_path_cache(edit->psys, edit); - DEG_id_tag_update(&CTX_data_scene(C)->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&CTX_data_scene(C)->id, ID_RECALC_COPY_ON_WRITE); } static void rna_ParticleEdit_update(bContext *C, PointerRNA *UNUSED(ptr)) @@ -197,10 +197,10 @@ static void rna_ParticleEdit_update(bContext *C, PointerRNA *UNUSED(ptr)) ViewLayer *view_layer = CTX_data_view_layer(C); Object *ob = OBACT(view_layer); - if (ob) DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + if (ob) DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); /* Sync tool setting changes from original to evaluated scenes. */ - DEG_id_tag_update(&CTX_data_scene(C)->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&CTX_data_scene(C)->id, ID_RECALC_COPY_ON_WRITE); } static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value) @@ -211,7 +211,7 @@ static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value) if ((pset->brushtype == PE_BRUSH_WEIGHT || value == PE_BRUSH_WEIGHT) && pset->object) { Object *ob = pset->object; if (ob) { - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); } } @@ -355,7 +355,7 @@ static void rna_Sculpt_update(bContext *C, PointerRNA *UNUSED(ptr)) Object *ob = OBACT(view_layer); if (ob) { - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); if (ob->sculpt) { diff --git a/source/blender/makesrna/intern/rna_shader_fx.c b/source/blender/makesrna/intern/rna_shader_fx.c index ef045be82ca..5c6e2addfc2 100644 --- a/source/blender/makesrna/intern/rna_shader_fx.c +++ b/source/blender/makesrna/intern/rna_shader_fx.c @@ -160,7 +160,7 @@ static char *rna_ShaderFx_path(PointerRNA *ptr) static void rna_ShaderFx_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ptr->id.data); } diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index 8e375c3645e..65ff61096cc 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -64,7 +64,7 @@ static void rna_Smoke_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY); } static void rna_Smoke_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) @@ -78,7 +78,7 @@ static void rna_Smoke_resetCache(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin SmokeDomainSettings *settings = (SmokeDomainSettings *)ptr->data; if (settings->smd && settings->smd->domain) settings->point_cache[0]->flag |= PTCACHE_OUTDATED; - DEG_id_tag_update(ptr->id.data, OB_RECALC_DATA); + DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY); } static void rna_Smoke_cachetype_set(struct PointerRNA *ptr, int value) diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 2c9823daa7a..9bfd1d34b2b 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -512,7 +512,7 @@ static void rna_GPencil_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UN /* need set all caches as dirty to recalculate onion skinning */ for (Object *ob = bmain->object.first; ob; ob = ob->id.next) { if (ob->type == OB_GPENCIL) { - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } } WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL); @@ -679,7 +679,7 @@ static void rna_3DViewShading_type_update(Main *bmain, Scene *UNUSED(scene), Poi * the meshes itself. * This hack just tag BKE_MESH_BATCH_DIRTY_SHADING for every mesh that * have a material. (see T55059) */ - DEG_id_tag_update(&ma->id, DEG_TAG_SHADING_UPDATE); + DEG_id_tag_update(&ma->id, ID_RECALC_SHADING); } bScreen *screen = ptr->id.data; @@ -1534,7 +1534,7 @@ static void rna_SpaceDopeSheetEditor_action_update(bContext *C, PointerRNA *ptr) } /* force depsgraph flush too */ - DEG_id_tag_update(&obact->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&obact->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); /* Update relations as well, so new time source dependency is added. */ DEG_relations_tag_update(bmain); } diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 753870335ff..6a305ce23bb 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -163,7 +163,7 @@ static void rna_Texture_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *pt Tex *tex = ptr->id.data; DEG_id_tag_update(&tex->id, 0); - DEG_id_tag_update(&tex->id, DEG_TAG_EDITORS_UPDATE); + DEG_id_tag_update(&tex->id, ID_RECALC_EDITORS); WM_main_add_notifier(NC_TEXTURE, tex); WM_main_add_notifier(NC_MATERIAL | ND_SHADING_DRAW, NULL); } @@ -191,7 +191,7 @@ static void rna_Texture_nodes_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Tex *tex = ptr->id.data; DEG_id_tag_update(&tex->id, 0); - DEG_id_tag_update(&tex->id, DEG_TAG_EDITORS_UPDATE); + DEG_id_tag_update(&tex->id, ID_RECALC_EDITORS); WM_main_add_notifier(NC_TEXTURE | ND_NODES, tex); } @@ -235,12 +235,12 @@ void rna_TextureSlot_update(bContext *C, PointerRNA *ptr) case ID_PA: { MTex *mtex = ptr->data; - int recalc = OB_RECALC_DATA; + int recalc = ID_RECALC_GEOMETRY; if (mtex->mapto & PAMAP_INIT) - recalc |= PSYS_RECALC_RESET; + recalc |= ID_RECALC_PSYS_RESET; if (mtex->mapto & PAMAP_CHILD) - recalc |= PSYS_RECALC_CHILD; + recalc |= ID_RECALC_PSYS_CHILD; DEG_id_tag_update(id, recalc); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 00e7c42d5bb..573946e4ba1 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -324,7 +324,7 @@ static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRN for (ob = bmain->object.first; ob; ob = ob->id.next) { if (ob->mode & OB_MODE_WEIGHT_PAINT) - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } rna_userdef_update(bmain, scene, ptr); @@ -462,7 +462,7 @@ static void rna_userdef_opensubdiv_update(Main *bmain, Scene *UNUSED(scene), Poi object; object = object->id.next) { - DEG_id_tag_update(&object->id, OB_RECALC_OB); + DEG_id_tag_update(&object->id, ID_RECALC_TRANSFORM); } } diff --git a/source/blender/makesrna/intern/rna_vfont.c b/source/blender/makesrna/intern/rna_vfont.c index 487b5220c86..f01f095066e 100644 --- a/source/blender/makesrna/intern/rna_vfont.c +++ b/source/blender/makesrna/intern/rna_vfont.c @@ -61,7 +61,7 @@ static void rna_VectorFont_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scen /* update */ WM_main_add_notifier(NC_GEOM | ND_DATA, NULL); - DEG_id_tag_update(&vf->id, OB_RECALC_OB | OB_RECALC_DATA); + DEG_id_tag_update(&vf->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); } #else |