forked from bartvdbraak/blender
fix for error in the blenderplayer caused by r54727 (can't assume G.main is valid on load).
This commit is contained in:
parent
c00191dbe3
commit
9ef5d2d905
@ -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);
|
void DAG_on_visible_update(struct Main *bmain, const short do_time);
|
||||||
|
|
||||||
/* tag datablock to get updated for the next redraw */
|
/* 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);
|
void DAG_id_tag_update(struct ID *id, short flag);
|
||||||
/* flush all tagged updates */
|
/* flush all tagged updates */
|
||||||
void DAG_ids_flush_tagged(struct Main *bmain);
|
void DAG_ids_flush_tagged(struct Main *bmain);
|
||||||
|
@ -2914,10 +2914,8 @@ void DAG_ids_clear_recalc(Main *bmain)
|
|||||||
memset(bmain->id_tag_update, 0, sizeof(bmain->id_tag_update));
|
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;
|
if (id == NULL) return;
|
||||||
|
|
||||||
/* tag ID for update */
|
/* tag ID for update */
|
||||||
@ -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)
|
void DAG_id_type_tag(Main *bmain, short idtype)
|
||||||
{
|
{
|
||||||
if (idtype == ID_NT) {
|
if (idtype == ID_NT) {
|
||||||
|
@ -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;
|
bPoseChannel *pchan;
|
||||||
bArmature *arm = ob->data;
|
bArmature *arm = ob->data;
|
||||||
@ -2756,7 +2756,7 @@ static void lib_link_pose(FileData *fd, Object *ob, bPose *pose)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rebuild) {
|
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;
|
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 */
|
/* if id.us==0 a new base will be created later on */
|
||||||
|
|
||||||
/* WARNING! Also check expand_object(), should reflect the stuff below. */
|
/* 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);
|
lib_link_constraints(fd, &ob->id, &ob->constraints);
|
||||||
|
|
||||||
// XXX deprecated - old animation system <<<
|
// XXX deprecated - old animation system <<<
|
||||||
|
Loading…
Reference in New Issue
Block a user