You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
Refactor pixel snapping.
-Rename pixel_snap to snap_2d_to_vertices -Added snap_2d_to_transforms which is more useful Fixes #41814 Solves proposal https://github.com/godotengine/godot-proposals/issues/1666 Supersedes #35606, supersedes #41535, supersedes #41534
This commit is contained in:
@@ -506,6 +506,11 @@ void EditorNode::_notification(int p_what) {
|
||||
RS::get_singleton()->environment_set_volumetric_fog_directional_shadow_shrink_size(GLOBAL_GET("rendering/volumetric_fog/directional_shadow_shrink"));
|
||||
RS::get_singleton()->environment_set_volumetric_fog_positional_shadow_shrink_size(GLOBAL_GET("rendering/volumetric_fog/positional_shadow_shrink"));
|
||||
RS::get_singleton()->canvas_set_shadow_texture_size(GLOBAL_GET("rendering/quality/2d_shadow_atlas/size"));
|
||||
|
||||
bool snap_2d_transforms = GLOBAL_GET("rendering/quality/2d/snap_2d_transforms_to_pixel");
|
||||
scene_root->set_snap_2d_transforms_to_pixel(snap_2d_transforms);
|
||||
bool snap_2d_vertices = GLOBAL_GET("rendering/quality/2d/snap_2d_vertices_to_pixel");
|
||||
scene_root->set_snap_2d_vertices_to_pixel(snap_2d_vertices);
|
||||
}
|
||||
|
||||
ResourceImporterTexture::get_singleton()->update_imports();
|
||||
@@ -517,6 +522,8 @@ void EditorNode::_notification(int p_what) {
|
||||
OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(int(EDITOR_GET("interface/editor/low_processor_mode_sleep_usec")));
|
||||
get_tree()->get_root()->set_as_audio_listener(false);
|
||||
get_tree()->get_root()->set_as_audio_listener_2d(false);
|
||||
get_tree()->get_root()->set_snap_2d_transforms_to_pixel(false);
|
||||
get_tree()->get_root()->set_snap_2d_vertices_to_pixel(false);
|
||||
get_tree()->set_auto_accept_quit(false);
|
||||
get_tree()->get_root()->connect("files_dropped", callable_mp(this, &EditorNode::_dropped_files));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user