no more errors related to missing GlobalConfig::Get (or so I hope)
This commit is contained in:
parent
a1d07fd6d6
commit
5dde810aa5
8 changed files with 32 additions and 26 deletions
|
@ -166,8 +166,10 @@ bool GlobalConfig::_get(const StringName& p_name,Variant &r_ret) const {
|
|||
|
||||
_THREAD_SAFE_METHOD_
|
||||
|
||||
if (!props.has(p_name))
|
||||
if (!props.has(p_name)) {
|
||||
print_line("WARNING: not found: "+String(p_name));
|
||||
return false;
|
||||
}
|
||||
r_ret=props[p_name].variant;
|
||||
return true;
|
||||
|
||||
|
@ -922,6 +924,7 @@ GlobalConfig::GlobalConfig() {
|
|||
GLOBAL_DEF("application/main_scene","");
|
||||
custom_prop_info["application/main_scene"]=PropertyInfo(Variant::STRING,"application/main_scene",PROPERTY_HINT_FILE,"tscn,scn,xscn,xml,res");
|
||||
GLOBAL_DEF("application/disable_stdout",false);
|
||||
GLOBAL_DEF("application/disable_stderr",false);
|
||||
GLOBAL_DEF("application/use_shared_user_dir",true);
|
||||
|
||||
|
||||
|
|
|
@ -124,7 +124,10 @@ void PathRemap::clear_remaps() {
|
|||
void PathRemap::load_remaps() {
|
||||
|
||||
// default remaps first
|
||||
PoolVector<String> remaps = GlobalConfig::get_singleton()->get("remap/all");
|
||||
PoolVector<String> remaps;
|
||||
if (GlobalConfig::get_singleton()->has("remap/all")) {
|
||||
remaps = GlobalConfig::get_singleton()->get("remap/all");
|
||||
}
|
||||
|
||||
{
|
||||
int rlen = remaps.size();
|
||||
|
@ -141,7 +144,11 @@ void PathRemap::load_remaps() {
|
|||
|
||||
|
||||
// platform remaps second, so override
|
||||
remaps = GlobalConfig::get_singleton()->get("remap/"+OS::get_singleton()->get_name());
|
||||
if (GlobalConfig::get_singleton()->has("remap/"+OS::get_singleton()->get_name())) {
|
||||
remaps = GlobalConfig::get_singleton()->get("remap/"+OS::get_singleton()->get_name());
|
||||
} else {
|
||||
remaps.resize(0);
|
||||
}
|
||||
//remaps = Globals::get_singleton()->get("remap/PSP");
|
||||
{
|
||||
int rlen = remaps.size();
|
||||
|
|
|
@ -4991,12 +4991,12 @@ void RasterizerSceneGLES3::initialize() {
|
|||
void RasterizerSceneGLES3::iteration() {
|
||||
|
||||
shadow_filter_mode=ShadowFilterMode(int(GlobalConfig::get_singleton()->get("rendering/gles3/shadow_filter_mode")));
|
||||
subsurface_scatter_follow_surface=GlobalConfig::get_singleton()->get("rendering/gles3/subsurface_scattering/follow_surface");
|
||||
subsurface_scatter_quality=SubSurfaceScatterQuality(int(GlobalConfig::get_singleton()->get("rendering/gles3/subsurface_scattering/quality")));
|
||||
subsurface_scatter_size=GlobalConfig::get_singleton()->get("rendering/gles3/subsurface_scattering/max_size");
|
||||
subsurface_scatter_follow_surface=GlobalConfig::get_singleton()->get("rendering/ssurf_scattering/follow_surface");
|
||||
subsurface_scatter_quality=SubSurfaceScatterQuality(int(GlobalConfig::get_singleton()->get("rendering/ssurf_scattering/quality")));
|
||||
subsurface_scatter_size=GlobalConfig::get_singleton()->get("rendering/ssurf_scattering/max_size");
|
||||
|
||||
|
||||
state.scene_shader.set_conditional(SceneShaderGLES3::VCT_QUALITY_HIGH,GlobalConfig::get_singleton()->get("rendering/gles3/high_quality_vct_gi"));
|
||||
state.scene_shader.set_conditional(SceneShaderGLES3::VCT_QUALITY_HIGH,GlobalConfig::get_singleton()->get("rendering/reflections/high_quality_vct_gi"));
|
||||
}
|
||||
|
||||
void RasterizerSceneGLES3::finalize(){
|
||||
|
|
|
@ -596,6 +596,7 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
|
|||
I=N;
|
||||
}
|
||||
|
||||
GLOBAL_DEF("memory/multithread/thread_rid_pool_prealloc",60);
|
||||
|
||||
GLOBAL_DEF("network/debug/max_remote_stdout_chars_per_second",2048);
|
||||
GLOBAL_DEF("network/debug/remote_port",6007);
|
||||
|
|
|
@ -1385,7 +1385,7 @@ String Node::_generate_serial_child_name(Node *p_child) {
|
|||
|
||||
name = p_child->get_class();
|
||||
// Adjust casing according to project setting. The current type name is expected to be in PascalCase.
|
||||
switch (GlobalConfig::get_singleton()->get("editor/node_name_casing").operator int()) {
|
||||
switch (GlobalConfig::get_singleton()->get("node/name_casing").operator int()) {
|
||||
case NAME_CASING_PASCAL_CASE:
|
||||
break;
|
||||
case NAME_CASING_CAMEL_CASE:
|
||||
|
@ -2899,10 +2899,10 @@ void Node::request_ready() {
|
|||
|
||||
void Node::_bind_methods() {
|
||||
|
||||
GLOBAL_DEF("editor/node_name_num_separator",0);
|
||||
GlobalConfig::get_singleton()->set_custom_property_info("editor/node_name_num_separator",PropertyInfo(Variant::INT,"editor/node_name_num_separator",PROPERTY_HINT_ENUM, "None,Space,Underscore,Dash"));
|
||||
GLOBAL_DEF("editor/node_name_casing",NAME_CASING_PASCAL_CASE);
|
||||
GlobalConfig::get_singleton()->set_custom_property_info("editor/node_name_casing",PropertyInfo(Variant::INT,"editor/node_name_casing",PROPERTY_HINT_ENUM,"PascalCase,camelCase,snake_case"));
|
||||
GLOBAL_DEF("node/name_num_separator",0);
|
||||
GlobalConfig::get_singleton()->set_custom_property_info("node/name_num_separator",PropertyInfo(Variant::INT,"node/name_num_separator",PROPERTY_HINT_ENUM, "None,Space,Underscore,Dash"));
|
||||
GLOBAL_DEF("node/name_casing",NAME_CASING_PASCAL_CASE);
|
||||
GlobalConfig::get_singleton()->set_custom_property_info("node/name_casing",PropertyInfo(Variant::INT,"node/name_casing",PROPERTY_HINT_ENUM,"PascalCase,camelCase,snake_case"));
|
||||
|
||||
ClassDB::bind_method(_MD("_add_child_below_node","node:Node","child_node:Node","legible_unique_name"),&Node::add_child_below_node,DEFVAL(false));
|
||||
|
||||
|
|
|
@ -406,12 +406,6 @@ World2D::World2D() {
|
|||
Physics2DServer::get_singleton()->space_set_active(space,true);
|
||||
Physics2DServer::get_singleton()->area_set_param(space,Physics2DServer::AREA_PARAM_GRAVITY,GLOBAL_DEF("physics/2d/default_gravity",98));
|
||||
Physics2DServer::get_singleton()->area_set_param(space,Physics2DServer::AREA_PARAM_GRAVITY_VECTOR,GLOBAL_DEF("physics/2d/default_gravity_vector",Vector2(0,1)));
|
||||
// TODO: Remove this deprecation warning and compatibility code for 2.2 or 3.0
|
||||
if (GlobalConfig::get_singleton()->get("physics/2d/default_density") && !GlobalConfig::get_singleton()->get("physics/2d/default_linear_damp")) {
|
||||
WARN_PRINT("Deprecated parameter 'physics/2d/default_density'. It was renamed to 'physics/2d/default_linear_damp', adjusting your project settings accordingly (make sure to adjust scripts that potentially rely on 'physics/2d/default_density'.");
|
||||
GlobalConfig::get_singleton()->set("physics/2d/default_linear_damp", GlobalConfig::get_singleton()->get("physics/2d/default_density"));
|
||||
GlobalConfig::get_singleton()->save();
|
||||
}
|
||||
Physics2DServer::get_singleton()->area_set_param(space,Physics2DServer::AREA_PARAM_LINEAR_DAMP,GLOBAL_DEF("physics/2d/default_linear_damp",0.1));
|
||||
Physics2DServer::get_singleton()->area_set_param(space,Physics2DServer::AREA_PARAM_ANGULAR_DAMP,GLOBAL_DEF("physics/2d/default_angular_damp",1));
|
||||
indexer = memnew( SpatialIndexer2D );
|
||||
|
|
|
@ -1537,7 +1537,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) {
|
|||
|
||||
if (p_event.type==InputEvent::MOUSE_MOTION) {
|
||||
|
||||
if (!viewport->has_focus() && (!get_focus_owner() || !get_focus_owner()->is_text_field()))
|
||||
if (!viewport->has_focus() && (!get_focus_owner() || !get_focus_owner()->is_text_field()))
|
||||
viewport->call_deferred("grab_focus");
|
||||
|
||||
const InputEventMouseMotion &m=p_event.mouse_motion;
|
||||
|
@ -1555,7 +1555,6 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) {
|
|||
|
||||
|
||||
if ( (m.button_mask&BUTTON_MASK_LEFT && tool == TOOL_PAN) || m.button_mask&BUTTON_MASK_MIDDLE || (m.button_mask&BUTTON_MASK_LEFT && Input::get_singleton()->is_key_pressed(KEY_SPACE))) {
|
||||
|
||||
h_scroll->set_value( h_scroll->get_value() - m.relative_x/zoom);
|
||||
v_scroll->set_value( v_scroll->get_value() - m.relative_y/zoom);
|
||||
}
|
||||
|
@ -2071,7 +2070,7 @@ void CanvasItemEditor::_viewport_draw() {
|
|||
VisualServer::get_singleton()->canvas_item_add_line(ci,transform.xform(display_rotate_from), transform.xform(display_rotate_to),rotate_color);
|
||||
}
|
||||
|
||||
Size2 screen_size = Size2( GlobalConfig::get_singleton()->get("display/width"), GlobalConfig::get_singleton()->get("display/height") );
|
||||
Size2 screen_size = Size2( GlobalConfig::get_singleton()->get("display/window/width"), GlobalConfig::get_singleton()->get("display/window/height") );
|
||||
|
||||
Vector2 screen_endpoints[4]= {
|
||||
transform.xform(Vector2(0,0)),
|
||||
|
@ -2406,7 +2405,8 @@ void CanvasItemEditor::_update_scrollbars() {
|
|||
h_scroll->set_end( Point2(size.width-vmin.width, size.height) );
|
||||
|
||||
|
||||
Size2 screen_rect = Size2( GlobalConfig::get_singleton()->get("display/width"), GlobalConfig::get_singleton()->get("display/height") );
|
||||
Size2 screen_rect = Size2( GlobalConfig::get_singleton()->get("display/window/width"), GlobalConfig::get_singleton()->get("display/window/height") );
|
||||
|
||||
|
||||
Rect2 local_rect = Rect2(Point2(),viewport->get_size()-Size2(vmin.width,hmin.height));
|
||||
|
||||
|
@ -2477,6 +2477,7 @@ void CanvasItemEditor::_update_scrollbars() {
|
|||
|
||||
//transform=Matrix32();
|
||||
transform.elements[2]=-ofs*zoom;
|
||||
|
||||
editor->get_scene_root()->set_global_canvas_transform(transform);
|
||||
|
||||
|
||||
|
@ -3354,8 +3355,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
|
|||
viewport->connect("gui_input",this,"_viewport_gui_input");
|
||||
|
||||
|
||||
h_scroll->connect("value_changed", this,"_update_scroll",Vector<Variant>(),true);
|
||||
v_scroll->connect("value_changed", this,"_update_scroll",Vector<Variant>(),true);
|
||||
h_scroll->connect("value_changed", this,"_update_scroll",Vector<Variant>(),Object::CONNECT_DEFERRED);
|
||||
v_scroll->connect("value_changed", this,"_update_scroll",Vector<Variant>(),Object::CONNECT_DEFERRED);
|
||||
|
||||
h_scroll->hide();
|
||||
v_scroll->hide();
|
||||
|
|
|
@ -1821,10 +1821,10 @@ void SpatialEditorViewport::_notification(int p_what) {
|
|||
|
||||
//update msaa if changed
|
||||
|
||||
int msaa_mode = GlobalConfig::get_singleton()->get("rendering/antialias/msaa");
|
||||
int msaa_mode = GlobalConfig::get_singleton()->get("rendering/quality/msaa");
|
||||
viewport->set_msaa(Viewport::MSAA(msaa_mode));
|
||||
|
||||
bool hdr = GlobalConfig::get_singleton()->get("rendering/dynamic_range/hdr");
|
||||
bool hdr = GlobalConfig::get_singleton()->get("rendering/quality/hdr");
|
||||
viewport->set_hdr(hdr);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue