Fix T45364: NEW DEPSGRAPH: New Torus created can't be transformed

Linking objects to a scene via python should ensure relations are properly
updated for that scene.
This commit is contained in:
Sergey Sharybin 2015-07-13 15:59:58 +02:00
parent 9f63cbf4a7
commit b16bf6da80
Notes: blender-bot 2023-02-14 08:54:32 +01:00
Referenced by issue #45364, NEW DEPSGRAPH: New Torus created can't be transformed!
1 changed files with 2 additions and 0 deletions

View File

@ -480,6 +480,8 @@ static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *report
if (scene == scene_act)
ob->lay = base->lay;
/* TODO(sergey): Only update relations for the current scene. */
DAG_relations_tag_update(CTX_data_main(C));
DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
/* slows down importers too much, run scene.update() */