diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h index eaf19f8dd08..4cdfc1cba95 100644 --- a/source/blender/blenkernel/BKE_depsgraph.h +++ b/source/blender/blenkernel/BKE_depsgraph.h @@ -118,6 +118,7 @@ void DAG_scene_flush_update(struct Main *bmain, struct Scene *sce, unsigned i void DAG_on_visible_update(struct Main *bmain, const short do_time); /* tag datablock to get updated for the next redraw */ +void DAG_id_tag_update_ex(struct Main *bmain, struct ID *id, short flag); void DAG_id_tag_update(struct ID *id, short flag); /* flush all tagged updates */ void DAG_ids_flush_tagged(struct Main *bmain); diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 56600069aa0..8c55ad02dc6 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2914,12 +2914,10 @@ void DAG_ids_clear_recalc(Main *bmain) memset(bmain->id_tag_update, 0, sizeof(bmain->id_tag_update)); } -void DAG_id_tag_update(ID *id, short flag) +void DAG_id_tag_update_ex(Main *bmain, ID *id, short flag) { - Main *bmain = G.main; - if (id == NULL) return; - + /* tag ID for update */ if (flag) { if (flag & OB_RECALC_OB) @@ -2974,6 +2972,11 @@ void DAG_id_tag_update(ID *id, short flag) } } +void DAG_id_tag_update(ID *id, short flag) +{ + DAG_id_tag_update_ex(G.main, id, flag); +} + void DAG_id_type_tag(Main *bmain, short idtype) { if (idtype == ID_NT) { diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 9b896c12d10..4bae406fd09 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2712,7 +2712,7 @@ static void direct_link_constraints(FileData *fd, ListBase *lb) } } -static void lib_link_pose(FileData *fd, Object *ob, bPose *pose) +static void lib_link_pose(FileData *fd, Main *bmain, Object *ob, bPose *pose) { bPoseChannel *pchan; bArmature *arm = ob->data; @@ -2756,7 +2756,7 @@ static void lib_link_pose(FileData *fd, Object *ob, bPose *pose) } if (rebuild) { - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); + DAG_id_tag_update_ex(bmain, &ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); pose->flag |= POSE_RECALC; } } @@ -4221,7 +4221,7 @@ static void lib_link_object(FileData *fd, Main *main) /* if id.us==0 a new base will be created later on */ /* WARNING! Also check expand_object(), should reflect the stuff below. */ - lib_link_pose(fd, ob, ob->pose); + lib_link_pose(fd, main, ob, ob->pose); lib_link_constraints(fd, &ob->id, &ob->constraints); // XXX deprecated - old animation system <<<