Fix #21741: changing scenes didn't update layers in 3d view, patch by Elia Sarti.
This commit is contained in:
@@ -153,6 +153,7 @@ struct RegionView3D *ED_view3d_context_rv3d(struct bContext *C);
|
||||
|
||||
void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d);
|
||||
|
||||
void ED_view3d_scene_layers_copy(struct View3D *v3d, struct Scene *scene);
|
||||
void ED_view3d_scene_layers_update(struct Main *bmain, struct Scene *scene);
|
||||
int ED_view3d_scene_layer_set(int lay, const int *values);
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "WM_types.h"
|
||||
|
||||
#include "ED_image.h"
|
||||
#include "ED_view3d.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_screen_types.h"
|
||||
|
||||
@@ -1387,6 +1388,9 @@ void ED_screen_set_scene(bContext *C, Scene *scene)
|
||||
while(sl) {
|
||||
if(sl->spacetype==SPACE_VIEW3D) {
|
||||
View3D *v3d= (View3D*) sl;
|
||||
|
||||
ED_view3d_scene_layers_copy(v3d, scene);
|
||||
|
||||
if (!v3d->camera || !object_in_scene(v3d->camera, scene)) {
|
||||
v3d->camera= scene_find_camera(sc->scene);
|
||||
// XXX if (sc==curscreen) handle_view3d_lock();
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
#include "ED_screen.h"
|
||||
#include "ED_armature.h"
|
||||
|
||||
#include "GPU_draw.h"
|
||||
|
||||
|
||||
#include "PIL_time.h" /* smoothview */
|
||||
@@ -1415,6 +1416,11 @@ static void copy_view3d_lock_space(View3D *v3d, Scene *scene)
|
||||
}
|
||||
}
|
||||
|
||||
void ED_view3d_scene_layers_copy(struct View3D *v3d, struct Scene *scene)
|
||||
{
|
||||
copy_view3d_lock_space(v3d, scene);
|
||||
}
|
||||
|
||||
void ED_view3d_scene_layers_update(Main *bmain, Scene *scene)
|
||||
{
|
||||
bScreen *sc;
|
||||
|
||||
Reference in New Issue
Block a user