Depsgraph: Remove duplicated sets of recalc/update flags
There were at least three copies of those: - OB_RECALC* family of flags, which are rudiment of an old dependency graph system. - PSYS_RECALC* which were used by old dependency graph system as a separate set since the graph itself did not handle particle systems. - DEG_TAG_* which was used to tag IDs. Now there is a single set, which defines what can be tagged and queried for an update. It also has some aggregate flags to make queries simpler. Lets once and for all solve the madness of those flags, stick to a single set, which will not overlap with anything or require any extra conversion. Technically, shouldn't be measurable user difference, but some of the agregate flags for few dependency graph components did change. Fixes T58632: Particle don't update rotation settings
This commit is contained in:
@@ -818,12 +818,12 @@ static void import_endjob(void *user_data)
|
||||
/* TODO: is setting active needed? */
|
||||
BKE_view_layer_base_select_and_set_active(view_layer, base);
|
||||
|
||||
DEG_id_tag_update(&lc->collection->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&lc->collection->id, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_id_tag_update_ex(data->bmain, &ob->id,
|
||||
OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME | DEG_TAG_BASE_FLAGS_UPDATE);
|
||||
ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION | ID_RECALC_BASE_FLAGS);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(&data->scene->id, DEG_TAG_BASE_FLAGS_UPDATE);
|
||||
DEG_id_tag_update(&data->scene->id, ID_RECALC_BASE_FLAGS);
|
||||
DEG_relations_tag_update(data->bmain);
|
||||
}
|
||||
|
||||
|
||||
@@ -512,7 +512,7 @@ static bool collection_object_add(Main *bmain, Collection *collection, Object *o
|
||||
}
|
||||
|
||||
if ((flag & LIB_ID_CREATE_NO_MAIN) == 0) {
|
||||
DEG_id_tag_update_ex(bmain, &collection->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update_ex(bmain, &collection->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -535,7 +535,7 @@ static bool collection_object_remove(Main *bmain, Collection *collection, Object
|
||||
id_us_min(&ob->id);
|
||||
}
|
||||
|
||||
DEG_id_tag_update_ex(bmain, &collection->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update_ex(bmain, &collection->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5157,7 +5157,7 @@ static bConstraint *constraint_find_original_for_update(bConstraintOb *cob, bCon
|
||||
bConstraint *orig_con = constraint_find_original(cob->ob, cob->pchan, con, &orig_ob);
|
||||
|
||||
if (orig_con != NULL) {
|
||||
DEG_id_tag_update(&orig_ob->id, DEG_TAG_COPY_ON_WRITE | DEG_TAG_TRANSFORM);
|
||||
DEG_id_tag_update(&orig_ob->id, ID_RECALC_COPY_ON_WRITE | ID_RECALC_TRANSFORM);
|
||||
}
|
||||
|
||||
return orig_con;
|
||||
|
||||
@@ -5296,7 +5296,7 @@ bool BKE_curve_material_index_validate(Curve *cu)
|
||||
}
|
||||
|
||||
if (!is_valid) {
|
||||
DEG_id_tag_update(&cu->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&cu->id, ID_RECALC_GEOMETRY);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -78,7 +78,7 @@ void(*BKE_gpencil_batch_cache_free_cb)(bGPdata *gpd) = NULL;
|
||||
void BKE_gpencil_batch_cache_dirty_tag(bGPdata *gpd)
|
||||
{
|
||||
if (gpd) {
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
BKE_gpencil_batch_cache_dirty_tag_cb(gpd);
|
||||
}
|
||||
}
|
||||
@@ -1219,7 +1219,7 @@ void BKE_gpencil_vgroup_remove(Object *ob, bDeformGroup *defgroup)
|
||||
|
||||
/* Remove the group */
|
||||
BLI_freelinkN(&ob->defbase, defgroup);
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -861,7 +861,7 @@ void BKE_main_collection_sync_remap(const Main *bmain)
|
||||
|
||||
for (Collection *collection = bmain->collection.first; collection; collection = collection->id.next) {
|
||||
BKE_collection_object_cache_free(collection);
|
||||
DEG_id_tag_update_ex((Main *)bmain, &collection->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update_ex((Main *)bmain, &collection->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
BKE_main_collection_sync(bmain);
|
||||
|
||||
@@ -787,8 +787,8 @@ bool id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop)
|
||||
|
||||
/* tag grease pencil datablock and disable onion */
|
||||
if (GS(id->name) == ID_GD) {
|
||||
DEG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(newid, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
DEG_id_tag_update(newid, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
bGPdata *gpd = (bGPdata *)newid;
|
||||
gpd->flag &= ~GP_DATA_SHOW_ONIONSKINS;
|
||||
}
|
||||
@@ -979,7 +979,7 @@ void BKE_main_lib_objects_recalc_all(Main *bmain)
|
||||
/* flag for full recalc */
|
||||
for (ob = bmain->object.first; ob; ob = ob->id.next) {
|
||||
if (ID_IS_LINKED(ob)) {
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@ static int foreach_libblock_remap_callback(void *user_data, ID *id_self, ID **id
|
||||
if (!is_never_null) {
|
||||
*id_p = new_id;
|
||||
DEG_id_tag_update_ex(id_remap_data->bmain, id_self,
|
||||
DEG_TAG_COPY_ON_WRITE | DEG_TAG_TRANSFORM | DEG_TAG_GEOMETRY);
|
||||
ID_RECALC_COPY_ON_WRITE | ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
}
|
||||
if (cb_flag & IDWALK_CB_USER) {
|
||||
id_us_min(old_id);
|
||||
@@ -307,14 +307,14 @@ static void libblock_remap_data_postprocess_object_update(Main *bmain, Object *o
|
||||
if (old_ob == NULL) {
|
||||
for (Object *ob = bmain->object.first; ob != NULL; ob = ob->id.next) {
|
||||
if (ob->type == OB_MBALL && BKE_mball_is_basis(ob)) {
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (Object *ob = bmain->object.first; ob != NULL; ob = ob->id.next) {
|
||||
if (ob->type == OB_MBALL && BKE_mball_is_basis_for(ob, old_ob)) {
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
break; /* There is only one basis... */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ void BKE_material_resize_id(Main *bmain, ID *id, short totcol, bool do_id_user)
|
||||
}
|
||||
*totcolp = totcol;
|
||||
|
||||
DEG_id_tag_update(id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(id, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@ void BKE_material_append_id(Main *bmain, ID *id, Material *ma)
|
||||
id_us_plus((ID *)ma);
|
||||
test_all_objects_materials(bmain, id);
|
||||
|
||||
DEG_id_tag_update(id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(id, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
}
|
||||
@@ -479,7 +479,7 @@ Material *BKE_material_pop_id(Main *bmain, ID *id, int index_i, bool update_data
|
||||
material_data_index_remove_id(id, index);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(id, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
}
|
||||
@@ -507,7 +507,7 @@ void BKE_material_clear_id(Main *bmain, ID *id, bool update_data)
|
||||
material_data_index_clear_id(id);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(id, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
}
|
||||
@@ -618,7 +618,7 @@ void BKE_material_resize_object(Main *bmain, Object *ob, const short totcol, boo
|
||||
if (ob->totcol && ob->actcol == 0) ob->actcol = 1;
|
||||
if (ob->actcol > ob->totcol) ob->actcol = ob->totcol;
|
||||
|
||||
DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE | DEG_TAG_GEOMETRY);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE | ID_RECALC_GEOMETRY);
|
||||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
|
||||
|
||||
@@ -958,7 +958,7 @@ bool BKE_mesh_validate(Mesh *me, const bool do_verbose, const bool cddata_check_
|
||||
&changed);
|
||||
|
||||
if (changed) {
|
||||
DEG_id_tag_update(&me->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&me->id, ID_RECALC_GEOMETRY);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
@@ -1025,7 +1025,7 @@ bool BKE_mesh_validate_material_indices(Mesh *me)
|
||||
}
|
||||
|
||||
if (!is_valid) {
|
||||
DEG_id_tag_update(&me->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&me->id, ID_RECALC_GEOMETRY);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -517,7 +517,7 @@ void BKE_object_free_caches(Object *object)
|
||||
psys = psys->next)
|
||||
{
|
||||
psys_free_path_cache(psys, psys->edit);
|
||||
update_flag |= PSYS_RECALC_REDO;
|
||||
update_flag |= ID_RECALC_PSYS_REDO;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -533,7 +533,7 @@ void BKE_object_free_caches(Object *object)
|
||||
psmd->mesh_original = NULL;
|
||||
}
|
||||
psmd->flag |= eParticleSystemFlag_file_loaded;
|
||||
update_flag |= OB_RECALC_DATA;
|
||||
update_flag |= ID_RECALC_GEOMETRY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -544,7 +544,7 @@ void BKE_object_free_caches(Object *object)
|
||||
*/
|
||||
if ((object->base_flag & BASE_FROMDUPLI) == 0) {
|
||||
BKE_object_free_derived_caches(object);
|
||||
update_flag |= OB_RECALC_DATA;
|
||||
update_flag |= ID_RECALC_GEOMETRY;
|
||||
}
|
||||
|
||||
/* Tag object for update, so once memory critical operation is over and
|
||||
@@ -904,7 +904,7 @@ static Object *object_add_common(Main *bmain, ViewLayer *view_layer, int type, c
|
||||
ob->data = BKE_object_obdata_add_from_type(bmain, type, name);
|
||||
BKE_view_layer_base_deselect_all(view_layer);
|
||||
|
||||
DEG_id_tag_update_ex(bmain, &ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
|
||||
DEG_id_tag_update_ex(bmain, &ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
|
||||
return ob;
|
||||
}
|
||||
|
||||
@@ -978,7 +978,7 @@ Object *BKE_object_add_for_data(
|
||||
if (do_id_user) id_us_plus(data);
|
||||
|
||||
BKE_view_layer_base_deselect_all(view_layer);
|
||||
DEG_id_tag_update_ex(bmain, &ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
|
||||
DEG_id_tag_update_ex(bmain, &ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
|
||||
|
||||
layer_collection = BKE_layer_collection_get_active(view_layer);
|
||||
BKE_collection_object_add(bmain, layer_collection->collection, ob);
|
||||
@@ -1567,8 +1567,8 @@ void BKE_object_make_proxy(Main *bmain, Object *ob, Object *target, Object *cob)
|
||||
ob->proxy_group = cob;
|
||||
id_lib_extern(&target->id);
|
||||
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
|
||||
DEG_id_tag_update(&target->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
|
||||
DEG_id_tag_update(&target->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
|
||||
|
||||
/* copy transform
|
||||
* - cob means this proxy comes from a collection, just apply the matrix
|
||||
@@ -2856,7 +2856,7 @@ void BKE_object_handle_update_ex(Depsgraph *depsgraph,
|
||||
const bool do_proxy_update)
|
||||
{
|
||||
const ID *object_data = ob->data;
|
||||
const bool recalc_object = (ob->id.recalc & ID_RECALC) != 0;
|
||||
const bool recalc_object = (ob->id.recalc & ID_RECALC_ALL) != 0;
|
||||
const bool recalc_data =
|
||||
(object_data != NULL) ? ((object_data->recalc & ID_RECALC_ALL) != 0)
|
||||
: 0;
|
||||
@@ -2883,9 +2883,9 @@ void BKE_object_handle_update_ex(Depsgraph *depsgraph,
|
||||
}
|
||||
}
|
||||
}
|
||||
/* XXX new animsys warning: depsgraph tag OB_RECALC_DATA should not skip drivers,
|
||||
/* XXX new animsys warning: depsgraph tag ID_RECALC_GEOMETRY should not skip drivers,
|
||||
* which is only in BKE_object_where_is_calc now */
|
||||
/* XXX: should this case be OB_RECALC_OB instead? */
|
||||
/* XXX: should this case be ID_RECALC_TRANSFORM instead? */
|
||||
if (recalc_object || recalc_data) {
|
||||
if (G.debug & G_DEBUG_DEPSGRAPH_EVAL) {
|
||||
printf("recalcob %s\n", ob->id.name + 2);
|
||||
@@ -3695,7 +3695,7 @@ void BKE_object_groups_clear(Main *bmain, Object *ob)
|
||||
Collection *collection = NULL;
|
||||
while ((collection = BKE_collection_object_find(bmain, collection, ob))) {
|
||||
BKE_collection_object_remove(bmain, collection, ob, false);
|
||||
DEG_id_tag_update(&collection->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&collection->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4016,7 +4016,7 @@ bool BKE_object_modifier_update_subframe(
|
||||
}
|
||||
}
|
||||
|
||||
/* was originally OB_RECALC_ALL - TODO - which flags are really needed??? */
|
||||
/* was originally ID_RECALC_ALL - TODO - which flags are really needed??? */
|
||||
/* TODO(sergey): What about animation? */
|
||||
ob->id.recalc |= ID_RECALC_ALL;
|
||||
BKE_animsys_evaluate_animdata(depsgraph, scene, &ob->id, ob->adt, frame, ADT_RECALC_ANIM);
|
||||
|
||||
@@ -921,7 +921,7 @@ void BKE_sculptsession_bm_to_me(Object *ob, bool reorder)
|
||||
sculptsession_bm_to_me_update_data_only(ob, reorder);
|
||||
|
||||
/* ensure the objects evaluated mesh doesn't hold onto arrays now realloc'd in the mesh [#34473] */
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1098,7 +1098,7 @@ void BKE_sculpt_update_mesh_elements(
|
||||
#else /* if we wanted to support adding mask data while multi-res painting, we would need to do this */
|
||||
if ((ED_sculpt_mask_layers_ensure(ob, mmd) & ED_SCULPT_MASK_LAYER_CALC_LOOP)) {
|
||||
/* remake the derived mesh */
|
||||
ob->recalc |= OB_RECALC_DATA;
|
||||
ob->recalc |= ID_RECALC_GEOMETRY;
|
||||
BKE_object_handle_update(scene, ob);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3088,7 +3088,7 @@ ModifierData *object_add_particle_system(Main *bmain, Scene *scene, Object *ob,
|
||||
psys->cfra = BKE_scene_frame_get_from_ctime(scene, CFRA + 1);
|
||||
|
||||
DEG_relations_tag_update(bmain);
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
return md;
|
||||
}
|
||||
@@ -3134,10 +3134,10 @@ void object_remove_particle_system(Main *bmain, Scene *UNUSED(scene), Object *ob
|
||||
ob->mode &= ~OB_MODE_PARTICLE_EDIT;
|
||||
|
||||
DEG_relations_tag_update(bmain);
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* Flush object mode. */
|
||||
DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
static void default_particle_settings(ParticleSettings *part)
|
||||
|
||||
@@ -2916,10 +2916,10 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra, cons
|
||||
ParticleEditSettings *pset = &sim->scene->toolsettings->particle;
|
||||
int distr=0, alloc=0, skip=0;
|
||||
|
||||
if ((psys->part->childtype && psys->totchild != psys_get_tot_child(sim->scene, psys, use_render_params)) || psys->recalc&PSYS_RECALC_RESET)
|
||||
if ((psys->part->childtype && psys->totchild != psys_get_tot_child(sim->scene, psys, use_render_params)) || psys->recalc&ID_RECALC_PSYS_RESET)
|
||||
alloc=1;
|
||||
|
||||
if (alloc || psys->recalc&PSYS_RECALC_CHILD || (psys->vgroup[PSYS_VG_DENSITY] && (sim->ob && sim->ob->mode & OB_MODE_WEIGHT_PAINT)))
|
||||
if (alloc || psys->recalc&ID_RECALC_PSYS_CHILD || (psys->vgroup[PSYS_VG_DENSITY] && (sim->ob && sim->ob->mode & OB_MODE_WEIGHT_PAINT)))
|
||||
distr=1;
|
||||
|
||||
if (distr) {
|
||||
@@ -3248,7 +3248,7 @@ static void hair_step(ParticleSimulationData *sim, float cfra, const bool use_re
|
||||
pa->flag &= ~PARS_NO_DISP;
|
||||
}
|
||||
|
||||
if (psys->recalc & PSYS_RECALC_RESET) {
|
||||
if (psys->recalc & ID_RECALC_PSYS_RESET) {
|
||||
/* need this for changing subsurf levels */
|
||||
psys_calc_dmcache(sim->ob, sim->psmd->mesh_final, sim->psmd->mesh_original, psys);
|
||||
|
||||
@@ -3964,7 +3964,7 @@ static void system_step(ParticleSimulationData *sim, float cfra, const bool use_
|
||||
BKE_ptcache_id_time(pid, sim->scene, 0.0f, &startframe, &endframe, NULL);
|
||||
|
||||
/* clear everything on start frame, or when psys needs full reset! */
|
||||
if ((cfra == startframe) || (psys->recalc & PSYS_RECALC_RESET)) {
|
||||
if ((cfra == startframe) || (psys->recalc & ID_RECALC_PSYS_RESET)) {
|
||||
BKE_ptcache_id_reset(sim->scene, pid, PTCACHE_RESET_OUTDATED);
|
||||
BKE_ptcache_validate(cache, startframe);
|
||||
cache->flag &= ~PTCACHE_REDO_NEEDED;
|
||||
@@ -3975,7 +3975,7 @@ static void system_step(ParticleSimulationData *sim, float cfra, const bool use_
|
||||
|
||||
/* 1. emit particles and redo particles if needed */
|
||||
oldtotpart = psys->totpart;
|
||||
if (emit_particles(sim, pid, cfra) || psys->recalc & PSYS_RECALC_RESET) {
|
||||
if (emit_particles(sim, pid, cfra) || psys->recalc & ID_RECALC_PSYS_RESET) {
|
||||
distribute_particles(sim, part->from);
|
||||
initialize_all_particles(sim);
|
||||
/* reset only just created particles (on startframe all particles are recreated) */
|
||||
@@ -4200,7 +4200,7 @@ static void psys_prepare_physics(ParticleSimulationData *sim)
|
||||
static int hair_needs_recalc(ParticleSystem *psys)
|
||||
{
|
||||
if (!(psys->flag & PSYS_EDITED) && (!psys->edit || !psys->edit->edited) &&
|
||||
((psys->flag & PSYS_HAIR_DONE)==0 || psys->recalc & PSYS_RECALC_RESET || (psys->part->flag & PART_HAIR_REGROW && !psys->edit)))
|
||||
((psys->flag & PSYS_HAIR_DONE)==0 || psys->recalc & ID_RECALC_PSYS_RESET || (psys->part->flag & PART_HAIR_REGROW && !psys->edit)))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -4253,7 +4253,7 @@ void particle_system_update(struct Depsgraph *depsgraph, Scene *scene, Object *o
|
||||
/* to verify if we need to restore object afterwards */
|
||||
psys->flag &= ~PSYS_OB_ANIM_RESTORE;
|
||||
|
||||
if (psys->recalc & PSYS_RECALC_RESET)
|
||||
if (psys->recalc & ID_RECALC_PSYS_RESET)
|
||||
psys->totunexist = 0;
|
||||
|
||||
/* setup necessary physics type dependent additional data if it doesn't yet exist */
|
||||
@@ -4320,10 +4320,10 @@ void particle_system_update(struct Depsgraph *depsgraph, Scene *scene, Object *o
|
||||
bool free_unexisting = false;
|
||||
|
||||
/* Particles without dynamics haven't been reset yet because they don't use pointcache */
|
||||
if (psys->recalc & PSYS_RECALC_RESET)
|
||||
if (psys->recalc & ID_RECALC_PSYS_RESET)
|
||||
psys_reset(psys, PSYS_RESET_ALL);
|
||||
|
||||
if (emit_particles(&sim, NULL, cfra) || (psys->recalc & PSYS_RECALC_RESET)) {
|
||||
if (emit_particles(&sim, NULL, cfra) || (psys->recalc & ID_RECALC_PSYS_RESET)) {
|
||||
free_keyed_keys(psys);
|
||||
distribute_particles(&sim, part->from);
|
||||
initialize_all_particles(&sim);
|
||||
@@ -4436,7 +4436,7 @@ void BKE_particle_system_eval_init(struct Depsgraph *depsgraph,
|
||||
psys != NULL;
|
||||
psys = psys->next)
|
||||
{
|
||||
psys->recalc |= (psys->part->id.recalc & DEG_TAG_PSYS_ALL);
|
||||
psys->recalc |= (psys->part->id.recalc & ID_RECALC_PSYS_ALL);
|
||||
}
|
||||
BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH);
|
||||
}
|
||||
|
||||
@@ -3389,7 +3389,7 @@ int BKE_ptcache_object_reset(Scene *scene, Object *ob, int mode)
|
||||
|
||||
for (psys=ob->particlesystem.first; psys; psys=psys->next) {
|
||||
/* children or just redo can be calculated without resetting anything */
|
||||
if (psys->recalc & PSYS_RECALC_REDO || psys->recalc & PSYS_RECALC_CHILD)
|
||||
if (psys->recalc & ID_RECALC_PSYS_REDO || psys->recalc & ID_RECALC_PSYS_CHILD)
|
||||
skip = 1;
|
||||
/* Baked cloth hair has to be checked too, because we don't want to reset */
|
||||
/* particles or cloth in that case -jahka */
|
||||
|
||||
@@ -1201,7 +1201,7 @@ int BKE_scene_camera_switch_update(Scene *scene)
|
||||
Object *camera = BKE_scene_camera_switch_find(scene);
|
||||
if (camera) {
|
||||
scene->camera = camera;
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE);
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -3607,7 +3607,7 @@ static void lib_link_pose(FileData *fd, Main *bmain, Object *ob, bPose *pose)
|
||||
|
||||
|
||||
if (rebuild) {
|
||||
DEG_id_tag_update_ex(bmain, &ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
|
||||
DEG_id_tag_update_ex(bmain, &ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
|
||||
BKE_pose_tag_recalc(bmain, pose);
|
||||
}
|
||||
}
|
||||
@@ -10384,7 +10384,7 @@ static void add_collections_to_scene(
|
||||
}
|
||||
|
||||
BKE_scene_object_base_flag_sync_from_base(base);
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
|
||||
view_layer->basact = base;
|
||||
|
||||
/* Assign the collection. */
|
||||
|
||||
@@ -864,7 +864,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
||||
for (ob = bmain->object.first; ob; ob = ob->id.next) {
|
||||
for (psys = ob->particlesystem.first; psys; psys = psys->next) {
|
||||
if ((psys->pointcache->flag & PTCACHE_BAKED) == 0) {
|
||||
psys->recalc |= PSYS_RECALC_RESET;
|
||||
psys->recalc |= ID_RECALC_PSYS_RESET;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2267,7 +2267,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
|
||||
|
||||
part->draw_as = PART_DRAW_PATH;
|
||||
part->type = PART_HAIR;
|
||||
psys->recalc |= PSYS_RECALC_REDO;
|
||||
psys->recalc |= ID_RECALC_PSYS_REDO;
|
||||
|
||||
part->normfac *= fac;
|
||||
part->randfac *= fac;
|
||||
|
||||
@@ -1945,7 +1945,7 @@ Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root, COLLADAFW::No
|
||||
job->lay = BKE_scene_base_find(scene, job)->lay = 2;
|
||||
|
||||
mul_v3_fl(job->size, 0.5f);
|
||||
DEG_id_tag_update(&job->id, OB_RECALC_OB);
|
||||
DEG_id_tag_update(&job->id, ID_RECALC_TRANSFORM);
|
||||
|
||||
verify_adt_action((ID *)&job->id, 1);
|
||||
|
||||
@@ -1966,7 +1966,7 @@ Object *AnimationImporter::get_joint_object(COLLADAFW::Node *root, COLLADAFW::No
|
||||
if (par_job) {
|
||||
job->parent = par_job;
|
||||
|
||||
DEG_id_tag_update(&par_job->id, OB_RECALC_OB);
|
||||
DEG_id_tag_update(&par_job->id, ID_RECALC_TRANSFORM);
|
||||
job->parsubstr[0] = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -499,7 +499,7 @@ void ArmatureImporter::create_armature_bones(Main *bmain, std::vector<Object *>
|
||||
ob_arms.push_back(ob_arm);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(&ob_arm->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob_arm->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -632,7 +632,7 @@ Object *ArmatureImporter::create_armature_bones(Main *bmain, SkinInfo& skin)
|
||||
ED_armature_from_edit(bmain, armature);
|
||||
ED_armature_edit_free(armature);
|
||||
|
||||
DEG_id_tag_update(&ob_arm->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob_arm->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
|
||||
return ob_arm;
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ void DocumentImporter::finish()
|
||||
delete objects_to_scale;
|
||||
|
||||
// update scene
|
||||
DEG_id_tag_update(&sce->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&sce->id, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_relations_tag_update(bmain);
|
||||
WM_event_add_notifier(mContext, NC_OBJECT | ND_TRANSFORM, NULL);
|
||||
}
|
||||
@@ -406,7 +406,7 @@ Object *DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Nod
|
||||
|
||||
Main *bmain = CTX_data_main(mContext);
|
||||
Object *obn = BKE_object_copy(bmain, source_ob);
|
||||
DEG_id_tag_update(&obn->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
|
||||
DEG_id_tag_update(&obn->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
|
||||
BKE_collection_object_add_from(bmain, sce, source_ob, obn);
|
||||
|
||||
if (instance_node) {
|
||||
|
||||
@@ -244,7 +244,7 @@ void SkinInfo::link_armature(bContext *C, Object *ob, std::map<COLLADAFW::Unique
|
||||
BKE_object_workob_calc_parent(scene, ob, &workob);
|
||||
invert_m4_m4(ob->parentinv, workob.obmat);
|
||||
|
||||
DEG_id_tag_update(&obn->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&obn->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
#endif
|
||||
copy_m4_m4(ob->obmat, bind_shape_matrix);
|
||||
BKE_object_apply_mat4(ob, ob->obmat, 0, 0);
|
||||
|
||||
@@ -183,8 +183,8 @@ int bc_set_parent(Object *ob, Object *par, bContext *C, bool is_parent_space)
|
||||
BKE_object_workob_calc_parent(depsgraph, sce, ob, &workob);
|
||||
invert_m4_m4(ob->parentinv, workob.obmat);
|
||||
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&par->id, OB_RECALC_OB);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
DEG_id_tag_update(&par->id, ID_RECALC_TRANSFORM);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ Object *bc_add_object(Main *bmain, Scene *scene, ViewLayer *view_layer, int type
|
||||
|
||||
ob->data = BKE_object_obdata_add_from_type(bmain, type, name);
|
||||
ob->lay = scene->lay;
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
|
||||
|
||||
LayerCollection *layer_collection = BKE_layer_collection_get_active(view_layer);
|
||||
BKE_collection_object_add(bmain, layer_collection->collection, ob);
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
#ifndef __DEG_DEPSGRAPH_H__
|
||||
#define __DEG_DEPSGRAPH_H__
|
||||
|
||||
#include "DNA_ID.h"
|
||||
|
||||
/* Dependency Graph */
|
||||
typedef struct Depsgraph Depsgraph;
|
||||
|
||||
@@ -122,39 +124,7 @@ void DEG_graph_on_visible_update(struct Main *bmain, Depsgraph *depsgraph);
|
||||
/* Update all dependency graphs when visible scenes/layers changes. */
|
||||
void DEG_on_visible_update(struct Main *bmain, const bool do_time);
|
||||
|
||||
/* Tag given ID for an update in all the dependency graphs. */
|
||||
typedef enum eDepsgraph_Tag {
|
||||
/* Object transformation changed, corresponds to OB_RECALC_OB. */
|
||||
DEG_TAG_TRANSFORM = (1 << 0),
|
||||
/* Object geometry changed, corresponds to OB_RECALC_DATA. */
|
||||
DEG_TAG_GEOMETRY = (1 << 1),
|
||||
/* Time changed and animation is to be re-evaluated, OB_RECALC_TIME. */
|
||||
DEG_TAG_TIME = (1 << 2),
|
||||
/* Particle system changed; values are aligned with PSYS_RECALC_xxx. */
|
||||
DEG_TAG_PSYS_REDO = (1 << 3),
|
||||
DEG_TAG_PSYS_RESET = (1 << 4),
|
||||
DEG_TAG_PSYS_TYPE = (1 << 5),
|
||||
DEG_TAG_PSYS_CHILD = (1 << 6),
|
||||
DEG_TAG_PSYS_PHYS = (1 << 7),
|
||||
DEG_TAG_PSYS_ALL = (DEG_TAG_PSYS_REDO |
|
||||
DEG_TAG_PSYS_RESET |
|
||||
DEG_TAG_PSYS_TYPE |
|
||||
DEG_TAG_PSYS_CHILD |
|
||||
DEG_TAG_PSYS_PHYS),
|
||||
/* Update copy on write component without flushing down the road. */
|
||||
DEG_TAG_COPY_ON_WRITE = (1 << 8),
|
||||
/* Tag shading components for update.
|
||||
* Only parameters of material changed).
|
||||
*/
|
||||
DEG_TAG_SHADING_UPDATE = (1 << 9),
|
||||
DEG_TAG_SELECT_UPDATE = (1 << 10),
|
||||
DEG_TAG_BASE_FLAGS_UPDATE = (1 << 11),
|
||||
DEG_TAG_POINT_CACHE_UPDATE = (1 << 12),
|
||||
/* Only inform editors about the change. Don't modify datablock itself. */
|
||||
DEG_TAG_EDITORS_UPDATE = (1 << 13),
|
||||
} eDepsgraph_Tag;
|
||||
|
||||
const char *DEG_update_tag_as_string(eDepsgraph_Tag flag);
|
||||
const char *DEG_update_tag_as_string(IDRecalcFlag flag);
|
||||
|
||||
void DEG_id_tag_update(struct ID *id, int flag);
|
||||
void DEG_id_tag_update_ex(struct Main *bmain, struct ID *id, int flag);
|
||||
@@ -166,8 +136,7 @@ void DEG_graph_id_tag_update(struct Main *bmain,
|
||||
|
||||
/* Mark a particular datablock type as having changing. This does
|
||||
* not cause any updates but is used by external render engines to detect if for
|
||||
* example a datablock was removed.
|
||||
*/
|
||||
* example a datablock was removed. */
|
||||
void DEG_id_type_tag(struct Main *bmain, short id_type);
|
||||
|
||||
void DEG_ids_clear_recalc(struct Main *bmain, Depsgraph *depsgraph);
|
||||
|
||||
@@ -135,24 +135,24 @@ void deg_graph_build_finalize(Main *bmain, Depsgraph *graph)
|
||||
if ((id->recalc & ID_RECALC_ALL)) {
|
||||
AnimData *adt = BKE_animdata_from_id(id);
|
||||
if (adt != NULL && (adt->recalc & ADT_RECALC_ANIM) != 0) {
|
||||
flag |= DEG_TAG_TIME;
|
||||
flag |= ID_RECALC_ANIMATION;
|
||||
}
|
||||
}
|
||||
/* Tag rebuild if special evaluation flags changed. */
|
||||
if (id_node->eval_flags != id_node->previous_eval_flags) {
|
||||
flag |= DEG_TAG_TRANSFORM | DEG_TAG_GEOMETRY;
|
||||
flag |= ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY;
|
||||
}
|
||||
/* Tag rebuild if the custom data mask changed. */
|
||||
if (id_node->customdata_mask != id_node->previous_customdata_mask) {
|
||||
flag |= DEG_TAG_GEOMETRY;
|
||||
flag |= ID_RECALC_GEOMETRY;
|
||||
}
|
||||
if (!deg_copy_on_write_is_expanded(id_node->id_cow)) {
|
||||
flag |= DEG_TAG_COPY_ON_WRITE;
|
||||
flag |= ID_RECALC_COPY_ON_WRITE;
|
||||
/* This means ID is being added to the dependency graph first
|
||||
* time, which is similar to "ob-visible-change"
|
||||
*/
|
||||
if (GS(id->name) == ID_OB) {
|
||||
flag |= OB_RECALC_OB | OB_RECALC_DATA;
|
||||
flag |= ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY;
|
||||
}
|
||||
}
|
||||
if (flag != 0) {
|
||||
|
||||
@@ -143,7 +143,7 @@ void depsgraph_base_flags_tag_to_component_opcode(
|
||||
}
|
||||
|
||||
void depsgraph_tag_to_component_opcode(const ID *id,
|
||||
eDepsgraph_Tag tag,
|
||||
IDRecalcFlag tag,
|
||||
eDepsNode_Type *component_type,
|
||||
eDepsOperation_Code *operation_code)
|
||||
{
|
||||
@@ -157,20 +157,20 @@ void depsgraph_tag_to_component_opcode(const ID *id,
|
||||
return;
|
||||
}
|
||||
switch (tag) {
|
||||
case DEG_TAG_TRANSFORM:
|
||||
case ID_RECALC_TRANSFORM:
|
||||
*component_type = DEG_NODE_TYPE_TRANSFORM;
|
||||
break;
|
||||
case DEG_TAG_GEOMETRY:
|
||||
case ID_RECALC_GEOMETRY:
|
||||
depsgraph_geometry_tag_to_component(id, component_type);
|
||||
break;
|
||||
case DEG_TAG_TIME:
|
||||
case ID_RECALC_ANIMATION:
|
||||
*component_type = DEG_NODE_TYPE_ANIMATION;
|
||||
break;
|
||||
case DEG_TAG_PSYS_REDO:
|
||||
case DEG_TAG_PSYS_RESET:
|
||||
case DEG_TAG_PSYS_TYPE:
|
||||
case DEG_TAG_PSYS_CHILD:
|
||||
case DEG_TAG_PSYS_PHYS:
|
||||
case ID_RECALC_PSYS_REDO:
|
||||
case ID_RECALC_PSYS_RESET:
|
||||
case ID_RECALC_PSYS_YPE:
|
||||
case ID_RECALC_PSYS_CHILD:
|
||||
case ID_RECALC_PSYS_PHYS:
|
||||
if (id_type == ID_PA) {
|
||||
/* NOTES:
|
||||
* - For particle settings node we need to use different
|
||||
@@ -184,10 +184,10 @@ void depsgraph_tag_to_component_opcode(const ID *id,
|
||||
*component_type = DEG_NODE_TYPE_EVAL_PARTICLES;
|
||||
}
|
||||
break;
|
||||
case DEG_TAG_COPY_ON_WRITE:
|
||||
case ID_RECALC_COPY_ON_WRITE:
|
||||
*component_type = DEG_NODE_TYPE_COPY_ON_WRITE;
|
||||
break;
|
||||
case DEG_TAG_SHADING_UPDATE:
|
||||
case ID_RECALC_SHADING:
|
||||
if (id_type == ID_NT) {
|
||||
*component_type = DEG_NODE_TYPE_SHADING_PARAMETERS;
|
||||
}
|
||||
@@ -195,25 +195,26 @@ void depsgraph_tag_to_component_opcode(const ID *id,
|
||||
*component_type = DEG_NODE_TYPE_SHADING;
|
||||
}
|
||||
break;
|
||||
case DEG_TAG_SELECT_UPDATE:
|
||||
case ID_RECALC_SELECT:
|
||||
depsgraph_select_tag_to_component_opcode(id,
|
||||
component_type,
|
||||
operation_code);
|
||||
break;
|
||||
case DEG_TAG_BASE_FLAGS_UPDATE:
|
||||
case ID_RECALC_BASE_FLAGS:
|
||||
depsgraph_base_flags_tag_to_component_opcode(id,
|
||||
component_type,
|
||||
operation_code);
|
||||
break;
|
||||
case DEG_TAG_POINT_CACHE_UPDATE:
|
||||
case ID_RECALC_POINT_CACHE:
|
||||
*component_type = DEG_NODE_TYPE_POINT_CACHE;
|
||||
break;
|
||||
case DEG_TAG_EDITORS_UPDATE:
|
||||
case ID_RECALC_EDITORS:
|
||||
/* There is no such node in depsgraph, this tag is to be handled
|
||||
* separately.
|
||||
*/
|
||||
break;
|
||||
case DEG_TAG_PSYS_ALL:
|
||||
case ID_RECALC_ALL:
|
||||
case ID_RECALC_PSYS_ALL:
|
||||
BLI_assert(!"Should not happen");
|
||||
break;
|
||||
}
|
||||
@@ -273,16 +274,16 @@ void depsgraph_tag_component(Depsgraph *graph,
|
||||
|
||||
/* This is a tag compatibility with legacy code.
|
||||
*
|
||||
* Mainly, old code was tagging object with OB_RECALC_DATA tag to inform
|
||||
* Mainly, old code was tagging object with ID_RECALC_GEOMETRY tag to inform
|
||||
* that object's data datablock changed. Now API expects that ID is given
|
||||
* explicitly, but not all areas are aware of this yet.
|
||||
*/
|
||||
void deg_graph_id_tag_legacy_compat(Main *bmain,
|
||||
Depsgraph *depsgraph,
|
||||
ID *id,
|
||||
eDepsgraph_Tag tag)
|
||||
IDRecalcFlag tag)
|
||||
{
|
||||
if (tag == DEG_TAG_GEOMETRY || tag == 0) {
|
||||
if (tag == ID_RECALC_GEOMETRY || tag == 0) {
|
||||
switch (GS(id->name)) {
|
||||
case ID_OB:
|
||||
{
|
||||
@@ -334,9 +335,9 @@ static void deg_graph_id_tag_update_single_flag(Main *bmain,
|
||||
Depsgraph *graph,
|
||||
ID *id,
|
||||
IDDepsNode *id_node,
|
||||
eDepsgraph_Tag tag)
|
||||
IDRecalcFlag tag)
|
||||
{
|
||||
if (tag == DEG_TAG_EDITORS_UPDATE) {
|
||||
if (tag == ID_RECALC_EDITORS) {
|
||||
if (graph != NULL) {
|
||||
depsgraph_update_editors_tag(bmain, graph, id);
|
||||
}
|
||||
@@ -380,7 +381,7 @@ static void deg_graph_id_tag_update_single_flag(Main *bmain,
|
||||
|
||||
}
|
||||
|
||||
string stringify_append_bit(const string& str, eDepsgraph_Tag tag)
|
||||
string stringify_append_bit(const string& str, IDRecalcFlag tag)
|
||||
{
|
||||
string result = str;
|
||||
if (!result.empty()) {
|
||||
@@ -400,13 +401,13 @@ string stringify_update_bitfield(int flag)
|
||||
/* Special cases to avoid ALL flags form being split into
|
||||
* individual bits.
|
||||
*/
|
||||
if ((current_flag & DEG_TAG_PSYS_ALL) == DEG_TAG_PSYS_ALL) {
|
||||
result = stringify_append_bit(result, DEG_TAG_PSYS_ALL);
|
||||
if ((current_flag & ID_RECALC_PSYS_ALL) == ID_RECALC_PSYS_ALL) {
|
||||
result = stringify_append_bit(result, ID_RECALC_PSYS_ALL);
|
||||
}
|
||||
/* Handle all the rest of the flags. */
|
||||
while (current_flag != 0) {
|
||||
eDepsgraph_Tag tag =
|
||||
(eDepsgraph_Tag)(1 << bitscan_forward_clear_i(¤t_flag));
|
||||
IDRecalcFlag tag =
|
||||
(IDRecalcFlag)(1 << bitscan_forward_clear_i(¤t_flag));
|
||||
result = stringify_append_bit(result, tag);
|
||||
}
|
||||
return result;
|
||||
@@ -425,7 +426,7 @@ void deg_graph_node_tag_zero(Main *bmain, Depsgraph *graph, IDDepsNode *id_node)
|
||||
}
|
||||
ID *id = id_node->id_orig;
|
||||
/* TODO(sergey): Which recalc flags to set here? */
|
||||
id->recalc |= ID_RECALC_ALL & ~(DEG_TAG_PSYS_ALL | ID_RECALC_ANIMATION);
|
||||
id->recalc |= ID_RECALC_ALL & ~(ID_RECALC_PSYS_ALL | ID_RECALC_ANIMATION);
|
||||
GHASH_FOREACH_BEGIN(ComponentDepsNode *, comp_node, id_node->components)
|
||||
{
|
||||
if (comp_node->type == DEG_NODE_TYPE_ANIMATION) {
|
||||
@@ -434,7 +435,7 @@ void deg_graph_node_tag_zero(Main *bmain, Depsgraph *graph, IDDepsNode *id_node)
|
||||
comp_node->tag_update(graph, DEG_UPDATE_SOURCE_USER_EDIT);
|
||||
}
|
||||
GHASH_FOREACH_END();
|
||||
deg_graph_id_tag_legacy_compat(bmain, graph, id, (eDepsgraph_Tag)0);
|
||||
deg_graph_id_tag_legacy_compat(bmain, graph, id, (IDRecalcFlag)0);
|
||||
}
|
||||
|
||||
void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag)
|
||||
@@ -454,11 +455,11 @@ void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag)
|
||||
if (flag == 0) {
|
||||
deg_graph_node_tag_zero(bmain, graph, id_node);
|
||||
}
|
||||
id->recalc |= (flag & PSYS_RECALC);
|
||||
id->recalc |= flag;
|
||||
int current_flag = flag;
|
||||
while (current_flag != 0) {
|
||||
eDepsgraph_Tag tag =
|
||||
(eDepsgraph_Tag)(1 << bitscan_forward_clear_i(¤t_flag));
|
||||
IDRecalcFlag tag =
|
||||
(IDRecalcFlag)(1 << bitscan_forward_clear_i(¤t_flag));
|
||||
deg_graph_id_tag_update_single_flag(bmain,
|
||||
graph,
|
||||
id,
|
||||
@@ -471,7 +472,7 @@ void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag)
|
||||
* physics did change and that cache is to be invalidated.
|
||||
*/
|
||||
deg_graph_id_tag_update_single_flag(
|
||||
bmain, graph, id, id_node, DEG_TAG_POINT_CACHE_UPDATE);
|
||||
bmain, graph, id, id_node, ID_RECALC_POINT_CACHE);
|
||||
}
|
||||
|
||||
void deg_id_tag_update(Main *bmain, ID *id, int flag)
|
||||
@@ -509,7 +510,7 @@ void deg_graph_on_visible_update(Main *bmain, Depsgraph *graph)
|
||||
}
|
||||
int flag = 0;
|
||||
if (!DEG::deg_copy_on_write_is_expanded(id_node->id_cow)) {
|
||||
flag |= DEG_TAG_COPY_ON_WRITE;
|
||||
flag |= ID_RECALC_COPY_ON_WRITE;
|
||||
}
|
||||
/* We only tag components which needs an update. Tagging everything is
|
||||
* not a good idea because that might reset particles cache (or any
|
||||
@@ -519,7 +520,7 @@ void deg_graph_on_visible_update(Main *bmain, Depsgraph *graph)
|
||||
*/
|
||||
const ID_Type id_type = GS(id_node->id_orig->name);
|
||||
if (id_type == ID_OB) {
|
||||
flag |= OB_RECALC_OB | OB_RECALC_DATA;
|
||||
flag |= ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY;
|
||||
}
|
||||
deg_graph_id_tag_update(bmain, graph, id_node->id_orig, flag);
|
||||
if (id_type == ID_SCE) {
|
||||
@@ -583,24 +584,25 @@ eDepsNode_Type deg_geometry_tag_to_component(const ID *id)
|
||||
|
||||
} // namespace DEG
|
||||
|
||||
const char *DEG_update_tag_as_string(eDepsgraph_Tag flag)
|
||||
const char *DEG_update_tag_as_string(IDRecalcFlag flag)
|
||||
{
|
||||
switch (flag) {
|
||||
case DEG_TAG_TRANSFORM: return "TRANSFORM";
|
||||
case DEG_TAG_GEOMETRY: return "GEOMETRY";
|
||||
case DEG_TAG_TIME: return "TIME";
|
||||
case DEG_TAG_PSYS_REDO: return "PSYS_REDO";
|
||||
case DEG_TAG_PSYS_RESET: return "PSYS_RESET";
|
||||
case DEG_TAG_PSYS_TYPE: return "PSYS_TYPE";
|
||||
case DEG_TAG_PSYS_CHILD: return "PSYS_CHILD";
|
||||
case DEG_TAG_PSYS_PHYS: return "PSYS_PHYS";
|
||||
case DEG_TAG_PSYS_ALL: return "PSYS_ALL";
|
||||
case DEG_TAG_COPY_ON_WRITE: return "COPY_ON_WRITE";
|
||||
case DEG_TAG_SHADING_UPDATE: return "SHADING_UPDATE";
|
||||
case DEG_TAG_SELECT_UPDATE: return "SELECT_UPDATE";
|
||||
case DEG_TAG_BASE_FLAGS_UPDATE: return "BASE_FLAGS_UPDATE";
|
||||
case DEG_TAG_POINT_CACHE_UPDATE: return "POINT_CACHE_UPDATE";
|
||||
case DEG_TAG_EDITORS_UPDATE: return "EDITORS_UPDATE";
|
||||
case ID_RECALC_TRANSFORM: return "TRANSFORM";
|
||||
case ID_RECALC_GEOMETRY: return "GEOMETRY";
|
||||
case ID_RECALC_ANIMATION: return "ANIMATION";
|
||||
case ID_RECALC_PSYS_REDO: return "PSYS_REDO";
|
||||
case ID_RECALC_PSYS_RESET: return "PSYS_RESET";
|
||||
case ID_RECALC_PSYS_YPE: return "PSYS_TYPE";
|
||||
case ID_RECALC_PSYS_CHILD: return "PSYS_CHILD";
|
||||
case ID_RECALC_PSYS_PHYS: return "PSYS_PHYS";
|
||||
case ID_RECALC_PSYS_ALL: return "PSYS_ALL";
|
||||
case ID_RECALC_COPY_ON_WRITE: return "COPY_ON_WRITE";
|
||||
case ID_RECALC_SHADING: return "SHADING";
|
||||
case ID_RECALC_SELECT: return "SELECT";
|
||||
case ID_RECALC_BASE_FLAGS: return "BASE_FLAGS";
|
||||
case ID_RECALC_POINT_CACHE: return "POINT_CACHE";
|
||||
case ID_RECALC_EDITORS: return "EDITORS";
|
||||
case ID_RECALC_ALL: return "ALL";
|
||||
}
|
||||
BLI_assert(!"Unhandled update flag, should never happen!");
|
||||
return "UNKNOWN";
|
||||
|
||||
@@ -930,7 +930,7 @@ ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph,
|
||||
* everything is done by node tree update function which
|
||||
* only copies socket values.
|
||||
*/
|
||||
const int ignore_flag = (ID_RECALC_DRAW |
|
||||
const int ignore_flag = (ID_RECALC_SHADING |
|
||||
ID_RECALC_ANIMATION |
|
||||
ID_RECALC_COPY_ON_WRITE);
|
||||
if ((id_cow->recalc & ~ignore_flag) == 0) {
|
||||
|
||||
@@ -345,10 +345,10 @@ void invalidate_tagged_evaluated_data(Depsgraph *graph)
|
||||
continue;
|
||||
}
|
||||
switch (comp_node->type) {
|
||||
case DEG_TAG_TRANSFORM:
|
||||
case ID_RECALC_TRANSFORM:
|
||||
invalidate_tagged_evaluated_transform(id_cow);
|
||||
break;
|
||||
case DEG_TAG_GEOMETRY:
|
||||
case ID_RECALC_GEOMETRY:
|
||||
invalidate_tagged_evaluated_geometry(id_cow);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -384,22 +384,23 @@ void BoneComponentDepsNode::init(const ID *id, const char *subdata)
|
||||
/* Register all components. =============================== */
|
||||
|
||||
DEG_COMPONENT_NODE_DEFINE(Animation, ANIMATION, ID_RECALC_ANIMATION);
|
||||
DEG_COMPONENT_NODE_DEFINE(BatchCache, BATCH_CACHE, ID_RECALC_DRAW_CACHE);
|
||||
/* TODO(sergey): Is this a correct tag? */
|
||||
DEG_COMPONENT_NODE_DEFINE(BatchCache, BATCH_CACHE, ID_RECALC_SHADING);
|
||||
DEG_COMPONENT_NODE_DEFINE(Bone, BONE, ID_RECALC_GEOMETRY);
|
||||
DEG_COMPONENT_NODE_DEFINE(Cache, CACHE, ID_RECALC);
|
||||
DEG_COMPONENT_NODE_DEFINE(Cache, CACHE, 0);
|
||||
DEG_COMPONENT_NODE_DEFINE(CopyOnWrite, COPY_ON_WRITE, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_COMPONENT_NODE_DEFINE(Geometry, GEOMETRY, ID_RECALC_GEOMETRY);
|
||||
DEG_COMPONENT_NODE_DEFINE(LayerCollections, LAYER_COLLECTIONS, 0);
|
||||
DEG_COMPONENT_NODE_DEFINE(Parameters, PARAMETERS, ID_RECALC);
|
||||
DEG_COMPONENT_NODE_DEFINE(Parameters, PARAMETERS, 0);
|
||||
DEG_COMPONENT_NODE_DEFINE(Particles, EVAL_PARTICLES, ID_RECALC_GEOMETRY);
|
||||
DEG_COMPONENT_NODE_DEFINE(PointCache, POINT_CACHE, 0);
|
||||
DEG_COMPONENT_NODE_DEFINE(Pose, EVAL_POSE, ID_RECALC_GEOMETRY);
|
||||
DEG_COMPONENT_NODE_DEFINE(Proxy, PROXY, ID_RECALC_GEOMETRY);
|
||||
DEG_COMPONENT_NODE_DEFINE(Sequencer, SEQUENCER, ID_RECALC);
|
||||
DEG_COMPONENT_NODE_DEFINE(Shading, SHADING, ID_RECALC_DRAW);
|
||||
DEG_COMPONENT_NODE_DEFINE(ShadingParameters, SHADING_PARAMETERS, ID_RECALC_DRAW);
|
||||
DEG_COMPONENT_NODE_DEFINE(Sequencer, SEQUENCER, 0);
|
||||
DEG_COMPONENT_NODE_DEFINE(Shading, SHADING, ID_RECALC_SHADING);
|
||||
DEG_COMPONENT_NODE_DEFINE(ShadingParameters, SHADING_PARAMETERS, ID_RECALC_SHADING);
|
||||
DEG_COMPONENT_NODE_DEFINE(Transform, TRANSFORM, ID_RECALC_TRANSFORM);
|
||||
DEG_COMPONENT_NODE_DEFINE(ObjectFromLayer, OBJECT_FROM_LAYER, ID_RECALC);
|
||||
DEG_COMPONENT_NODE_DEFINE(ObjectFromLayer, OBJECT_FROM_LAYER, 0);
|
||||
DEG_COMPONENT_NODE_DEFINE(Dupli, DUPLI, 0);
|
||||
DEG_COMPONENT_NODE_DEFINE(Synchronize, SYNCHRONIZE, 0);
|
||||
DEG_COMPONENT_NODE_DEFINE(GenericDatablock, GENERIC_DATABLOCK, 0);
|
||||
|
||||
@@ -1050,7 +1050,7 @@ void EEVEE_lightbake_update(void *custom_data)
|
||||
|
||||
EEVEE_lightcache_info_update(&lbake->scene->eevee);
|
||||
|
||||
DEG_id_tag_update(&scene_orig->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&scene_orig->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
static bool lightbake_do_sample(EEVEE_LightBake *lbake, void (*render_callback)(void *ved, void *user_data))
|
||||
|
||||
@@ -4055,7 +4055,7 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
|
||||
/* draw cache updates for settings that affect the visible strokes */
|
||||
if (setting == ACHANNEL_SETTING_VISIBLE) {
|
||||
bGPdata *gpd = (bGPdata *)ale_setting->id;
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
}
|
||||
|
||||
/* UI updates */
|
||||
@@ -4064,11 +4064,11 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
|
||||
|
||||
/* tag copy-on-write flushing (so that the settings will have an effect) */
|
||||
if (ale_setting->id) {
|
||||
DEG_id_tag_update(ale_setting->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(ale_setting->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
if (ale_setting->adt && ale_setting->adt->action) {
|
||||
/* action is it's own datablock, so has to be tagged specifically... */
|
||||
DEG_id_tag_update(&ale_setting->adt->action->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ale_setting->adt->action->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
/* verify animation context */
|
||||
|
||||
@@ -78,15 +78,15 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale)
|
||||
adt = BKE_animdata_from_id(id);
|
||||
if (adt) {
|
||||
adt->recalc |= ADT_RECALC_ANIM;
|
||||
DEG_id_tag_update(id, OB_RECALC_TIME);
|
||||
DEG_id_tag_update(id, ID_RECALC_ANIMATION);
|
||||
if (adt->action != NULL) {
|
||||
DEG_id_tag_update(&adt->action->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
}
|
||||
|
||||
/* Tag copy on the main object if updating anything directly inside AnimData */
|
||||
if (ELEM(ale->type, ANIMTYPE_ANIMDATA, ANIMTYPE_NLAACTION, ANIMTYPE_NLATRACK, ANIMTYPE_NLACURVE)) {
|
||||
DEG_id_tag_update(id, DEG_TAG_TIME | DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale)
|
||||
else {
|
||||
/* in other case we do standard depsgraph update, ideally
|
||||
* we'd be calling property update functions here too ... */
|
||||
DEG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX or do we want something more restrictive?
|
||||
DEG_id_tag_update(id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); // XXX or do we want something more restrictive?
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ void ANIM_id_update(Main *bmain, ID *id)
|
||||
adt->recalc |= ADT_RECALC_ANIM;
|
||||
|
||||
/* set recalc flags */
|
||||
DEG_id_tag_update_ex(bmain, id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX or do we want something more restrictive?
|
||||
DEG_id_tag_update_ex(bmain, id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); // XXX or do we want something more restrictive?
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1201,7 +1201,7 @@ static int ed_marker_select(bContext *C, const wmEvent *event, bool extend, bool
|
||||
}
|
||||
}
|
||||
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -944,7 +944,7 @@ static int add_driver_button_invoke(bContext *C, wmOperator *op, const wmEvent *
|
||||
if (success) {
|
||||
/* send updates */
|
||||
UI_context_update_anim_flag(C);
|
||||
DEG_id_tag_update(ptr.id.data, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(ptr.id.data, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_relations_tag_update(CTX_data_main(C));
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL);
|
||||
}
|
||||
@@ -1126,7 +1126,7 @@ static int paste_driver_button_exec(bContext *C, wmOperator *op)
|
||||
UI_context_update_anim_flag(C);
|
||||
|
||||
DEG_relations_tag_update(CTX_data_main(C));
|
||||
DEG_id_tag_update(ptr.id.data, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(ptr.id.data, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL); // XXX
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ bAction *verify_adt_action(Main *bmain, ID *id, short add)
|
||||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(&adt->action->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* return the action */
|
||||
return adt->action;
|
||||
@@ -1178,10 +1178,10 @@ short insert_keyframe(
|
||||
|
||||
if (ret) {
|
||||
if (act != NULL) {
|
||||
DEG_id_tag_update(&act->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&act->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
if (adt != NULL && adt->action != NULL && adt->action != act) {
|
||||
DEG_id_tag_update(&adt->action->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1306,7 +1306,7 @@ short delete_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *act,
|
||||
* about relations update, since it needs to get rid of animation operation
|
||||
* for this datablock. */
|
||||
if (ret && adt->action == NULL) {
|
||||
DEG_id_tag_update_ex(bmain, id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update_ex(bmain, id, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
/* return success/failure */
|
||||
@@ -1402,7 +1402,7 @@ static short clear_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *a
|
||||
* about relations update, since it needs to get rid of animation operation
|
||||
* for this datablock. */
|
||||
if (ret && adt->action == NULL) {
|
||||
DEG_id_tag_update_ex(bmain, id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update_ex(bmain, id, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
/* return success/failure */
|
||||
@@ -1731,7 +1731,7 @@ static int clear_anim_v3d_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
/* delete F-Curve completely */
|
||||
if (can_delete) {
|
||||
ANIM_fcurve_delete_from_animdata(NULL, adt, fcu);
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_OB);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
@@ -1838,7 +1838,7 @@ static int delete_key_v3d_exec(bContext *C, wmOperator *op)
|
||||
else
|
||||
BKE_reportf(op->reports, RPT_ERROR, "No keyframes removed from Object '%s'", id->name + 2);
|
||||
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_OB);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
|
||||
}
|
||||
CTX_DATA_END;
|
||||
|
||||
|
||||
@@ -1051,11 +1051,11 @@ int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSe
|
||||
Object *ob = (Object *)ksp->id;
|
||||
|
||||
// XXX: only object transforms?
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
DEG_id_tag_update(ksp->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(ksp->id, ID_RECALC_COPY_ON_WRITE);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ void ED_armature_bone_rename(Main *bmain, bArmature *arm, const char *oldnamep,
|
||||
}
|
||||
|
||||
/* force copy on write to update database */
|
||||
DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* do entire dbase - objects */
|
||||
for (ob = bmain->object.first; ob; ob = ob->id.next) {
|
||||
@@ -313,7 +313,7 @@ void ED_armature_bone_rename(Main *bmain, bArmature *arm, const char *oldnamep,
|
||||
}
|
||||
}
|
||||
}
|
||||
DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
/* Fix all animdata that may refer to this bone - we can't just do the ones attached to objects, since
|
||||
@@ -447,7 +447,7 @@ static int armature_flip_names_exec(bContext *C, wmOperator *op)
|
||||
BLI_freelistN(&bones_names);
|
||||
|
||||
/* since we renamed stuff... */
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copied from #rna_Bone_update_renamed */
|
||||
/* redraw view */
|
||||
@@ -532,7 +532,7 @@ static int armature_autoside_names_exec(bContext *C, wmOperator *op)
|
||||
changed_multi = true;
|
||||
|
||||
/* Since we renamed stuff... */
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* Note, notifier might evolve. */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
|
||||
@@ -403,7 +403,7 @@ int join_armature_exec(bContext *C, wmOperator *op)
|
||||
ED_armature_from_edit(bmain, arm);
|
||||
ED_armature_edit_free(arm);
|
||||
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -638,8 +638,8 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
|
||||
/* 4) fix links before depsgraph flushes */ // err... or after?
|
||||
separated_armature_fix_links(bmain, oldob, newob);
|
||||
|
||||
DEG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
|
||||
DEG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
|
||||
DEG_id_tag_update(&oldob->id, ID_RECALC_GEOMETRY); /* this is the original one */
|
||||
DEG_id_tag_update(&newob->id, ID_RECALC_GEOMETRY); /* this is the separated one */
|
||||
|
||||
|
||||
/* 5) restore original conditions */
|
||||
|
||||
@@ -192,7 +192,7 @@ static void armature_undosys_step_decode(struct bContext *C, UndoStep *us_p, int
|
||||
continue;
|
||||
}
|
||||
undoarm_to_editarm(&elem->data, arm);
|
||||
DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
|
||||
/* The first element is always active */
|
||||
|
||||
@@ -110,7 +110,7 @@ bool ED_object_posemode_enter_ex(struct Main *bmain, Object *ob)
|
||||
ob->restore_mode = ob->mode;
|
||||
ob->mode |= OB_MODE_POSE;
|
||||
/* Inform all CoW versions that we changed the mode. */
|
||||
DEG_id_tag_update_ex(bmain, &ob->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update_ex(bmain, &ob->id, ID_RECALC_COPY_ON_WRITE);
|
||||
ok = true;
|
||||
|
||||
break;
|
||||
@@ -143,7 +143,7 @@ bool ED_object_posemode_exit_ex(struct Main *bmain, Object *ob)
|
||||
ob->mode &= ~OB_MODE_POSE;
|
||||
|
||||
/* Inform all CoW versions that we changed the mode. */
|
||||
DEG_id_tag_update_ex(bmain, &ob->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update_ex(bmain, &ob->id, ID_RECALC_COPY_ON_WRITE);
|
||||
ok = true;
|
||||
}
|
||||
return ok;
|
||||
@@ -257,7 +257,7 @@ void ED_pose_recalculate_paths(bContext *C, Scene *scene, Object *ob, bool curre
|
||||
if (!current_frame_only) {
|
||||
/* Tag armature object for copy on write - so paths will draw/redraw.
|
||||
* For currently frame only we update evaluated object directly. */
|
||||
DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
/* Free temporary depsgraph instance */
|
||||
@@ -442,7 +442,7 @@ static void ED_pose_clear_paths(Object *ob, bool only_selected)
|
||||
ob->pose->avs.path_bakeflag &= ~MOTIONPATH_BAKE_HAS_PATHS;
|
||||
|
||||
/* tag armature object for copy on write - so removed paths don't still show */
|
||||
DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
/* operator callback - wrapper for the backend function */
|
||||
@@ -510,7 +510,7 @@ static int pose_update_paths_range_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
ob->pose->avs.path_ef = PEFRA;
|
||||
|
||||
/* tag for updates */
|
||||
DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -728,7 +728,7 @@ static void pose_copy_menu(Scene *scene)
|
||||
BKE_pose_tag_recalc(bmain, ob->pose);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA); // and all its relations
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); // and all its relations
|
||||
|
||||
BIF_undo_push("Copy Pose Attributes");
|
||||
|
||||
@@ -760,7 +760,7 @@ static int pose_flip_names_exec(bContext *C, wmOperator *op)
|
||||
BLI_freelistN(&bones_names);
|
||||
|
||||
/* since we renamed stuff... */
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* note, notifier might evolve */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
@@ -809,7 +809,7 @@ static int pose_autoside_names_exec(bContext *C, wmOperator *op)
|
||||
|
||||
if (ob_prev != ob) {
|
||||
/* since we renamed stuff... */
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* note, notifier might evolve */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
@@ -861,7 +861,7 @@ static int pose_bone_rotmode_exec(bContext *C, wmOperator *op)
|
||||
|
||||
if (prev_ob != ob) {
|
||||
/* Notifiers and updates. */
|
||||
DEG_id_tag_update((ID *)ob, OB_RECALC_DATA);
|
||||
DEG_id_tag_update((ID *)ob, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
|
||||
prev_ob = ob;
|
||||
@@ -946,7 +946,7 @@ static int pose_armature_layers_showall_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* note, notifier might evolve */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* done */
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1014,7 +1014,7 @@ static int armature_layers_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* note, notifier might evolve */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -1085,7 +1085,7 @@ static int pose_bone_layers_exec(bContext *C, wmOperator *op)
|
||||
if (prev_ob != ob) {
|
||||
/* Note, notifier might evolve. */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
DEG_id_tag_update((ID *)ob->data, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update((ID *)ob->data, ID_RECALC_COPY_ON_WRITE);
|
||||
prev_ob = ob;
|
||||
}
|
||||
}
|
||||
@@ -1229,7 +1229,7 @@ static int pose_hide_exec(bContext *C, wmOperator *op)
|
||||
if (changed) {
|
||||
changed_multi = true;
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob_iter);
|
||||
DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -1292,7 +1292,7 @@ static int pose_reveal_exec(bContext *C, wmOperator *op)
|
||||
if (changed) {
|
||||
changed_multi = true;
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob_iter);
|
||||
DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -1346,7 +1346,7 @@ static int pose_flip_quats_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
if (changed) {
|
||||
changed_multi = true;
|
||||
/* notifiers and updates */
|
||||
DEG_id_tag_update(&ob_iter->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob_iter->id, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob_iter);
|
||||
}
|
||||
} FOREACH_OBJECT_IN_MODE_END;
|
||||
|
||||
@@ -107,7 +107,7 @@ static int pose_group_remove_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
/* notifiers for updates */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* notifiers for updates */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* report done status */
|
||||
if (done)
|
||||
@@ -267,7 +267,7 @@ static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
/* notifiers for updates */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* report done status */
|
||||
if (done)
|
||||
@@ -419,7 +419,7 @@ static int group_sort_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
/* notifiers for updates */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
@@ -503,7 +503,7 @@ static int poselib_add_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* store new 'active' pose number */
|
||||
act->active_marker = BLI_listbase_count(&act->markers);
|
||||
DEG_id_tag_update(&act->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&act->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* done */
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -618,7 +618,7 @@ static int poselib_remove_exec(bContext *C, wmOperator *op)
|
||||
* may be being shown in anim editors as active action
|
||||
*/
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
|
||||
DEG_id_tag_update(&act->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&act->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* done */
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1106,7 +1106,7 @@ static void poselib_preview_apply(bContext *C, wmOperator *op)
|
||||
*/
|
||||
// FIXME: shouldn't this use the builtin stuff?
|
||||
if ((pld->arm->flag & ARM_DELAYDEFORM) == 0)
|
||||
DEG_id_tag_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */
|
||||
DEG_id_tag_update(&pld->ob->id, ID_RECALC_GEOMETRY); /* sets recalc flags */
|
||||
else
|
||||
BKE_pose_where_is(CTX_data_depsgraph(C), pld->scene, pld->ob);
|
||||
}
|
||||
@@ -1613,7 +1613,7 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op)
|
||||
* - note: code copied from transform_generics.c -> recalcData()
|
||||
*/
|
||||
if ((arm->flag & ARM_DELAYDEFORM) == 0)
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); /* sets recalc flags */
|
||||
else
|
||||
BKE_pose_where_is(CTX_data_depsgraph(C), scene, ob);
|
||||
}
|
||||
@@ -1626,7 +1626,7 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op)
|
||||
action_set_activemarker(act, marker, NULL);
|
||||
|
||||
/* Update event for pose and deformation children */
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* updates */
|
||||
if (IS_AUTOKEY_MODE(scene, NORMAL)) {
|
||||
|
||||
@@ -104,11 +104,11 @@ void ED_pose_bone_select_tag_update(Object *ob)
|
||||
|
||||
if (arm->flag & ARM_HAS_VIZ_DEPS) {
|
||||
/* mask modifier ('armature' mode), etc. */
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
|
||||
/* copy on write tag is needed (for the armature), or else no refresh happens */
|
||||
DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ bool ED_armature_pose_select_pick_with_buffer(
|
||||
if (ob_act->mode & OB_MODE_WEIGHT_PAINT) {
|
||||
if (nearBone == arm->act_bone) {
|
||||
ED_vgroup_select_by_name(ob_act, nearBone->name);
|
||||
DEG_id_tag_update(&ob_act->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob_act->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
}
|
||||
/* if there are some dependencies for visualizing armature state
|
||||
@@ -227,11 +227,11 @@ bool ED_armature_pose_select_pick_with_buffer(
|
||||
/* NOTE: ob not ob_act here is intentional - it's the source of the
|
||||
* bones being selected [T37247]
|
||||
*/
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
|
||||
/* tag armature for copy-on-write update (since act_bone is in armature not object) */
|
||||
DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,10 +424,10 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op)
|
||||
if (ob_prev != ob) {
|
||||
/* weightpaint or mask modifiers need depsgraph updates */
|
||||
if (multipaint || (arm->flag & ARM_HAS_VIZ_DEPS)) {
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
/* need to tag armature for cow updates, or else selection doesn't update */
|
||||
DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
|
||||
ob_prev = ob;
|
||||
}
|
||||
}
|
||||
@@ -1066,14 +1066,14 @@ static int pose_select_mirror_exec(bContext *C, wmOperator *op)
|
||||
/* In weightpaint we select the associated vertex group too. */
|
||||
if (is_weight_paint) {
|
||||
ED_vgroup_select_by_name(ob, pchan_mirror_act->name);
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
}
|
||||
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
|
||||
|
||||
/* Need to tag armature for cow updates, or else selection doesn't update. */
|
||||
DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* note, notifier might evolve */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -261,7 +261,7 @@ static int pose_visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
}
|
||||
FOREACH_PCHAN_SELECTED_IN_OBJECT_END;
|
||||
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* note, notifier might evolve */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
@@ -581,7 +581,7 @@ static int pose_paste_exec(bContext *C, wmOperator *op)
|
||||
BKE_main_free(tmp_bmain);
|
||||
|
||||
/* Update event for pose and deformation children. */
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* Recalculate paths if any of the bones have paths... */
|
||||
if ((ob->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS)) {
|
||||
@@ -835,7 +835,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op,
|
||||
BLI_freelistN(&dsources);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(&ob_iter->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob_iter->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* note, notifier might evolve */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob_iter);
|
||||
@@ -988,7 +988,7 @@ static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* notifiers and updates */
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, ob);
|
||||
}
|
||||
FOREACH_OBJECT_IN_MODE_END;
|
||||
|
||||
@@ -240,11 +240,11 @@ void poseAnim_mapping_refresh(bContext *C, Scene *scene, Object *ob)
|
||||
*/
|
||||
/* FIXME: shouldn't this use the builtin stuff? */
|
||||
if ((arm->flag & ARM_DELAYDEFORM) == 0)
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); /* sets recalc flags */
|
||||
else
|
||||
BKE_pose_where_is(depsgraph, scene, ob);
|
||||
|
||||
DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE); /* otherwise animation doesn't get updated */
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE); /* otherwise animation doesn't get updated */
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
|
||||
}
|
||||
|
||||
|
||||
@@ -1356,8 +1356,8 @@ static int separate_exec(bContext *C, wmOperator *op)
|
||||
ED_curve_editnurb_free(newob);
|
||||
curve_delete_segments(oldob, v3d, true);
|
||||
|
||||
DEG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* This is the original one. */
|
||||
DEG_id_tag_update(&newob->id, OB_RECALC_DATA); /* This is the separated one. */
|
||||
DEG_id_tag_update(&oldob->id, ID_RECALC_GEOMETRY); /* This is the original one. */
|
||||
DEG_id_tag_update(&newob->id, ID_RECALC_GEOMETRY); /* This is the separated one. */
|
||||
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_DATA, oldob->data);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, newob);
|
||||
@@ -3006,7 +3006,7 @@ static int hide_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
}
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_COPY_ON_WRITE | DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
BKE_curve_nurb_vert_active_validate(obedit->data);
|
||||
}
|
||||
@@ -3080,7 +3080,7 @@ static int reveal_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_COPY_ON_WRITE | DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
changed_multi = true;
|
||||
}
|
||||
@@ -4579,7 +4579,7 @@ bool ED_curve_editnurb_select_pick(bContext *C, const int mval[2], bool extend,
|
||||
|
||||
ED_curve_deselect_all(((Curve *)ob_iter->data)->editnurb);
|
||||
|
||||
DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(ob_iter->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob_iter->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -4678,7 +4678,7 @@ bool ED_curve_editnurb_select_pick(bContext *C, const int mval[2], bool extend,
|
||||
ED_object_base_activate(C, basact);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
|
||||
return true;
|
||||
@@ -5640,7 +5640,7 @@ static int duplicate_exec(bContext *C, wmOperator *op)
|
||||
|
||||
ok = 1;
|
||||
BLI_movelisttolist(object_editcurve_get(obedit), &newnurb);
|
||||
DEG_id_tag_update(&cu->id, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(&cu->id, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, &cu->id);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -6534,8 +6534,8 @@ int join_curve_exec(bContext *C, wmOperator *op)
|
||||
|
||||
DEG_relations_tag_update(bmain); // because we removed object(s), call before editmode!
|
||||
|
||||
DEG_id_tag_update(&ob_active->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(&ob_active->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
|
||||
|
||||
|
||||
@@ -502,7 +502,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
|
||||
cu->flag |= CU_PATH | CU_3D;
|
||||
}
|
||||
else {
|
||||
DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
}
|
||||
else { /* adding surface */
|
||||
@@ -512,7 +512,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
|
||||
newob = true;
|
||||
}
|
||||
else {
|
||||
DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -434,7 +434,7 @@ static int de_select_first_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
|
||||
Object *obedit = objects[ob_index];
|
||||
selectend_nurb(obedit, FIRST, true, DESELECT);
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
BKE_curve_nurb_vert_active_validate(obedit->data);
|
||||
}
|
||||
@@ -466,7 +466,7 @@ static int de_select_last_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
|
||||
Object *obedit = objects[ob_index];
|
||||
selectend_nurb(obedit, LAST, true, DESELECT);
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
BKE_curve_nurb_vert_active_validate(obedit->data);
|
||||
}
|
||||
@@ -528,7 +528,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op)
|
||||
break;
|
||||
}
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
BKE_curve_nurb_vert_active_validate(cu);
|
||||
}
|
||||
@@ -582,7 +582,7 @@ static int select_linked_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
}
|
||||
@@ -654,7 +654,7 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent
|
||||
|
||||
Object *obedit = basact->object;
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
|
||||
if (!select) {
|
||||
@@ -718,7 +718,7 @@ static int select_row_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
}
|
||||
}
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -751,7 +751,7 @@ static int select_next_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
Object *obedit = objects[ob_index];
|
||||
ListBase *editnurb = object_editcurve_get(obedit);
|
||||
select_adjacent_cp(editnurb, 1, 0, SELECT);
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -785,7 +785,7 @@ static int select_previous_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
Object *obedit = objects[ob_index];
|
||||
ListBase *editnurb = object_editcurve_get(obedit);
|
||||
select_adjacent_cp(editnurb, -1, 0, SELECT);
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -883,7 +883,7 @@ static int curve_select_more_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
|
||||
Object *obedit = objects[ob_index];
|
||||
curve_select_more(obedit);
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -1080,7 +1080,7 @@ static int curve_select_less_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
|
||||
Object *obedit = objects[ob_index];
|
||||
curve_select_less(obedit);
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -1167,7 +1167,7 @@ static int curve_select_random_exec(bContext *C, wmOperator *op)
|
||||
curve_select_random(editnurb, randfac, seed_iter, select);
|
||||
BKE_curve_nurb_vert_active_validate(obedit->data);
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
|
||||
@@ -1282,7 +1282,7 @@ static int select_nth_exec(bContext *C, wmOperator *op)
|
||||
|
||||
if (ed_curve_select_nth(obedit->data, &op_params) == true) {
|
||||
changed = true;
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
}
|
||||
@@ -1637,7 +1637,7 @@ static int curve_select_similar_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
}
|
||||
@@ -1890,7 +1890,7 @@ static int edcu_shortest_path_pick_invoke(bContext *C, wmOperator *op, const wmE
|
||||
ED_object_base_activate(C, basact);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ static void curve_undosys_step_decode(struct bContext *C, UndoStep *us_p, int UN
|
||||
continue;
|
||||
}
|
||||
undocurve_to_editcurve(&elem->data, obedit->data, &obedit->shapenr);
|
||||
DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
|
||||
/* The first element is always active */
|
||||
|
||||
@@ -276,7 +276,7 @@ static void text_update_edited(bContext *C, Object *obedit, int mode)
|
||||
}
|
||||
}
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
|
||||
}
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ static void font_undosys_step_decode(struct bContext *C, UndoStep *us_p, int UNU
|
||||
Object *obedit = us->obedit_ref.ptr;
|
||||
Curve *cu = obedit->data;
|
||||
undofont_to_editfont(&us->data, cu);
|
||||
DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_DATA, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -1883,12 +1883,12 @@ static int gpencil_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event
|
||||
ob->mode = OB_MODE_OBJECT;
|
||||
bGPdata *gpd = (bGPdata *)ob->data;
|
||||
ED_gpencil_setup_modes(C, gpd, 0);
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
BKE_view_layer_base_deselect_all(view_layer);
|
||||
view_layer->basact = NULL;
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1561,7 +1561,7 @@ void ED_gpencil_create_monkey(bContext *C, float mat[4][4])
|
||||
BKE_gpencil_stroke_add_points(gps, data35, 261, mat);
|
||||
|
||||
/* update depsgraph */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
|
||||
}
|
||||
|
||||
|
||||
@@ -246,6 +246,6 @@ void ED_gpencil_create_stroke(bContext *C, float mat[4][4])
|
||||
BKE_gpencil_stroke_add_points(gps, data0, 175, mat);
|
||||
|
||||
/* update depsgraph */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
|
||||
}
|
||||
|
||||
@@ -502,7 +502,7 @@ bool ED_gpencil_add_armature_weights(
|
||||
"Unable to add a new Armature modifier to object");
|
||||
return false;
|
||||
}
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
}
|
||||
|
||||
/* verify armature */
|
||||
@@ -600,7 +600,7 @@ static int gpencil_generate_weights_exec(bContext *C, wmOperator *op)
|
||||
gpencil_object_vgroup_calc_from_armature(C, ob, ob_arm, mode, ratio, decay);
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
|
||||
@@ -1756,7 +1756,7 @@ static void gpsculpt_brush_apply(bContext *C, wmOperator *op, PointerRNA *itempt
|
||||
|
||||
/* Updates */
|
||||
if (changed) {
|
||||
DEG_id_tag_update(&gso->gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gso->gpd->id, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
}
|
||||
|
||||
@@ -2107,7 +2107,7 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even
|
||||
|
||||
/* Redraw toolsettings (brush settings)? */
|
||||
if (redraw_toolsettings) {
|
||||
DEG_id_tag_update(&gso->gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gso->gpd->id, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -1395,7 +1395,7 @@ static int gp_convert_layer_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_OBJECT | NA_ADDED, NULL);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ static int gp_layer_add_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* notifiers */
|
||||
bGPdata *gpd = *gpd_ptr;
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA | DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -308,7 +308,7 @@ static int gp_layer_remove_exec(bContext *C, wmOperator *op)
|
||||
BKE_gpencil_layer_delete(gpd, gpl);
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -348,7 +348,7 @@ static int gp_layer_move_exec(bContext *C, wmOperator *op)
|
||||
|
||||
BLI_assert(ELEM(direction, -1, 0, 1)); /* we use value below */
|
||||
if (BLI_listbase_link_move(&gpd->layers, gpl, direction)) {
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ static int gp_layer_copy_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
BKE_gpencil_layer_setactive(gpd, new_layer);
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -524,8 +524,8 @@ static int gp_layer_duplicate_object_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd_dst->id, OB_RECALC_OB | OB_RECALC_DATA | DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ob_dst->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd_dst->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ob_dst->id, ID_RECALC_COPY_ON_WRITE);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -588,7 +588,7 @@ static int gp_frame_duplicate_exec(bContext *C, wmOperator *op)
|
||||
|
||||
}
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -674,7 +674,7 @@ static int gp_frame_clean_fill_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* notifiers */
|
||||
if (changed) {
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
}
|
||||
|
||||
@@ -762,7 +762,7 @@ static int gp_frame_clean_loose_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* notifiers */
|
||||
if (changed) {
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
}
|
||||
|
||||
@@ -814,7 +814,7 @@ static int gp_hide_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -902,7 +902,7 @@ static int gp_reveal_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -943,7 +943,7 @@ static int gp_lock_all_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
}
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -981,7 +981,7 @@ static int gp_unlock_all_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
}
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1054,7 +1054,7 @@ static int gp_isolate_layer_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1119,7 +1119,7 @@ static int gp_merge_layer_exec(bContext *C, wmOperator *op)
|
||||
BLI_ghash_free(gh_frames_cur, NULL, NULL);
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1181,7 +1181,7 @@ static int gp_layer_change_exec(bContext *C, wmOperator *op)
|
||||
BKE_gpencil_layer_setactive(gpd, gpl);
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1318,7 +1318,7 @@ static int gp_stroke_arrange_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1424,7 +1424,7 @@ static int gp_stroke_change_color_exec(bContext *C, wmOperator *op)
|
||||
CTX_DATA_END;
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1466,7 +1466,7 @@ static int gp_stroke_lock_color_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
for (short i = 0; i < *totcol; i++) {
|
||||
Material *tmp_ma = give_current_material(ob, i + 1);
|
||||
tmp_ma->gp_style->flag |= GP_STYLE_COLOR_LOCKED;
|
||||
DEG_id_tag_update(&tmp_ma->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&tmp_ma->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
/* loop all selected strokes and unlock any color */
|
||||
@@ -1484,19 +1484,19 @@ static int gp_stroke_lock_color_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
Material *tmp_ma = give_current_material(ob, gps->mat_nr + 1);
|
||||
|
||||
tmp_ma->gp_style->flag &= ~GP_STYLE_COLOR_LOCKED;
|
||||
DEG_id_tag_update(&tmp_ma->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&tmp_ma->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1594,7 +1594,7 @@ static int gpencil_vertex_group_assign_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
/* notifiers */
|
||||
bGPdata *gpd = ob->data;
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1628,7 +1628,7 @@ static int gpencil_vertex_group_remove_from_exec(bContext *C, wmOperator *UNUSED
|
||||
|
||||
/* notifiers */
|
||||
bGPdata *gpd = ob->data;
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1662,7 +1662,7 @@ static int gpencil_vertex_group_select_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
/* notifiers */
|
||||
bGPdata *gpd = ob->data;
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1695,7 +1695,7 @@ static int gpencil_vertex_group_deselect_exec(bContext *C, wmOperator *UNUSED(op
|
||||
|
||||
/* notifiers */
|
||||
bGPdata *gpd = ob->data;
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1751,7 +1751,7 @@ static int gpencil_vertex_group_invert_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
/* notifiers */
|
||||
bGPdata *gpd = ob->data;
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1836,7 +1836,7 @@ static int gpencil_vertex_group_smooth_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* notifiers */
|
||||
bGPdata *gpd = ob->data;
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED | ND_SPACE_PROPERTIES, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -2189,7 +2189,7 @@ static int gpencil_lock_layer_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
gp_style = ma->gp_style;
|
||||
gp_style->flag |= GP_STYLE_COLOR_LOCKED;
|
||||
gp_style->flag |= GP_STYLE_COLOR_HIDE;
|
||||
DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
/* loop all selected strokes and unlock any color used in active layer */
|
||||
@@ -2202,7 +2202,7 @@ static int gpencil_lock_layer_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
continue;
|
||||
|
||||
ma = give_current_material(ob, gps->mat_nr + 1);
|
||||
DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
gp_style = ma->gp_style;
|
||||
/* unlock/unhide color if not unlocked before */
|
||||
@@ -2214,13 +2214,13 @@ static int gpencil_lock_layer_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
}
|
||||
}
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -2288,7 +2288,7 @@ static int gpencil_color_isolate_exec(bContext *C, wmOperator *op)
|
||||
continue;
|
||||
else
|
||||
gp_style->flag |= flags;
|
||||
DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -2297,15 +2297,15 @@ static int gpencil_color_isolate_exec(bContext *C, wmOperator *op)
|
||||
ma = give_current_material(ob, i + 1);
|
||||
gp_style = ma->gp_style;
|
||||
gp_style->flag &= ~flags;
|
||||
DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
}
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
@@ -2354,7 +2354,7 @@ static int gpencil_color_hide_exec(bContext *C, wmOperator *op)
|
||||
color = ma->gp_style;
|
||||
if (active_color != color) {
|
||||
color->flag |= GP_STYLE_COLOR_HIDE;
|
||||
DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2364,10 +2364,10 @@ static int gpencil_color_hide_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* notifiers */
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
@@ -2412,14 +2412,14 @@ static int gpencil_color_reveal_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
ma = give_current_material(ob, i + 1);
|
||||
gp_style = ma->gp_style;
|
||||
gp_style->flag &= ~GP_STYLE_COLOR_HIDE;
|
||||
DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* notifiers */
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
@@ -2462,14 +2462,14 @@ static int gpencil_color_lock_all_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
ma = give_current_material(ob, i + 1);
|
||||
gp_style = ma->gp_style;
|
||||
gp_style->flag |= GP_STYLE_COLOR_LOCKED;
|
||||
DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* notifiers */
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
@@ -2511,14 +2511,14 @@ static int gpencil_color_unlock_all_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
ma = give_current_material(ob, i + 1);
|
||||
gp_style = ma->gp_style;
|
||||
gp_style->flag &= ~GP_STYLE_COLOR_LOCKED;
|
||||
DEG_id_tag_update(&ma->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* notifiers */
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
@@ -2607,7 +2607,7 @@ static int gpencil_color_select_exec(bContext *C, wmOperator *op)
|
||||
CTX_DATA_END;
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
/* notifiers */
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
@@ -190,7 +190,7 @@ static int gpencil_editmode_toggle_exec(bContext *C, wmOperator *op)
|
||||
/* setup other modes */
|
||||
ED_gpencil_setup_modes(C, gpd, mode);
|
||||
/* set cache as dirty */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_GPENCIL_EDITMODE, NULL);
|
||||
@@ -238,7 +238,7 @@ static int gpencil_selectmode_toggle_exec(bContext *C, wmOperator *op)
|
||||
ts->gpencil_selectmode = mode;
|
||||
|
||||
WM_main_add_notifier(NC_SCENE | ND_TOOLSETTINGS, NULL);
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -330,7 +330,7 @@ static int gpencil_paintmode_toggle_exec(bContext *C, wmOperator *op)
|
||||
/* setup other modes */
|
||||
ED_gpencil_setup_modes(C, gpd, mode);
|
||||
/* set cache as dirty */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | ND_GPENCIL_EDITMODE, NULL);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_MODE, NULL);
|
||||
@@ -418,7 +418,7 @@ static int gpencil_sculptmode_toggle_exec(bContext *C, wmOperator *op)
|
||||
/* setup other modes */
|
||||
ED_gpencil_setup_modes(C, gpd, mode);
|
||||
/* set cache as dirty */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | ND_GPENCIL_EDITMODE, NULL);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_MODE, NULL);
|
||||
@@ -506,7 +506,7 @@ static int gpencil_weightmode_toggle_exec(bContext *C, wmOperator *op)
|
||||
/* setup other modes */
|
||||
ED_gpencil_setup_modes(C, gpd, mode);
|
||||
/* set cache as dirty */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | ND_GPENCIL_EDITMODE, NULL);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_MODE, NULL);
|
||||
@@ -739,7 +739,7 @@ static int gp_duplicate_exec(bContext *C, wmOperator *op)
|
||||
CTX_DATA_END;
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1135,7 +1135,7 @@ static int gp_strokes_paste_exec(bContext *C, wmOperator *op)
|
||||
BLI_ghash_free(new_colors, NULL, NULL);
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1250,7 +1250,7 @@ static int gp_move_to_layer_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1337,7 +1337,7 @@ static int gp_blank_frame_add_exec(bContext *C, wmOperator *op)
|
||||
CTX_DATA_END;
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1396,7 +1396,7 @@ static int gp_actframe_delete_exec(bContext *C, wmOperator *op)
|
||||
BKE_gpencil_layer_delframe(gpl, gpf);
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1454,7 +1454,7 @@ static int gp_actframe_delete_all_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* updates */
|
||||
if (success) {
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -1551,7 +1551,7 @@ static int gp_delete_selected_strokes(bContext *C)
|
||||
CTX_DATA_END;
|
||||
|
||||
if (changed) {
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -1665,7 +1665,7 @@ static int gp_dissolve_selected_points(bContext *C, eGP_DissolveMode mode)
|
||||
MEM_freeN(gps->triangles);
|
||||
}
|
||||
BLI_freelinkN(&gpf->strokes, gps);
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
}
|
||||
else {
|
||||
/* just copy all points to keep into a smaller buffer */
|
||||
@@ -1794,7 +1794,7 @@ static int gp_dissolve_selected_points(bContext *C, eGP_DissolveMode mode)
|
||||
CTX_DATA_END;
|
||||
|
||||
if (changed) {
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -2004,7 +2004,7 @@ static int gp_delete_selected_points(bContext *C)
|
||||
CTX_DATA_END;
|
||||
|
||||
if (changed) {
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -2168,8 +2168,8 @@ static int gp_snap_to_grid(bContext *C, wmOperator *UNUSED(op))
|
||||
}
|
||||
}
|
||||
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&obact->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
DEG_id_tag_update(&obact->id, ID_RECALC_COPY_ON_WRITE);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -2251,8 +2251,8 @@ static int gp_snap_to_cursor(bContext *C, wmOperator *op)
|
||||
}
|
||||
}
|
||||
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&obact->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
DEG_id_tag_update(&obact->id, ID_RECALC_COPY_ON_WRITE);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -2344,7 +2344,7 @@ static int gp_snap_cursor_to_sel(bContext *C, wmOperator *UNUSED(op))
|
||||
}
|
||||
|
||||
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE);
|
||||
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -2393,7 +2393,7 @@ static int gp_stroke_apply_thickness_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
gpl->line_change = 0;
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -2468,7 +2468,7 @@ static int gp_stroke_cyclical_set_exec(bContext *C, wmOperator *op)
|
||||
CTX_DATA_END;
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -2747,7 +2747,7 @@ static int gp_stroke_join_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -2815,7 +2815,7 @@ static int gp_stroke_flip_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
CTX_DATA_END;
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -2971,7 +2971,7 @@ static int gp_strokes_reproject_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
GP_EDITABLE_STROKES_END(gpstroke_iter);
|
||||
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -3152,7 +3152,7 @@ static int gp_stroke_subdivide_exec(bContext *C, wmOperator *op)
|
||||
GP_EDITABLE_STROKES_END(gpstroke_iter);
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -3202,7 +3202,7 @@ static int gp_stroke_simplify_exec(bContext *C, wmOperator *op)
|
||||
GP_EDITABLE_STROKES_END(gpstroke_iter);
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -3252,7 +3252,7 @@ static int gp_stroke_simplify_fixed_exec(bContext *C, wmOperator *op)
|
||||
GP_EDITABLE_STROKES_END(gpstroke_iter);
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -3453,8 +3453,8 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op)
|
||||
BLI_addtail(&gpd_dst->layers, gpl);
|
||||
}
|
||||
}
|
||||
DEG_id_tag_update(&gpd_src->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd_dst->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd_src->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
DEG_id_tag_update(&gpd_dst->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
|
||||
DEG_relations_tag_update(bmain);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, NULL);
|
||||
@@ -3570,7 +3570,7 @@ static int gp_stroke_split_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
}
|
||||
CTX_DATA_END;
|
||||
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
|
||||
@@ -1099,7 +1099,7 @@ static void gpencil_fill_exit(bContext *C, wmOperator *op)
|
||||
/* drawing batch cache is dirty now */
|
||||
if ((ob) && (ob->type == OB_GPENCIL) && (ob->data)) {
|
||||
bGPdata *gpd2 = ob->data;
|
||||
DEG_id_tag_update(&gpd2->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd2->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
gpd2->flag |= GP_DATA_CACHE_IS_DIRTY;
|
||||
}
|
||||
|
||||
@@ -1160,7 +1160,7 @@ static int gpencil_fill_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
|
||||
|
||||
gpencil_fill_status_indicators(C, tgpf);
|
||||
|
||||
DEG_id_tag_update(&tgpf->gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&tgpf->gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
|
||||
|
||||
/* add a modal handler for this operator*/
|
||||
|
||||
@@ -167,7 +167,7 @@ static void gp_interpolate_update_strokes(bContext *C, tGPDinterpolate *tgpi)
|
||||
}
|
||||
}
|
||||
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ static void gpencil_interpolate_exit(bContext *C, wmOperator *op)
|
||||
BLI_freelistN(&tgpi->ilayers);
|
||||
MEM_freeN(tgpi);
|
||||
}
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
|
||||
|
||||
/* clear pointer */
|
||||
@@ -548,7 +548,7 @@ static int gpencil_interpolate_invoke(bContext *C, wmOperator *op, const wmEvent
|
||||
|
||||
/* update shift indicator in header */
|
||||
gpencil_interpolate_status_indicators(C, tgpi);
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
|
||||
|
||||
/* add a modal handler for this operator */
|
||||
@@ -1046,7 +1046,7 @@ static int gpencil_interpolate_seq_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1158,7 +1158,7 @@ static int gpencil_interpolate_reverse_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
CTX_DATA_END;
|
||||
|
||||
/* notifiers */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
|
||||
@@ -208,7 +208,7 @@ typedef struct tGPsdata {
|
||||
static void gp_update_cache(bGPdata *gpd)
|
||||
{
|
||||
if (gpd) {
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
|
||||
}
|
||||
}
|
||||
@@ -1710,7 +1710,7 @@ static void gp_init_drawing_brush(bContext *C, tGPsdata *p)
|
||||
* Maybe this update can be removed when the new tool system
|
||||
* will be in place, but while, we need this to keep drawing working.
|
||||
*/
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -426,8 +426,8 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
|
||||
/* free temp data */
|
||||
MEM_SAFE_FREE(points2D);
|
||||
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@ static void gpencil_primitive_exit(bContext *C, wmOperator *op)
|
||||
MEM_freeN(tgpi->gpf);
|
||||
MEM_freeN(tgpi);
|
||||
}
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
|
||||
|
||||
/* clear pointer */
|
||||
@@ -576,7 +576,7 @@ static int gpencil_primitive_invoke(bContext *C, wmOperator *op, const wmEvent *
|
||||
|
||||
/* update sindicator in header */
|
||||
gpencil_primitive_status_indicators(C, tgpi);
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL);
|
||||
|
||||
/* add a modal handler for this operator */
|
||||
@@ -628,8 +628,8 @@ static void gpencil_primitive_interaction_end(bContext *C, wmOperator *op, wmWin
|
||||
}
|
||||
}
|
||||
|
||||
DEG_id_tag_update(&tgpi->gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&tgpi->gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&tgpi->gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&tgpi->gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
|
||||
/* clean up temp data */
|
||||
gpencil_primitive_exit(C, op);
|
||||
|
||||
@@ -194,10 +194,10 @@ static int gpencil_select_all_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -255,10 +255,10 @@ static int gpencil_select_linked_exec(bContext *C, wmOperator *op)
|
||||
CTX_DATA_END;
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -335,10 +335,10 @@ static int gpencil_select_alternate_exec(bContext *C, wmOperator *op)
|
||||
CTX_DATA_END;
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -491,10 +491,10 @@ static int gpencil_select_grouped_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -569,10 +569,10 @@ static int gpencil_select_first_exec(bContext *C, wmOperator *op)
|
||||
CTX_DATA_END;
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -643,10 +643,10 @@ static int gpencil_select_last_exec(bContext *C, wmOperator *op)
|
||||
CTX_DATA_END;
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -733,10 +733,10 @@ static int gpencil_select_more_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
CTX_DATA_END;
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -818,10 +818,10 @@ static int gpencil_select_less_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
CTX_DATA_END;
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -1010,10 +1010,10 @@ static int gpencil_circle_select_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* updates */
|
||||
if (changed) {
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
|
||||
}
|
||||
@@ -1152,15 +1152,15 @@ static int gpencil_generic_select_exec(
|
||||
if (gpd->flag & GP_DATA_STROKE_PAINTMODE) {
|
||||
gp_delete_selected_point_wrap(C);
|
||||
changed = true;
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
}
|
||||
|
||||
/* updates */
|
||||
if (changed) {
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
|
||||
}
|
||||
@@ -1401,8 +1401,8 @@ static int gpencil_select_exec(bContext *C, wmOperator *op)
|
||||
deselect_all_selected(C);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
|
||||
|
||||
return OPERATOR_CANCELLED;
|
||||
@@ -1455,10 +1455,10 @@ static int gpencil_select_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* updates */
|
||||
if (hit_point != NULL) {
|
||||
DEG_id_tag_update(&gpd->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
/* copy on write tag is needed, or else no refresh happens */
|
||||
DEG_id_tag_update(&gpd->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&gpd->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
||||
WM_event_add_notifier(C, NC_GPENCIL | NA_SELECTED, NULL);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ int ED_undo_gpencil_step(bContext *C, int step, const char *name)
|
||||
}
|
||||
}
|
||||
/* drawing batch cache is dirty now */
|
||||
DEG_id_tag_update(&new_gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&new_gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
new_gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ static void driverdropper_sample(bContext *C, wmOperator *op, const wmEvent *eve
|
||||
/* send updates */
|
||||
UI_context_update_anim_flag(C);
|
||||
DEG_relations_tag_update(CTX_data_main(C));
|
||||
DEG_id_tag_update(ddr->ptr.id.data, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(ddr->ptr.id.data, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); // XXX
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
|
||||
Main *bmain = CTX_data_main(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ED_object_single_user(bmain, scene, (struct Object *)id);
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
|
||||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
@@ -1335,7 +1335,7 @@ static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v)
|
||||
ob->partype = PAROBJECT;
|
||||
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
ED_undo_push(C, "Modifier convert to real");
|
||||
}
|
||||
@@ -1942,8 +1942,8 @@ static void do_constraint_panels(bContext *C, void *ob_pt, int event)
|
||||
* object_test_constraints(ob);
|
||||
* if (ob->pose) BKE_pose_update_constraint_flags(ob->pose); */
|
||||
|
||||
if (ob->type == OB_ARMATURE) DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
|
||||
else DEG_id_tag_update(&ob->id, OB_RECALC_OB);
|
||||
if (ob->type == OB_ARMATURE) DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_TRANSFORM);
|
||||
else DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
|
||||
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob);
|
||||
}
|
||||
|
||||
@@ -579,7 +579,7 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op)
|
||||
import_settings.keep_bind_info = keep_bind_info != 0;
|
||||
|
||||
if (collada_import(C, &import_settings)) {
|
||||
DEG_id_tag_update(&CTX_data_scene(C)->id, DEG_TAG_BASE_FLAGS_UPDATE);
|
||||
DEG_id_tag_update(&CTX_data_scene(C)->id, ID_RECALC_BASE_FLAGS);
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -122,7 +122,7 @@ static int lattice_select_random_exec(bContext *C, wmOperator *op)
|
||||
|
||||
BLI_rng_free(rng);
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
|
||||
}
|
||||
@@ -214,7 +214,7 @@ static int lattice_select_mirror_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* TODO, only notify changes */
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -308,7 +308,7 @@ static int lattice_select_more_less(bContext *C, const bool select)
|
||||
MEM_freeN(selpoints);
|
||||
|
||||
changed = true;
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -428,7 +428,7 @@ static int lattice_select_all_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
break;
|
||||
}
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -495,7 +495,7 @@ static int lattice_select_ungrouped_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
changed = true;
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -605,7 +605,7 @@ bool ED_lattice_select_pick(bContext *C, const int mval[2], bool extend, bool de
|
||||
Object *ob = objects[ob_index];
|
||||
ED_lattice_flags_set(ob, 0);
|
||||
|
||||
DEG_id_tag_update(ob->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(ob->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -636,7 +636,7 @@ bool ED_lattice_select_pick(bContext *C, const int mval[2], bool extend, bool de
|
||||
ED_object_base_activate(C, basact);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(vc.obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(vc.obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -89,7 +89,7 @@ static int make_regular_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
BKE_lattice_resize(lt->editlatt->latt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
|
||||
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -103,7 +103,7 @@ static int make_regular_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
Lattice *lt = ob->data;
|
||||
BKE_lattice_resize(lt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
|
||||
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
|
||||
} FOREACH_SELECTED_OBJECT_END;
|
||||
}
|
||||
@@ -336,7 +336,7 @@ static int lattice_flip_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* updates */
|
||||
DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ static void lattice_undosys_step_decode(struct bContext *C, UndoStep *us_p, int
|
||||
continue;
|
||||
}
|
||||
undolatt_to_editlatt(&elem->data, lt->editlatt);
|
||||
DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
|
||||
/* The first element is always active */
|
||||
|
||||
@@ -124,7 +124,7 @@ static int mask_shape_key_clear_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
if (changed) {
|
||||
WM_event_add_notifier(C, NC_MASK | ND_DATA, mask);
|
||||
DEG_id_tag_update(&mask->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&mask->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
@@ -130,10 +130,10 @@ void paintface_flush_flags(struct bContext *C, Object *ob, short flag)
|
||||
BKE_mesh_batch_cache_dirty_tag(me_eval, BKE_MESH_BATCH_DIRTY_SELECT);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(ob->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(ob->data, ID_RECALC_SELECT);
|
||||
}
|
||||
else {
|
||||
DEG_id_tag_update(ob->data, DEG_TAG_COPY_ON_WRITE | DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(ob->data, ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT);
|
||||
}
|
||||
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
|
||||
@@ -544,7 +544,7 @@ void paintvert_flush_flags(Object *ob)
|
||||
|
||||
void paintvert_tag_select_update(struct bContext *C, struct Object *ob)
|
||||
{
|
||||
DEG_id_tag_update(ob->data, DEG_TAG_COPY_ON_WRITE | DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(ob->data, ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ static void edgering_select(RingSelOpData *lcd)
|
||||
Object *ob_iter = lcd->objects[ob_index];
|
||||
BMEditMesh *em = BKE_editmesh_from_object(ob_iter);
|
||||
EDBM_flag_disable_all(em, BM_ELEM_SELECT);
|
||||
DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(ob_iter->data, ID_RECALC_SELECT);
|
||||
WM_main_add_notifier(NC_GEOM | ND_SELECT, ob_iter->data);
|
||||
}
|
||||
}
|
||||
@@ -227,7 +227,7 @@ static void ringsel_finish(bContext *C, wmOperator *op)
|
||||
BM_select_history_store(em->bm, lcd->eed);
|
||||
|
||||
EDBM_selectmode_flush(lcd->em);
|
||||
DEG_id_tag_update(lcd->ob->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(lcd->ob->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, lcd->ob->data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ static void edbm_flag_disable_all_multi(ViewLayer *view_layer, View3D *v3d, cons
|
||||
BMesh *bm_iter = em_iter->bm;
|
||||
if (bm_iter->totvertsel) {
|
||||
EDBM_flag_disable_all(em_iter, hflag);
|
||||
DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(ob_iter->data, ID_RECALC_SELECT);
|
||||
}
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
|
||||
@@ -1381,7 +1381,7 @@ static int edbm_select_similar_region_exec(bContext *C, wmOperator *op)
|
||||
MEM_freeN(group_index);
|
||||
|
||||
if (changed) {
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
else {
|
||||
@@ -1603,7 +1603,7 @@ static int edbm_loop_multiselect_exec(bContext *C, wmOperator *op)
|
||||
MEM_freeN(edarray);
|
||||
// if (EM_texFaceCheck())
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -1765,7 +1765,7 @@ static bool mouse_mesh_loop(bContext *C, const int mval[2], bool extend, bool de
|
||||
}
|
||||
|
||||
EDBM_flag_disable_all(em_iter, BM_ELEM_SELECT);
|
||||
DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(ob_iter->data, ID_RECALC_SELECT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1852,7 +1852,7 @@ static bool mouse_mesh_loop(bContext *C, const int mval[2], bool extend, bool de
|
||||
|
||||
MEM_freeN(bases);
|
||||
|
||||
DEG_id_tag_update(vc.obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(vc.obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data);
|
||||
|
||||
return true;
|
||||
@@ -1959,7 +1959,7 @@ static int edbm_select_all_exec(bContext *C, wmOperator *op)
|
||||
EDBM_selectmode_flush(em);
|
||||
break;
|
||||
}
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
|
||||
@@ -2005,7 +2005,7 @@ static int edbm_faces_select_interior_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
continue;
|
||||
}
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -2067,7 +2067,7 @@ bool EDBM_select_pick(bContext *C, const int mval[2], bool extend, bool deselect
|
||||
Object *ob_iter = base_iter->object;
|
||||
EDBM_flag_disable_all(BKE_editmesh_from_object(ob_iter), BM_ELEM_SELECT);
|
||||
if (basact->object != ob_iter) {
|
||||
DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(ob_iter->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob_iter->data);
|
||||
}
|
||||
}
|
||||
@@ -2187,7 +2187,7 @@ bool EDBM_select_pick(bContext *C, const int mval[2], bool extend, bool deselect
|
||||
ED_object_base_activate(C, basact);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(vc.obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(vc.obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data);
|
||||
|
||||
ok = true;
|
||||
@@ -2521,11 +2521,11 @@ bool EDBM_selectmode_toggle(
|
||||
BMEditMesh *em_iter = BKE_editmesh_from_object(ob_iter);
|
||||
em_iter->selectmode = ts->selectmode;
|
||||
EDBM_selectmode_set(em_iter);
|
||||
DEG_id_tag_update(ob_iter->data, DEG_TAG_COPY_ON_WRITE | DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(ob_iter->data, ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob_iter->data);
|
||||
}
|
||||
WM_main_add_notifier(NC_SCENE | ND_TOOLSETTINGS, NULL);
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
MEM_freeN(objects);
|
||||
@@ -2974,7 +2974,7 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
|
||||
select_linked_delimit_end(em);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
|
||||
}
|
||||
@@ -3194,7 +3194,7 @@ static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmE
|
||||
* index selections isn't very common. */
|
||||
RNA_int_set(op->ptr, "index", index);
|
||||
|
||||
DEG_id_tag_update(basact->object->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(basact->object->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, basact->object->data);
|
||||
|
||||
MEM_freeN(bases);
|
||||
@@ -3225,7 +3225,7 @@ static int edbm_select_linked_pick_exec(bContext *C, wmOperator *op)
|
||||
|
||||
edbm_select_linked_pick_ex(em, ele, sel, delimit);
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -3314,7 +3314,7 @@ static int edbm_select_face_by_sides_exec(bContext *C, wmOperator *op)
|
||||
|
||||
EDBM_selectmode_flush(em);
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
|
||||
@@ -3412,7 +3412,7 @@ static int edbm_select_loose_exec(bContext *C, wmOperator *op)
|
||||
|
||||
EDBM_selectmode_flush(em);
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
|
||||
@@ -3477,7 +3477,7 @@ static int edbm_select_mirror_exec(bContext *C, wmOperator *op)
|
||||
if (tot_mirr_iter) {
|
||||
EDBM_selectmode_flush(em);
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
|
||||
@@ -3538,7 +3538,7 @@ static int edbm_select_more_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
EDBM_select_more(em, use_face_step);
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
|
||||
@@ -3589,7 +3589,7 @@ static int edbm_select_less_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
EDBM_select_less(em, use_face_step);
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
|
||||
@@ -3915,7 +3915,7 @@ static int edbm_select_sharp_edges_exec(bContext *C, wmOperator *op)
|
||||
else {
|
||||
EDBM_selectmode_flush(em);
|
||||
}
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -4014,7 +4014,7 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
|
||||
|
||||
BLI_LINKSTACK_FREE(stack);
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -4111,7 +4111,7 @@ static int edbm_select_non_manifold_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
}
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
|
||||
EDBM_selectmode_flush(em);
|
||||
@@ -4215,7 +4215,7 @@ static int edbm_select_random_exec(bContext *C, wmOperator *op)
|
||||
EDBM_deselect_flush(em);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
|
||||
@@ -4310,7 +4310,7 @@ static int edbm_select_ungrouped_exec(bContext *C, wmOperator *op)
|
||||
|
||||
if (changed) {
|
||||
EDBM_selectmode_flush(em);
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
}
|
||||
@@ -4434,7 +4434,7 @@ static int edbm_select_axis_exec(bContext *C, wmOperator *op)
|
||||
if (changed) {
|
||||
EDBM_selectmode_flush(em_iter);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit_iter->data);
|
||||
DEG_id_tag_update(obedit_iter->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit_iter->data, ID_RECALC_SELECT);
|
||||
}
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -4526,7 +4526,7 @@ static int edbm_region_to_loop_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
EDBM_selectmode_to_scene(C);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -4734,7 +4734,7 @@ static int edbm_loop_to_region_exec(bContext *C, wmOperator *op)
|
||||
|
||||
EDBM_selectmode_flush(em);
|
||||
|
||||
DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
|
||||
@@ -4058,7 +4058,7 @@ static int edbm_separate_exec(bContext *C, wmOperator *op)
|
||||
.calc_object_remap = true,
|
||||
}));
|
||||
|
||||
DEG_id_tag_update(&me->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&me->id, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_DATA, me);
|
||||
}
|
||||
|
||||
@@ -6048,7 +6048,7 @@ static void sort_bmelem_flag(
|
||||
}
|
||||
|
||||
BM_mesh_remap(em->bm, map[0], map[1], map[2]);
|
||||
DEG_id_tag_update(ob->data, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(ob->data, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
|
||||
|
||||
for (j = 3; j--; ) {
|
||||
@@ -6974,7 +6974,7 @@ static int edbm_mark_freestyle_edge_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
}
|
||||
|
||||
DEG_id_tag_update(obedit->data, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -7051,7 +7051,7 @@ static int edbm_mark_freestyle_face_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
}
|
||||
|
||||
DEG_id_tag_update(obedit->data, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
|
||||
@@ -744,7 +744,7 @@ static void mesh_undosys_step_decode(struct bContext *C, UndoStep *us_p, int UNU
|
||||
}
|
||||
BMEditMesh *em = me->edit_btmesh;
|
||||
undomesh_to_editmesh(&elem->data, em, obedit->data);
|
||||
DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
|
||||
/* The first element is always active */
|
||||
|
||||
@@ -174,7 +174,7 @@ bool EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const bool
|
||||
}
|
||||
|
||||
if (em->ob) {
|
||||
DEG_id_tag_update(&((Mesh *)em->ob->data)->id, DEG_TAG_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&((Mesh *)em->ob->data)->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1333,7 +1333,7 @@ void EDBM_update_generic(BMEditMesh *em, const bool do_tessface, const bool is_d
|
||||
{
|
||||
Object *ob = em->ob;
|
||||
/* order of calling isn't important */
|
||||
DEG_id_tag_update(ob->data, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(ob->data, ID_RECALC_GEOMETRY);
|
||||
WM_main_add_notifier(NC_GEOM | ND_DATA, ob->data);
|
||||
|
||||
if (do_tessface) {
|
||||
|
||||
@@ -593,9 +593,9 @@ int join_mesh_exec(bContext *C, wmOperator *op)
|
||||
|
||||
DEG_relations_tag_update(bmain); /* removed objects, need to rebuild dag */
|
||||
|
||||
DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -681,7 +681,7 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
CTX_DATA_END;
|
||||
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
|
||||
@@ -199,7 +199,7 @@ static void mball_undosys_step_decode(struct bContext *C, UndoStep *us_p, int UN
|
||||
continue;
|
||||
}
|
||||
undomball_to_editmball(&elem->data, mb);
|
||||
DEG_id_tag_update(&obedit->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&obedit->id, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
|
||||
/* The first element is always active */
|
||||
|
||||
@@ -155,7 +155,7 @@ static int mball_select_all_exec(bContext *C, wmOperator *op)
|
||||
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
|
||||
Object *obedit = objects[ob_index];
|
||||
MetaBall *mb = (MetaBall *)obedit->data;
|
||||
DEG_id_tag_update(&mb->id, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(&mb->id, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
|
||||
}
|
||||
|
||||
@@ -384,7 +384,7 @@ static int mball_select_similar_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
DEG_id_tag_update(&mb->id, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(&mb->id, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
|
||||
}
|
||||
}
|
||||
@@ -458,7 +458,7 @@ static int select_random_metaelems_exec(bContext *C, wmOperator *op)
|
||||
|
||||
BLI_rng_free(rng);
|
||||
|
||||
DEG_id_tag_update(&mb->id, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(&mb->id, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -761,7 +761,7 @@ bool ED_mball_select_pick(bContext *C, const int mval[2], bool extend, bool dese
|
||||
}
|
||||
|
||||
BKE_mball_deselect_all((MetaBall *)ob_iter->data);
|
||||
DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(ob_iter->data, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob_iter->data);
|
||||
}
|
||||
MEM_freeN(objects);
|
||||
@@ -789,7 +789,7 @@ bool ED_mball_select_pick(bContext *C, const int mval[2], bool extend, bool dese
|
||||
|
||||
mb->lastelem = ml_act;
|
||||
|
||||
DEG_id_tag_update(&mb->id, DEG_TAG_SELECT_UPDATE);
|
||||
DEG_id_tag_update(&mb->id, ID_RECALC_SELECT);
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
|
||||
|
||||
if (vc.view_layer->basact != base) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -137,7 +137,7 @@ static int surface_slot_remove_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
}
|
||||
|
||||
dynamicPaint_resetPreview(canvas);
|
||||
DEG_id_tag_update(&obj_ctx->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&obj_ctx->id, ID_RECALC_GEOMETRY);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, obj_ctx);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -183,7 +183,7 @@ static int type_toggle_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* update dependency */
|
||||
DEG_id_tag_update(&cObject->id, OB_RECALC_DATA);
|
||||
DEG_id_tag_update(&cObject->id, ID_RECALC_GEOMETRY);
|
||||
DEG_relations_tag_update(CTX_data_main(C));
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, cObject);
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ static int rule_add_exec(bContext *C, wmOperator *op)
|
||||
|
||||
BLI_addtail(&state->rules, rule);
|
||||
|
||||
DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
|
||||
DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -124,7 +124,7 @@ static int rule_del_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
rule->flag |= BOIDRULE_CURRENT;
|
||||
|
||||
DEG_relations_tag_update(bmain);
|
||||
DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
|
||||
DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ static int rule_move_up_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
BLI_remlink(&state->rules, rule);
|
||||
BLI_insertlinkbefore(&state->rules, rule->prev, rule);
|
||||
|
||||
DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
|
||||
DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -196,7 +196,7 @@ static int rule_move_down_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
BLI_remlink(&state->rules, rule);
|
||||
BLI_insertlinkafter(&state->rules, rule->next, rule);
|
||||
|
||||
DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
|
||||
DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -280,7 +280,7 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
state->flag |= BOIDSTATE_CURRENT;
|
||||
|
||||
DEG_relations_tag_update(bmain);
|
||||
DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
|
||||
DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
@@ -351,7 +351,7 @@ static int state_move_down_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
if (state->flag & BOIDSTATE_CURRENT && state->next) {
|
||||
BLI_remlink(&boids->states, state);
|
||||
BLI_insertlinkafter(&boids->states, state->next, state);
|
||||
DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET);
|
||||
DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user