| 449 | } |
| 450 | |
| 451 | void EditorNode::_update_from_settings() { |
| 452 | if (!is_inside_tree()) { |
| 453 | return; |
| 454 | } |
| 455 | _update_title(); |
| 456 | |
| 457 | int current_filter = GLOBAL_GET("rendering/textures/canvas_textures/default_texture_filter"); |
| 458 | if (current_filter != scene_root->get_default_canvas_item_texture_filter()) { |
| 459 | Viewport::DefaultCanvasItemTextureFilter tf = (Viewport::DefaultCanvasItemTextureFilter)current_filter; |
| 460 | scene_root->set_default_canvas_item_texture_filter(tf); |
| 461 | } |
| 462 | int current_repeat = GLOBAL_GET("rendering/textures/canvas_textures/default_texture_repeat"); |
| 463 | if (current_repeat != scene_root->get_default_canvas_item_texture_repeat()) { |
| 464 | Viewport::DefaultCanvasItemTextureRepeat tr = (Viewport::DefaultCanvasItemTextureRepeat)current_repeat; |
| 465 | scene_root->set_default_canvas_item_texture_repeat(tr); |
| 466 | } |
| 467 | String current_fallback_locale = GLOBAL_GET("internationalization/locale/fallback"); |
| 468 | if (current_fallback_locale != TranslationServer::get_singleton()->get_fallback_locale()) { |
| 469 | TranslationServer::get_singleton()->set_fallback_locale(current_fallback_locale); |
| 470 | scene_root->propagate_notification(Control::NOTIFICATION_LAYOUT_DIRECTION_CHANGED); |
| 471 | } |
| 472 | |
| 473 | RS::DOFBokehShape dof_shape = RS::DOFBokehShape(int(GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_bokeh_shape"))); |
| 474 | RS::get_singleton()->camera_attributes_set_dof_blur_bokeh_shape(dof_shape); |
| 475 | RS::DOFBlurQuality dof_quality = RS::DOFBlurQuality(int(GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_bokeh_quality"))); |
| 476 | bool dof_jitter = GLOBAL_GET("rendering/camera/depth_of_field/depth_of_field_use_jitter"); |
| 477 | RS::get_singleton()->camera_attributes_set_dof_blur_quality(dof_quality, dof_jitter); |
| 478 | RS::get_singleton()->environment_set_ssao_quality(RS::EnvironmentSSAOQuality(int(GLOBAL_GET("rendering/environment/ssao/quality"))), GLOBAL_GET("rendering/environment/ssao/half_size"), GLOBAL_GET("rendering/environment/ssao/adaptive_target"), GLOBAL_GET("rendering/environment/ssao/blur_passes"), GLOBAL_GET("rendering/environment/ssao/fadeout_from"), GLOBAL_GET("rendering/environment/ssao/fadeout_to")); |
| 479 | RS::get_singleton()->screen_space_roughness_limiter_set_active(GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/enabled"), GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/amount"), GLOBAL_GET("rendering/anti_aliasing/screen_space_roughness_limiter/limit")); |
| 480 | bool glow_bicubic = int(GLOBAL_GET("rendering/environment/glow/upscale_mode")) > 0; |
| 481 | RS::get_singleton()->environment_set_ssil_quality(RS::EnvironmentSSILQuality(int(GLOBAL_GET("rendering/environment/ssil/quality"))), GLOBAL_GET("rendering/environment/ssil/half_size"), GLOBAL_GET("rendering/environment/ssil/adaptive_target"), GLOBAL_GET("rendering/environment/ssil/blur_passes"), GLOBAL_GET("rendering/environment/ssil/fadeout_from"), GLOBAL_GET("rendering/environment/ssil/fadeout_to")); |
| 482 | RS::get_singleton()->environment_glow_set_use_bicubic_upscale(glow_bicubic); |
| 483 | RS::EnvironmentSSRRoughnessQuality ssr_roughness_quality = RS::EnvironmentSSRRoughnessQuality(int(GLOBAL_GET("rendering/environment/screen_space_reflection/roughness_quality"))); |
| 484 | RS::get_singleton()->environment_set_ssr_roughness_quality(ssr_roughness_quality); |
| 485 | RS::SubSurfaceScatteringQuality sss_quality = RS::SubSurfaceScatteringQuality(int(GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_quality"))); |
| 486 | RS::get_singleton()->sub_surface_scattering_set_quality(sss_quality); |
| 487 | float sss_scale = GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_scale"); |
| 488 | float sss_depth_scale = GLOBAL_GET("rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale"); |
| 489 | RS::get_singleton()->sub_surface_scattering_set_scale(sss_scale, sss_depth_scale); |
| 490 | |
| 491 | uint32_t directional_shadow_size = GLOBAL_GET("rendering/lights_and_shadows/directional_shadow/size"); |
| 492 | uint32_t directional_shadow_16_bits = GLOBAL_GET("rendering/lights_and_shadows/directional_shadow/16_bits"); |
| 493 | RS::get_singleton()->directional_shadow_atlas_set_size(directional_shadow_size, directional_shadow_16_bits); |
| 494 | |
| 495 | RS::ShadowQuality shadows_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality"))); |
| 496 | RS::get_singleton()->positional_soft_shadow_filter_set_quality(shadows_quality); |
| 497 | RS::ShadowQuality directional_shadow_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality"))); |
| 498 | RS::get_singleton()->directional_soft_shadow_filter_set_quality(directional_shadow_quality); |
| 499 | float probe_update_speed = GLOBAL_GET("rendering/lightmapping/probe_capture/update_speed"); |
| 500 | RS::get_singleton()->lightmap_set_probe_capture_update_speed(probe_update_speed); |
| 501 | RS::EnvironmentSDFGIFramesToConverge frames_to_converge = RS::EnvironmentSDFGIFramesToConverge(int(GLOBAL_GET("rendering/global_illumination/sdfgi/frames_to_converge"))); |
| 502 | RS::get_singleton()->environment_set_sdfgi_frames_to_converge(frames_to_converge); |
| 503 | RS::EnvironmentSDFGIRayCount ray_count = RS::EnvironmentSDFGIRayCount(int(GLOBAL_GET("rendering/global_illumination/sdfgi/probe_ray_count"))); |
| 504 | RS::get_singleton()->environment_set_sdfgi_ray_count(ray_count); |
| 505 | RS::VoxelGIQuality voxel_gi_quality = RS::VoxelGIQuality(int(GLOBAL_GET("rendering/global_illumination/voxel_gi/quality"))); |
| 506 | RS::get_singleton()->voxel_gi_set_quality(voxel_gi_quality); |
| 507 | RS::get_singleton()->environment_set_volumetric_fog_volume_size(GLOBAL_GET("rendering/environment/volumetric_fog/volume_size"), GLOBAL_GET("rendering/environment/volumetric_fog/volume_depth")); |
| 508 | RS::get_singleton()->environment_set_volumetric_fog_filter_active(bool(GLOBAL_GET("rendering/environment/volumetric_fog/use_filter"))); |
nothing calls this directly
no test coverage detected