Mark some common project settings as basic
This commit is contained in:
parent
296c8b74f2
commit
c178cfef8e
|
@ -4863,7 +4863,7 @@ bool EditorNode::has_scenes_in_session() {
|
|||
|
||||
bool EditorNode::ensure_main_scene(bool p_from_native) {
|
||||
pick_main_scene->set_meta("from_native", p_from_native); // Whether from play button or native run.
|
||||
String main_scene = GLOBAL_DEF("application/run/main_scene", "");
|
||||
String main_scene = GLOBAL_DEF_BASIC("application/run/main_scene", "");
|
||||
|
||||
if (main_scene.is_empty()) {
|
||||
current_menu_option = -1;
|
||||
|
@ -4929,7 +4929,7 @@ bool EditorNode::is_run_playing() const {
|
|||
String EditorNode::get_run_playing_scene() const {
|
||||
String run_filename = editor_run.get_running_scene();
|
||||
if (run_filename.is_empty() && is_run_playing()) {
|
||||
run_filename = GLOBAL_DEF("application/run/main_scene", ""); // Must be the main scene then.
|
||||
run_filename = GLOBAL_DEF_BASIC("application/run/main_scene", ""); // Must be the main scene then.
|
||||
}
|
||||
|
||||
return run_filename;
|
||||
|
|
|
@ -1765,14 +1765,14 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
|||
|
||||
MAIN_PRINT("Main: Load Boot Image");
|
||||
|
||||
Color clear = GLOBAL_DEF("rendering/environment/defaults/default_clear_color", Color(0.3, 0.3, 0.3));
|
||||
Color clear = GLOBAL_DEF_BASIC("rendering/environment/defaults/default_clear_color", Color(0.3, 0.3, 0.3));
|
||||
RenderingServer::get_singleton()->set_default_clear_color(clear);
|
||||
|
||||
if (show_logo) { //boot logo!
|
||||
const bool boot_logo_image = GLOBAL_DEF("application/boot_splash/show_image", true);
|
||||
const String boot_logo_path = String(GLOBAL_DEF("application/boot_splash/image", String())).strip_edges();
|
||||
const bool boot_logo_scale = GLOBAL_DEF("application/boot_splash/fullsize", true);
|
||||
const bool boot_logo_filter = GLOBAL_DEF("application/boot_splash/use_filter", true);
|
||||
const bool boot_logo_image = GLOBAL_DEF_BASIC("application/boot_splash/show_image", true);
|
||||
const String boot_logo_path = String(GLOBAL_DEF_BASIC("application/boot_splash/image", String())).strip_edges();
|
||||
const bool boot_logo_scale = GLOBAL_DEF_BASIC("application/boot_splash/fullsize", true);
|
||||
const bool boot_logo_filter = GLOBAL_DEF_BASIC("application/boot_splash/use_filter", true);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("application/boot_splash/image",
|
||||
PropertyInfo(Variant::STRING,
|
||||
"application/boot_splash/image",
|
||||
|
@ -1797,10 +1797,10 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
|||
|
||||
#if defined(TOOLS_ENABLED) && !defined(NO_EDITOR_SPLASH)
|
||||
const Color boot_bg_color =
|
||||
GLOBAL_DEF("application/boot_splash/bg_color",
|
||||
GLOBAL_DEF_BASIC("application/boot_splash/bg_color",
|
||||
(editor || project_manager) ? boot_splash_editor_bg_color : boot_splash_bg_color);
|
||||
#else
|
||||
const Color boot_bg_color = GLOBAL_DEF("application/boot_splash/bg_color", boot_splash_bg_color);
|
||||
const Color boot_bg_color = GLOBAL_DEF_BASIC("application/boot_splash/bg_color", boot_splash_bg_color);
|
||||
#endif
|
||||
if (boot_logo.is_valid()) {
|
||||
RenderingServer::get_singleton()->set_boot_image(boot_logo, boot_bg_color, boot_logo_scale,
|
||||
|
@ -1832,7 +1832,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
|||
|
||||
MAIN_PRINT("Main: DCC");
|
||||
RenderingServer::get_singleton()->set_default_clear_color(
|
||||
GLOBAL_DEF("rendering/environment/defaults/default_clear_color", Color(0.3, 0.3, 0.3)));
|
||||
GLOBAL_DEF_BASIC("rendering/environment/defaults/default_clear_color", Color(0.3, 0.3, 0.3)));
|
||||
|
||||
GLOBAL_DEF("application/config/icon", String());
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("application/config/icon",
|
||||
|
@ -1958,9 +1958,9 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
|||
// Theme needs modules to be initialized so that sub-resources can be loaded.
|
||||
initialize_theme();
|
||||
|
||||
GLOBAL_DEF("display/mouse_cursor/custom_image", String());
|
||||
GLOBAL_DEF("display/mouse_cursor/custom_image_hotspot", Vector2());
|
||||
GLOBAL_DEF("display/mouse_cursor/tooltip_position_offset", Point2(10, 10));
|
||||
GLOBAL_DEF_BASIC("display/mouse_cursor/custom_image", String());
|
||||
GLOBAL_DEF_BASIC("display/mouse_cursor/custom_image_hotspot", Vector2());
|
||||
GLOBAL_DEF_BASIC("display/mouse_cursor/tooltip_position_offset", Point2(10, 10));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("display/mouse_cursor/custom_image",
|
||||
PropertyInfo(Variant::STRING,
|
||||
"display/mouse_cursor/custom_image",
|
||||
|
|
|
@ -1373,15 +1373,15 @@ SceneTree::SceneTree() {
|
|||
root->set_as_audio_listener_2d(true);
|
||||
current_scene = nullptr;
|
||||
|
||||
const int msaa_mode = GLOBAL_DEF("rendering/anti_aliasing/quality/msaa", 0);
|
||||
const int msaa_mode = GLOBAL_DEF_BASIC("rendering/anti_aliasing/quality/msaa", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/quality/msaa", PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/msaa", PROPERTY_HINT_ENUM, String::utf8("Disabled (Fastest),2× (Average),4× (Slow),8× (Slowest)")));
|
||||
root->set_msaa(Viewport::MSAA(msaa_mode));
|
||||
|
||||
const int ssaa_mode = GLOBAL_DEF("rendering/anti_aliasing/quality/screen_space_aa", 0);
|
||||
const int ssaa_mode = GLOBAL_DEF_BASIC("rendering/anti_aliasing/quality/screen_space_aa", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/quality/screen_space_aa", PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/screen_space_aa", PROPERTY_HINT_ENUM, "Disabled (Fastest),FXAA (Fast)"));
|
||||
root->set_screen_space_aa(Viewport::ScreenSpaceAA(ssaa_mode));
|
||||
|
||||
const bool use_taa = GLOBAL_DEF("rendering/anti_aliasing/quality/use_taa", false);
|
||||
const bool use_taa = GLOBAL_DEF_BASIC("rendering/anti_aliasing/quality/use_taa", false);
|
||||
root->set_use_taa(use_taa);
|
||||
|
||||
const bool use_debanding = GLOBAL_DEF("rendering/anti_aliasing/quality/use_debanding", false);
|
||||
|
|
|
@ -73,8 +73,8 @@ World2D::World2D() {
|
|||
// Create and configure space2D to be more friendly with pixels than meters
|
||||
space = PhysicsServer2D::get_singleton()->space_create();
|
||||
PhysicsServer2D::get_singleton()->space_set_active(space, true);
|
||||
PhysicsServer2D::get_singleton()->area_set_param(space, PhysicsServer2D::AREA_PARAM_GRAVITY, GLOBAL_DEF("physics/2d/default_gravity", 980.0));
|
||||
PhysicsServer2D::get_singleton()->area_set_param(space, PhysicsServer2D::AREA_PARAM_GRAVITY_VECTOR, GLOBAL_DEF("physics/2d/default_gravity_vector", Vector2(0, 1)));
|
||||
PhysicsServer2D::get_singleton()->area_set_param(space, PhysicsServer2D::AREA_PARAM_GRAVITY, GLOBAL_DEF_BASIC("physics/2d/default_gravity", 980.0));
|
||||
PhysicsServer2D::get_singleton()->area_set_param(space, PhysicsServer2D::AREA_PARAM_GRAVITY_VECTOR, GLOBAL_DEF_BASIC("physics/2d/default_gravity_vector", Vector2(0, 1)));
|
||||
PhysicsServer2D::get_singleton()->area_set_param(space, PhysicsServer2D::AREA_PARAM_LINEAR_DAMP, GLOBAL_DEF("physics/2d/default_linear_damp", 0.1));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_linear_damp", PropertyInfo(Variant::FLOAT, "physics/2d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
|
||||
PhysicsServer2D::get_singleton()->area_set_param(space, PhysicsServer2D::AREA_PARAM_ANGULAR_DAMP, GLOBAL_DEF("physics/2d/default_angular_damp", 1.0));
|
||||
|
|
|
@ -141,8 +141,8 @@ World3D::World3D() {
|
|||
scenario = RenderingServer::get_singleton()->scenario_create();
|
||||
|
||||
PhysicsServer3D::get_singleton()->space_set_active(space, true);
|
||||
PhysicsServer3D::get_singleton()->area_set_param(space, PhysicsServer3D::AREA_PARAM_GRAVITY, GLOBAL_DEF("physics/3d/default_gravity", 9.8));
|
||||
PhysicsServer3D::get_singleton()->area_set_param(space, PhysicsServer3D::AREA_PARAM_GRAVITY_VECTOR, GLOBAL_DEF("physics/3d/default_gravity_vector", Vector3(0, -1, 0)));
|
||||
PhysicsServer3D::get_singleton()->area_set_param(space, PhysicsServer3D::AREA_PARAM_GRAVITY, GLOBAL_DEF_BASIC("physics/3d/default_gravity", 9.8));
|
||||
PhysicsServer3D::get_singleton()->area_set_param(space, PhysicsServer3D::AREA_PARAM_GRAVITY_VECTOR, GLOBAL_DEF_BASIC("physics/3d/default_gravity_vector", Vector3(0, -1, 0)));
|
||||
PhysicsServer3D::get_singleton()->area_set_param(space, PhysicsServer3D::AREA_PARAM_LINEAR_DAMP, GLOBAL_DEF("physics/3d/default_linear_damp", 0.1));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_linear_damp", PropertyInfo(Variant::FLOAT, "physics/3d/default_linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"));
|
||||
PhysicsServer3D::get_singleton()->area_set_param(space, PhysicsServer3D::AREA_PARAM_ANGULAR_DAMP, GLOBAL_DEF("physics/3d/default_angular_damp", 0.1));
|
||||
|
|
Loading…
Reference in New Issue