Fix: EEVEE: Use of scene before assignment

Move update_eval_members to the top of init to avoid future issues.
This commit is contained in:
Miguel Pozo
2024-06-19 18:15:27 +02:00
parent da9f586748
commit 8fc614fc1b

View File

@@ -62,6 +62,7 @@ void Instance::init(const int2 &output_res,
v3d = v3d_;
rv3d = rv3d_;
manager = DRW_manager_get();
update_eval_members();
info = "";
@@ -93,8 +94,6 @@ void Instance::init(const int2 &output_res,
sampling.reset();
}
update_eval_members();
sampling.init(scene);
camera.init();
film.init(output_res, output_rect);
@@ -125,6 +124,7 @@ void Instance::init_light_bake(Depsgraph *depsgraph, draw::Manager *manager)
drw_view = nullptr;
v3d = nullptr;
rv3d = nullptr;
update_eval_members();
is_light_bake = true;
debug_mode = (eDebugMode)G.debug_value;
@@ -132,8 +132,6 @@ void Instance::init_light_bake(Depsgraph *depsgraph, draw::Manager *manager)
shaders.is_ready(true);
update_eval_members();
sampling.init(scene);
camera.init();
/* Film isn't used but init to avoid side effects in other module. */