diff options
author | Ton Roosendaal <ton@blender.org> | 2006-07-02 16:03:07 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-07-02 16:03:07 +0400 |
commit | e4354bbf126a59bbcf511f6633f2bf3377b78e3c (patch) | |
tree | f4fc1750b4349680570f840e6bb10c804835cdbb /source | |
parent | e16df991abc6b9bd45739d90226fe51ce5d8ce5b (diff) |
Bugfix #4569
Global undo didn't restore correctly the camera in unlocked 3d views.
("Lock" icon option next to layer buttons)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 8d22a2b2bf4..847e853a96d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3066,6 +3066,7 @@ static void *restore_pointer_by_name(Main *mainp, ID *id, int user) /* called from kernel/blender.c */ /* used to link a file (without UI) to the current UI */ +/* note that it assumes the old pointers in UI are still valid, so old Main is not freed */ void lib_link_screen_restore(Main *newmain, Scene *curscene) { bScreen *sc; @@ -3094,7 +3095,9 @@ void lib_link_screen_restore(Main *newmain, Scene *curscene) if(sl->spacetype==SPACE_VIEW3D) { View3D *v3d= (View3D*) sl; - v3d->camera= sc->scene->camera; + v3d->camera= restore_pointer_by_name(newmain, (ID *)v3d->camera, 1); + if(v3d->camera==NULL) + v3d->camera= sc->scene->camera; if(v3d->bgpic) { v3d->bgpic->ima= restore_pointer_by_name(newmain, (ID *)v3d->bgpic->ima, 1); |