Merge pull request #80972 from KoBeWi/settings_from_nowhere
Cleanup some `GLOBAL_DEF`s
This commit is contained in:
commit
33b95f06e2
7 changed files with 9 additions and 12 deletions
|
@ -1398,6 +1398,8 @@ ProjectSettings::ProjectSettings() {
|
|||
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);
|
||||
|
||||
GLOBAL_DEF("collada/use_ambient", false);
|
||||
|
||||
// These properties will not show up in the dialog. If you want to exclude whole groups, use add_hidden_prefix().
|
||||
GLOBAL_DEF_INTERNAL("application/config/features", PackedStringArray());
|
||||
GLOBAL_DEF_INTERNAL("internationalization/locale/translation_remaps", PackedStringArray());
|
||||
|
|
|
@ -400,6 +400,9 @@
|
|||
<member name="audio/video/video_delay_compensation_ms" type="int" setter="" getter="" default="0">
|
||||
Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing.
|
||||
</member>
|
||||
<member name="collada/use_ambient" type="bool" setter="" getter="" default="false">
|
||||
If [code]true[/code], ambient lights will be imported from COLLADA models as [DirectionalLight3D]. If [code]false[/code], ambient lights will be ignored.
|
||||
</member>
|
||||
<member name="compression/formats/gzip/compression_level" type="int" setter="" getter="" default="-1">
|
||||
The default compression level for gzip. Affects compressed scenes and resources. Higher levels result in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression level. [code]-1[/code] uses the default gzip compression level, which is identical to [code]6[/code] but could change in the future due to underlying zlib updates.
|
||||
</member>
|
||||
|
|
|
@ -220,7 +220,7 @@ void EditorRunBar::_run_scene(const String &p_scene_path) {
|
|||
return;
|
||||
}
|
||||
|
||||
run_filename = GLOBAL_DEF_BASIC("application/run/main_scene", "");
|
||||
run_filename = GLOBAL_GET("application/run/main_scene");
|
||||
} break;
|
||||
}
|
||||
|
||||
|
|
|
@ -208,7 +208,7 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Node3D *p_parent) {
|
|||
return OK; //do nothing not needed
|
||||
}
|
||||
|
||||
if (!bool(GLOBAL_DEF("collada/use_ambient", false))) {
|
||||
if (!bool(GLOBAL_GET("collada/use_ambient"))) {
|
||||
return OK;
|
||||
}
|
||||
//well, it's an ambient light..
|
||||
|
|
|
@ -42,11 +42,7 @@ void initialize_webrtc_module(ModuleInitializationLevel p_level) {
|
|||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||
return;
|
||||
}
|
||||
|
||||
#define SET_HINT(NAME, _VAL_, _MAX_) \
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, NAME, PROPERTY_HINT_RANGE, "2," #_MAX_ ",1,or_greater"), _VAL_);
|
||||
|
||||
SET_HINT(WRTC_IN_BUF, 64, 4096);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "network/limits/webrtc/max_channel_in_buffer_kb", PROPERTY_HINT_RANGE, "2,4096,1,or_greater"), 64);
|
||||
|
||||
ClassDB::register_custom_instance_class<WebRTCPeerConnection>();
|
||||
GDREGISTER_CLASS(WebRTCPeerConnectionExtension);
|
||||
|
@ -55,8 +51,6 @@ void initialize_webrtc_module(ModuleInitializationLevel p_level) {
|
|||
GDREGISTER_CLASS(WebRTCDataChannelExtension);
|
||||
|
||||
GDREGISTER_CLASS(WebRTCMultiplayerPeer);
|
||||
|
||||
#undef SET_HINT
|
||||
}
|
||||
|
||||
void uninitialize_webrtc_module(ModuleInitializationLevel p_level) {
|
||||
|
|
|
@ -61,7 +61,7 @@ void WebRTCDataChannel::_bind_methods() {
|
|||
}
|
||||
|
||||
WebRTCDataChannel::WebRTCDataChannel() {
|
||||
_in_buffer_shift = nearest_shift((int)GLOBAL_GET(WRTC_IN_BUF) - 1) + 10;
|
||||
_in_buffer_shift = nearest_shift((int)GLOBAL_GET("network/limits/webrtc/max_channel_in_buffer_kb") - 1) + 10;
|
||||
}
|
||||
|
||||
WebRTCDataChannel::~WebRTCDataChannel() {
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
|
||||
#include "core/io/packet_peer.h"
|
||||
|
||||
#define WRTC_IN_BUF PNAME("network/limits/webrtc/max_channel_in_buffer_kb")
|
||||
|
||||
class WebRTCDataChannel : public PacketPeer {
|
||||
GDCLASS(WebRTCDataChannel, PacketPeer);
|
||||
|
||||
|
|
Loading…
Reference in a new issue