diff options
87 files changed, 462 insertions, 459 deletions
diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h index 5b2dca5299c..e612d00f936 100644 --- a/source/blender/blenkernel/BKE_depsgraph.h +++ b/source/blender/blenkernel/BKE_depsgraph.h @@ -110,15 +110,14 @@ void DAG_scene_flush_update(struct Main *bmain, struct Scene *sce, unsigned int /* tag objects for update on file load */ void DAG_on_load_update(struct Main *bmain); - /* flag all IDs that need recalc because they're animated, influencing - this ID only. only for objects currently */ -void DAG_id_update_flags(struct ID *id); - /* flushes all recalc flags for this object down the dependency tree, - but note the DAG only supports objects and object data currently */ -void DAG_id_flush_update(struct ID *id, short flag); /* when setting manual RECALC flags, call this afterwards */ void DAG_ids_flush_update(struct Main *bmain, int time); + /* tag datablock to get updated for the next redraw */ +void DAG_id_tag_update(struct ID *id, short flag); + /* flush all tagged updates */ +void DAG_ids_flush_tagged(struct Main *bmain); + /* (re)-create dependency graph for armature pose */ void DAG_pose_sort(struct Object *ob); diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h index 1a53f488841..533679cead1 100644 --- a/source/blender/blenkernel/BKE_main.h +++ b/source/blender/blenkernel/BKE_main.h @@ -81,6 +81,8 @@ typedef struct Main { ListBase particle; ListBase wm; ListBase gpencil; + + char id_tag_update[256]; } Main; diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 65a58b02377..97a27405db3 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -52,6 +52,7 @@ #include "BKE_global.h" #include "BKE_group.h" #include "BKE_key.h" +#include "BKE_library.h" #include "BKE_main.h" #include "BKE_mball.h" #include "BKE_modifier.h" @@ -2290,26 +2291,21 @@ static void dag_id_flush_update__isDependentTexture(void *userData, Object *UNUS } } -void DAG_id_flush_update(ID *id, short flag) +static void dag_id_flush_update(Scene *sce, ID *id) { Main *bmain= G.main; - Scene *sce; Object *obt, *ob= NULL; short idtype; - unsigned int lay; - dag_current_scene_layers(bmain, &sce, &lay); - - if(!id || !sce || !sce->theDag) - return; + /* here we flush a few things before actual scene wide flush, mostly + due to only objects and not other datablocks being in the depsgraph */ /* set flags & pointcache for object */ if(GS(id->name) == ID_OB) { ob= (Object*)id; - ob->recalc |= (flag & OB_RECALC_ALL); BKE_ptcache_object_reset(sce, ob, PTCACHE_RESET_DEPSGRAPH); - if(flag & OB_RECALC_DATA) { + if(ob->recalc & OB_RECALC_DATA) { /* all users of this ob->data should be checked */ id= ob->data; @@ -2374,23 +2370,90 @@ void DAG_id_flush_update(ID *id, short flag) /* set flags based on particle settings */ if(idtype == ID_PA) { ParticleSystem *psys; - for(obt=bmain->object.first; obt; obt= obt->id.next) { - for(psys=obt->particlesystem.first; psys; psys=psys->next) { - if(&psys->part->id == id) { + for(obt=bmain->object.first; obt; obt= obt->id.next) + for(psys=obt->particlesystem.first; psys; psys=psys->next) + if(&psys->part->id == id) BKE_ptcache_object_reset(sce, obt, PTCACHE_RESET_DEPSGRAPH); - obt->recalc |= (flag & OB_RECALC_ALL); - psys->recalc |= (flag & PSYS_RECALC); - } - } - } } /* update editors */ dag_editors_update(bmain, id); } +} + +void DAG_ids_flush_tagged(Main *bmain) +{ + ListBase *lbarray[MAX_LIBARRAY]; + Scene *sce; + unsigned int lay; + int a, have_tag = 0; + + dag_current_scene_layers(bmain, &sce, &lay); + + if(!sce || !sce->theDag) + return; + + /* loop over all ID types */ + a = set_listbasepointers(bmain, lbarray); + + while(a--) { + ListBase *lb = lbarray[a]; + ID *id = lb->first; + + /* we tag based on first ID type character to avoid + looping over all ID's in case there are no tags */ + if(id && bmain->id_tag_update[id->name[0]]) { + for(; id; id=id->next) { + if(id->flag & LIB_ID_RECALC) { + dag_id_flush_update(sce, id); + id->flag &= ~LIB_ID_RECALC; + } + } + + have_tag = 1; + } + } - /* flush to other objects that depend on this one */ - DAG_scene_flush_update(bmain, sce, lay, 0); + if(have_tag) { + /* clear tags */ + memset(bmain->id_tag_update, 0, sizeof(bmain->id_tag_update)); + + /* flush changes to other objects */ + DAG_scene_flush_update(bmain, sce, lay, 0); + } +} + +void DAG_id_tag_update(ID *id, short flag) +{ + Main *bmain= G.main; + + /* tag ID for update */ + id->flag |= LIB_ID_RECALC; + bmain->id_tag_update[id->name[0]] = 1; + + /* flag is for objects and particle systems */ + if(flag) { + Object *ob; + ParticleSystem *psys; + short idtype = GS(id->name); + + if(idtype == ID_OB) { + /* only quick tag */ + ob = (Object*)id; + ob->recalc |= (flag & OB_RECALC_ALL); + } + else if(idtype == ID_PA) { + /* this is weak still, should be done delayed as well */ + for(ob=bmain->object.first; ob; ob=ob->id.next) { + for(psys=ob->particlesystem.first; psys; psys=psys->next) { + if(&psys->part->id == id) { + ob->recalc |= (flag & OB_RECALC_ALL); + psys->recalc |= (flag & PSYS_RECALC); + } + } + } + } + } } /* recursively descends tree, each node only checked once */ @@ -2423,68 +2486,6 @@ static int parent_check_node(DagNode *node, int curtime) return DAG_WHITE; } -/* all nodes that influence this object get tagged, for calculating the exact - position of this object at a given timeframe */ -void DAG_id_update_flags(ID *id) -{ - Main *bmain= G.main; - Scene *sce; - DagNode *node; - DagAdjList *itA; - Object *ob; - unsigned int lay; - - dag_current_scene_layers(bmain, &sce, &lay); - - if(!id || !sce || !sce->theDag) - return; - - /* objects only currently */ - if(GS(id->name) != ID_OB) - return; - - ob= (Object*)id; - - /* tag nodes unchecked */ - for(node = sce->theDag->DagNode.first; node; node= node->next) - node->color = DAG_WHITE; - - node= dag_find_node(sce->theDag, ob); - - /* object not in scene? then handle group exception. needs to be dagged once too */ - if(node==NULL) { - Group *group= NULL; - while( (group = find_group(ob, group)) ) { - GroupObject *go; - /* primitive; tag all... this call helps building groups for particles */ - for(go= group->gobject.first; go; go= go->next) - go->ob->recalc= OB_RECALC_ALL; - } - } - else { - - node->color = DAG_GRAY; - - sce->theDag->time++; - node= sce->theDag->DagNode.first; - for(itA = node->child; itA; itA= itA->next) { - if(itA->node->type==ID_OB && itA->node->lasttime!=sce->theDag->time) - itA->node->color= parent_check_node(itA->node, sce->theDag->time); - } - - /* set recalcs and flushes */ - DAG_scene_update_flags(bmain, sce, lay); - - /* now we clear recalcs, unless color is set */ - for(node = sce->theDag->DagNode.first; node; node= node->next) { - if(node->type==ID_OB && node->color==DAG_WHITE) { - Object *ob= node->ob; - ob->recalc= 0; - } - } - } -} - /* ******************* DAG FOR ARMATURE POSE ***************** */ /* we assume its an armature with pose */ diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index eb413187544..7a72207ff69 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -1222,8 +1222,6 @@ void mesh_set_smooth_flag(Object *meshOb, int enableSmooth) mf->flag &= ~ME_SMOOTH; } } - -// XXX do this in caller DAG_id_flush_update(&me->id, OB_RECALC_DATA); } void mesh_calc_normals(MVert *mverts, int numVerts, MFace *mfaces, int numFaces, float **faceNors_r) @@ -1483,8 +1481,6 @@ void mesh_pmv_revert(Mesh *me) me->pv->edge_map= NULL; MEM_freeN(me->pv->vert_map); me->pv->vert_map= NULL; - -// XXX do this in caller DAG_id_flush_update(&me->id, OB_RECALC_DATA); } } diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 9c2efe395dc..6fec4775769 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -3425,7 +3425,7 @@ ModifierData *object_add_particle_system(Scene *scene, Object *ob, const char *n psys->cfra=bsystem_time(scene,ob,scene->r.cfra+1,0.0); DAG_scene_sort(G.main, scene); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); return md; } @@ -3462,7 +3462,7 @@ void object_remove_particle_system(Scene *scene, Object *ob) ob->mode &= ~OB_MODE_PARTICLE_EDIT; DAG_scene_sort(G.main, scene); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } static void default_particle_settings(ParticleSettings *part) { diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index f7af3c68814..cd45a39f2c9 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2313,7 +2313,7 @@ void BKE_ptcache_set_continue_physics(Main *bmain, Scene *scene, int enable) if(CONTINUE_PHYSICS == 0) { for(ob=bmain->object.first; ob; ob=ob->id.next) if(BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_OUTDATED)) - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } } } diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index edbace71c6d..9bbadbacb37 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -968,6 +968,8 @@ static void scene_update_tagged_recursive(Main *bmain, Scene *scene, Scene *scen /* this is called in main loop, doing tagged updates before redraw */ void scene_update_tagged(Main *bmain, Scene *scene) { + DAG_ids_flush_tagged(bmain); + scene->physics_settings.quick_cache_step= 0; /* update all objects: drivers, matrices, displists, etc. flags set diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index f6833596883..6e0289e907b 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -521,7 +521,7 @@ void unlink_text(Main *bmain, Text *text) } if(update) - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } /* pynodes */ diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index f0288e16e66..aeeced27a92 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5508,6 +5508,7 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, int flag, ID if(id->flag & LIB_FAKEUSER) id->us= 1; else id->us= 0; id->icon_id = 0; + id->flag &= ~LIB_ID_RECALC; /* this case cannot be direct_linked: it's just the ID part */ if(bhead->code==ID_ID) { diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index a8ac6d8b768..7bbbc65d6e2 100644 --- a/source/blender/collada/ArmatureImporter.cpp +++ b/source/blender/collada/ArmatureImporter.cpp @@ -402,7 +402,7 @@ void ArmatureImporter::create_armature_bones(SkinInfo& skin) // exit armature edit mode ED_armature_from_edit(ob_arm); ED_armature_edit_free(ob_arm); - DAG_id_flush_update(&ob_arm->id, OB_RECALC_OB|OB_RECALC_DATA); + DAG_id_tag_update(&ob_arm->id, OB_RECALC_OB|OB_RECALC_DATA); set_leaf_bone_shapes(ob_arm); diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index ed23e72b328..8ea113cedb9 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -90,7 +90,7 @@ void ANIM_list_elem_update(Scene *scene, bAnimListElem *ale) else { /* in other case we do standard depsgaph update, ideally we'd be calling property update functions here too ... */ - DAG_id_flush_update(id, OB_RECALC_ALL); // XXX or do we want something more restrictive? + DAG_id_tag_update(id, OB_RECALC_ALL); // XXX or do we want something more restrictive? } } @@ -106,7 +106,7 @@ void ANIM_id_update(Scene *UNUSED(scene), ID *id) adt->recalc |= ADT_RECALC_ANIM; /* set recalc flags */ - DAG_id_flush_update(id, OB_RECALC_ALL); // XXX or do we want something more restrictive? + DAG_id_tag_update(id, OB_RECALC_ALL); // XXX or do we want something more restrictive? } } diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 78b78952df4..2e251a67a34 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -409,7 +409,7 @@ void ED_armature_from_edit(Object *obedit) armature_rebuild_pose(obt, arm); } - DAG_id_flush_update(&obedit->id, OB_RECALC_DATA); + DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); } void ED_armature_apply_transform(Object *ob, float mat[4][4]) @@ -677,7 +677,7 @@ static int pose_visual_transform_apply_exec (bContext *C, wmOperator *UNUSED(op) CTX_DATA_END; // ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob); @@ -1172,8 +1172,8 @@ static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op)) /* 4) fix links before depsgraph flushes */ // err... or after? separated_armature_fix_links(oldob, newob); - DAG_id_flush_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */ - DAG_id_flush_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */ + DAG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */ + DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */ /* 5) restore original conditions */ @@ -4414,7 +4414,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor if (OBACT && OBACT->mode & OB_MODE_WEIGHT_PAINT) { if (nearBone == arm->act_bone) { ED_vgroup_select_by_name(OBACT, nearBone->name); - DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA); + DAG_id_tag_update(&OBACT->id, OB_RECALC_DATA); } } @@ -4885,7 +4885,7 @@ static int pose_clear_scale_exec(bContext *C, wmOperator *UNUSED(op)) ED_pose_recalculate_paths(scene, ob); } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob); @@ -4954,7 +4954,7 @@ static int pose_clear_loc_exec(bContext *C, wmOperator *UNUSED(op)) ED_pose_recalculate_paths(scene, ob); } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob); @@ -5107,7 +5107,7 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *UNUSED(op)) ED_pose_recalculate_paths(scene, ob); } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob); @@ -5554,7 +5554,7 @@ static int armature_flip_names_exec (bContext *C, wmOperator *UNUSED(op)) CTX_DATA_END; /* since we renamed stuff... */ - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob); @@ -5600,7 +5600,7 @@ static int armature_autoside_names_exec (bContext *C, wmOperator *op) CTX_DATA_END; /* since we renamed stuff... */ - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob); diff --git a/source/blender/editors/armature/poseUtils.c b/source/blender/editors/armature/poseUtils.c index b8b9c354d9a..6756691c506 100644 --- a/source/blender/editors/armature/poseUtils.c +++ b/source/blender/editors/armature/poseUtils.c @@ -161,7 +161,7 @@ void poseAnim_mapping_refresh (bContext *C, Scene *scene, Object *ob) */ // FIXME: shouldn't this use the builtin stuff? if ((arm->flag & ARM_DELAYDEFORM)==0) - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ else where_is_pose(scene, ob); diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 2ec940d25bc..5636b67df9a 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -826,7 +826,7 @@ static void poselib_preview_apply (bContext *C, wmOperator *op) */ // FIXME: shouldn't this use the builtin stuff? if ((pld->arm->flag & ARM_DELAYDEFORM)==0) - DAG_id_flush_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */ + DAG_id_tag_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */ else where_is_pose(pld->scene, pld->ob); } @@ -1330,7 +1330,7 @@ static void poselib_preview_cleanup (bContext *C, wmOperator *op) * - note: code copied from transform_generics.c -> recalcData() */ if ((arm->flag & ARM_DELAYDEFORM)==0) - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ else where_is_pose(scene, ob); @@ -1344,7 +1344,7 @@ static void poselib_preview_cleanup (bContext *C, wmOperator *op) action_set_activemarker(act, marker, 0); /* Update event for pose and deformation children */ - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* updates */ if (IS_AUTOKEY_MODE(scene, NORMAL)) { diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index db2e8eb276a..fbc0e4929ee 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -851,7 +851,7 @@ void pose_copy_menu(Scene *scene) ob->pose->flag |= POSE_RECALC; } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); // and all its relations + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); // and all its relations BIF_undo_push("Copy Pose Attributes"); @@ -1069,7 +1069,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op) } /* Update event for pose and deformation children */ - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* notifiers for updates */ WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob); @@ -1471,7 +1471,7 @@ static int pose_flip_names_exec (bContext *C, wmOperator *UNUSED(op)) CTX_DATA_END; /* since we renamed stuff... */ - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob); @@ -1518,7 +1518,7 @@ static int pose_autoside_names_exec (bContext *C, wmOperator *op) CTX_DATA_END; /* since we renamed stuff... */ - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob); @@ -1581,7 +1581,7 @@ void pose_activate_flipped_bone(Scene *scene) /* in weightpaint we select the associated vertex group too */ if(ob->mode & OB_MODE_WEIGHT_PAINT) { ED_vgroup_select_by_name(OBACT, name); - DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA); + DAG_id_tag_update(&OBACT->id, OB_RECALC_DATA); } // XXX notifiers need to be sent to other editors to update @@ -1865,7 +1865,7 @@ static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op)) CTX_DATA_END; /* notifiers and updates */ - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob); return OPERATOR_FINISHED; @@ -1954,7 +1954,7 @@ static void pose_clear_user_transforms(Object *ob) rest_pose(ob->pose); } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); BIF_undo_push("Clear User Transform"); } diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 70cd8333e8f..57c614336a4 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1170,8 +1170,8 @@ static int separate_exec(bContext *C, wmOperator *op) load_editNurb(newob); free_editNurb(newob); - DAG_id_flush_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */ - DAG_id_flush_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */ + DAG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */ + DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */ WM_event_add_notifier(C, NC_GEOM|ND_DATA, oldob->data); @@ -1776,7 +1776,7 @@ static int switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) keyData_switchDirectionNurb(cu, nu); } - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -1823,7 +1823,7 @@ static int set_goal_weight_exec(bContext *C, wmOperator *op) } } - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -1875,7 +1875,7 @@ static int set_radius_exec(bContext *C, wmOperator *op) } WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -1950,7 +1950,7 @@ static int smooth_exec(bContext *C, wmOperator *UNUSED(op)) } WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -2115,7 +2115,7 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op)) } WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -2443,7 +2443,7 @@ static int hide_exec(bContext *C, wmOperator *op) } } - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); return OPERATOR_FINISHED; @@ -2503,7 +2503,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) } } - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); return OPERATOR_FINISHED; @@ -2999,7 +2999,7 @@ static int subdivide_exec(bContext *C, wmOperator *op) subdividenurb(obedit, number_cuts); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -3300,7 +3300,7 @@ static int set_spline_type_exec(bContext *C, wmOperator *op) } if(changed) { - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -3346,7 +3346,7 @@ static int set_handle_type_exec(bContext *C, wmOperator *op) sethandlesNurb(editnurb, RNA_enum_get(op->ptr, "type")); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -3706,7 +3706,7 @@ static int merge_nurb(bContext *C, wmOperator *op) set_actNurb(obedit, NULL); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -3881,7 +3881,7 @@ static int make_segment_exec(bContext *C, wmOperator *op) } WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -4086,7 +4086,7 @@ static int spin_exec(bContext *C, wmOperator *op) } WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -4241,7 +4241,7 @@ static int addvert_Nurb(bContext *C, short mode, float location[3]) test2DNurb(nu); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -4312,7 +4312,7 @@ static int extrude_exec(bContext *C, wmOperator *UNUSED(op)) else { if(extrudeflagNurb(editnurb, 1)) { /* '1'= flag */ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } } @@ -4424,7 +4424,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op) } WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -5243,7 +5243,7 @@ static int delete_exec(bContext *C, wmOperator *op) } WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -5384,7 +5384,7 @@ static int delete_exec(bContext *C, wmOperator *op) nu->flagu &= ~CU_NURB_CYCLIC; calchandlesNurb(nu); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } } @@ -5410,7 +5410,7 @@ static int delete_exec(bContext *C, wmOperator *op) if( bp2->f1 & SELECT ) { nu->flagu &= ~CU_NURB_CYCLIC; WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } } @@ -5512,7 +5512,7 @@ static int delete_exec(bContext *C, wmOperator *op) } WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -5584,7 +5584,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) } WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -6118,14 +6118,14 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) if(type & CU_PRIM_PATH) cu->flag |= CU_PATH|CU_3D; } - else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA); + else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); } else { /* adding surface */ if(obedit==NULL || obedit->type!=OB_SURF) { obedit= ED_object_add_type(C, OB_SURF, loc, rot, TRUE, layer); newob = 1; } - else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA); + else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); } /* rename here, the undo stack checks name for valid undo pushes */ @@ -6457,7 +6457,7 @@ static int clear_tilt_exec(bContext *C, wmOperator *UNUSED(op)) } WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 96bd4624fe4..b23cc8bf3a3 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -265,7 +265,7 @@ static void text_update_edited(bContext *C, Scene *scene, Object *obedit, int re BKE_text_to_curve(scene, obedit, mode); if(recalc) - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); } @@ -299,7 +299,7 @@ static int insert_lorem_exec(bContext *C, wmOperator *UNUSED(op)) insert_into_textbuf(obedit, '\n'); insert_into_textbuf(obedit, '\n'); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -626,7 +626,7 @@ static int set_style(bContext *C, int style, int clear) ef->textbufinfo[i].flag |= style; } - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -1678,7 +1678,7 @@ static int open_exec(bContext *C, wmOperator *op) cu->vfont = font; } - DAG_id_flush_update(ob->data, OB_RECALC_DATA); + DAG_id_tag_update(ob->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA|NA_EDITED, ob->data); MEM_freeN(op->customdata); @@ -1768,7 +1768,7 @@ static int font_unlink_exec(bContext *C, wmOperator *op) id_us_plus(&cu->vfont->id); id_us_min(&font->id); - DAG_id_flush_update(ob->data, OB_RECALC_DATA); + DAG_id_tag_update(ob->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA|NA_EDITED, ob->data); return OPERATOR_FINISHED; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index f8310cd468d..83acf254346 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -601,7 +601,7 @@ static void modifiers_setOnCage(bContext *C, void *ob_v, void *md_v) } WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v) @@ -620,7 +620,7 @@ static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v) ob->partype = PAROBJECT; WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); ED_undo_push(C, "Modifier convert to real"); } @@ -849,8 +849,8 @@ void do_constraint_panels(bContext *C, void *UNUSED(arg), int event) // object_test_constraints(ob); // if(ob->pose) update_pose_constraint_flags(ob->pose); - if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); - else DAG_id_flush_update(&ob->id, OB_RECALC_OB); + if(ob->type==OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); + else DAG_id_tag_update(&ob->id, OB_RECALC_OB); WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob); diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c index 99b3d4e64ab..2a66e95bc77 100644 --- a/source/blender/editors/mesh/editmesh.c +++ b/source/blender/editors/mesh/editmesh.c @@ -1316,7 +1316,7 @@ void load_editMesh(Scene *scene, Object *obedit) void remake_editMesh(Scene *scene, Object *ob) { make_editMesh(scene, ob); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); BIF_undo_push("Undo all changes"); } @@ -1432,8 +1432,8 @@ static int mesh_separate_selected(wmOperator *op, Main *bmain, Scene *scene, Bas /* hashedges are invalid now, make new! */ editMesh_set_hash(em); - DAG_id_flush_update(&obedit->id, OB_RECALC_DATA); - DAG_id_flush_update(&basenew->object->id, OB_RECALC_DATA); + DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); + DAG_id_tag_update(&basenew->object->id, OB_RECALC_DATA); BKE_mesh_end_editmesh(me, em); diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index e15e8e05f59..c150255d10e 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -260,7 +260,7 @@ printf("%d\n", event->val); EM_project_snap_verts(C, vc.ar, vc.obedit, vc.em); WM_event_add_notifier(C, NC_GEOM|ND_DATA, vc.obedit->data); - DAG_id_flush_update(vc.obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(vc.obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -387,7 +387,7 @@ static int make_fgon_exec(bContext *C, wmOperator *op) EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); if( make_fgon(em, op, 1) ) { - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -419,7 +419,7 @@ static int clear_fgon_exec(bContext *C, wmOperator *op) EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); if( make_fgon(em, op, 0) ) { - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -708,7 +708,7 @@ void addfaces_from_edgenet(EditMesh *em) EM_select_flush(em); -// XXX DAG_id_flush_update(obedit->data, OB_RECALC_DATA); +// XXX DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } static void addedgeface_mesh(EditMesh *em, wmOperator *op) @@ -737,7 +737,7 @@ static void addedgeface_mesh(EditMesh *em, wmOperator *op) eed= addedgelist(em, neweve[0], neweve[1], NULL); EM_select_edge(eed, 1); - // XXX DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + // XXX DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return; } else if(amount > 4) { @@ -835,7 +835,7 @@ static int addedgeface_mesh_exec(bContext *C, wmOperator *op) addedgeface_mesh(em, op); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -1351,7 +1351,7 @@ static void make_prim_ext(bContext *C, float *loc, float *rot, int enter_editmod ED_object_enter_editmode(C, EM_DO_UNDO|EM_IGNORE_LAYER); /* rare cases the active layer is messed up */ newob = 1; } - else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA); + else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); scale= ED_object_new_primitive_matrix(C, obedit, loc, rot, mat); @@ -1360,7 +1360,7 @@ static void make_prim_ext(bContext *C, float *loc, float *rot, int enter_editmod make_prim(obedit, type, mat, tot, seg, subdiv, dia, depth, ext, fill); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); @@ -1722,7 +1722,7 @@ static int mesh_duplicate_exec(bContext *C, wmOperator *UNUSED(op)) BKE_mesh_end_editmesh(ob->data, em); - DAG_id_flush_update(ob->data, OB_RECALC_DATA); + DAG_id_tag_update(ob->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); return OPERATOR_FINISHED; diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c index 70fcca097ef..229a76f8ec8 100644 --- a/source/blender/editors/mesh/editmesh_loop.c +++ b/source/blender/editors/mesh/editmesh_loop.c @@ -376,7 +376,7 @@ void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts) EM_selectmode_set(em); } -// DAG_id_flush_update(obedit->data, OB_RECALC_DATA); +// DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return; } @@ -696,7 +696,7 @@ static int knife_cut_exec(bContext *C, wmOperator *op) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index af03df34d5c..b4cac123ce4 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -143,7 +143,7 @@ void EM_automerge(Scene *scene, Object *obedit, int update) if (len) { em->totvert -= len; /* saves doing a countall */ if (update) { - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); } } } @@ -1431,7 +1431,7 @@ void EM_mesh_copy_edge(EditMesh *em, short type) } if (change) { -// DAG_id_flush_update(obedit->data, OB_RECALC_DATA); +// DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } } @@ -1559,7 +1559,7 @@ void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type) } if (change) { -// DAG_id_flush_update(obedit->data, OB_RECALC_DATA); +// DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } } @@ -1689,7 +1689,7 @@ void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type) } if (change) { -// DAG_id_flush_update(obedit->data, OB_RECALC_DATA); +// DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } } @@ -2199,7 +2199,7 @@ static void mouse_mesh_shortest_path(bContext *C, short mval[2]) break; } - DAG_id_flush_update(vc.obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(vc.obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data); } } @@ -2743,7 +2743,7 @@ void EM_hide_mesh(EditMesh *em, int swap) em->totedgesel= em->totfacesel= em->totvertsel= 0; // if(EM_texFaceCheck()) - // DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + // DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } static int hide_mesh_exec(bContext *C, wmOperator *op) @@ -2810,7 +2810,7 @@ void EM_reveal_mesh(EditMesh *em) EM_selectmode_flush(em); // if (EM_texFaceCheck()) -// DAG_id_flush_update(obedit->data, OB_RECALC_DATA); +// DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } static int reveal_mesh_exec(bContext *C, wmOperator *UNUSED(op)) @@ -3747,7 +3747,7 @@ static int editmesh_mark_seam(bContext *C, wmOperator *op) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -3799,7 +3799,7 @@ static int editmesh_mark_sharp(bContext *C, wmOperator *op) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -4025,7 +4025,7 @@ void EM_recalc_normal_direction(EditMesh *em, int inside, int select) /* makes f recalc_editnormals(em); -// DAG_id_flush_update(obedit->data, OB_RECALC_DATA); +// DAG_id_tag_update(obedit->data, OB_RECALC_DATA); waitcursor(0); } @@ -4043,7 +4043,7 @@ static int normals_make_consistent_exec(bContext *C, wmOperator *op) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); //TODO is this needed ? return OPERATOR_FINISHED; @@ -4383,7 +4383,7 @@ static int smooth_vertex(bContext *C, wmOperator *op) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -4470,7 +4470,7 @@ static int mesh_noise_exec(bContext *C, wmOperator *op) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -4535,7 +4535,7 @@ static int flip_normals(bContext *C, wmOperator *UNUSED(op)) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -4575,7 +4575,7 @@ static int solidify_exec(bContext *C, wmOperator *op) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -4611,7 +4611,7 @@ static int mesh_select_nth_exec(bContext *C, wmOperator *op) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 6b101c0c92f..1ee93adccfc 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -483,7 +483,7 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op) if(count) { recalc_editnormals(em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); } @@ -643,7 +643,7 @@ static void extrude_mesh(Object *obedit, EditMesh *em, wmOperator *op, short typ * This shouldn't be necessary, derived queries should be * automatically building this data if invalid. Or something. */ - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); /* individual faces? */ // BIF_TransformSetUndo("Extrude"); @@ -674,7 +674,7 @@ static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -688,7 +688,7 @@ static int mesh_extrude_exec(bContext *C, wmOperator *op) extrude_mesh(obedit, em, op, RNA_int_get(op->ptr, "type")); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -810,7 +810,7 @@ static int split_mesh(bContext *C, wmOperator *UNUSED(op)) WM_cursor_wait(0); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -870,7 +870,7 @@ static int extrude_repeat_mesh(bContext *C, wmOperator *op) EM_fgon_flags(em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -974,7 +974,7 @@ static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float EM_fgon_flags(em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } BKE_mesh_end_editmesh(obedit->data, em); @@ -992,7 +992,7 @@ static int spin_mesh_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -1093,7 +1093,7 @@ static int screw_mesh_exec(bContext *C, wmOperator *op) } if(spin_mesh(C, op, dvec, turns*steps, 360.0f*turns, 0)) { - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -1348,7 +1348,7 @@ static int delete_mesh_exec(bContext *C, wmOperator *op) delete_mesh(em, op, type); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -2756,7 +2756,7 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float smooth, float } } -// DAG_id_flush_update(obedit->data, OB_RECALC_DATA); +// DAG_id_tag_update(obedit->data, OB_RECALC_DATA); // Now for each face in the mesh we need to figure out How many edges were cut // and which filling method to use for that face for(ef = em->faces.first;ef;ef = ef->next) { @@ -3799,7 +3799,7 @@ static int edge_rotate_selected(bContext *C, wmOperator *op) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -4650,7 +4650,7 @@ useless: } else { draw = 0; } -// DAG_id_flush_update(obedit->data, OB_RECALC_DATA); +// DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } @@ -4670,7 +4670,7 @@ useless: if(!immediate) EM_automerge(0); -// DAG_id_flush_update(obedit->data, OB_RECALC_DATA); +// DAG_id_tag_update(obedit->data, OB_RECALC_DATA); // scrarea_queue_winredraw(curarea); //BLI_ghash_free(edgesgh, freeGHash, NULL); @@ -4721,7 +4721,7 @@ int EdgeLoopDelete(EditMesh *UNUSED(em), wmOperator *UNUSED(op)) EM_select_more(em); removedoublesflag(em, 1,0, 0.001); EM_select_flush(em); - // DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + // DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return 1; #endif return 0; @@ -5030,7 +5030,7 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) } } - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -5103,7 +5103,7 @@ static void shape_propagate(Object *obedit, EditMesh *em, wmOperator *op) } #endif - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return; } @@ -5116,7 +5116,7 @@ static int shape_propagate_to_all_exec(bContext *C, wmOperator *op) shape_propagate(obedit, em, op); - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); return OPERATOR_FINISHED; @@ -5178,7 +5178,7 @@ static int blend_from_shape_exec(bContext *C, wmOperator *op) if(!blended) return OPERATOR_CANCELLED; - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); return OPERATOR_FINISHED; @@ -5881,7 +5881,7 @@ static int merge_exec(bContext *C, wmOperator *op) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -6461,7 +6461,7 @@ static int mesh_rotate_uvs(bContext *C, wmOperator *op) if(!change) return OPERATOR_CANCELLED; - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -6550,7 +6550,7 @@ static int mesh_mirror_uvs(bContext *C, wmOperator *op) if(!change) return OPERATOR_CANCELLED; - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -6606,7 +6606,7 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op) if(!change) return OPERATOR_CANCELLED; - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -6662,7 +6662,7 @@ static int mesh_mirror_colors(bContext *C, wmOperator *op) if(!change) return OPERATOR_CANCELLED; - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -6760,7 +6760,7 @@ static int subdivide_exec(bContext *C, wmOperator *op) esubdivideflag(obedit, em, 1, smooth, fractal, ts->editbutflag|flag, cuts, corner_cut_pattern, 0); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -7042,7 +7042,7 @@ static int fill_mesh_exec(bContext *C, wmOperator *UNUSED(op)) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -7073,7 +7073,7 @@ static int beautify_fill_exec(bContext *C, wmOperator *UNUSED(op)) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -7237,7 +7237,7 @@ static int sort_faces_exec(bContext *C, wmOperator *op) } MEM_freeN(index); - DAG_id_flush_update(ob->data, OB_RECALC_DATA); + DAG_id_tag_update(ob->data, OB_RECALC_DATA); /* Return to editmode. */ ED_object_enter_editmode(C, 0); @@ -7281,7 +7281,7 @@ static int quads_convert_to_tris_exec(bContext *C, wmOperator *UNUSED(op)) convert_to_triface(em,0); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -7310,7 +7310,7 @@ static int tris_convert_to_quads_exec(bContext *C, wmOperator *UNUSED(op)) join_triangles(em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -7339,7 +7339,7 @@ static int edge_flip_exec(bContext *C, wmOperator *UNUSED(op)) edge_flip(em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -7386,7 +7386,7 @@ static int mesh_faces_shade_smooth_exec(bContext *C, wmOperator *UNUSED(op)) BKE_mesh_end_editmesh(obedit->data, em); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -7414,7 +7414,7 @@ static int mesh_faces_shade_flat_exec(bContext *C, wmOperator *UNUSED(op)) mesh_set_smooth_faces(em, 0); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c index 85faf00fef8..f39180bbe1b 100644 --- a/source/blender/editors/mesh/loopcut.c +++ b/source/blender/editors/mesh/loopcut.c @@ -285,7 +285,7 @@ static void ringsel_finish(bContext *C, wmOperator *op) WM_event_add_notifier(C, NC_SCENE|ND_TOOLSETTINGS, CTX_data_scene(C)); } - DAG_id_flush_update(lcd->ob->data, OB_RECALC_DATA); + DAG_id_tag_update(lcd->ob->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, lcd->ob->data); } else { diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 080151a8dca..42db085a0ca 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -189,7 +189,7 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s mesh_update_customdata_pointers(me); } - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); return 1; @@ -208,7 +208,7 @@ int ED_mesh_uv_texture_remove(bContext *C, Object *ob, Mesh *me) return 0; delete_customdata_layer(C, ob, cdl); - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); return 1; @@ -252,7 +252,7 @@ int ED_mesh_color_add(bContext *C, Scene *scene, Object *ob, Mesh *me, const cha shadeMeshMCol(scene, ob, me); } - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); return 1; @@ -271,7 +271,7 @@ int ED_mesh_color_remove(bContext *C, Object *ob, Mesh *me) return 0; delete_customdata_layer(C, ob, cdl); - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); return 1; @@ -485,7 +485,7 @@ static int sticky_add_exec(bContext *C, wmOperator *UNUSED(op)) RE_make_sticky(scene, v3d); - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); return OPERATOR_FINISHED; @@ -517,7 +517,7 @@ static int sticky_remove_exec(bContext *C, wmOperator *UNUSED(op)) CustomData_free_layer_active(&me->vdata, CD_MSTICKY, me->totvert); me->msticky= NULL; - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); return OPERATOR_FINISHED; @@ -614,7 +614,7 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges) mesh_calc_normals(mesh->mvert, mesh->totvert, mesh->mface, mesh->totface, NULL); - DAG_id_flush_update(&mesh->id, OB_RECALC_DATA); + DAG_id_tag_update(&mesh->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, mesh); } diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 8b12b4b8872..1f3950f561b 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -532,7 +532,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) free_editMesh(me->edit_mesh); MEM_freeN(me->edit_mesh); me->edit_mesh= NULL; - DAG_id_flush_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA); #endif WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene); diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index 3d534aaa4a2..1170a910c92 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -284,7 +284,7 @@ static int duplicate_metaelems_exec(bContext *C, wmOperator *UNUSED(op)) ml= ml->prev; } WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -343,7 +343,7 @@ static int delete_metaelems_exec(bContext *C, wmOperator *UNUSED(op)) ml= next; } WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -393,7 +393,7 @@ static int hide_metaelems_exec(bContext *C, wmOperator *op) } } WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } return OPERATOR_FINISHED; @@ -434,7 +434,7 @@ static int reveal_metaelems_exec(bContext *C, wmOperator *UNUSED(op)) ml= ml->next; } WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 664e2d5eda3..58985a97a72 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -506,7 +506,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op) obedit= ED_object_add_type(C, OB_MBALL, loc, rot, TRUE, layer); newob = 1; } - else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA); + else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); ED_object_new_primitive_matrix(C, obedit, loc, rot, mat); @@ -617,7 +617,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op) ED_object_enter_editmode(C, 0); newob = 1; } - else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA); + else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); if(obedit==NULL) { BKE_report(op->reports, RPT_ERROR, "Cannot create editmode armature."); @@ -1309,7 +1309,7 @@ static int convert_exec(bContext *C, wmOperator *op) } if (!keep_original) { - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } /* delete original if needed */ @@ -1659,7 +1659,7 @@ static int duplicate_exec(bContext *C, wmOperator *op) if(BASACT==base) ED_base_object_activate(C, basen); - DAG_id_flush_update(base->object->data, 0); + DAG_id_tag_update(base->object->data, 0); } CTX_DATA_END; diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index d5ca7f0f89e..7e44442d867 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -784,8 +784,8 @@ void ED_object_constraint_update(Object *ob) object_test_constraints(ob); - if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); - else DAG_id_flush_update(&ob->id, OB_RECALC_OB); + if(ob->type==OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); + else DAG_id_tag_update(&ob->id, OB_RECALC_OB); } void ED_object_constraint_dependency_update(Main *bmain, Scene *scene, Object *ob) @@ -958,7 +958,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op)) DAG_scene_sort(bmain, scene); /* sort order of objects */ /* do updates */ - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob); return OPERATOR_FINISHED; @@ -986,7 +986,7 @@ static int object_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op)) CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) { free_constraints(&ob->constraints); - DAG_id_flush_update(&ob->id, OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_OB); } CTX_DATA_END; @@ -1336,10 +1336,10 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase if ((ob->type==OB_ARMATURE) && (pchan)) { ob->pose->flag |= POSE_RECALC; /* sort pose channels */ - DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); } else - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* notifiers for updates */ WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_ADDED, ob); @@ -1579,7 +1579,7 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op)) CTX_DATA_END; /* refresh depsgraph */ - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, ob); diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 11084c2c0d1..2c0f232b03c 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -371,7 +371,7 @@ void ED_object_exit_editmode(bContext *C, int flag) BKE_ptcache_object_reset(scene, obedit, PTCACHE_RESET_OUTDATED); /* also flush ob recalc, doesn't take much overhead, but used for particles */ - DAG_id_flush_update(&obedit->id, OB_RECALC_OB|OB_RECALC_DATA); + DAG_id_tag_update(&obedit->id, OB_RECALC_OB|OB_RECALC_DATA); if(flag & EM_DO_UNDO) ED_undo_push(C, "Editmode"); @@ -460,7 +460,7 @@ void ED_object_enter_editmode(bContext *C, int flag) scene->obedit= ob; ED_armature_to_edit(ob); /* to ensure all goes in restposition and without striding */ - DAG_id_flush_update(&ob->id, OB_RECALC_ALL); // XXX: should this be OB_RECALC_DATA? + DAG_id_tag_update(&ob->id, OB_RECALC_ALL); // XXX: should this be OB_RECALC_DATA? WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_ARMATURE, scene); } @@ -494,7 +494,7 @@ void ED_object_enter_editmode(bContext *C, int flag) } if(ok) { - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } else { scene->obedit= NULL; // XXX for context @@ -777,7 +777,7 @@ void special_editmenu(Scene *scene, View3D *v3d) } } } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } else if(ob->mode & OB_MODE_VERTEX_PAINT) { Mesh *me= get_mesh(ob); @@ -789,7 +789,7 @@ void special_editmenu(Scene *scene, View3D *v3d) // XXX do_shared_vertexcol(me); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } } else if(ob->mode & OB_MODE_WEIGHT_PAINT) { @@ -836,7 +836,7 @@ void special_editmenu(Scene *scene, View3D *v3d) break; } - DAG_id_flush_update(&obedit->id, OB_RECALC_DATA); + DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); if(nr>0) waitcursor(0); #endif @@ -1621,7 +1621,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) if(ob->type==OB_MESH) { mesh_set_smooth_flag(ob, !clear); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); done= 1; @@ -1634,7 +1634,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) else nu->flag &= ~ME_SMOOTH; } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); done= 1; @@ -1726,7 +1726,7 @@ void image_aspect(Scene *scene, View3D *v3d) else ob->size[1]= ob->size[0]*y/x; done= 1; - DAG_id_flush_update(&ob->id, OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_OB); } } if(done) break; diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index ee7164046ce..e04ec43dace 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -551,7 +551,7 @@ static int object_hook_remove_exec(bContext *C, wmOperator *op) BLI_remlink(&ob->modifiers, (ModifierData *)hmd); modifier_free((ModifierData *)hmd); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -646,7 +646,7 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op) } } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -702,7 +702,7 @@ static int object_hook_recenter_exec(bContext *C, wmOperator *op) sub_v3_v3v3(hmd->cent, scene->cursor, ob->obmat[3]); mul_m3_v3(imat, hmd->cent); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -765,7 +765,7 @@ static int object_hook_assign_exec(bContext *C, wmOperator *op) hmd->indexar= indexar; hmd->totindex= tot; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c index 22d1a2f6b9d..2eefad06d2f 100644 --- a/source/blender/editors/object/object_lattice.c +++ b/source/blender/editors/object/object_lattice.c @@ -274,7 +274,7 @@ int make_regular_exec(bContext *C, wmOperator *UNUSED(op)) resizelattice(lt, lt->pntsu, lt->pntsv, lt->pntsw, NULL); } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 6c7b57a0b69..cf34e885592 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -137,7 +137,7 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc multiresModifier_set_levels_from_disps((MultiresModifierData *)new_md, ob); } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); return new_md; } @@ -204,7 +204,7 @@ int ED_object_modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Ob BLI_remlink(&ob->modifiers, md); modifier_free(md); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sorting has to be done after the update so that dynamic systems can react properly */ if(sort_depsgraph) @@ -465,7 +465,7 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob, MEM_freeN(vertexCos); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } else { BKE_report(reports, RPT_ERROR, "Cannot apply modifier for this object type"); @@ -713,7 +713,7 @@ static int modifier_move_up_exec(bContext *C, wmOperator *op) if(!ob || !md || !ED_object_modifier_move_up(op->reports, ob, md)) return OPERATOR_CANCELLED; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -752,7 +752,7 @@ static int modifier_move_down_exec(bContext *C, wmOperator *op) if(!ob || !md || !ED_object_modifier_move_down(op->reports, ob, md)) return OPERATOR_CANCELLED; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -794,7 +794,7 @@ static int modifier_apply_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -842,7 +842,7 @@ static int modifier_convert_exec(bContext *C, wmOperator *op) if(!ob || !md || !ED_object_modifier_convert(op->reports, bmain, scene, ob, md)) return OPERATOR_CANCELLED; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -881,7 +881,7 @@ static int modifier_copy_exec(bContext *C, wmOperator *op) if(!ob || !md || !ED_object_modifier_copy(op->reports, ob, md)) return OPERATOR_CANCELLED; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -966,7 +966,7 @@ static int multires_subdivide_exec(bContext *C, wmOperator *op) multiresModifier_subdivide(mmd, ob, 0, mmd->simple); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1024,7 +1024,7 @@ static int multires_reshape_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); return OPERATOR_FINISHED; @@ -1191,7 +1191,7 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op) mmd->totcagevert= 0; mmd->totinfluence= 0; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); } else { @@ -1265,7 +1265,7 @@ static int explode_refresh_exec(bContext *C, wmOperator *op) emd->flag |= eExplodeFlag_CalcFaces; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 7ccbc86a20d..5f1e9b43990 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -343,7 +343,7 @@ static int make_proxy_exec (bContext *C, wmOperator *op) /* depsgraph flushes are needed for the new data */ DAG_scene_sort(bmain, scene); - DAG_id_flush_update(&newob->id, OB_RECALC_ALL); + DAG_id_tag_update(&newob->id, OB_RECALC_ALL); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, newob); } else { diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c index 0aefb09ee9e..db58965fbcf 100644 --- a/source/blender/editors/object/object_shapekey.c +++ b/source/blender/editors/object/object_shapekey.c @@ -155,7 +155,7 @@ static int ED_object_shape_key_remove(bContext *C, Object *ob) free_libblock_us(&(bmain->key), key); } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); return 1; @@ -216,7 +216,7 @@ static int object_shape_key_mirror(bContext *C, Object *ob) MEM_freeN(tag_elem); } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); return 1; @@ -304,7 +304,7 @@ static int shape_key_clear_exec(bContext *C, wmOperator *UNUSED(op)) for(kb=key->block.first; kb; kb=kb->next) kb->curval= 0.0f; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); return OPERATOR_FINISHED; @@ -392,7 +392,7 @@ static int shape_key_move_exec(bContext *C, wmOperator *op) } } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 2917de2864b..1792cabd5f6 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -557,7 +557,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo where_is_object(scene, ob); ignore_parent_tx(bmain, scene, ob); - DAG_id_flush_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA); change = 1; } @@ -581,7 +581,7 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op)) where_is_object(scene, ob); /* update for any children that may get moved */ - DAG_id_flush_update(&ob->id, OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_OB); change = 1; } @@ -780,7 +780,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) recalc_editnormals(em); tot_change++; - DAG_id_flush_update(&obedit->id, OB_RECALC_DATA); + DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); BKE_mesh_end_editmesh(me, em); } } @@ -872,7 +872,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) if(obedit) { if (centermode == GEOMETRY_TO_ORIGIN) { - DAG_id_flush_update(&obedit->id, OB_RECALC_DATA); + DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); } break; } diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 693a8e9b0e7..52a7810d791 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -1434,7 +1434,7 @@ static int vertex_group_add_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; ED_vgroup_add(ob); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); @@ -1464,7 +1464,7 @@ static int vertex_group_remove_exec(bContext *C, wmOperator *op) else vgroup_delete(ob); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); @@ -1497,7 +1497,7 @@ static int vertex_group_assign_exec(bContext *C, wmOperator *op) ED_vgroup_add(ob); vgroup_assign_verts(ob, ts->vgroup_weight); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); return OPERATOR_FINISHED; @@ -1529,7 +1529,7 @@ static int vertex_group_remove_from_exec(bContext *C, wmOperator *op) else vgroup_active_remove_verts(ob, 0); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); return OPERATOR_FINISHED; @@ -1608,7 +1608,7 @@ static int vertex_group_copy_exec(bContext *C, wmOperator *UNUSED(op)) Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; vgroup_duplicate(ob); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); @@ -1638,7 +1638,7 @@ static int vertex_group_levels_exec(bContext *C, wmOperator *op) vgroup_levels(ob, offset, gain); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); @@ -1668,7 +1668,7 @@ static int vertex_group_normalize_exec(bContext *C, wmOperator *UNUSED(op)) vgroup_normalize(ob); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); @@ -1696,7 +1696,7 @@ static int vertex_group_normalize_all_exec(bContext *C, wmOperator *op) vgroup_normalize_all(ob, lock_active); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); @@ -1726,7 +1726,7 @@ static int vertex_group_invert_exec(bContext *C, wmOperator *op) int auto_remove= RNA_boolean_get(op->ptr,"auto_remove"); vgroup_invert(ob, auto_assign, auto_remove); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); @@ -1757,7 +1757,7 @@ static int vertex_group_blend_exec(bContext *C, wmOperator *UNUSED(op)) vgroup_blend(ob); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); @@ -1791,7 +1791,7 @@ static int vertex_group_clean_exec(bContext *C, wmOperator *op) if(all_groups) vgroup_clean_all(ob, limit, keep_single); else vgroup_clean(ob, limit, keep_single); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); @@ -1824,7 +1824,7 @@ static int vertex_group_mirror_exec(bContext *C, wmOperator *op) ED_vgroup_mirror(ob, RNA_boolean_get(op->ptr,"mirror_weights"), RNA_boolean_get(op->ptr,"flip_group_names")); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); @@ -1865,7 +1865,7 @@ static int vertex_group_copy_to_linked_exec(bContext *C, wmOperator *UNUSED(op)) BLI_duplicatelist(&base->object->defbase, &ob->defbase); base->object->actdef= ob->actdef; - DAG_id_flush_update(&base->object->id, OB_RECALC_DATA); + DAG_id_tag_update(&base->object->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, base->object); WM_event_add_notifier(C, NC_GEOM|ND_DATA, base->object->data); @@ -1932,7 +1932,7 @@ static int set_active_group_exec(bContext *C, wmOperator *op) ob->actdef= nr+1; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob); return OPERATOR_FINISHED; @@ -2088,7 +2088,7 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op) ret = vgroup_do_remap(ob, name_array, op); if (ret != OPERATOR_CANCELLED) { - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob); } @@ -2142,7 +2142,7 @@ static int vgroup_move_exec(bContext *C, wmOperator *op) if (name_array) MEM_freeN(name_array); if (ret != OPERATOR_CANCELLED) { - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob); } diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c index 0ba76bbe34c..84d9c0725bf 100644 --- a/source/blender/editors/physics/particle_boids.c +++ b/source/blender/editors/physics/particle_boids.c @@ -76,7 +76,7 @@ static int rule_add_exec(bContext *C, wmOperator *op) BLI_addtail(&state->rules, rule); - DAG_id_flush_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); + DAG_id_tag_update(&part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); return OPERATOR_FINISHED; @@ -128,7 +128,7 @@ static int rule_del_exec(bContext *C, wmOperator *UNUSED(op)) rule->flag |= BOIDRULE_CURRENT; DAG_scene_sort(bmain, scene); - DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); + DAG_id_tag_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); @@ -166,7 +166,7 @@ static int rule_move_up_exec(bContext *C, wmOperator *UNUSED(op)) BLI_remlink(&state->rules, rule); BLI_insertlink(&state->rules, rule->prev->prev, rule); - DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); + DAG_id_tag_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); break; } @@ -204,7 +204,7 @@ static int rule_move_down_exec(bContext *C, wmOperator *UNUSED(op)) BLI_remlink(&state->rules, rule); BLI_insertlink(&state->rules, rule->next, rule); - DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); + DAG_id_tag_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); break; } @@ -301,7 +301,7 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op)) state->flag |= BOIDSTATE_CURRENT; DAG_scene_sort(bmain, scene); - DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); + DAG_id_tag_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); @@ -375,7 +375,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_insertlink(&boids->states, state->next, state); - DAG_id_flush_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); + DAG_id_tag_update(&psys->part->id, OB_RECALC_DATA|PSYS_RECALC_RESET); break; } } diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index cba64fe6325..5de915d9a3a 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -2393,7 +2393,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op) BKE_reportf(op->reports, RPT_INFO, "Remove %d double particles.", totremoved); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); return OPERATOR_FINISHED; @@ -2443,7 +2443,7 @@ static int weight_set_exec(bContext *C, wmOperator *op) } } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); return OPERATOR_FINISHED; @@ -2620,7 +2620,7 @@ static int delete_exec(bContext *C, wmOperator *op) recalc_lengths(data.edit); } - DAG_id_flush_update(&data.ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&data.ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, data.ob); return OPERATOR_FINISHED; @@ -2781,7 +2781,7 @@ static int mirror_exec(bContext *C, wmOperator *UNUSED(op)) update_world_cos(ob, edit); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -3560,7 +3560,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) update_world_cos(ob,edit); psys_free_path_cache(NULL, edit); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } else PE_update_object(scene, ob, 1); @@ -3885,7 +3885,7 @@ void PE_undo_step(Scene *scene, int step) } } - DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA); + DAG_id_tag_update(&OBACT->id, OB_RECALC_DATA); } static void PTCacheUndo_number(Scene *scene, PTCacheEdit *edit, int nr) @@ -4149,7 +4149,7 @@ static int particle_edit_toggle_exec(bContext *C, wmOperator *UNUSED(op)) WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL); } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); return OPERATOR_FINISHED; } @@ -4189,7 +4189,7 @@ static int clear_edited_exec(bContext *C, wmOperator *UNUSED(op)) psys_reset(psys, PSYS_RESET_DEPSGRAPH); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } } else { /* some operation might have protected hair from editing so let's clear the flag */ @@ -4197,7 +4197,7 @@ static int clear_edited_exec(bContext *C, wmOperator *UNUSED(op)) psys->flag &= ~PSYS_GLOBAL_HAIR; psys->flag &= ~PSYS_EDITED; WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } return OPERATOR_FINISHED; diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 9d4880ea2ed..6e0ac82ebf3 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -167,7 +167,7 @@ static int new_particle_settings_exec(bContext *C, wmOperator *UNUSED(op)) psys_check_boid_data(psys); DAG_scene_sort(bmain, scene); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); @@ -216,7 +216,7 @@ static int new_particle_target_exec(bContext *C, wmOperator *UNUSED(op)) BLI_addtail(&psys->targets, pt); DAG_scene_sort(bmain, scene); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); @@ -265,7 +265,7 @@ static int remove_particle_target_exec(bContext *C, wmOperator *UNUSED(op)) pt->flag |= PTARGET_CURRENT; DAG_scene_sort(bmain, scene); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); @@ -304,7 +304,7 @@ static int target_move_up_exec(bContext *C, wmOperator *UNUSED(op)) BLI_remlink(&psys->targets, pt); BLI_insertlink(&psys->targets, pt->prev->prev, pt); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); break; } @@ -342,7 +342,7 @@ static int target_move_down_exec(bContext *C, wmOperator *UNUSED(op)) BLI_remlink(&psys->targets, pt); BLI_insertlink(&psys->targets, pt->next, pt); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); break; } @@ -595,7 +595,7 @@ static int disconnect_hair_exec(bContext *C, wmOperator *op) disconnect_hair(scene, ob, psys); } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); return OPERATOR_FINISHED; @@ -733,7 +733,7 @@ static int connect_hair_exec(bContext *C, wmOperator *op) connect_hair(scene, ob, psys); } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 41aace4e0a7..3f7e30f9e41 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -79,7 +79,7 @@ #include "render_intern.h" // own include /***************************** Updates *********************************** - * ED_render_id_flush_update gets called from DAG_id_flush_update, to do * + * ED_render_id_flush_update gets called from DAG_id_tag_update, to do * * editor level updates when the ID changes. when these ID blocks are in * * the dependency graph, we can get rid of the manual dependency checks */ @@ -355,7 +355,7 @@ static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op)) } } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); return OPERATOR_FINISHED; diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 68a73e77a38..3c116d3b763 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -5329,7 +5329,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op) toggle_paint_cursor(C, 1); } - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_SCENE|ND_MODE, scene); return OPERATOR_FINISHED; diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 89f44199914..9ec4039a271 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -273,7 +273,7 @@ static void make_vertexcol(Object *ob) /* single ob */ memset(me->mcol, 255, 4*sizeof(MCol)*me->totface); - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); } @@ -334,7 +334,7 @@ void vpaint_fill(Object *ob, unsigned int paintcol) } } - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); } @@ -448,7 +448,7 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight) MEM_freeN(indexar); copy_wpaint_prev(wp, NULL, 0); - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); } /* XXX: should be re-implemented as a vertex/weight paint 'color correct' operator @@ -925,7 +925,7 @@ void sample_wpaint(Scene *scene, ARegion *ar, View3D *UNUSED(v3d), int mode) val= 0; // XXX pupmenu(str); if(val>=0) { ob->actdef= val+1; - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); } MEM_freeN(str); } @@ -1080,7 +1080,7 @@ static int set_wpaint(bContext *C, wmOperator *UNUSED(op)) /* toggle */ * exit (exit needs doing regardless because we * should redeform). */ - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); if(ob->mode & OB_MODE_WEIGHT_PAINT) { Object *par; @@ -1586,7 +1586,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P swap_m4m4(vc->rv3d->persmat, mat); - DAG_id_flush_update(ob->data, OB_RECALC_DATA); + DAG_id_tag_update(ob->data, OB_RECALC_DATA); ED_region_tag_redraw(vc->ar); } @@ -1625,7 +1625,7 @@ static void wpaint_stroke_done(bContext *C, struct PaintStroke *stroke) } } - DAG_id_flush_update(ob->data, OB_RECALC_DATA); + DAG_id_tag_update(ob->data, OB_RECALC_DATA); } @@ -1727,7 +1727,7 @@ static int set_vpaint(bContext *C, wmOperator *op) /* toggle */ if (me) /* update modifier stack for mapping requirements */ - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_SCENE|ND_MODE, scene); @@ -1903,7 +1903,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P ED_region_tag_redraw(vc->ar); - DAG_id_flush_update(ob->data, OB_RECALC_DATA); + DAG_id_tag_update(ob->data, OB_RECALC_DATA); } static void vpaint_stroke_done(bContext *C, struct PaintStroke *stroke) @@ -1973,7 +1973,7 @@ static int weight_from_bones_exec(bContext *C, wmOperator *op) create_vgroups_from_armature(op->reports, scene, ob, armob, type, (me->editflag & ME_EDIT_MIRROR_X)); - DAG_id_flush_update(&me->id, OB_RECALC_DATA); + DAG_id_tag_update(&me->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); return OPERATOR_FINISHED; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 7607255d5ce..5913de2d83e 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3329,7 +3329,7 @@ static void sculpt_flush_update(bContext *C) GPU_drawobject_free(ob->derivedFinal); if(ss->modifiers_active) { - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); ED_region_tag_redraw(ar); } else { @@ -3460,7 +3460,7 @@ static void sculpt_stroke_done(bContext *C, struct PaintStroke *unused) /* try to avoid calling this, only for e.g. linked duplicates now */ if(((Mesh*)ob->data)->id.us > 1) - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); } @@ -3615,7 +3615,7 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *unused) multires_force_update(ob); if(flush_recalc) - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* Leave sculptmode */ ob->mode &= ~OB_MODE_SCULPT; @@ -3627,7 +3627,7 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *unused) ob->mode |= OB_MODE_SCULPT; if(flush_recalc) - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* Create persistent sculpt mode data */ if(!ts->sculpt) { diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 1964f1a03c7..a9b27ab2a15 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -169,7 +169,7 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb) multires_mark_as_modified(ob); if(ss->modifiers_active || ((Mesh*)ob->data)->id.us > 1) - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } } diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index cc9e95de0b9..ab1b83f60ae 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -77,7 +77,7 @@ void ED_node_changed_update(ID *id, bNode *node) node_tree_from_ID(id, &nodetree, &edittree, &treetype); if(treetype==NTREE_SHADER) { - DAG_id_flush_update(id, 0); + DAG_id_tag_update(id, 0); WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, id); } else if(treetype==NTREE_COMPOSIT) { @@ -91,7 +91,7 @@ void ED_node_changed_update(ID *id, bNode *node) WM_main_add_notifier(NC_SCENE|ND_NODES, id); } else if(treetype==NTREE_TEXTURE) { - DAG_id_flush_update(id, 0); + DAG_id_tag_update(id, 0); WM_main_add_notifier(NC_TEXTURE|ND_NODES, id); } } diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 393be83ad11..63127360fcd 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -2109,7 +2109,7 @@ static int tree_element_active_defgroup(bContext *C, Scene *scene, TreeElement * ob= (Object *)tselem->id; if(set) { ob->actdef= te->index+1; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob); } else { @@ -4917,7 +4917,7 @@ static void restrictbutton_modifier_cb(bContext *C, void *UNUSED(poin), void *po { Object *ob = (Object *)poin2; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); } diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 768a04e42c0..bd291cc8fe2 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -631,7 +631,7 @@ static int refresh_pyconstraints_exec(bContext *UNUSED(C), wmOperator *UNUSED(op } if(update) { - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } } #endif diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 36fef45249d..bb0ea9f0b63 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -666,7 +666,7 @@ static void do_view3d_vgroup_buttons(bContext *C, void *UNUSED(arg), int event) // ED_vgroup_mirror(ob, 1, 1, 0); /* default for now */ - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); } @@ -1006,14 +1006,14 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event return; /* no notifier! */ case B_OBJECTPANEL: - DAG_id_flush_update(&ob->id, OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_OB); break; case B_OBJECTPANELMEDIAN: if(ob) { v3d_editvertex_buts(NULL, v3d, ob, 1.0); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } break; @@ -1024,7 +1024,7 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event ob->parent= NULL; else { DAG_scene_sort(bmain, scene); - DAG_id_flush_update(&ob->id, OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_OB); } } break; @@ -1058,7 +1058,7 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event case B_ARMATUREPANEL2: { ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } break; case B_TRANSFORMSPACEADD: @@ -1114,7 +1114,7 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event int a; for(a=0; a<me->totvert; a++) ED_vgroup_vert_remove (ob, defGroup, a); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } } break; diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index 1711520df63..6b600f277f0 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -368,7 +368,7 @@ static int flyEnd(bContext *C, FlyInfo *fly) /* store the original camera loc and rot */ object_tfm_restore(ob_back, fly->obtfm); - DAG_id_flush_update(&ob_back->id, OB_RECALC_OB); + DAG_id_tag_update(&ob_back->id, OB_RECALC_OB); } else { /* Non Camera we need to reset the view back to the original location bacause the user canceled*/ copy_qt_qt(rv3d->viewquat, fly->rot_backup); @@ -377,7 +377,7 @@ static int flyEnd(bContext *C, FlyInfo *fly) } } else if (fly->persp_backup==RV3D_CAMOB) { /* camera */ - DAG_id_flush_update(fly->root_parent ? &fly->root_parent->id : &v3d->camera->id, OB_RECALC_OB); + DAG_id_tag_update(fly->root_parent ? &fly->root_parent->id : &v3d->camera->id, OB_RECALC_OB); } else { /* not camera */ /* Apply the fly mode view */ @@ -800,7 +800,7 @@ static int flyApply(bContext *C, FlyInfo *fly) ob_update= v3d->camera->parent; while(ob_update) { - DAG_id_flush_update(&ob_update->id, OB_RECALC_OB); + DAG_id_tag_update(&ob_update->id, OB_RECALC_OB); ob_update= ob_update->parent; } diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 5bedcfd793f..beb6170e0dc 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -87,7 +87,7 @@ static void special_transvert_update(Object *obedit) if(obedit) { - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); if(obedit->type==OB_MESH) { Mesh *me= obedit->data; @@ -522,7 +522,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op)) /* auto-keyframing */ // XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } else { ob->recalc |= OB_RECALC_OB; @@ -646,7 +646,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op)) /* auto-keyframing */ // XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } else { ob->recalc |= OB_RECALC_OB; diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 1f05f8bb668..1aac6e72228 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -4861,9 +4861,9 @@ void special_aftertrans_update(bContext *C, TransInfo *t) // fixme... some of this stuff is not good if (ob) { if (ob->pose || ob_get_key(ob)) - DAG_id_flush_update(&ob->id, OB_RECALC_ALL); + DAG_id_tag_update(&ob->id, OB_RECALC_ALL); else - DAG_id_flush_update(&ob->id, OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_OB); } /* Do curve cleanups? */ @@ -5032,15 +5032,15 @@ void special_aftertrans_update(bContext *C, TransInfo *t) /* automatic inserting of keys and unkeyed tagging - only if transform wasn't cancelled (or TFM_DUMMY) */ if (!cancelled && (t->mode != TFM_DUMMY)) { autokeyframe_pose_cb_func(C, t->scene, (View3D *)t->view, ob, t->mode, targetless_ik); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } else if (arm->flag & ARM_DELAYDEFORM) { /* old optimize trick... this enforces to bypass the depgraph */ - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); ob->recalc= 0; // is set on OK position already by recalcData() } else - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } else if(t->scene->basact && (ob = t->scene->basact->object) && (ob->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(t->scene, ob)) { @@ -5077,7 +5077,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t) /* Creates troubles for moving animated objects without */ /* autokey though, probably needed is an anim sys override? */ /* Please remove if some other solution is found. -jahka */ - DAG_id_flush_update(&ob->id, OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_OB); /* Set autokey if necessary */ if (!cancelled) { diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 21ec46de6af..8148e10b5d2 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -616,7 +616,7 @@ void recalcData(TransInfo *t) if(sima->flag & SI_LIVE_UNWRAP) ED_uvedit_live_unwrap_re_solve(); - DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(t->obedit->data, OB_RECALC_DATA); } } else if (t->spacetype == SPACE_VIEW3D) { @@ -632,7 +632,7 @@ void recalcData(TransInfo *t) applyProject(t); } - DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */ + DAG_id_tag_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */ if (t->state == TRANS_CANCEL) { while(nu) { @@ -655,7 +655,7 @@ void recalcData(TransInfo *t) applyProject(t); } - DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */ + DAG_id_tag_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */ if(la->editlatt->latt->flag & LT_OUTSIDE) outside_lattice(la->editlatt->latt); } @@ -669,7 +669,7 @@ void recalcData(TransInfo *t) if((t->options & CTX_NO_MIRROR) == 0 && (t->flag & T_MIRROR)) editmesh_apply_to_mirror(t); - DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */ + DAG_id_tag_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */ recalc_editnormals(em); } @@ -760,7 +760,7 @@ void recalcData(TransInfo *t) if(t->state != TRANS_CANCEL) { applyProject(t); } - DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */ + DAG_id_tag_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */ } } else if( (t->flag & T_POSE) && t->poseobj) { @@ -781,7 +781,7 @@ void recalcData(TransInfo *t) /* old optimize trick... this enforces to bypass the depgraph */ if (!(arm->flag & ARM_DELAYDEFORM)) { - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ } else where_is_pose(t->scene, ob); @@ -822,7 +822,7 @@ void recalcData(TransInfo *t) /* sets recalc flags fully, instead of flushing existing ones * otherwise proxies don't function correctly */ - DAG_id_flush_update(&ob->id, OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_OB); } } diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c index 2b9b8c7f162..6b0d5b7f172 100644 --- a/source/blender/editors/util/editmode_undo.c +++ b/source/blender/editors/util/editmode_undo.c @@ -269,7 +269,7 @@ void undo_editmode_step(bContext *C, int step) EM_selectmode_to_scene(CTX_data_scene(C), obedit); } - DAG_id_flush_update(&obedit->id, OB_RECALC_DATA); + DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); /* XXX notifiers */ } diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 5d2798aad05..4ae7ae85eff 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -135,7 +135,7 @@ void ED_uvedit_assign_image(Scene *scene, Object *obedit, Image *ima, Image *pre /* and update depdency graph */ if(update) - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); BKE_mesh_end_editmesh(obedit->data, em); } @@ -168,7 +168,7 @@ static int uvedit_set_tile(Object *obedit, Image *ima, int curtile) tf->tile= curtile; /* set tile index */ } - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); BKE_mesh_end_editmesh(obedit->data, em); return 1; @@ -1018,7 +1018,7 @@ static void weld_align_uv(bContext *C, int tool) } } - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -1241,7 +1241,7 @@ static int stitch_exec(bContext *C, wmOperator *op) MEM_freeN(uv_average); } - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -1702,7 +1702,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) } } - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -1854,7 +1854,7 @@ static int select_linked_internal(bContext *C, wmOperator *op, wmEvent *event, i select_linked(scene, ima, em, limit, hit_p, extend); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -1943,7 +1943,7 @@ static int unlink_selection_exec(bContext *C, wmOperator *op) } } - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -2624,7 +2624,7 @@ static int snap_selection_exec(bContext *C, wmOperator *op) if(!change) return OPERATOR_CANCELLED; - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); return OPERATOR_FINISHED; diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index f4a6d6ed3e5..5136c50a16b 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -286,7 +286,7 @@ static void minimize_stretch_iteration(bContext *C, wmOperator *op, int interact ms->lasttime = PIL_check_seconds_timer(); - DAG_id_flush_update(ms->obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(ms->obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ms->obedit->data); } } @@ -309,7 +309,7 @@ static void minimize_stretch_exit(bContext *C, wmOperator *op, int cancel) param_stretch_end(ms->handle); param_delete(ms->handle); - DAG_id_flush_update(ms->obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(ms->obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, ms->obedit->data); MEM_freeN(ms); @@ -437,7 +437,7 @@ static int pack_islands_exec(bContext *C, wmOperator *UNUSED(op)) param_flush(handle); param_delete(handle); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -470,7 +470,7 @@ static int average_islands_scale_exec(bContext *C, wmOperator *UNUSED(op)) param_flush(handle); param_delete(handle); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -834,7 +834,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) param_delete(handle); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -940,7 +940,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op) uv_map_clip_correct(em, op); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -1007,7 +1007,7 @@ static int reset_exec(bContext *C, wmOperator *UNUSED(op)) } } - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -1095,7 +1095,7 @@ static int sphere_project_exec(bContext *C, wmOperator *op) uv_map_clip_correct(em, op); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -1167,7 +1167,7 @@ static int cylinder_project_exec(bContext *C, wmOperator *op) uv_map_clip_correct(em, op); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -1254,7 +1254,7 @@ static int cube_project_exec(bContext *C, wmOperator *op) uv_map_clip_correct(em, op); - DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 49c2df42810..d33d78d4f37 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -215,6 +215,8 @@ typedef struct PreviewImage { #define LIB_DOIT 1024 /* tag existing data before linking so we know what is new */ #define LIB_PRE_EXISTING 2048 +/* runtime */ +#define LIB_ID_RECALC 4096 #ifdef __cplusplus } diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 77ff78fc9bf..44155a8c528 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -1259,7 +1259,7 @@ static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerR else { /* WARNING! This is so property drivers update the display! * not especially nice */ - DAG_id_flush_update(ptr->id.data, OB_RECALC_ALL); + DAG_id_tag_update(ptr->id.data, OB_RECALC_ALL); WM_main_add_notifier(NC_WINDOW, NULL); } diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 44aafb6b993..8f436d9597d 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -51,7 +51,7 @@ static void rna_Armature_update_data(Main *bmain, Scene *scene, PointerRNA *ptr) { ID *id= ptr->id.data; - DAG_id_flush_update(id, OB_RECALC_DATA); + DAG_id_tag_update(id, OB_RECALC_DATA); WM_main_add_notifier(NC_GEOM|ND_DATA, id); //WM_main_add_notifier(NC_OBJECT|ND_POSE, NULL); } diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c index b77f40a31f3..757952bb956 100644 --- a/source/blender/makesrna/intern/rna_boid.c +++ b/source/blender/makesrna/intern/rna_boid.c @@ -78,10 +78,10 @@ static void rna_Boids_reset(Main *bmain, Scene *scene, PointerRNA *ptr) psys->recalc = PSYS_RECALC_RESET; - DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA); + DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } else - DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET); + DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET); WM_main_add_notifier(NC_OBJECT|ND_PARTICLE|NA_EDITED, NULL); } @@ -92,10 +92,10 @@ static void rna_Boids_reset_deps(Main *bmain, Scene *scene, PointerRNA *ptr) psys->recalc = PSYS_RECALC_RESET; - DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA); + DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } else - DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET); + DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET); DAG_scene_sort(bmain, scene); diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c index 759a4acc860..2d2c9ab8a5b 100644 --- a/source/blender/makesrna/intern/rna_cloth.c +++ b/source/blender/makesrna/intern/rna_cloth.c @@ -48,7 +48,7 @@ static void rna_cloth_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Object *ob= (Object*)ptr->id.data; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob); } @@ -60,7 +60,7 @@ static void rna_cloth_pinning_changed(Main *bmain, Scene *scene, PointerRNA *ptr cloth_free_modifier(clmd); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob); } @@ -71,7 +71,7 @@ static void rna_cloth_reset(Main *bmain, Scene *scene, PointerRNA *ptr) settings->reset = 1; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob); } diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index cd588b598bd..01b5c3a9793 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -242,7 +242,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Material *ma= ptr->id.data; - DAG_id_flush_update(&ma->id, 0); + DAG_id_tag_update(&ma->id, 0); WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, ma); } break; @@ -262,7 +262,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Tex *tex= ptr->id.data; - DAG_id_flush_update(&tex->id, 0); + DAG_id_tag_update(&tex->id, 0); WM_main_add_notifier(NC_TEXTURE, tex); } break; diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 1972abfd3ec..9b0b96b9058 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -278,7 +278,7 @@ static void rna_BPoint_array_begin(CollectionPropertyIterator *iter, PointerRNA static void rna_Curve_update_data_id(Main *bmain, Scene *scene, ID *id) { - DAG_id_flush_update(id, OB_RECALC_DATA); + DAG_id_tag_update(id, OB_RECALC_DATA); WM_main_add_notifier(NC_GEOM|ND_DATA, id); } diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 23f37f8db8e..05ee9f9c216 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -111,7 +111,7 @@ static void rna_ChannelDriver_update_data(Main *bmain, Scene *scene, PointerRNA // TODO: this really needs an update guard... DAG_scene_sort(bmain, scene); - DAG_id_flush_update(id, OB_RECALC_OB|OB_RECALC_DATA); + DAG_id_tag_update(id, OB_RECALC_OB|OB_RECALC_DATA); WM_main_add_notifier(NC_SCENE|ND_FRAME, scene); } diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c index 025c3b81efc..8e606e7acea 100644 --- a/source/blender/makesrna/intern/rna_fluidsim.c +++ b/source/blender/makesrna/intern/rna_fluidsim.c @@ -76,7 +76,7 @@ static void rna_fluid_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Object *ob= ptr->id.data; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob); } diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index 3874103ef7a..13c35f46e87 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -79,7 +79,7 @@ static void rna_Image_source_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Image *ima= ptr->id.data; BKE_image_signal(ima, NULL, IMA_SIGNAL_SRC_CHANGE); - DAG_id_flush_update(&ima->id, 0); + DAG_id_tag_update(&ima->id, 0); } static void rna_Image_fields_update(Main *bmain, Scene *scene, PointerRNA *ptr) @@ -107,7 +107,7 @@ static void rna_Image_reload_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Image *ima= ptr->id.data; BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD); - DAG_id_flush_update(&ima->id, 0); + DAG_id_tag_update(&ima->id, 0); } static void rna_Image_generated_update(Main *bmain, Scene *scene, PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index 970c825d30b..47a14c3dac7 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -318,7 +318,7 @@ static void rna_Key_update_data(Main *bmain, Scene *scene, PointerRNA *ptr) for(ob=bmain->object.first; ob; ob= ob->id.next) { if(ob_get_key(ob) == key) { - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob); } } diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index fb7bb4a9194..68ff80f83dc 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -105,7 +105,7 @@ static void rna_Lamp_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Lamp *la= ptr->id.data; - DAG_id_flush_update(&la->id, 0); + DAG_id_tag_update(&la->id, 0); if(scene->gm.matmode == GAME_MAT_GLSL) WM_main_add_notifier(NC_LAMP|ND_LIGHTING_DRAW, la); else @@ -116,7 +116,7 @@ static void rna_Lamp_draw_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Lamp *la= ptr->id.data; - DAG_id_flush_update(&la->id, 0); + DAG_id_tag_update(&la->id, 0); WM_main_add_notifier(NC_LAMP|ND_LIGHTING_DRAW, la); } @@ -124,7 +124,7 @@ static void rna_Lamp_sky_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Lamp *la= ptr->id.data; - DAG_id_flush_update(&la->id, 0); + DAG_id_tag_update(&la->id, 0); WM_main_add_notifier(NC_LAMP|ND_SKY, la); } diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c index f27a1ef86c0..c9e7da414e5 100644 --- a/source/blender/makesrna/intern/rna_lattice.c +++ b/source/blender/makesrna/intern/rna_lattice.c @@ -91,7 +91,7 @@ static void rna_Lattice_update_data(Main *bmain, Scene *scene, PointerRNA *ptr) { ID *id= ptr->id.data; - DAG_id_flush_update(id, OB_RECALC_DATA); + DAG_id_tag_update(id, OB_RECALC_DATA); WM_main_add_notifier(NC_GEOM|ND_DATA, id); } diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index ea079d9bdaa..ec2e34fa0b6 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -67,7 +67,7 @@ static void rna_Material_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Material *ma= ptr->id.data; - DAG_id_flush_update(&ma->id, 0); + DAG_id_tag_update(&ma->id, 0); if(scene->gm.matmode == GAME_MAT_GLSL) WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, ma); else @@ -78,7 +78,7 @@ static void rna_Material_draw_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Material *ma= ptr->id.data; - DAG_id_flush_update(&ma->id, 0); + DAG_id_tag_update(&ma->id, 0); WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, ma); } diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index dd989d05441..d9f6e0886bd 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -59,7 +59,7 @@ static void rna_Mesh_update_data(Main *bmain, Scene *scene, PointerRNA *ptr) /* cheating way for importers to avoid slow updates */ if(id->us > 0) { - DAG_id_flush_update(id, OB_RECALC_DATA); + DAG_id_tag_update(id, OB_RECALC_DATA); WM_main_add_notifier(NC_GEOM|ND_DATA, id); } } diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c index 6fb8f159758..e2e66b53513 100644 --- a/source/blender/makesrna/intern/rna_meta.c +++ b/source/blender/makesrna/intern/rna_meta.c @@ -98,7 +98,7 @@ static void rna_MetaBall_update_data(Main *bmain, Scene *scene, PointerRNA *ptr) if(ob->data == mb) copy_mball_properties(scene, ob); - DAG_id_flush_update(&mb->id, OB_RECALC_DATA); + DAG_id_tag_update(&mb->id, OB_RECALC_DATA); WM_main_add_notifier(NC_GEOM|ND_DATA, mb); } } @@ -109,7 +109,7 @@ static MetaElem *rna_MetaBall_elements_new(MetaBall *mb, int type) /* cheating way for importers to avoid slow updates */ if(mb->id.us > 0) { - DAG_id_flush_update(&mb->id, OB_RECALC_DATA); + DAG_id_tag_update(&mb->id, OB_RECALC_DATA); WM_main_add_notifier(NC_GEOM|ND_DATA, &mb->id); } @@ -132,7 +132,7 @@ static void rna_MetaBall_elements_remove(MetaBall *mb, ReportList *reports, Meta /* cheating way for importers to avoid slow updates */ if(mb->id.us > 0) { - DAG_id_flush_update(&mb->id, OB_RECALC_DATA); + DAG_id_tag_update(&mb->id, OB_RECALC_DATA); WM_main_add_notifier(NC_GEOM|ND_DATA, &mb->id); } } diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 1b9cdc5a482..b846e0bd07f 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -208,7 +208,7 @@ static char *rna_Modifier_path(PointerRNA *ptr) static void rna_Modifier_update(Main *bmain, Scene *scene, PointerRNA *ptr) { - DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA); + DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ptr->id.data); } @@ -255,7 +255,7 @@ static void rna_Smoke_set_type(Main *bmain, Scene *scene, PointerRNA *ptr) part->ren_as = PART_DRAW_NOT; sprintf(psys->name, "SmokeParticles"); psys->recalc |= (PSYS_RECALC_RESET|PSYS_RECALC_PHYS); - DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA); + DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } } if(smd->flow) diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 183b64fb808..5cb88c35b85 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -443,7 +443,7 @@ static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *C, ReportList *r else { nodeVerifyGroup(ntree); /* update group node socket links*/ NodeTagChanged(ntree, node); - WM_event_add_notifier(C, NC_NODE|NA_EDITED, ntree); + WM_main_add_notifier(NC_NODE|NA_EDITED, ntree); if (group) id_us_plus(&group->id); @@ -489,7 +489,7 @@ static bNode *rna_NodeTree_node_texture_new(bNodeTree *ntree, bContext *C, Repor return node; } -static void rna_NodeTree_node_remove(bNodeTree *ntree, bContext *C, ReportList *reports, bNode *node) +static void rna_NodeTree_node_remove(bNodeTree *ntree, ReportList *reports, bNode *node) { if (BLI_findindex(&ntree->nodes, node) == -1) { BKE_reportf(reports, RPT_ERROR, "Unable to locate node '%s' in nodetree", node->name); @@ -501,11 +501,11 @@ static void rna_NodeTree_node_remove(bNodeTree *ntree, bContext *C, ReportList * nodeFreeNode(ntree, node); nodeVerifyGroup(ntree); /* update group node socket links*/ - WM_event_add_notifier(C, NC_NODE|NA_EDITED, ntree); + WM_main_add_notifier(NC_NODE|NA_EDITED, ntree); } } -static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, bContext *C, ReportList *reports, bNodeSocket *in, bNodeSocket *out) +static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports, bNodeSocket *in, bNodeSocket *out) { bNodeLink *ret; bNode *fromnode, *tonode; @@ -529,12 +529,12 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, bContext *C, ReportLis ntreeSolveOrder(ntree); - WM_event_add_notifier(C, NC_NODE|NA_EDITED, ntree); + WM_main_add_notifier(NC_NODE|NA_EDITED, ntree); return ret; } -static void rna_NodeTree_link_remove(bNodeTree *ntree, bContext *C, ReportList *reports, bNodeLink *link) +static void rna_NodeTree_link_remove(bNodeTree *ntree, ReportList *reports, bNodeLink *link) { if (BLI_findindex(&ntree->links, link) == -1) { BKE_reportf(reports, RPT_ERROR, "Unable to locate link in nodetree"); @@ -544,7 +544,7 @@ static void rna_NodeTree_link_remove(bNodeTree *ntree, bContext *C, ReportList * ntreeSolveOrder(ntree); nodeVerifyGroup(ntree); /* update group node socket links*/ - WM_event_add_notifier(C, NC_NODE|NA_EDITED, ntree); + WM_main_add_notifier(NC_NODE|NA_EDITED, ntree); } } @@ -2338,7 +2338,7 @@ static void rna_def_nodetree_link_api(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "new", "rna_NodeTree_link_new"); RNA_def_function_ui_description(func, "Add a node link to this node tree."); - RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS); + RNA_def_function_flag(func, FUNC_USE_REPORTS); parm= RNA_def_pointer(func, "input", "NodeSocket", "", "The input socket."); RNA_def_property_flag(parm, PROP_REQUIRED); parm= RNA_def_pointer(func, "output", "NodeSocket", "", "The output socket."); @@ -2349,7 +2349,7 @@ static void rna_def_nodetree_link_api(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "remove", "rna_NodeTree_link_remove"); RNA_def_function_ui_description(func, "remove a node link from the node tree."); - RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS); + RNA_def_function_flag(func, FUNC_USE_REPORTS); parm= RNA_def_pointer(func, "link", "NodeLink", "", "The node link to remove."); RNA_def_property_flag(parm, PROP_REQUIRED); } @@ -2377,7 +2377,7 @@ static void rna_def_composite_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "remove", "rna_NodeTree_node_remove"); RNA_def_function_ui_description(func, "remove a node from this node tree."); - RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS); + RNA_def_function_flag(func, FUNC_USE_REPORTS); parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove."); RNA_def_property_flag(parm, PROP_REQUIRED); } @@ -2405,7 +2405,7 @@ static void rna_def_shader_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "remove", "rna_NodeTree_node_remove"); RNA_def_function_ui_description(func, "remove a node from this node tree."); - RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS); + RNA_def_function_flag(func, FUNC_USE_REPORTS); parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove."); RNA_def_property_flag(parm, PROP_REQUIRED); } @@ -2433,7 +2433,7 @@ static void rna_def_texture_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "remove", "rna_NodeTree_node_remove"); RNA_def_function_ui_description(func, "remove a node from this node tree."); - RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS); + RNA_def_function_flag(func, FUNC_USE_REPORTS); parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove."); RNA_def_property_flag(parm, PROP_REQUIRED); } diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index cd16b75a8ed..289f3de2f2c 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -148,7 +148,7 @@ EnumPropertyItem object_type_curve_items[] = { static void rna_Object_internal_update(Main *bmain, Scene *scene, PointerRNA *ptr) { - DAG_id_flush_update(ptr->id.data, OB_RECALC_OB); + DAG_id_tag_update(ptr->id.data, OB_RECALC_OB); } static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA *ptr) @@ -206,7 +206,7 @@ static void rna_Object_matrix_basis_set(PointerRNA *ptr, const float values[16]) void rna_Object_internal_update_data(Main *bmain, Scene *scene, PointerRNA *ptr) { - DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA); + DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT|ND_DRAW, ptr->id.data); } @@ -238,7 +238,7 @@ void rna_Object_active_shape_update(Main *bmain, Scene *scene, PointerRNA *ptr) static void rna_Object_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) { - DAG_id_flush_update(ptr->id.data, OB_RECALC_OB); + DAG_id_tag_update(ptr->id.data, OB_RECALC_OB); DAG_scene_sort(bmain, scene); WM_main_add_notifier(NC_OBJECT|ND_PARENT, ptr->id.data); } diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 34e3caad618..af77c55dbf9 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -278,7 +278,7 @@ static void rna_Object_update(Object *ob, Scene *sce, int object, int data, int if(data) flag |= OB_RECALC_DATA; if(time) flag |= OB_RECALC_TIME; - DAG_id_flush_update(&ob->id, flag); + DAG_id_tag_update(&ob->id, flag); } static PointerRNA rna_Object_add_shape_key(Object *ob, bContext *C, ReportList *reports, const char *name, int from_mix) diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index cdcc57bde12..3947e0366e6 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -110,7 +110,7 @@ static void rna_Cache_change(Main *bmain, Scene *scene, PointerRNA *ptr) BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); for(pid=pidlist.first; pid; pid=pid->next) { if(pid->cache==cache) @@ -179,7 +179,7 @@ static void rna_Cache_idname_change(Main *bmain, Scene *scene, PointerRNA *ptr) BKE_ptcache_load_external(pid); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } else { for(pid=pidlist.first; pid; pid=pid->next) { @@ -480,7 +480,7 @@ static void rna_FieldSettings_update(Main *bmain, Scene *scene, PointerRNA *ptr) part->pd2->tex= 0; } - DAG_id_flush_update(&part->id, OB_RECALC_ALL|PSYS_RECALC_RESET); + DAG_id_tag_update(&part->id, OB_RECALC_ALL|PSYS_RECALC_RESET); WM_main_add_notifier(NC_OBJECT|ND_DRAW, NULL); } @@ -492,7 +492,7 @@ static void rna_FieldSettings_update(Main *bmain, Scene *scene, PointerRNA *ptr) ob->pd->tex= 0; } - DAG_id_flush_update(&ob->id, OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_OB); WM_main_add_notifier(NC_OBJECT|ND_DRAW, ob); } } @@ -522,7 +522,7 @@ static void rna_FieldSettings_shape_update(Main *bmain, Scene *scene, PointerRNA static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) { if(particle_id_check(ptr)) { - DAG_id_flush_update((ID*)ptr->id.data, OB_RECALC_ALL|PSYS_RECALC_RESET); + DAG_id_tag_update((ID*)ptr->id.data, OB_RECALC_ALL|PSYS_RECALC_RESET); } else { Object *ob= (Object*)ptr->id.data; @@ -539,9 +539,9 @@ static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, Point DAG_scene_sort(bmain, scene); if(ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE) - DAG_id_flush_update(&ob->id, OB_RECALC_ALL); + DAG_id_tag_update(&ob->id, OB_RECALC_ALL); else - DAG_id_flush_update(&ob->id, OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_OB); WM_main_add_notifier(NC_OBJECT|ND_DRAW, ob); } @@ -573,7 +573,7 @@ static char *rna_FieldSettings_path(PointerRNA *ptr) static void rna_EffectorWeight_update(Main *bmain, Scene *scene, PointerRNA *ptr) { - DAG_id_flush_update((ID*)ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET); + DAG_id_tag_update((ID*)ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET); WM_main_add_notifier(NC_OBJECT|ND_DRAW, NULL); } @@ -582,7 +582,7 @@ static void rna_EffectorWeight_dependency_update(Main *bmain, Scene *scene, Poin { DAG_scene_sort(bmain, scene); - DAG_id_flush_update((ID*)ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET); + DAG_id_tag_update((ID*)ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET); WM_main_add_notifier(NC_OBJECT|ND_DRAW, NULL); } @@ -649,7 +649,7 @@ static void rna_CollisionSettings_update(Main *bmain, Scene *scene, PointerRNA * { Object *ob= (Object*)ptr->id.data; - DAG_id_flush_update(&ob->id, OB_RECALC_ALL); + DAG_id_tag_update(&ob->id, OB_RECALC_ALL); WM_main_add_notifier(NC_OBJECT|ND_DRAW, ob); } @@ -657,7 +657,7 @@ static void rna_softbody_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Object *ob= (Object*)ptr->id.data; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob); } diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index a8b9b5b3e51..38e052dd7be 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -201,10 +201,10 @@ static void particle_recalc(Main *bmain, Scene *scene, PointerRNA *ptr, short fl psys->recalc = flag; - DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA); + DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } else - DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA|flag); + DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA|flag); WM_main_add_notifier(NC_OBJECT|ND_PARTICLE|NA_EDITED, NULL); } @@ -279,7 +279,7 @@ static void rna_Particle_target_reset(Main *bmain, Scene *scene, PointerRNA *ptr psys->recalc = PSYS_RECALC_RESET; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); DAG_scene_sort(bmain, scene); } @@ -295,7 +295,7 @@ static void rna_Particle_target_redo(Main *bmain, Scene *scene, PointerRNA *ptr) psys->recalc = PSYS_RECALC_REDO; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT|ND_PARTICLE|NA_EDITED, NULL); } } diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 309800e8a83..be14556cb41 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -70,7 +70,7 @@ static void rna_Pose_update(Main *bmain, Scene *scene, PointerRNA *ptr) { // XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); - DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA); + DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } static void rna_Pose_IK_update(Main *bmain, Scene *scene, PointerRNA *ptr) @@ -78,7 +78,7 @@ static void rna_Pose_IK_update(Main *bmain, Scene *scene, PointerRNA *ptr) // XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); Object *ob= ptr->id.data; - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); BIK_clear_data(ob->pose); } @@ -162,7 +162,7 @@ static void rna_Pose_ik_solver_update(Main *bmain, Scene *scene, PointerRNA *ptr object_test_constraints(ob); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); } /* rotation - axis-angle */ @@ -271,7 +271,7 @@ static void rna_Itasc_update(Main *bmain, Scene *scene, PointerRNA *ptr) itasc->maxvel = 100.f; BIK_update_param(ob->pose); - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } static void rna_Itasc_update_rebuild(Main *bmain, Scene *scene, PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 520a6e659d7..cb12c042298 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -725,7 +725,7 @@ static void rna_Scene_glsl_update(Main *bmain, Scene *unused, PointerRNA *ptr) { Scene *scene= (Scene*)ptr->id.data; - DAG_id_flush_update(&scene->id, 0); + DAG_id_tag_update(&scene->id, 0); } static void rna_RenderSettings_color_management_update(Main *bmain, Scene *unused, PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index f4cc6427599..6203df0a975 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -105,7 +105,7 @@ static void rna_ParticleEdit_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Object *ob= (scene->basact)? scene->basact->object: NULL; - if(ob) DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + if(ob) DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value) { @@ -115,7 +115,7 @@ static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value) if((pset->brushtype == PE_BRUSH_WEIGHT || value == PE_BRUSH_WEIGHT) && pset->scene) { Object *ob = (pset->scene->basact)? pset->scene->basact->object: NULL; if(ob) { - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_main_add_notifier(NC_OBJECT|ND_PARTICLE|NA_EDITED, NULL); } } diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index cdc80cfa176..fc1584c7a0f 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -50,7 +50,7 @@ static void rna_Smoke_update(Main *bmain, Scene *scene, PointerRNA *ptr) { - DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA); + DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); } static void rna_Smoke_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 0697ce8d056..1752096d0aa 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -670,7 +670,7 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *bmain, Scene *scene, Po } /* force depsgraph flush too */ - DAG_id_flush_update(&obact->id, OB_RECALC_OB|OB_RECALC_DATA); + DAG_id_tag_update(&obact->id, OB_RECALC_OB|OB_RECALC_DATA); } } diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index c020ceb2c0f..6bdb3fbc738 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -128,7 +128,7 @@ static void rna_Texture_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Tex *tex= ptr->id.data; - DAG_id_flush_update(&tex->id, 0); + DAG_id_tag_update(&tex->id, 0); WM_main_add_notifier(NC_TEXTURE, tex); } @@ -153,7 +153,7 @@ static void rna_Texture_nodes_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Tex *tex= ptr->id.data; - DAG_id_flush_update(&tex->id, 0); + DAG_id_tag_update(&tex->id, 0); WM_main_add_notifier(NC_TEXTURE|ND_NODES, tex); } @@ -168,7 +168,7 @@ void rna_TextureSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr) { ID *id= ptr->id.data; - DAG_id_flush_update(id, 0); + DAG_id_tag_update(id, 0); switch(GS(id->name)) { case ID_MA: diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 116e25030d6..014406f9074 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -219,7 +219,7 @@ static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRN for(ob= bmain->object.first; ob; ob= ob->id.next) { if(ob->mode & OB_MODE_WEIGHT_PAINT) - DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } rna_userdef_update(bmain, scene, ptr); diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c index f7aa30174ac..1358964a92b 100644 --- a/source/blender/makesrna/intern/rna_world.c +++ b/source/blender/makesrna/intern/rna_world.c @@ -86,7 +86,7 @@ static void rna_World_update(Main *bmain, Scene *scene, PointerRNA *ptr) { World *wo= ptr->id.data; - DAG_id_flush_update(&wo->id, 0); + DAG_id_tag_update(&wo->id, 0); WM_main_add_notifier(NC_WORLD, wo); } @@ -94,7 +94,7 @@ static void rna_World_draw_update(Main *bmain, Scene *scene, PointerRNA *ptr) { World *wo= ptr->id.data; - DAG_id_flush_update(&wo->id, 0); + DAG_id_tag_update(&wo->id, 0); WM_main_add_notifier(NC_WORLD|ND_WORLD_DRAW, wo); } @@ -103,7 +103,7 @@ static void rna_World_draw_mist_update(Main *bmain, Scene *scene, PointerRNA *pt { World *wo= ptr->id.data; - DAG_id_flush_update(&wo->id, 0); + DAG_id_tag_update(&wo->id, 0); WM_main_add_notifier(NC_WORLD|ND_WORLD_DRAW, wo); WM_main_add_notifier(NC_OBJECT|ND_DRAW, NULL); } @@ -112,7 +112,7 @@ static void rna_World_stars_update(Main *bmain, Scene *scene, PointerRNA *ptr) { World *wo= ptr->id.data; - DAG_id_flush_update(&wo->id, 0); + DAG_id_tag_update(&wo->id, 0); WM_main_add_notifier(NC_WORLD|ND_WORLD_STARS, wo); } diff --git a/source/blender/modifiers/intern/MOD_boolean_util.c b/source/blender/modifiers/intern/MOD_boolean_util.c index 2fba4c6a603..b31c3f19017 100644 --- a/source/blender/modifiers/intern/MOD_boolean_util.c +++ b/source/blender/modifiers/intern/MOD_boolean_util.c @@ -577,7 +577,7 @@ int NewBooleanMesh(Scene *scene, Base *base, Base *base_select, int int_op_type) MEM_freeN(mat); /* update dag */ - DAG_id_flush_update(&ob_new->id, OB_RECALC_DATA); + DAG_id_tag_update(&ob_new->id, OB_RECALC_DATA); return 1; } |