Add PropertyInfo overload for GLOBAL_DEF
This commit is contained in:
parent
05097ded0a
commit
7c6b659bd7
25 changed files with 172 additions and 446 deletions
|
@ -1048,6 +1048,12 @@ Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restar
|
|||
return ret;
|
||||
}
|
||||
|
||||
Variant _GLOBAL_DEF(const PropertyInfo &p_info, const Variant &p_default, bool p_restart_if_changed, bool p_ignore_value_in_docs, bool p_basic, bool p_internal) {
|
||||
Variant ret = _GLOBAL_DEF(p_info.name, p_default, p_restart_if_changed, p_ignore_value_in_docs, p_basic, p_internal);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(p_info);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Vector<String> ProjectSettings::get_optimizer_presets() const {
|
||||
List<PropertyInfo> pi;
|
||||
ProjectSettings::get_singleton()->get_property_list(&pi);
|
||||
|
@ -1082,13 +1088,13 @@ void ProjectSettings::_add_property_info_bind(const Dictionary &p_info) {
|
|||
pinfo.hint_string = p_info["hint_string"];
|
||||
}
|
||||
|
||||
set_custom_property_info(pinfo.name, pinfo);
|
||||
set_custom_property_info(pinfo);
|
||||
}
|
||||
|
||||
void ProjectSettings::set_custom_property_info(const String &p_prop, const PropertyInfo &p_info) {
|
||||
ERR_FAIL_COND(!props.has(p_prop));
|
||||
custom_prop_info[p_prop] = p_info;
|
||||
custom_prop_info[p_prop].name = p_prop;
|
||||
void ProjectSettings::set_custom_property_info(const PropertyInfo &p_info) {
|
||||
const String &prop_name = p_info.name;
|
||||
ERR_FAIL_COND(!props.has(prop_name));
|
||||
custom_prop_info[prop_name] = p_info;
|
||||
}
|
||||
|
||||
const HashMap<StringName, PropertyInfo> &ProjectSettings::get_custom_property_info() const {
|
||||
|
@ -1298,12 +1304,11 @@ ProjectSettings::ProjectSettings() {
|
|||
String("Please include this when reporting the bug to the project developer."));
|
||||
GLOBAL_DEF("debug/settings/crash_handler/message.editor",
|
||||
String("Please include this when reporting the bug on: https://github.com/godotengine/godot/issues"));
|
||||
GLOBAL_DEF_RST("rendering/occlusion_culling/bvh_build_quality", 2);
|
||||
GLOBAL_DEF("memory/limits/multithreaded_server/rid_pool_prealloc", 60);
|
||||
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/occlusion_culling/bvh_build_quality", PROPERTY_HINT_ENUM, "Low,Medium,High"), 2);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "memory/limits/multithreaded_server/rid_pool_prealloc", PROPERTY_HINT_RANGE, "0,500,1"), 60); // No negative and limit to 500 due to crashes.
|
||||
GLOBAL_DEF_RST("internationalization/rendering/force_right_to_left_layout_direction", false);
|
||||
|
||||
GLOBAL_DEF("gui/timers/incremental_search_max_interval_msec", 2000);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/incremental_search_max_interval_msec", PropertyInfo(Variant::INT, "gui/timers/incremental_search_max_interval_msec", PROPERTY_HINT_RANGE, "0,10000,1,or_greater")); // No negative numbers.
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "gui/timers/incremental_search_max_interval_msec", PROPERTY_HINT_RANGE, "0,10000,1,or_greater"), 2000);
|
||||
|
||||
GLOBAL_DEF("rendering/rendering_device/staging_buffer/block_size_kb", 256);
|
||||
GLOBAL_DEF("rendering/rendering_device/staging_buffer/max_size_mb", 128);
|
||||
|
|
|
@ -173,7 +173,7 @@ public:
|
|||
Error load_custom(const String &p_path);
|
||||
Error save_custom(const String &p_path = "", const CustomMap &p_custom = CustomMap(), const Vector<String> &p_custom_features = Vector<String>(), bool p_merge_with_current = true);
|
||||
Error save();
|
||||
void set_custom_property_info(const String &p_prop, const PropertyInfo &p_info);
|
||||
void set_custom_property_info(const PropertyInfo &p_info);
|
||||
const HashMap<StringName, PropertyInfo> &get_custom_property_info() const;
|
||||
uint64_t get_last_saved_time() { return last_save_time; }
|
||||
|
||||
|
@ -199,6 +199,8 @@ public:
|
|||
|
||||
// Not a macro any longer.
|
||||
Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restart_if_changed = false, bool p_ignore_value_in_docs = false, bool p_basic = false, bool p_internal = false);
|
||||
Variant _GLOBAL_DEF(const PropertyInfo &p_info, const Variant &p_default, bool p_restart_if_changed = false, bool p_ignore_value_in_docs = false, bool p_basic = false, bool p_internal = false);
|
||||
|
||||
#define GLOBAL_DEF(m_var, m_value) _GLOBAL_DEF(m_var, m_value)
|
||||
#define GLOBAL_DEF_RST(m_var, m_value) _GLOBAL_DEF(m_var, m_value, true)
|
||||
#define GLOBAL_DEF_NOVAL(m_var, m_value) _GLOBAL_DEF(m_var, m_value, false, true)
|
||||
|
|
|
@ -465,10 +465,8 @@ Error FileAccessNetwork::_set_unix_permissions(const String &p_file, uint32_t p_
|
|||
}
|
||||
|
||||
void FileAccessNetwork::configure() {
|
||||
GLOBAL_DEF("network/remote_fs/page_size", 65536);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("network/remote_fs/page_size", PropertyInfo(Variant::INT, "network/remote_fs/page_size", PROPERTY_HINT_RANGE, "1,65536,1,or_greater")); //is used as denominator and can't be zero
|
||||
GLOBAL_DEF("network/remote_fs/page_read_ahead", 4);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("network/remote_fs/page_read_ahead", PropertyInfo(Variant::INT, "network/remote_fs/page_read_ahead", PROPERTY_HINT_RANGE, "0,8,1,or_greater"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "network/remote_fs/page_size", PROPERTY_HINT_RANGE, "1,65536,1,or_greater"), 65536); // Is used as denominator and can't be zero
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "network/remote_fs/page_read_ahead", PROPERTY_HINT_RANGE, "0,8,1,or_greater"), 4);
|
||||
}
|
||||
|
||||
FileAccessNetwork::FileAccessNetwork() {
|
||||
|
|
|
@ -314,8 +314,7 @@ MessageQueue::MessageQueue() {
|
|||
ERR_FAIL_COND_MSG(singleton != nullptr, "A MessageQueue singleton already exists.");
|
||||
singleton = this;
|
||||
|
||||
buffer_size = GLOBAL_DEF_RST("memory/limits/message_queue/max_size_kb", DEFAULT_QUEUE_SIZE_KB);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("memory/limits/message_queue/max_size_kb", PropertyInfo(Variant::INT, "memory/limits/message_queue/max_size_kb", PROPERTY_HINT_RANGE, "1024,4096,1,or_greater"));
|
||||
buffer_size = GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "memory/limits/message_queue/max_size_kb", PROPERTY_HINT_RANGE, "1024,4096,1,or_greater"), DEFAULT_QUEUE_SIZE_KB);
|
||||
buffer_size *= 1024;
|
||||
buffer = memnew_arr(uint8_t, buffer_size);
|
||||
}
|
||||
|
|
|
@ -293,12 +293,9 @@ void register_core_types() {
|
|||
|
||||
void register_core_settings() {
|
||||
// Since in register core types, globals may not be present.
|
||||
GLOBAL_DEF("network/limits/tcp/connect_timeout_seconds", (30));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("network/limits/tcp/connect_timeout_seconds", PropertyInfo(Variant::INT, "network/limits/tcp/connect_timeout_seconds", PROPERTY_HINT_RANGE, "1,1800,1"));
|
||||
GLOBAL_DEF_RST("network/limits/packet_peer_stream/max_buffer_po2", (16));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("network/limits/packet_peer_stream/max_buffer_po2", PropertyInfo(Variant::INT, "network/limits/packet_peer_stream/max_buffer_po2", PROPERTY_HINT_RANGE, "0,64,1,or_greater"));
|
||||
GLOBAL_DEF("network/tls/certificate_bundle_override", "");
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("network/tls/certificate_bundle_override", PropertyInfo(Variant::STRING, "network/tls/certificate_bundle_override", PROPERTY_HINT_FILE, "*.crt"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "network/limits/tcp/connect_timeout_seconds", PROPERTY_HINT_RANGE, "1,1800,1"), (30));
|
||||
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "network/limits/packet_peer_stream/max_buffer_po2", PROPERTY_HINT_RANGE, "0,64,1,or_greater"), (16));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "network/tls/certificate_bundle_override", PROPERTY_HINT_FILE, "*.crt"), "");
|
||||
|
||||
int worker_threads = GLOBAL_DEF("threading/worker_pool/max_threads", -1);
|
||||
bool low_priority_use_system_threads = GLOBAL_DEF("threading/worker_pool/use_system_threads_for_low_priority_tasks", true);
|
||||
|
|
|
@ -688,7 +688,7 @@ void TranslationServer::setup() {
|
|||
pseudolocalization_skip_placeholders_enabled = GLOBAL_DEF("internationalization/pseudolocalization/skip_placeholders", true);
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("internationalization/locale/fallback", PropertyInfo(Variant::STRING, "internationalization/locale/fallback", PROPERTY_HINT_LOCALE_ID, ""));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(PropertyInfo(Variant::STRING, "internationalization/locale/fallback", PROPERTY_HINT_LOCALE_ID, ""));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -5895,8 +5895,7 @@ void EditorNode::_feature_profile_changed() {
|
|||
}
|
||||
|
||||
void EditorNode::_bind_methods() {
|
||||
GLOBAL_DEF("editor/scene/scene_naming", SCENE_NAME_CASING_SNAKE_CASE);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("editor/scene/scene_naming", PropertyInfo(Variant::INT, "editor/scene/scene_naming", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "editor/scene/scene_naming", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"), SCENE_NAME_CASING_SNAKE_CASE);
|
||||
ClassDB::bind_method("edit_current", &EditorNode::edit_current);
|
||||
ClassDB::bind_method("edit_node", &EditorNode::edit_node);
|
||||
|
||||
|
|
221
main/main.cpp
221
main/main.cpp
|
@ -1359,35 +1359,10 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
|
||||
ResourceUID::get_singleton()->load_from_cache(); // load UUIDs from cache.
|
||||
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("memory/limits/multithreaded_server/rid_pool_prealloc",
|
||||
PropertyInfo(Variant::INT,
|
||||
"memory/limits/multithreaded_server/rid_pool_prealloc",
|
||||
PROPERTY_HINT_RANGE,
|
||||
"0,500,1")); // No negative and limit to 500 due to crashes
|
||||
GLOBAL_DEF("network/limits/debugger/max_chars_per_second", 32768);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("network/limits/debugger/max_chars_per_second",
|
||||
PropertyInfo(Variant::INT,
|
||||
"network/limits/debugger/max_chars_per_second",
|
||||
PROPERTY_HINT_RANGE,
|
||||
"0, 4096, 1, or_greater"));
|
||||
GLOBAL_DEF("network/limits/debugger/max_queued_messages", 2048);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("network/limits/debugger/max_queued_messages",
|
||||
PropertyInfo(Variant::INT,
|
||||
"network/limits/debugger/max_queued_messages",
|
||||
PROPERTY_HINT_RANGE,
|
||||
"0, 8192, 1, or_greater"));
|
||||
GLOBAL_DEF("network/limits/debugger/max_errors_per_second", 400);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("network/limits/debugger/max_errors_per_second",
|
||||
PropertyInfo(Variant::INT,
|
||||
"network/limits/debugger/max_errors_per_second",
|
||||
PROPERTY_HINT_RANGE,
|
||||
"0, 200, 1, or_greater"));
|
||||
GLOBAL_DEF("network/limits/debugger/max_warnings_per_second", 400);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("network/limits/debugger/max_warnings_per_second",
|
||||
PropertyInfo(Variant::INT,
|
||||
"network/limits/debugger/max_warnings_per_second",
|
||||
PROPERTY_HINT_RANGE,
|
||||
"0, 200, 1, or_greater"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "network/limits/debugger/max_chars_per_second", PROPERTY_HINT_RANGE, "0, 4096, 1, or_greater"), 32768);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "network/limits/debugger/max_queued_messages", PROPERTY_HINT_RANGE, "0, 8192, 1, or_greater"), 2048);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "network/limits/debugger/max_errors_per_second", PROPERTY_HINT_RANGE, "0, 200, 1, or_greater"), 400);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "network/limits/debugger/max_warnings_per_second", PROPERTY_HINT_RANGE, "0, 200, 1, or_greater"), 400);
|
||||
|
||||
EngineDebugger::initialize(debug_uri, skip_breakpoints, breakpoints, []() {
|
||||
if (editor_pid) {
|
||||
|
@ -1424,12 +1399,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
// are disabled while in the editor (even if they should logically apply).
|
||||
GLOBAL_DEF("debug/file_logging/enable_file_logging.pc", true);
|
||||
GLOBAL_DEF("debug/file_logging/log_path", "user://logs/godot.log");
|
||||
GLOBAL_DEF("debug/file_logging/max_log_files", 5);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("debug/file_logging/max_log_files",
|
||||
PropertyInfo(Variant::INT,
|
||||
"debug/file_logging/max_log_files",
|
||||
PROPERTY_HINT_RANGE,
|
||||
"0,20,1,or_greater")); //no negative numbers
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "debug/file_logging/max_log_files", PROPERTY_HINT_RANGE, "0,20,1,or_greater"), 5);
|
||||
|
||||
if (!project_manager && !editor && FileAccess::get_create_func(FileAccess::ACCESS_USERDATA) &&
|
||||
GLOBAL_GET("debug/file_logging/enable_file_logging")) {
|
||||
// Don't create logs for the project manager as they would be written to
|
||||
|
@ -1485,21 +1456,11 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
|
||||
// For now everything defaults to vulkan when available. This can change in future updates.
|
||||
GLOBAL_DEF("rendering/rendering_device/driver", default_driver);
|
||||
GLOBAL_DEF("rendering/rendering_device/driver.windows", default_driver);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/rendering_device/driver.windows",
|
||||
PropertyInfo(Variant::STRING, "rendering/rendering_device/driver.windows", PROPERTY_HINT_ENUM, driver_hints));
|
||||
GLOBAL_DEF("rendering/rendering_device/driver.linuxbsd", default_driver);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/rendering_device/driver.linuxbsd",
|
||||
PropertyInfo(Variant::STRING, "rendering/rendering_device/driver.linuxbsd", PROPERTY_HINT_ENUM, driver_hints));
|
||||
GLOBAL_DEF("rendering/rendering_device/driver.android", default_driver);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/rendering_device/driver.android",
|
||||
PropertyInfo(Variant::STRING, "rendering/rendering_device/driver.android", PROPERTY_HINT_ENUM, driver_hints));
|
||||
GLOBAL_DEF("rendering/rendering_device/driver.ios", default_driver);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/rendering_device/driver.ios",
|
||||
PropertyInfo(Variant::STRING, "rendering/rendering_device/driver.ios", PROPERTY_HINT_ENUM, driver_hints));
|
||||
GLOBAL_DEF("rendering/rendering_device/driver.macos", default_driver);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/rendering_device/driver.macos",
|
||||
PropertyInfo(Variant::STRING, "rendering/rendering_device/driver.macos", PROPERTY_HINT_ENUM, driver_hints));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/rendering_device/driver.windows", PROPERTY_HINT_ENUM, driver_hints), default_driver);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/rendering_device/driver.linuxbsd", PROPERTY_HINT_ENUM, driver_hints), default_driver);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/rendering_device/driver.android", PROPERTY_HINT_ENUM, driver_hints), default_driver);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/rendering_device/driver.ios", PROPERTY_HINT_ENUM, driver_hints), default_driver);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/rendering_device/driver.macos", PROPERTY_HINT_ENUM, driver_hints), default_driver);
|
||||
|
||||
driver_hints = "";
|
||||
#ifdef GLES3_ENABLED
|
||||
|
@ -1509,24 +1470,12 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
default_driver = driver_hints.get_slice(",", 0);
|
||||
|
||||
GLOBAL_DEF("rendering/gl_compatibility/driver", default_driver);
|
||||
GLOBAL_DEF("rendering/gl_compatibility/driver.windows", default_driver);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/gl_compatibility/driver.windows",
|
||||
PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.windows", PROPERTY_HINT_ENUM, driver_hints));
|
||||
GLOBAL_DEF("rendering/gl_compatibility/driver.linuxbsd", default_driver);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/gl_compatibility/driver.linuxbsd",
|
||||
PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.linuxbsd", PROPERTY_HINT_ENUM, driver_hints));
|
||||
GLOBAL_DEF("rendering/gl_compatibility/driver.web", default_driver);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/gl_compatibility/driver.web",
|
||||
PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.web", PROPERTY_HINT_ENUM, driver_hints));
|
||||
GLOBAL_DEF("rendering/gl_compatibility/driver.android", default_driver);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/gl_compatibility/driver.android",
|
||||
PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.android", PROPERTY_HINT_ENUM, driver_hints));
|
||||
GLOBAL_DEF("rendering/gl_compatibility/driver.ios", default_driver);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/gl_compatibility/driver.ios",
|
||||
PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.ios", PROPERTY_HINT_ENUM, driver_hints));
|
||||
GLOBAL_DEF("rendering/gl_compatibility/driver.macos", default_driver);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/gl_compatibility/driver.macos",
|
||||
PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.macos", PROPERTY_HINT_ENUM, driver_hints));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.windows", PROPERTY_HINT_ENUM, driver_hints), default_driver);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.linuxbsd", PROPERTY_HINT_ENUM, driver_hints), default_driver);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.web", PROPERTY_HINT_ENUM, driver_hints), default_driver);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.android", PROPERTY_HINT_ENUM, driver_hints), default_driver);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.ios", PROPERTY_HINT_ENUM, driver_hints), default_driver);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/gl_compatibility/driver.macos", PROPERTY_HINT_ENUM, driver_hints), default_driver);
|
||||
}
|
||||
|
||||
// Start with RenderingDevice-based backends. Should be included if any RD driver present.
|
||||
|
@ -1646,15 +1595,10 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
}
|
||||
|
||||
default_renderer = renderer_hints.get_slice(",", 0);
|
||||
GLOBAL_DEF_RST_BASIC("rendering/renderer/rendering_method", default_renderer);
|
||||
GLOBAL_DEF_RST_BASIC(PropertyInfo(Variant::STRING, "rendering/renderer/rendering_method", PROPERTY_HINT_ENUM, renderer_hints), default_renderer);
|
||||
GLOBAL_DEF_RST_BASIC("rendering/renderer/rendering_method.mobile", default_renderer_mobile);
|
||||
GLOBAL_DEF_RST_BASIC("rendering/renderer/rendering_method.web", "gl_compatibility"); // This is a bit of a hack until we have WebGPU support.
|
||||
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/renderer/rendering_method",
|
||||
PropertyInfo(Variant::STRING,
|
||||
"rendering/renderer/rendering_method",
|
||||
PROPERTY_HINT_ENUM, renderer_hints));
|
||||
|
||||
// Default to ProjectSettings default if nothing set on the command line.
|
||||
if (rendering_method.is_empty()) {
|
||||
rendering_method = GLOBAL_GET("rendering/renderer/rendering_method");
|
||||
|
@ -1795,22 +1739,10 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
window_vsync_mode = DisplayServer::VSyncMode::VSYNC_DISABLED;
|
||||
}
|
||||
}
|
||||
Engine::get_singleton()->set_physics_ticks_per_second(GLOBAL_DEF_BASIC("physics/common/physics_ticks_per_second", 60));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/common/physics_ticks_per_second",
|
||||
PropertyInfo(Variant::INT, "physics/common/physics_ticks_per_second",
|
||||
PROPERTY_HINT_RANGE, "1,1000,1"));
|
||||
|
||||
Engine::get_singleton()->set_max_physics_steps_per_frame(GLOBAL_DEF("physics/common/max_physics_steps_per_frame", 8));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/common/max_physics_steps_per_frame",
|
||||
PropertyInfo(Variant::INT, "physics/common/max_physics_steps_per_frame",
|
||||
PROPERTY_HINT_RANGE, "1,100,1"));
|
||||
|
||||
Engine::get_singleton()->set_physics_ticks_per_second(GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "physics/common/physics_ticks_per_second", PROPERTY_HINT_RANGE, "1,1000,1"), 60));
|
||||
Engine::get_singleton()->set_max_physics_steps_per_frame(GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "physics/common/max_physics_steps_per_frame", PROPERTY_HINT_RANGE, "1,100,1"), 8));
|
||||
Engine::get_singleton()->set_physics_jitter_fix(GLOBAL_DEF("physics/common/physics_jitter_fix", 0.5));
|
||||
Engine::get_singleton()->set_max_fps(GLOBAL_DEF("application/run/max_fps", 0));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("application/run/max_fps",
|
||||
PropertyInfo(Variant::INT,
|
||||
"application/run/max_fps",
|
||||
PROPERTY_HINT_RANGE, "0,1000,1"));
|
||||
Engine::get_singleton()->set_max_fps(GLOBAL_DEF(PropertyInfo(Variant::INT, "application/run/max_fps", PROPERTY_HINT_RANGE, "0,1000,1"), 0));
|
||||
|
||||
GLOBAL_DEF("debug/settings/stdout/print_fps", false);
|
||||
GLOBAL_DEF("debug/settings/stdout/print_gpu_profile", false);
|
||||
|
@ -1821,46 +1753,25 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
|||
}
|
||||
|
||||
if (frame_delay == 0) {
|
||||
frame_delay = GLOBAL_DEF("application/run/frame_delay_msec", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("application/run/frame_delay_msec",
|
||||
PropertyInfo(Variant::INT,
|
||||
"application/run/frame_delay_msec",
|
||||
PROPERTY_HINT_RANGE,
|
||||
"0,100,1,or_greater")); // No negative numbers
|
||||
frame_delay = GLOBAL_DEF(PropertyInfo(Variant::INT, "application/run/frame_delay_msec", PROPERTY_HINT_RANGE, "0,100,1,or_greater"), 0);
|
||||
}
|
||||
|
||||
OS::get_singleton()->set_low_processor_usage_mode(GLOBAL_DEF("application/run/low_processor_mode", false));
|
||||
OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(
|
||||
GLOBAL_DEF("application/run/low_processor_mode_sleep_usec", 6900)); // Roughly 144 FPS
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("application/run/low_processor_mode_sleep_usec",
|
||||
PropertyInfo(Variant::INT,
|
||||
"application/run/low_processor_mode_sleep_usec",
|
||||
PROPERTY_HINT_RANGE,
|
||||
"0,33200,1,or_greater")); // No negative numbers
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "application/run/low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "0,33200,1,or_greater"), 6900)); // Roughly 144 FPS
|
||||
|
||||
GLOBAL_DEF("display/window/ios/allow_high_refresh_rate", true);
|
||||
GLOBAL_DEF("display/window/ios/hide_home_indicator", true);
|
||||
GLOBAL_DEF("display/window/ios/hide_status_bar", true);
|
||||
GLOBAL_DEF("display/window/ios/suppress_ui_gesture", true);
|
||||
GLOBAL_DEF("input_devices/pointing/ios/touch_delay", 0.15);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("input_devices/pointing/ios/touch_delay",
|
||||
PropertyInfo(Variant::FLOAT,
|
||||
"input_devices/pointing/ios/touch_delay",
|
||||
PROPERTY_HINT_RANGE, "0,1,0.001"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "input_devices/pointing/ios/touch_delay", PROPERTY_HINT_RANGE, "0,1,0.001"), 0.15);
|
||||
|
||||
// XR project settings.
|
||||
GLOBAL_DEF_RST_BASIC("xr/openxr/enabled", false);
|
||||
GLOBAL_DEF_BASIC("xr/openxr/default_action_map", "res://openxr_action_map.tres");
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("xr/openxr/default_action_map", PropertyInfo(Variant::STRING, "xr/openxr/default_action_map", PROPERTY_HINT_FILE, "*.tres"));
|
||||
|
||||
GLOBAL_DEF_BASIC("xr/openxr/form_factor", "0");
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("xr/openxr/form_factor", PropertyInfo(Variant::INT, "xr/openxr/form_factor", PROPERTY_HINT_ENUM, "Head Mounted,Handheld"));
|
||||
|
||||
GLOBAL_DEF_BASIC("xr/openxr/view_configuration", "1");
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("xr/openxr/view_configuration", PropertyInfo(Variant::INT, "xr/openxr/view_configuration", PROPERTY_HINT_ENUM, "Mono,Stereo")); // "Mono,Stereo,Quad,Observer"
|
||||
|
||||
GLOBAL_DEF_BASIC("xr/openxr/reference_space", "1");
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("xr/openxr/reference_space", PropertyInfo(Variant::INT, "xr/openxr/reference_space", PROPERTY_HINT_ENUM, "Local,Stage"));
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "xr/openxr/default_action_map", PROPERTY_HINT_FILE, "*.tres"), "res://openxr_action_map.tres");
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "xr/openxr/form_factor", PROPERTY_HINT_ENUM, "Head Mounted,Handheld"), "0");
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "xr/openxr/view_configuration", PROPERTY_HINT_ENUM, "Mono,Stereo"), "1"); // "Mono,Stereo,Quad,Observer"
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "xr/openxr/reference_space", PROPERTY_HINT_ENUM, "Local,Stage"), "1");
|
||||
|
||||
GLOBAL_DEF_BASIC("xr/openxr/submit_depth_buffer", false);
|
||||
|
||||
|
@ -2046,8 +1957,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
|||
|
||||
{
|
||||
GLOBAL_DEF_RST_NOVAL("input_devices/pen_tablet/driver", "");
|
||||
GLOBAL_DEF_RST_NOVAL("input_devices/pen_tablet/driver.windows", "");
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("input_devices/pen_tablet/driver.windows", PropertyInfo(Variant::STRING, "input_devices/pen_tablet/driver.windows", PROPERTY_HINT_ENUM, "wintab,winink"));
|
||||
GLOBAL_DEF_RST_NOVAL(PropertyInfo(Variant::STRING, "input_devices/pen_tablet/driver.windows", PROPERTY_HINT_ENUM, "wintab,winink"), "");
|
||||
}
|
||||
|
||||
if (tablet_driver.is_empty()) { // specified in project.godot
|
||||
|
@ -2148,13 +2058,9 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
|||
|
||||
if (show_logo) { //boot logo!
|
||||
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 String boot_logo_path = String(GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "application/boot_splash/image", PROPERTY_HINT_FILE, "*.png"), 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",
|
||||
PROPERTY_HINT_FILE, "*.png"));
|
||||
|
||||
Ref<Image> boot_logo;
|
||||
|
||||
|
@ -2212,22 +2118,9 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
|||
RenderingServer::get_singleton()->set_default_clear_color(
|
||||
GLOBAL_GET("rendering/environment/defaults/default_clear_color"));
|
||||
|
||||
GLOBAL_DEF("application/config/icon", String());
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("application/config/icon",
|
||||
PropertyInfo(Variant::STRING, "application/config/icon",
|
||||
PROPERTY_HINT_FILE, "*.png,*.webp,*.svg"));
|
||||
|
||||
GLOBAL_DEF("application/config/macos_native_icon", String());
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("application/config/macos_native_icon",
|
||||
PropertyInfo(Variant::STRING,
|
||||
"application/config/macos_native_icon",
|
||||
PROPERTY_HINT_FILE, "*.icns"));
|
||||
|
||||
GLOBAL_DEF("application/config/windows_native_icon", String());
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("application/config/windows_native_icon",
|
||||
PropertyInfo(Variant::STRING,
|
||||
"application/config/windows_native_icon",
|
||||
PROPERTY_HINT_FILE, "*.ico"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "application/config/icon", PROPERTY_HINT_FILE, "*.png,*.webp,*.svg"), String());
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "application/config/macos_native_icon", PROPERTY_HINT_FILE, "*.icns"), String());
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "application/config/windows_native_icon", PROPERTY_HINT_FILE, "*.ico"), String());
|
||||
|
||||
Input *id = Input::get_singleton();
|
||||
if (id) {
|
||||
|
@ -2272,7 +2165,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
|||
}
|
||||
text_driver_options += driver_name;
|
||||
}
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("internationalization/rendering/text_driver", PropertyInfo(Variant::STRING, "internationalization/rendering/text_driver", PROPERTY_HINT_ENUM, text_driver_options));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(PropertyInfo(Variant::STRING, "internationalization/rendering/text_driver", PROPERTY_HINT_ENUM, text_driver_options));
|
||||
|
||||
/* Determine text driver */
|
||||
if (text_driver.is_empty()) {
|
||||
|
@ -2341,13 +2234,9 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
|
|||
initialize_theme_db();
|
||||
register_scene_singletons();
|
||||
|
||||
GLOBAL_DEF_BASIC("display/mouse_cursor/custom_image", String());
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "display/mouse_cursor/custom_image", PROPERTY_HINT_FILE, "*.png,*.webp"), 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",
|
||||
PROPERTY_HINT_FILE, "*.png,*.webp"));
|
||||
|
||||
if (String(GLOBAL_GET("display/mouse_cursor/custom_image")) != String()) {
|
||||
Ref<Texture2D> cursor = ResourceLoader::load(
|
||||
|
@ -2504,12 +2393,7 @@ bool Main::start() {
|
|||
#endif
|
||||
}
|
||||
|
||||
uint64_t minimum_time_msec = GLOBAL_DEF("application/boot_splash/minimum_display_time", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("application/boot_splash/minimum_display_time",
|
||||
PropertyInfo(Variant::INT,
|
||||
"application/boot_splash/minimum_display_time",
|
||||
PROPERTY_HINT_RANGE,
|
||||
"0,100,1,or_greater,suffix:ms")); // No negative numbers.
|
||||
uint64_t minimum_time_msec = GLOBAL_DEF(PropertyInfo(Variant::INT, "application/boot_splash/minimum_display_time", PROPERTY_HINT_RANGE, "0,100,1,or_greater,suffix:ms"), 0);
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (!doc_tool_path.is_empty()) {
|
||||
|
@ -2822,39 +2706,16 @@ bool Main::start() {
|
|||
startup_benchmark_file = String();
|
||||
}
|
||||
#endif
|
||||
GLOBAL_DEF_BASIC("display/window/stretch/mode", "disabled");
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/mode",
|
||||
PropertyInfo(Variant::STRING,
|
||||
"display/window/stretch/mode",
|
||||
PROPERTY_HINT_ENUM,
|
||||
"disabled,canvas_items,viewport"));
|
||||
GLOBAL_DEF_BASIC("display/window/stretch/aspect", "keep");
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/aspect",
|
||||
PropertyInfo(Variant::STRING,
|
||||
"display/window/stretch/aspect",
|
||||
PROPERTY_HINT_ENUM,
|
||||
"ignore,keep,keep_width,keep_height,expand"));
|
||||
GLOBAL_DEF_BASIC("display/window/stretch/scale", 1.0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("display/window/stretch/scale",
|
||||
PropertyInfo(Variant::FLOAT,
|
||||
"display/window/stretch/scale",
|
||||
PROPERTY_HINT_RANGE,
|
||||
"0.5,8.0,0.01"));
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "display/window/stretch/mode", PROPERTY_HINT_ENUM, "disabled,canvas_items,viewport"), "disabled");
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "display/window/stretch/aspect", PROPERTY_HINT_ENUM, "ignore,keep,keep_width,keep_height,expand"), "keep");
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::FLOAT, "display/window/stretch/scale", PROPERTY_HINT_RANGE, "0.5,8.0,0.01"), 1.0);
|
||||
sml->set_auto_accept_quit(GLOBAL_DEF("application/config/auto_accept_quit", true));
|
||||
sml->set_quit_on_go_back(GLOBAL_DEF("application/config/quit_on_go_back", true));
|
||||
GLOBAL_DEF_BASIC("gui/common/snap_controls_to_pixels", true);
|
||||
GLOBAL_DEF_BASIC("gui/fonts/dynamic_fonts/use_oversampling", true);
|
||||
|
||||
GLOBAL_DEF_BASIC("rendering/textures/canvas_textures/default_texture_filter", 1);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(
|
||||
"rendering/textures/canvas_textures/default_texture_filter",
|
||||
PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM,
|
||||
"Nearest,Linear,Linear Mipmap,Nearest Mipmap"));
|
||||
GLOBAL_DEF_BASIC("rendering/textures/canvas_textures/default_texture_repeat", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(
|
||||
"rendering/textures/canvas_textures/default_texture_repeat",
|
||||
PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM,
|
||||
"Disable,Enable,Mirror"));
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Linear Mipmap,Nearest Mipmap"), 1);
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, "Disable,Enable,Mirror"), 0);
|
||||
|
||||
if (!editor && !project_manager) {
|
||||
//standard helpers that can be changed from main config
|
||||
|
|
|
@ -2537,8 +2537,7 @@ GDScriptLanguage::GDScriptLanguage() {
|
|||
script_frame_time = 0;
|
||||
|
||||
_debug_call_stack_pos = 0;
|
||||
int dmcs = GLOBAL_DEF("debug/settings/gdscript/max_call_stack", 1024);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("debug/settings/gdscript/max_call_stack", PropertyInfo(Variant::INT, "debug/settings/gdscript/max_call_stack", PROPERTY_HINT_RANGE, "1024,4096,1,or_greater")); //minimum is 1024
|
||||
int dmcs = GLOBAL_DEF(PropertyInfo(Variant::INT, "debug/settings/gdscript/max_call_stack", PROPERTY_HINT_RANGE, "1024,4096,1,or_greater"), 1024);
|
||||
|
||||
if (EngineDebugger::is_active()) {
|
||||
//debugging enabled!
|
||||
|
@ -2559,10 +2558,7 @@ GDScriptLanguage::GDScriptLanguage() {
|
|||
GDScriptWarning::Code code = (GDScriptWarning::Code)i;
|
||||
Variant default_enabled = GDScriptWarning::get_default_value(code);
|
||||
String path = GDScriptWarning::get_settings_path_from_code(code);
|
||||
GLOBAL_DEF(path, default_enabled);
|
||||
|
||||
PropertyInfo property_info = GDScriptWarning::get_property_info(code);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(path, property_info);
|
||||
GLOBAL_DEF(GDScriptWarning::get_property_info(code), default_enabled);
|
||||
}
|
||||
#endif // DEBUG_ENABLED
|
||||
}
|
||||
|
|
|
@ -43,8 +43,7 @@ void initialize_webrtc_module(ModuleInitializationLevel p_level) {
|
|||
}
|
||||
|
||||
#define SET_HINT(NAME, _VAL_, _MAX_) \
|
||||
GLOBAL_DEF(NAME, _VAL_); \
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(NAME, PropertyInfo(Variant::INT, NAME, PROPERTY_HINT_RANGE, "2," #_MAX_ ",1,or_greater"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, NAME, PROPERTY_HINT_RANGE, "2," #_MAX_ ",1,or_greater"), _VAL_);
|
||||
|
||||
SET_HINT(WRTC_IN_BUF, 64, 4096);
|
||||
|
||||
|
|
|
@ -6403,10 +6403,8 @@ void TextEdit::_bind_methods() {
|
|||
ADD_SIGNAL(MethodInfo("gutter_removed"));
|
||||
|
||||
/* Settings. */
|
||||
GLOBAL_DEF("gui/timers/text_edit_idle_detect_sec", 3);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/text_edit_idle_detect_sec", PropertyInfo(Variant::FLOAT, "gui/timers/text_edit_idle_detect_sec", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater")); // No negative numbers.
|
||||
GLOBAL_DEF("gui/common/text_edit_undo_stack_max_size", 1024);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("gui/common/text_edit_undo_stack_max_size", PropertyInfo(Variant::INT, "gui/common/text_edit_undo_stack_max_size", PROPERTY_HINT_RANGE, "0,10000,1,or_greater")); // No negative numbers.
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "gui/timers/text_edit_idle_detect_sec", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater"), 3);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "gui/common/text_edit_undo_stack_max_size", PROPERTY_HINT_RANGE, "0,10000,1,or_greater"), 1024);
|
||||
}
|
||||
|
||||
/* Internal API for CodeEdit. */
|
||||
|
|
|
@ -2774,10 +2774,8 @@ void Node::unhandled_key_input(const Ref<InputEvent> &p_key_event) {
|
|||
}
|
||||
|
||||
void Node::_bind_methods() {
|
||||
GLOBAL_DEF("editor/node_naming/name_num_separator", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("editor/node_naming/name_num_separator", PropertyInfo(Variant::INT, "editor/node_naming/name_num_separator", PROPERTY_HINT_ENUM, "None,Space,Underscore,Dash"));
|
||||
GLOBAL_DEF("editor/node_naming/name_casing", NAME_CASING_PASCAL_CASE);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("editor/node_naming/name_casing", PropertyInfo(Variant::INT, "editor/node_naming/name_casing", PROPERTY_HINT_ENUM, "PascalCase,camelCase,snake_case"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "editor/node_naming/name_num_separator", PROPERTY_HINT_ENUM, "None,Space,Underscore,Dash"), 0);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "editor/node_naming/name_casing", PROPERTY_HINT_ENUM, "PascalCase,camelCase,snake_case"), NAME_CASING_PASCAL_CASE);
|
||||
|
||||
ClassDB::bind_static_method("Node", D_METHOD("print_orphan_nodes"), &Node::print_orphan_nodes);
|
||||
ClassDB::bind_method(D_METHOD("add_sibling", "sibling", "force_readable_name"), &Node::add_sibling, DEFVAL(false));
|
||||
|
|
|
@ -1378,8 +1378,7 @@ SceneTree::SceneTree() {
|
|||
debug_collision_contact_color = GLOBAL_DEF("debug/shapes/collision/contact_color", Color(1.0, 0.2, 0.1, 0.8));
|
||||
debug_paths_color = GLOBAL_DEF("debug/shapes/paths/geometry_color", Color(0.1, 1.0, 0.7, 0.4));
|
||||
debug_paths_width = GLOBAL_DEF("debug/shapes/paths/geometry_width", 2.0);
|
||||
collision_debug_contacts = GLOBAL_DEF("debug/shapes/collision/max_contacts_displayed", 10000);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("debug/shapes/collision/max_contacts_displayed", PropertyInfo(Variant::INT, "debug/shapes/collision/max_contacts_displayed", PROPERTY_HINT_RANGE, "0,20000,1")); // No negative
|
||||
collision_debug_contacts = GLOBAL_DEF(PropertyInfo(Variant::INT, "debug/shapes/collision/max_contacts_displayed", PROPERTY_HINT_RANGE, "0,20000,1"), 10000);
|
||||
|
||||
GLOBAL_DEF("debug/shapes/collision/draw_2d_outlines", true);
|
||||
|
||||
|
@ -1405,19 +1404,16 @@ SceneTree::SceneTree() {
|
|||
root->set_as_audio_listener_2d(true);
|
||||
current_scene = nullptr;
|
||||
|
||||
const int msaa_mode_2d = GLOBAL_DEF_BASIC("rendering/anti_aliasing/quality/msaa_2d", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/quality/msaa_2d", PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/msaa_2d", PROPERTY_HINT_ENUM, String::utf8("Disabled (Fastest),2× (Average),4× (Slow),8× (Slowest)")));
|
||||
const int msaa_mode_2d = GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/msaa_2d", PROPERTY_HINT_ENUM, String::utf8("Disabled (Fastest),2× (Average),4× (Slow),8× (Slowest)")), 0);
|
||||
root->set_msaa_2d(Viewport::MSAA(msaa_mode_2d));
|
||||
|
||||
const int msaa_mode_3d = GLOBAL_DEF_BASIC("rendering/anti_aliasing/quality/msaa_3d", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/quality/msaa_3d", PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/msaa_3d", PROPERTY_HINT_ENUM, String::utf8("Disabled (Fastest),2× (Average),4× (Slow),8× (Slowest)")));
|
||||
const int msaa_mode_3d = GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/msaa_3d", PROPERTY_HINT_ENUM, String::utf8("Disabled (Fastest),2× (Average),4× (Slow),8× (Slowest)")), 0);
|
||||
root->set_msaa_3d(Viewport::MSAA(msaa_mode_3d));
|
||||
|
||||
const bool transparent_background = GLOBAL_DEF("rendering/transparent_background", false);
|
||||
root->set_transparent_background(transparent_background);
|
||||
|
||||
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)"));
|
||||
const int ssaa_mode = GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/screen_space_aa", PROPERTY_HINT_ENUM, "Disabled (Fastest),FXAA (Fast)"), 0);
|
||||
root->set_screen_space_aa(Viewport::ScreenSpaceAA(ssaa_mode));
|
||||
|
||||
const bool use_taa = GLOBAL_DEF_BASIC("rendering/anti_aliasing/quality/use_taa", false);
|
||||
|
@ -1429,8 +1425,7 @@ SceneTree::SceneTree() {
|
|||
const bool use_occlusion_culling = GLOBAL_DEF("rendering/occlusion_culling/use_occlusion_culling", false);
|
||||
root->set_use_occlusion_culling(use_occlusion_culling);
|
||||
|
||||
float mesh_lod_threshold = GLOBAL_DEF("rendering/mesh_lod/lod_change/threshold_pixels", 1.0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/mesh_lod/lod_change/threshold_pixels", PropertyInfo(Variant::FLOAT, "rendering/mesh_lod/lod_change/threshold_pixels", PROPERTY_HINT_RANGE, "0,1024,0.1"));
|
||||
float mesh_lod_threshold = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/mesh_lod/lod_change/threshold_pixels", PROPERTY_HINT_RANGE, "0,1024,0.1"), 1.0);
|
||||
root->set_mesh_lod_threshold(mesh_lod_threshold);
|
||||
|
||||
bool snap_2d_transforms = GLOBAL_DEF("rendering/2d/snap/snap_2d_transforms_to_pixel", false);
|
||||
|
@ -1440,14 +1435,9 @@ SceneTree::SceneTree() {
|
|||
root->set_snap_2d_vertices_to_pixel(snap_2d_vertices);
|
||||
|
||||
// We setup VRS for the main viewport here, in the editor this will have little effect.
|
||||
const int vrs_mode = GLOBAL_DEF("rendering/vrs/mode", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/vrs/mode", PropertyInfo(Variant::INT, "rendering/vrs/mode", PROPERTY_HINT_ENUM, String::utf8("Disabled,Texture,XR")));
|
||||
const int vrs_mode = GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/vrs/mode", PROPERTY_HINT_ENUM, String::utf8("Disabled,Texture,XR")), 0);
|
||||
root->set_vrs_mode(Viewport::VRSMode(vrs_mode));
|
||||
const String vrs_texture_path = String(GLOBAL_DEF("rendering/vrs/texture", String())).strip_edges();
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/vrs/texture",
|
||||
PropertyInfo(Variant::STRING,
|
||||
"rendering/vrs/texture",
|
||||
PROPERTY_HINT_FILE, "*.bmp,*.png,*.tga,*.webp"));
|
||||
const String vrs_texture_path = String(GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/vrs/texture", PROPERTY_HINT_FILE, "*.bmp,*.png,*.tga,*.webp"), String())).strip_edges();
|
||||
if (vrs_mode == 1 && !vrs_texture_path.is_empty()) {
|
||||
Ref<Image> vrs_image;
|
||||
vrs_image.instantiate();
|
||||
|
@ -1462,18 +1452,13 @@ SceneTree::SceneTree() {
|
|||
}
|
||||
}
|
||||
|
||||
int shadowmap_size = GLOBAL_DEF("rendering/lights_and_shadows/positional_shadow/atlas_size", 4096);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/lights_and_shadows/positional_shadow/atlas_size", PropertyInfo(Variant::INT, "rendering/lights_and_shadows/positional_shadow/atlas_size", PROPERTY_HINT_RANGE, "256,16384"));
|
||||
int shadowmap_size = GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/lights_and_shadows/positional_shadow/atlas_size", PROPERTY_HINT_RANGE, "256,16384"), 4096);
|
||||
GLOBAL_DEF("rendering/lights_and_shadows/positional_shadow/atlas_size.mobile", 2048);
|
||||
bool shadowmap_16_bits = GLOBAL_DEF("rendering/lights_and_shadows/positional_shadow/atlas_16_bits", true);
|
||||
int atlas_q0 = GLOBAL_DEF("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv", 2);
|
||||
int atlas_q1 = GLOBAL_DEF("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv", 2);
|
||||
int atlas_q2 = GLOBAL_DEF("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv", 3);
|
||||
int atlas_q3 = GLOBAL_DEF("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv", 4);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv", PropertyInfo(Variant::INT, "rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv", PropertyInfo(Variant::INT, "rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv", PropertyInfo(Variant::INT, "rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv", PropertyInfo(Variant::INT, "rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
|
||||
int atlas_q0 = GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), 2);
|
||||
int atlas_q1 = GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), 2);
|
||||
int atlas_q2 = GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), 3);
|
||||
int atlas_q3 = GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), 4);
|
||||
|
||||
root->set_positional_shadow_atlas_size(shadowmap_size);
|
||||
root->set_positional_shadow_atlas_16_bits(shadowmap_16_bits);
|
||||
|
@ -1482,14 +1467,11 @@ SceneTree::SceneTree() {
|
|||
root->set_positional_shadow_atlas_quadrant_subdiv(2, Viewport::PositionalShadowAtlasQuadrantSubdiv(atlas_q2));
|
||||
root->set_positional_shadow_atlas_quadrant_subdiv(3, Viewport::PositionalShadowAtlasQuadrantSubdiv(atlas_q3));
|
||||
|
||||
Viewport::SDFOversize sdf_oversize = Viewport::SDFOversize(int(GLOBAL_DEF("rendering/2d/sdf/oversize", 1)));
|
||||
Viewport::SDFOversize sdf_oversize = Viewport::SDFOversize(int(GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/2d/sdf/oversize", PROPERTY_HINT_ENUM, "100%,120%,150%,200%"), 1)));
|
||||
root->set_sdf_oversize(sdf_oversize);
|
||||
Viewport::SDFScale sdf_scale = Viewport::SDFScale(int(GLOBAL_DEF("rendering/2d/sdf/scale", 1)));
|
||||
Viewport::SDFScale sdf_scale = Viewport::SDFScale(int(GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/2d/sdf/scale", PROPERTY_HINT_ENUM, "100%,50%,25%"), 1)));
|
||||
root->set_sdf_scale(sdf_scale);
|
||||
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/2d/sdf/oversize", PropertyInfo(Variant::INT, "rendering/2d/sdf/oversize", PROPERTY_HINT_ENUM, "100%,120%,150%,200%"));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/2d/sdf/scale", PropertyInfo(Variant::INT, "rendering/2d/sdf/scale", PROPERTY_HINT_ENUM, "100%,50%,25%"));
|
||||
|
||||
#ifndef _3D_DISABLED
|
||||
{ // Load default fallback environment.
|
||||
// Get possible extensions.
|
||||
|
@ -1503,9 +1485,8 @@ SceneTree::SceneTree() {
|
|||
ext_hint += "*." + E;
|
||||
}
|
||||
// Get path.
|
||||
String env_path = GLOBAL_DEF("rendering/environment/defaults/default_environment", "");
|
||||
String env_path = GLOBAL_DEF(PropertyInfo(Variant::STRING, "rendering/environment/defaults/default_environment", PROPERTY_HINT_FILE, ext_hint), "");
|
||||
// Setup property.
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/defaults/default_environment", PropertyInfo(Variant::STRING, "rendering/viewport/default_environment", PROPERTY_HINT_FILE, ext_hint));
|
||||
env_path = env_path.strip_edges();
|
||||
if (!env_path.is_empty()) {
|
||||
Ref<Environment> env = ResourceLoader::load(env_path);
|
||||
|
|
|
@ -4099,8 +4099,7 @@ Viewport::Viewport() {
|
|||
unhandled_key_input_group = "_vp_unhandled_key_input" + id;
|
||||
|
||||
// Window tooltip.
|
||||
gui.tooltip_delay = GLOBAL_DEF("gui/timers/tooltip_delay_sec", 0.5);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("gui/timers/tooltip_delay_sec", PropertyInfo(Variant::FLOAT, "gui/timers/tooltip_delay_sec", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater")); // No negative numbers
|
||||
gui.tooltip_delay = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "gui/timers/tooltip_delay_sec", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"), 0.5);
|
||||
|
||||
#ifndef _3D_DISABLED
|
||||
set_scaling_3d_mode((Viewport::Scaling3DMode)(int)GLOBAL_GET("rendering/scaling_3d/mode"));
|
||||
|
|
|
@ -75,10 +75,8 @@ World2D::World2D() {
|
|||
PhysicsServer2D::get_singleton()->space_set_active(space, true);
|
||||
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));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/default_angular_damp", PropertyInfo(Variant::FLOAT, "physics/2d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"));
|
||||
PhysicsServer2D::get_singleton()->area_set_param(space, PhysicsServer2D::AREA_PARAM_LINEAR_DAMP, GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/2d/default_linear_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), 0.1));
|
||||
PhysicsServer2D::get_singleton()->area_set_param(space, PhysicsServer2D::AREA_PARAM_ANGULAR_DAMP, GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/2d/default_angular_damp", PROPERTY_HINT_RANGE, "-1,100,0.001,or_greater"), 1.0));
|
||||
|
||||
// Create and configure the navigation_map to be more friendly with pixels than meters.
|
||||
navigation_map = NavigationServer2D::get_singleton()->map_create();
|
||||
|
|
|
@ -144,10 +144,8 @@ World3D::World3D() {
|
|||
PhysicsServer3D::get_singleton()->space_set_active(space, true);
|
||||
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));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/default_angular_damp", PropertyInfo(Variant::FLOAT, "physics/3d/default_angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"));
|
||||
PhysicsServer3D::get_singleton()->area_set_param(space, PhysicsServer3D::AREA_PARAM_LINEAR_DAMP, GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/3d/default_linear_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), 0.1));
|
||||
PhysicsServer3D::get_singleton()->area_set_param(space, PhysicsServer3D::AREA_PARAM_ANGULAR_DAMP, GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/3d/default_angular_damp", PROPERTY_HINT_RANGE, "0,100,0.001,or_greater"), 0.1));
|
||||
|
||||
navigation_map = NavigationServer3D::get_singleton()->map_create();
|
||||
NavigationServer3D::get_singleton()->map_set_active(navigation_map, true);
|
||||
|
|
|
@ -42,29 +42,22 @@
|
|||
// Default engine theme creation and configuration.
|
||||
void ThemeDB::initialize_theme() {
|
||||
// Allow creating the default theme at a different scale to suit higher/lower base resolutions.
|
||||
float default_theme_scale = GLOBAL_DEF("gui/theme/default_theme_scale", 1.0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/default_theme_scale", PropertyInfo(Variant::FLOAT, "gui/theme/default_theme_scale", PROPERTY_HINT_RANGE, "0.5,8,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
|
||||
float default_theme_scale = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "gui/theme/default_theme_scale", PROPERTY_HINT_RANGE, "0.5,8,0.01", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED), 1.0);
|
||||
|
||||
String theme_path = GLOBAL_DEF_RST("gui/theme/custom", "");
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/custom", PropertyInfo(Variant::STRING, "gui/theme/custom", PROPERTY_HINT_FILE, "*.tres,*.res,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
|
||||
String theme_path = GLOBAL_DEF_RST(PropertyInfo(Variant::STRING, "gui/theme/custom", PROPERTY_HINT_FILE, "*.tres,*.res,*.theme", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED), "");
|
||||
|
||||
String font_path = GLOBAL_DEF_RST("gui/theme/custom_font", "");
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/custom_font", PropertyInfo(Variant::STRING, "gui/theme/custom_font", PROPERTY_HINT_FILE, "*.tres,*.res,*.otf,*.ttf,*.woff,*.woff2,*.fnt,*.font,*.pfb,*.pfm", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
|
||||
String font_path = GLOBAL_DEF_RST(PropertyInfo(Variant::STRING, "gui/theme/custom_font", PROPERTY_HINT_FILE, "*.tres,*.res,*.otf,*.ttf,*.woff,*.woff2,*.fnt,*.font,*.pfb,*.pfm", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED), "");
|
||||
|
||||
TextServer::FontAntialiasing font_antialiasing = (TextServer::FontAntialiasing)(int)GLOBAL_DEF_RST("gui/theme/default_font_antialiasing", 1);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/default_font_antialiasing", PropertyInfo(Variant::INT, "gui/theme/default_font_antialiasing", PROPERTY_HINT_ENUM, "None,Grayscale,LCD Subpixel", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
|
||||
TextServer::FontAntialiasing font_antialiasing = (TextServer::FontAntialiasing)(int)GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "gui/theme/default_font_antialiasing", PROPERTY_HINT_ENUM, "None,Grayscale,LCD Subpixel", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED), 1);
|
||||
|
||||
TextServer::Hinting font_hinting = (TextServer::Hinting)(int)GLOBAL_DEF_RST("gui/theme/default_font_hinting", TextServer::HINTING_LIGHT);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/default_font_hinting", PropertyInfo(Variant::INT, "gui/theme/default_font_hinting", PROPERTY_HINT_ENUM, "None,Light,Normal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
|
||||
TextServer::Hinting font_hinting = (TextServer::Hinting)(int)GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "gui/theme/default_font_hinting", PROPERTY_HINT_ENUM, "None,Light,Normal", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED), TextServer::HINTING_LIGHT);
|
||||
|
||||
TextServer::SubpixelPositioning font_subpixel_positioning = (TextServer::SubpixelPositioning)(int)GLOBAL_DEF_RST("gui/theme/default_font_subpixel_positioning", TextServer::SUBPIXEL_POSITIONING_AUTO);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/default_font_subpixel_positioning", PropertyInfo(Variant::INT, "gui/theme/default_font_subpixel_positioning", PROPERTY_HINT_ENUM, "Disabled,Auto,One Half of a Pixel,One Quarter of a Pixel", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED));
|
||||
TextServer::SubpixelPositioning font_subpixel_positioning = (TextServer::SubpixelPositioning)(int)GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "gui/theme/default_font_subpixel_positioning", PROPERTY_HINT_ENUM, "Disabled,Auto,One Half of a Pixel,One Quarter of a Pixel", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED), TextServer::SUBPIXEL_POSITIONING_AUTO);
|
||||
|
||||
const bool font_msdf = GLOBAL_DEF_RST("gui/theme/default_font_multichannel_signed_distance_field", false);
|
||||
const bool font_generate_mipmaps = GLOBAL_DEF_RST("gui/theme/default_font_generate_mipmaps", false);
|
||||
|
||||
GLOBAL_DEF_RST("gui/theme/lcd_subpixel_layout", 1);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("gui/theme/lcd_subpixel_layout", PropertyInfo(Variant::INT, "gui/theme/lcd_subpixel_layout", PROPERTY_HINT_ENUM, "Disabled,Horizontal RGB,Horizontal BGR,Vertical RGB,Vertical BGR"));
|
||||
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "gui/theme/lcd_subpixel_layout", PROPERTY_HINT_ENUM, "Disabled,Horizontal RGB,Horizontal BGR,Vertical RGB,Vertical BGR"), 1);
|
||||
ProjectSettings::get_singleton()->set_restart_if_changed("gui/theme/lcd_subpixel_layout", false);
|
||||
|
||||
Ref<Font> font;
|
||||
|
|
|
@ -1346,8 +1346,7 @@ void AudioServer::init_channels_and_buffers() {
|
|||
|
||||
void AudioServer::init() {
|
||||
channel_disable_threshold_db = GLOBAL_DEF_RST("audio/buses/channel_disable_threshold_db", -60.0);
|
||||
channel_disable_frames = float(GLOBAL_DEF_RST("audio/buses/channel_disable_time", 2.0)) * get_mix_rate();
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("audio/buses/channel_disable_time", PropertyInfo(Variant::FLOAT, "audio/buses/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
|
||||
channel_disable_frames = float(GLOBAL_DEF_RST(PropertyInfo(Variant::FLOAT, "audio/buses/channel_disable_time", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"), 2.0)) * get_mix_rate();
|
||||
buffer_size = 512; //hardcoded for now
|
||||
|
||||
init_channels_and_buffers();
|
||||
|
|
|
@ -135,17 +135,13 @@ void MovieWriter::_bind_methods() {
|
|||
GDVIRTUAL_BIND(_write_frame, "frame_image", "audio_frame_block")
|
||||
GDVIRTUAL_BIND(_write_end)
|
||||
|
||||
GLOBAL_DEF("editor/movie_writer/mix_rate", 48000);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("editor/movie_writer/mix_rate", PropertyInfo(Variant::INT, "editor/movie_writer/mix_rate", PROPERTY_HINT_RANGE, "8000,192000,1,suffix:Hz"));
|
||||
GLOBAL_DEF("editor/movie_writer/speaker_mode", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("editor/movie_writer/speaker_mode", PropertyInfo(Variant::INT, "editor/movie_writer/speaker_mode", PROPERTY_HINT_ENUM, "Stereo,3.1,5.1,7.1"));
|
||||
GLOBAL_DEF("editor/movie_writer/mjpeg_quality", 0.75);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("editor/movie_writer/mjpeg_quality", PropertyInfo(Variant::FLOAT, "editor/movie_writer/mjpeg_quality", PROPERTY_HINT_RANGE, "0.01,1.0,0.01"));
|
||||
// used by the editor
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "editor/movie_writer/mix_rate", PROPERTY_HINT_RANGE, "8000,192000,1,suffix:Hz"), 48000);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "editor/movie_writer/speaker_mode", PROPERTY_HINT_ENUM, "Stereo,3.1,5.1,7.1"), 0);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "editor/movie_writer/mjpeg_quality", PROPERTY_HINT_RANGE, "0.01,1.0,0.01"), 0.75);
|
||||
// Used by the editor.
|
||||
GLOBAL_DEF_BASIC("editor/movie_writer/movie_file", "");
|
||||
GLOBAL_DEF_BASIC("editor/movie_writer/disable_vsync", false);
|
||||
GLOBAL_DEF_BASIC("editor/movie_writer/fps", 60);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("editor/movie_writer/fps", PropertyInfo(Variant::INT, "editor/movie_writer/fps", PROPERTY_HINT_RANGE, "1,300,1,suffix:FPS"));
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "editor/movie_writer/fps", PROPERTY_HINT_RANGE, "1,300,1,suffix:FPS"), 60);
|
||||
}
|
||||
|
||||
void MovieWriter::set_extensions_hint() {
|
||||
|
@ -166,7 +162,7 @@ void MovieWriter::set_extensions_hint() {
|
|||
}
|
||||
ext_hint += "*." + S;
|
||||
}
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("editor/movie_writer/movie_file", PropertyInfo(Variant::STRING, "editor/movie_writer/movie_file", PROPERTY_HINT_GLOBAL_SAVE_FILE, ext_hint));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(PropertyInfo(Variant::STRING, "editor/movie_writer/movie_file", PROPERTY_HINT_GLOBAL_SAVE_FILE, ext_hint));
|
||||
}
|
||||
|
||||
void MovieWriter::add_frame(const Ref<Image> &p_image) {
|
||||
|
|
|
@ -1218,26 +1218,13 @@ GodotPhysicsDirectSpaceState2D *GodotSpace2D::get_direct_state() {
|
|||
GodotSpace2D::GodotSpace2D() {
|
||||
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_linear", 2.0);
|
||||
body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_angular", Math::deg_to_rad(8.0));
|
||||
body_time_to_sleep = GLOBAL_DEF("physics/2d/time_before_sleep", 0.5);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/time_before_sleep", PropertyInfo(Variant::FLOAT, "physics/2d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
|
||||
|
||||
solver_iterations = GLOBAL_DEF("physics/2d/solver/solver_iterations", 16);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/solver/solver_iterations", PropertyInfo(Variant::INT, "physics/2d/solver/solver_iterations", PROPERTY_HINT_RANGE, "1,32,1,or_greater"));
|
||||
|
||||
contact_recycle_radius = GLOBAL_DEF("physics/2d/solver/contact_recycle_radius", 1.0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/solver/contact_recycle_radius", PropertyInfo(Variant::FLOAT, "physics/2d/solver/contact_recycle_radius", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater"));
|
||||
|
||||
contact_max_separation = GLOBAL_DEF("physics/2d/solver/contact_max_separation", 1.5);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/solver/contact_max_separation", PropertyInfo(Variant::FLOAT, "physics/2d/solver/contact_max_separation", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater"));
|
||||
|
||||
contact_max_allowed_penetration = GLOBAL_DEF("physics/2d/solver/contact_max_allowed_penetration", 0.3);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/solver/contact_max_allowed_penetration", PropertyInfo(Variant::FLOAT, "physics/2d/solver/contact_max_allowed_penetration", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater"));
|
||||
|
||||
contact_bias = GLOBAL_DEF("physics/2d/solver/default_contact_bias", 0.8);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/solver/default_contact_bias", PropertyInfo(Variant::FLOAT, "physics/2d/solver/default_contact_bias", PROPERTY_HINT_RANGE, "0,1,0.01"));
|
||||
|
||||
constraint_bias = GLOBAL_DEF("physics/2d/solver/default_constraint_bias", 0.2);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/solver/default_constraint_bias", PropertyInfo(Variant::FLOAT, "physics/2d/solver/default_constraint_bias", PROPERTY_HINT_RANGE, "0,1,0.01"));
|
||||
body_time_to_sleep = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/2d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"), 0.5);
|
||||
solver_iterations = GLOBAL_DEF(PropertyInfo(Variant::INT, "physics/2d/solver/solver_iterations", PROPERTY_HINT_RANGE, "1,32,1,or_greater"), 16);
|
||||
contact_recycle_radius = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/2d/solver/contact_recycle_radius", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater"), 1.0);
|
||||
contact_max_separation = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/2d/solver/contact_max_separation", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater"), 1.5);
|
||||
contact_max_allowed_penetration = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/2d/solver/contact_max_allowed_penetration", PROPERTY_HINT_RANGE, "0,10,0.01,or_greater"), 0.3);
|
||||
contact_bias = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/2d/solver/default_contact_bias", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.8);
|
||||
constraint_bias = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/2d/solver/default_constraint_bias", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.2);
|
||||
|
||||
broadphase = GodotBroadPhase2D::create_func();
|
||||
broadphase->set_pair_callback(_broadphase_pair, this);
|
||||
|
|
|
@ -1251,23 +1251,12 @@ GodotPhysicsDirectSpaceState3D *GodotSpace3D::get_direct_state() {
|
|||
GodotSpace3D::GodotSpace3D() {
|
||||
body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_linear", 0.1);
|
||||
body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/3d/sleep_threshold_angular", Math::deg_to_rad(8.0));
|
||||
body_time_to_sleep = GLOBAL_DEF("physics/3d/time_before_sleep", 0.5);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/time_before_sleep", PropertyInfo(Variant::FLOAT, "physics/3d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"));
|
||||
|
||||
solver_iterations = GLOBAL_DEF("physics/3d/solver/solver_iterations", 16);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/solver/solver_iterations", PropertyInfo(Variant::INT, "physics/3d/solver/solver_iterations", PROPERTY_HINT_RANGE, "1,32,1,or_greater"));
|
||||
|
||||
contact_recycle_radius = GLOBAL_DEF("physics/3d/solver/contact_recycle_radius", 0.01);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/solver/contact_recycle_radius", PropertyInfo(Variant::FLOAT, "physics/3d/solver/contact_recycle_radius", PROPERTY_HINT_RANGE, "0,0.1,0.01,or_greater"));
|
||||
|
||||
contact_max_separation = GLOBAL_DEF("physics/3d/solver/contact_max_separation", 0.05);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/solver/contact_max_separation", PropertyInfo(Variant::FLOAT, "physics/3d/solver/contact_max_separation", PROPERTY_HINT_RANGE, "0,0.1,0.01,or_greater"));
|
||||
|
||||
contact_max_allowed_penetration = GLOBAL_DEF("physics/3d/solver/contact_max_allowed_penetration", 0.01);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/solver/contact_max_allowed_penetration", PropertyInfo(Variant::FLOAT, "physics/3d/solver/contact_max_allowed_penetration", PROPERTY_HINT_RANGE, "0,0.1,0.01,or_greater"));
|
||||
|
||||
contact_bias = GLOBAL_DEF("physics/3d/solver/default_contact_bias", 0.8);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/solver/default_contact_bias", PropertyInfo(Variant::FLOAT, "physics/3d/solver/default_contact_bias", PROPERTY_HINT_RANGE, "0,1,0.01"));
|
||||
body_time_to_sleep = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/3d/time_before_sleep", PROPERTY_HINT_RANGE, "0,5,0.01,or_greater"), 0.5);
|
||||
solver_iterations = GLOBAL_DEF(PropertyInfo(Variant::INT, "physics/3d/solver/solver_iterations", PROPERTY_HINT_RANGE, "1,32,1,or_greater"), 16);
|
||||
contact_recycle_radius = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/3d/solver/contact_recycle_radius", PROPERTY_HINT_RANGE, "0,0.1,0.01,or_greater"), 0.01);
|
||||
contact_max_separation = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/3d/solver/contact_max_separation", PROPERTY_HINT_RANGE, "0,0.1,0.01,or_greater"), 0.05);
|
||||
contact_max_allowed_penetration = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/3d/solver/contact_max_allowed_penetration", PROPERTY_HINT_RANGE, "0,0.1,0.01,or_greater"), 0.01);
|
||||
contact_bias = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "physics/3d/solver/default_contact_bias", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.8);
|
||||
|
||||
broadphase = GodotBroadPhase3D::create_func();
|
||||
broadphase->set_pair_callback(_broadphase_pair, this);
|
||||
|
|
|
@ -887,7 +887,7 @@ void PhysicsServer2DManager::on_servers_changed() {
|
|||
for (int i = get_servers_count() - 1; 0 <= i; --i) {
|
||||
physics_servers += "," + get_server_name(i);
|
||||
}
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(setting_property_name, PropertyInfo(Variant::STRING, setting_property_name, PROPERTY_HINT_ENUM, physics_servers));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(PropertyInfo(Variant::STRING, setting_property_name, PROPERTY_HINT_ENUM, physics_servers));
|
||||
}
|
||||
|
||||
void PhysicsServer2DManager::_bind_methods() {
|
||||
|
|
|
@ -1059,7 +1059,7 @@ void PhysicsServer3DManager::on_servers_changed() {
|
|||
for (int i = get_servers_count() - 1; 0 <= i; --i) {
|
||||
physics_servers2 += "," + get_server_name(i);
|
||||
}
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(setting_property_name, PropertyInfo(Variant::STRING, setting_property_name, PROPERTY_HINT_ENUM, physics_servers2));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(PropertyInfo(Variant::STRING, setting_property_name, PROPERTY_HINT_ENUM, physics_servers2));
|
||||
}
|
||||
|
||||
void PhysicsServer3DManager::_bind_methods() {
|
||||
|
|
|
@ -270,15 +270,13 @@ void register_server_types() {
|
|||
ServersDebugger::initialize();
|
||||
|
||||
// Physics 2D
|
||||
GLOBAL_DEF(PhysicsServer2DManager::setting_property_name, "DEFAULT");
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(PhysicsServer2DManager::setting_property_name, PropertyInfo(Variant::STRING, PhysicsServer2DManager::setting_property_name, PROPERTY_HINT_ENUM, "DEFAULT"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, PhysicsServer2DManager::setting_property_name, PROPERTY_HINT_ENUM, "DEFAULT"), "DEFAULT");
|
||||
|
||||
PhysicsServer2DManager::get_singleton()->register_server("GodotPhysics2D", callable_mp_static(_createGodotPhysics2DCallback));
|
||||
PhysicsServer2DManager::get_singleton()->set_default_server("GodotPhysics2D");
|
||||
|
||||
// Physics 3D
|
||||
GLOBAL_DEF(PhysicsServer3DManager::setting_property_name, "DEFAULT");
|
||||
ProjectSettings::get_singleton()->set_custom_property_info(PhysicsServer3DManager::setting_property_name, PropertyInfo(Variant::STRING, PhysicsServer3DManager::setting_property_name, PROPERTY_HINT_ENUM, "DEFAULT"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, PhysicsServer3DManager::setting_property_name, PROPERTY_HINT_ENUM, "DEFAULT"), "DEFAULT");
|
||||
|
||||
PhysicsServer3DManager::get_singleton()->register_server("GodotPhysics3D", callable_mp_static(_createGodotPhysics3DCallback));
|
||||
PhysicsServer3DManager::get_singleton()->set_default_server("GodotPhysics3D");
|
||||
|
|
|
@ -2855,34 +2855,26 @@ void RenderingServer::init() {
|
|||
|
||||
GLOBAL_DEF("rendering/textures/lossless_compression/force_png", false);
|
||||
|
||||
GLOBAL_DEF("rendering/textures/webp_compression/compression_method", 2);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/textures/webp_compression/compression_method", PropertyInfo(Variant::INT, "rendering/textures/webp_compression/compression_method", PROPERTY_HINT_RANGE, "0,6,1"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/textures/webp_compression/compression_method", PROPERTY_HINT_RANGE, "0,6,1"), 2);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/textures/webp_compression/lossless_compression_factor", PROPERTY_HINT_RANGE, "0,100,1"), 25);
|
||||
|
||||
GLOBAL_DEF("rendering/textures/webp_compression/lossless_compression_factor", 25);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/textures/webp_compression/lossless_compression_factor", PropertyInfo(Variant::FLOAT, "rendering/textures/webp_compression/lossless_compression_factor", PROPERTY_HINT_RANGE, "0,100,1"));
|
||||
|
||||
GLOBAL_DEF("rendering/limits/time/time_rollover_secs", 3600);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/time/time_rollover_secs", PropertyInfo(Variant::FLOAT, "rendering/limits/time/time_rollover_secs", PROPERTY_HINT_RANGE, "0,10000,1,or_greater"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/limits/time/time_rollover_secs", PROPERTY_HINT_RANGE, "0,10000,1,or_greater"), 3600);
|
||||
|
||||
GLOBAL_DEF_RST("rendering/lights_and_shadows/use_physical_light_units", false);
|
||||
|
||||
GLOBAL_DEF("rendering/lights_and_shadows/directional_shadow/size", 4096);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/lights_and_shadows/directional_shadow/size", PROPERTY_HINT_RANGE, "256,16384"), 4096);
|
||||
GLOBAL_DEF("rendering/lights_and_shadows/directional_shadow/size.mobile", 2048);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/lights_and_shadows/directional_shadow/size", PropertyInfo(Variant::INT, "rendering/lights_and_shadows/directional_shadow/size", PROPERTY_HINT_RANGE, "256,16384"));
|
||||
GLOBAL_DEF("rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality", 2);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Very Low (Faster),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"), 2);
|
||||
GLOBAL_DEF("rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality.mobile", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality", PropertyInfo(Variant::INT, "rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Very Low (Faster),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"));
|
||||
GLOBAL_DEF("rendering/lights_and_shadows/directional_shadow/16_bits", true);
|
||||
|
||||
GLOBAL_DEF("rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality", 2);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Very Low (Faster),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"), 2);
|
||||
GLOBAL_DEF("rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality", PropertyInfo(Variant::INT, "rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Very Low (Faster),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"));
|
||||
|
||||
GLOBAL_DEF("rendering/2d/shadow_atlas/size", 2048);
|
||||
|
||||
// Number of commands that can be drawn per frame.
|
||||
GLOBAL_DEF_RST("rendering/gl_compatibility/item_buffer_size", 16384);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/gl_compatibility/item_buffer_size", PropertyInfo(Variant::INT, "rendering/gl_compatibility/item_buffer_size", PROPERTY_HINT_RANGE, "1024,1048576,1"));
|
||||
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/gl_compatibility/item_buffer_size", PROPERTY_HINT_RANGE, "1024,1048576,1"), 16384);
|
||||
|
||||
GLOBAL_DEF("rendering/shader_compiler/shader_cache/enabled", true);
|
||||
GLOBAL_DEF("rendering/shader_compiler/shader_cache/compress", true);
|
||||
|
@ -2902,8 +2894,7 @@ void RenderingServer::init() {
|
|||
|
||||
GLOBAL_DEF("rendering/global_illumination/gi/use_half_resolution", false);
|
||||
|
||||
GLOBAL_DEF("rendering/global_illumination/voxel_gi/quality", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/global_illumination/voxel_gi/quality", PropertyInfo(Variant::INT, "rendering/global_illumination/voxel_gi/quality", PROPERTY_HINT_ENUM, "Low (4 Cones - Fast),High (6 Cones - Slow)"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/global_illumination/voxel_gi/quality", PROPERTY_HINT_ENUM, "Low (4 Cones - Fast),High (6 Cones - Slow)"), 0);
|
||||
|
||||
GLOBAL_DEF("rendering/shading/overrides/force_vertex_shading", false);
|
||||
GLOBAL_DEF("rendering/shading/overrides/force_vertex_shading.mobile", true);
|
||||
|
@ -2914,127 +2905,72 @@ void RenderingServer::init() {
|
|||
GLOBAL_DEF("rendering/driver/depth_prepass/disable_for_vendors", "PowerVR,Mali,Adreno,Apple");
|
||||
|
||||
GLOBAL_DEF_RST("rendering/textures/default_filters/use_nearest_mipmap_filter", false);
|
||||
GLOBAL_DEF_RST("rendering/textures/default_filters/anisotropic_filtering_level", 2);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/textures/default_filters/anisotropic_filtering_level", PropertyInfo(Variant::INT, "rendering/textures/default_filters/anisotropic_filtering_level", PROPERTY_HINT_ENUM, String::utf8("Disabled (Fastest),2× (Faster),4× (Fast),8× (Average),16× (Slow)")));
|
||||
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/textures/default_filters/anisotropic_filtering_level", PROPERTY_HINT_ENUM, String::utf8("Disabled (Fastest),2× (Faster),4× (Fast),8× (Average),16× (Slow)")), 2);
|
||||
|
||||
GLOBAL_DEF("rendering/camera/depth_of_field/depth_of_field_bokeh_shape", 1);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/camera/depth_of_field/depth_of_field_bokeh_shape", PropertyInfo(Variant::INT, "rendering/camera/depth_of_field/depth_of_field_bokeh_shape", PROPERTY_HINT_ENUM, "Box (Fast),Hexagon (Average),Circle (Slowest)"));
|
||||
GLOBAL_DEF("rendering/camera/depth_of_field/depth_of_field_bokeh_quality", 1);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/camera/depth_of_field/depth_of_field_bokeh_quality", PropertyInfo(Variant::INT, "rendering/camera/depth_of_field/depth_of_field_bokeh_quality", PROPERTY_HINT_ENUM, "Very Low (Fastest),Low (Fast),Medium (Average),High (Slow)"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/camera/depth_of_field/depth_of_field_bokeh_shape", PROPERTY_HINT_ENUM, "Box (Fast),Hexagon (Average),Circle (Slowest)"), 1);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/camera/depth_of_field/depth_of_field_bokeh_quality", PROPERTY_HINT_ENUM, "Very Low (Fastest),Low (Fast),Medium (Average),High (Slow)"), 1);
|
||||
GLOBAL_DEF("rendering/camera/depth_of_field/depth_of_field_use_jitter", false);
|
||||
|
||||
GLOBAL_DEF("rendering/environment/ssao/quality", 2);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/quality", PropertyInfo(Variant::INT, "rendering/environment/ssao/quality", PROPERTY_HINT_ENUM, "Very Low (Fast),Low (Fast),Medium (Average),High (Slow),Ultra (Custom)"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/environment/ssao/quality", PROPERTY_HINT_ENUM, "Very Low (Fast),Low (Fast),Medium (Average),High (Slow),Ultra (Custom)"), 2);
|
||||
GLOBAL_DEF("rendering/environment/ssao/half_size", true);
|
||||
GLOBAL_DEF("rendering/environment/ssao/adaptive_target", 0.5);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/adaptive_target", PropertyInfo(Variant::FLOAT, "rendering/environment/ssao/adaptive_target", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"));
|
||||
GLOBAL_DEF("rendering/environment/ssao/blur_passes", 2);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/blur_passes", PropertyInfo(Variant::INT, "rendering/environment/ssao/blur_passes", PROPERTY_HINT_RANGE, "0,6"));
|
||||
GLOBAL_DEF("rendering/environment/ssao/fadeout_from", 50.0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/fadeout_from", PropertyInfo(Variant::FLOAT, "rendering/environment/ssao/fadeout_from", PROPERTY_HINT_RANGE, "0.0,512,0.1,or_greater"));
|
||||
GLOBAL_DEF("rendering/environment/ssao/fadeout_to", 300.0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssao/fadeout_to", PropertyInfo(Variant::FLOAT, "rendering/environment/ssao/fadeout_to", PROPERTY_HINT_RANGE, "64,65536,0.1,or_greater"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/environment/ssao/adaptive_target", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), 0.5);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/environment/ssao/blur_passes", PROPERTY_HINT_RANGE, "0,6"), 2);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/environment/ssao/fadeout_from", PROPERTY_HINT_RANGE, "0.0,512,0.1,or_greater"), 50.0);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/environment/ssao/fadeout_to", PROPERTY_HINT_RANGE, "64,65536,0.1,or_greater"), 300.0);
|
||||
|
||||
GLOBAL_DEF("rendering/environment/ssil/quality", 2);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssil/quality", PropertyInfo(Variant::INT, "rendering/environment/ssil/quality", PROPERTY_HINT_ENUM, "Very Low (Fast),Low (Fast),Medium (Average),High (Slow),Ultra (Custom)"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/environment/ssil/quality", PROPERTY_HINT_ENUM, "Very Low (Fast),Low (Fast),Medium (Average),High (Slow),Ultra (Custom)"), 2);
|
||||
GLOBAL_DEF("rendering/environment/ssil/half_size", true);
|
||||
GLOBAL_DEF("rendering/environment/ssil/adaptive_target", 0.5);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssil/adaptive_target", PropertyInfo(Variant::FLOAT, "rendering/environment/ssil/adaptive_target", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"));
|
||||
GLOBAL_DEF("rendering/environment/ssil/blur_passes", 4);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssil/blur_passes", PropertyInfo(Variant::INT, "rendering/environment/ssil/blur_passes", PROPERTY_HINT_RANGE, "0,6"));
|
||||
GLOBAL_DEF("rendering/environment/ssil/fadeout_from", 50.0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssil/fadeout_from", PropertyInfo(Variant::FLOAT, "rendering/environment/ssil/fadeout_from", PROPERTY_HINT_RANGE, "0.0,512,0.1,or_greater"));
|
||||
GLOBAL_DEF("rendering/environment/ssil/fadeout_to", 300.0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/ssil/fadeout_to", PropertyInfo(Variant::FLOAT, "rendering/environment/ssil/fadeout_to", PROPERTY_HINT_RANGE, "64,65536,0.1,or_greater"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/environment/ssil/adaptive_target", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), 0.5);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/environment/ssil/blur_passes", PROPERTY_HINT_RANGE, "0,6"), 4);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/environment/ssil/fadeout_from", PROPERTY_HINT_RANGE, "0.0,512,0.1,or_greater"), 50.0);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/environment/ssil/fadeout_to", PROPERTY_HINT_RANGE, "64,65536,0.1,or_greater"), 300.0);
|
||||
|
||||
GLOBAL_DEF("rendering/anti_aliasing/screen_space_roughness_limiter/enabled", true);
|
||||
GLOBAL_DEF("rendering/anti_aliasing/screen_space_roughness_limiter/amount", 0.25);
|
||||
GLOBAL_DEF("rendering/anti_aliasing/screen_space_roughness_limiter/limit", 0.18);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/screen_space_roughness_limiter/amount", PropertyInfo(Variant::FLOAT, "rendering/anti_aliasing/screen_space_roughness_limiter/amount", PROPERTY_HINT_RANGE, "0.01,4.0,0.01"));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/anti_aliasing/screen_space_roughness_limiter/limit", PropertyInfo(Variant::FLOAT, "rendering/anti_aliasing/screen_space_roughness_limiter/limit", PROPERTY_HINT_RANGE, "0.01,1.0,0.01"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/anti_aliasing/screen_space_roughness_limiter/amount", PROPERTY_HINT_RANGE, "0.01,4.0,0.01"), 0.25);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/anti_aliasing/screen_space_roughness_limiter/limit", PROPERTY_HINT_RANGE, "0.01,1.0,0.01"), 0.18);
|
||||
|
||||
GLOBAL_DEF("rendering/scaling_3d/mode", 0);
|
||||
GLOBAL_DEF("rendering/scaling_3d/scale", 1.0);
|
||||
GLOBAL_DEF("rendering/scaling_3d/fsr_sharpness", 0.2f);
|
||||
GLOBAL_DEF("rendering/textures/default_filters/texture_mipmap_bias", 0.0f);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/scaling_3d/mode",
|
||||
PropertyInfo(Variant::INT,
|
||||
"rendering/scaling_3d/mode",
|
||||
PROPERTY_HINT_ENUM, "Bilinear (Fastest),FSR 1.0 (Fast)"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/scaling_3d/mode", PROPERTY_HINT_ENUM, "Bilinear (Fastest),FSR 1.0 (Fast)"), 0);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/scaling_3d/scale", PROPERTY_HINT_RANGE, "0.25,2.0,0.01"), 1.0);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/scaling_3d/fsr_sharpness", PROPERTY_HINT_RANGE, "0,2,0.1"), 0.2f);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/textures/default_filters/texture_mipmap_bias", PROPERTY_HINT_RANGE, "-2,2,0.001"), 0.0f);
|
||||
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/scaling_3d/scale",
|
||||
PropertyInfo(Variant::FLOAT,
|
||||
"rendering/scaling_3d/scale",
|
||||
PROPERTY_HINT_RANGE, "0.25,2.0,0.01"));
|
||||
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/scaling_3d/fsr_sharpness",
|
||||
PropertyInfo(Variant::FLOAT,
|
||||
"rendering/scaling_3d/fsr_sharpness",
|
||||
PROPERTY_HINT_RANGE, "0,2,0.1"));
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/textures/default_filters/texture_mipmap_bias",
|
||||
PropertyInfo(Variant::FLOAT,
|
||||
"rendering/textures/default_filters/texture_mipmap_bias",
|
||||
PROPERTY_HINT_RANGE, "-2,2,0.001"));
|
||||
|
||||
GLOBAL_DEF("rendering/textures/decals/filter", DECAL_FILTER_LINEAR_MIPMAPS);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/textures/decals/filter", PropertyInfo(Variant::INT, "rendering/textures/decals/filter", PROPERTY_HINT_ENUM, "Nearest (Fast),Linear (Fast),Nearest Mipmap (Fast),Linear Mipmap (Fast),Nearest Mipmap Anisotropic (Average),Linear Mipmap Anisotropic (Average)"));
|
||||
GLOBAL_DEF("rendering/textures/light_projectors/filter", LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/textures/light_projectors/filter", PropertyInfo(Variant::INT, "rendering/textures/light_projectors/filter", PROPERTY_HINT_ENUM, "Nearest (Fast),Linear (Fast),Nearest Mipmap (Fast),Linear Mipmap (Fast),Nearest Mipmap Anisotropic (Average),Linear Mipmap Anisotropic (Average)"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/textures/decals/filter", PROPERTY_HINT_ENUM, "Nearest (Fast),Linear (Fast),Nearest Mipmap (Fast),Linear Mipmap (Fast),Nearest Mipmap Anisotropic (Average),Linear Mipmap Anisotropic (Average)"), DECAL_FILTER_LINEAR_MIPMAPS);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/textures/light_projectors/filter", PROPERTY_HINT_ENUM, "Nearest (Fast),Linear (Fast),Nearest Mipmap (Fast),Linear Mipmap (Fast),Nearest Mipmap Anisotropic (Average),Linear Mipmap Anisotropic (Average)"), LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS);
|
||||
|
||||
GLOBAL_DEF_RST("rendering/occlusion_culling/occlusion_rays_per_thread", 512);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/occlusion_culling/bvh_build_quality", PropertyInfo(Variant::INT, "rendering/occlusion_culling/bvh_build_quality", PROPERTY_HINT_ENUM, "Low,Medium,High"));
|
||||
|
||||
GLOBAL_DEF("rendering/environment/glow/upscale_mode", 1);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/glow/upscale_mode", PropertyInfo(Variant::INT, "rendering/environment/glow/upscale_mode", PROPERTY_HINT_ENUM, "Linear (Fast),Bicubic (Slow)"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/environment/glow/upscale_mode", PROPERTY_HINT_ENUM, "Linear (Fast),Bicubic (Slow)"), 1);
|
||||
GLOBAL_DEF("rendering/environment/glow/upscale_mode.mobile", 0);
|
||||
GLOBAL_DEF("rendering/environment/glow/use_high_quality", false);
|
||||
|
||||
GLOBAL_DEF("rendering/environment/screen_space_reflection/roughness_quality", 1);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/screen_space_reflection/roughness_quality", PropertyInfo(Variant::INT, "rendering/environment/screen_space_reflection/roughness_quality", PROPERTY_HINT_ENUM, "Disabled (Fastest),Low (Fast),Medium (Average),High (Slow)"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/environment/screen_space_reflection/roughness_quality", PROPERTY_HINT_ENUM, "Disabled (Fastest),Low (Fast),Medium (Average),High (Slow)"), 1);
|
||||
|
||||
GLOBAL_DEF("rendering/environment/subsurface_scattering/subsurface_scattering_quality", 1);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/subsurface_scattering/subsurface_scattering_quality", PropertyInfo(Variant::INT, "rendering/environment/subsurface_scattering/subsurface_scattering_quality", PROPERTY_HINT_ENUM, "Disabled (Fastest),Low (Fast),Medium (Average),High (Slow)"));
|
||||
GLOBAL_DEF("rendering/environment/subsurface_scattering/subsurface_scattering_scale", 0.05);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/subsurface_scattering/subsurface_scattering_scale", PropertyInfo(Variant::FLOAT, "rendering/environment/subsurface_scattering/subsurface_scattering_scale", PROPERTY_HINT_RANGE, "0.001,1,0.001"));
|
||||
GLOBAL_DEF("rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale", 0.01);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale", PropertyInfo(Variant::FLOAT, "rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale", PROPERTY_HINT_RANGE, "0.001,1,0.001"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/environment/subsurface_scattering/subsurface_scattering_quality", PROPERTY_HINT_ENUM, "Disabled (Fastest),Low (Fast),Medium (Average),High (Slow)"), 1);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/environment/subsurface_scattering/subsurface_scattering_scale", PROPERTY_HINT_RANGE, "0.001,1,0.001"), 0.05);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale", PROPERTY_HINT_RANGE, "0.001,1,0.001"), 0.01);
|
||||
|
||||
GLOBAL_DEF("rendering/limits/global_shader_variables/buffer_size", 65536);
|
||||
|
||||
GLOBAL_DEF("rendering/lightmapping/probe_capture/update_speed", 15);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/lightmapping/probe_capture/update_speed", PropertyInfo(Variant::FLOAT, "rendering/lightmapping/probe_capture/update_speed", PROPERTY_HINT_RANGE, "0.001,256,0.001"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/lightmapping/probe_capture/update_speed", PROPERTY_HINT_RANGE, "0.001,256,0.001"), 15);
|
||||
|
||||
GLOBAL_DEF("rendering/global_illumination/sdfgi/probe_ray_count", 1);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/global_illumination/sdfgi/probe_ray_count", PropertyInfo(Variant::INT, "rendering/global_illumination/sdfgi/probe_ray_count", PROPERTY_HINT_ENUM, "8 (Fastest),16,32,64,96,128 (Slowest)"));
|
||||
GLOBAL_DEF("rendering/global_illumination/sdfgi/frames_to_converge", 5);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/global_illumination/sdfgi/frames_to_converge", PropertyInfo(Variant::INT, "rendering/global_illumination/sdfgi/frames_to_converge", PROPERTY_HINT_ENUM, "5 (Less Latency but Lower Quality),10,15,20,25,30 (More Latency but Higher Quality)"));
|
||||
GLOBAL_DEF("rendering/global_illumination/sdfgi/frames_to_update_lights", 2);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/global_illumination/sdfgi/frames_to_update_lights", PropertyInfo(Variant::INT, "rendering/global_illumination/sdfgi/frames_to_update_lights", PROPERTY_HINT_ENUM, "1 (Slower),2,4,8,16 (Faster)"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/global_illumination/sdfgi/probe_ray_count", PROPERTY_HINT_ENUM, "8 (Fastest),16,32,64,96,128 (Slowest)"), 1);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/global_illumination/sdfgi/frames_to_converge", PROPERTY_HINT_ENUM, "5 (Less Latency but Lower Quality),10,15,20,25,30 (More Latency but Higher Quality)"), 5);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/global_illumination/sdfgi/frames_to_update_lights", PROPERTY_HINT_ENUM, "1 (Slower),2,4,8,16 (Faster)"), 2);
|
||||
|
||||
GLOBAL_DEF("rendering/environment/volumetric_fog/volume_size", 64);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/volumetric_fog/volume_size", PropertyInfo(Variant::INT, "rendering/environment/volumetric_fog/volume_size", PROPERTY_HINT_RANGE, "16,512,1"));
|
||||
GLOBAL_DEF("rendering/environment/volumetric_fog/volume_depth", 64);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/volumetric_fog/volume_depth", PropertyInfo(Variant::INT, "rendering/environment/volumetric_fog/volume_depth", PROPERTY_HINT_RANGE, "16,512,1"));
|
||||
GLOBAL_DEF("rendering/environment/volumetric_fog/use_filter", 1);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/environment/volumetric_fog/use_filter", PropertyInfo(Variant::INT, "rendering/environment/volumetric_fog/use_filter", PROPERTY_HINT_ENUM, "No (Faster),Yes (Higher Quality)"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/environment/volumetric_fog/volume_size", PROPERTY_HINT_RANGE, "16,512,1"), 64);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/environment/volumetric_fog/volume_depth", PROPERTY_HINT_RANGE, "16,512,1"), 64);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/environment/volumetric_fog/use_filter", PROPERTY_HINT_ENUM, "No (Faster),Yes (Higher Quality)"), 1);
|
||||
|
||||
GLOBAL_DEF("rendering/limits/spatial_indexer/update_iterations_per_frame", 10);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/spatial_indexer/update_iterations_per_frame", PropertyInfo(Variant::INT, "rendering/limits/spatial_indexer/update_iterations_per_frame", PROPERTY_HINT_RANGE, "0,1024,1"));
|
||||
GLOBAL_DEF("rendering/limits/spatial_indexer/threaded_cull_minimum_instances", 1000);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/spatial_indexer/threaded_cull_minimum_instances", PropertyInfo(Variant::INT, "rendering/limits/spatial_indexer/threaded_cull_minimum_instances", PROPERTY_HINT_RANGE, "32,65536,1"));
|
||||
GLOBAL_DEF("rendering/limits/forward_renderer/threaded_render_minimum_instances", 500);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/forward_renderer/threaded_render_minimum_instances", PropertyInfo(Variant::INT, "rendering/limits/forward_renderer/threaded_render_minimum_instances", PROPERTY_HINT_RANGE, "32,65536,1"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/limits/spatial_indexer/update_iterations_per_frame", PROPERTY_HINT_RANGE, "0,1024,1"), 10);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/limits/spatial_indexer/threaded_cull_minimum_instances", PROPERTY_HINT_RANGE, "32,65536,1"), 1000);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/limits/forward_renderer/threaded_render_minimum_instances", PROPERTY_HINT_RANGE, "32,65536,1"), 500);
|
||||
|
||||
GLOBAL_DEF("rendering/limits/cluster_builder/max_clustered_elements", 512);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/cluster_builder/max_clustered_elements", PropertyInfo(Variant::FLOAT, "rendering/limits/cluster_builder/max_clustered_elements", PROPERTY_HINT_RANGE, "32,8192,1"));
|
||||
GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/limits/cluster_builder/max_clustered_elements", PROPERTY_HINT_RANGE, "32,8192,1"), 512);
|
||||
|
||||
// OpenGL limits
|
||||
GLOBAL_DEF_RST("rendering/limits/opengl/max_renderable_elements", 65536);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/opengl/max_renderable_elements", PropertyInfo(Variant::INT, "rendering/limits/opengl/max_renderable_elements", PROPERTY_HINT_RANGE, "1024,65536,1"));
|
||||
GLOBAL_DEF_RST("rendering/limits/opengl/max_renderable_lights", 32);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/opengl/max_renderable_lights", PropertyInfo(Variant::INT, "rendering/limits/opengl/max_renderable_lights", PROPERTY_HINT_RANGE, "2,256,1"));
|
||||
GLOBAL_DEF_RST("rendering/limits/opengl/max_lights_per_object", 8);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/limits/opengl/max_lights_per_object", PropertyInfo(Variant::INT, "rendering/limits/opengl/max_lights_per_object", PROPERTY_HINT_RANGE, "2,1024,1"));
|
||||
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/limits/opengl/max_renderable_elements", PROPERTY_HINT_RANGE, "1024,65536,1"), 65536);
|
||||
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/limits/opengl/max_renderable_lights", PROPERTY_HINT_RANGE, "2,256,1"), 32);
|
||||
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/limits/opengl/max_lights_per_object", PROPERTY_HINT_RANGE, "2,1024,1"), 8);
|
||||
|
||||
GLOBAL_DEF_RST_BASIC("xr/shaders/enabled", false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue