summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/main.cpp12
-rw-r--r--tools/editor/editor_node.cpp15
-rw-r--r--tools/editor/io_plugins/editor_mesh_import_plugin.cpp2
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp9
4 files changed, 30 insertions, 8 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 41a032842d..adaebab1d4 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -101,6 +101,7 @@ static bool init_fullscreen=false;
static bool init_use_custom_pos=false;
static bool debug_collisions=false;
static bool debug_navigation=false;
+static int frame_delay=0;
static Vector2 init_custom_pos;
static int video_driver_idx=-1;
static int audio_driver_idx=-1;
@@ -488,7 +489,7 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
if (I->next()) {
- OS::get_singleton()->set_frame_delay(I->next()->get().to_int());
+ frame_delay=I->next()->get().to_int();
N=I->next()->next();
} else {
goto error;
@@ -805,12 +806,19 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
OS::get_singleton()->set_screen_orientation(OS::SCREEN_LANDSCAPE);
}
+
OS::get_singleton()->set_iterations_per_second(GLOBAL_DEF("physics/fixed_fps",60));
- OS::get_singleton()->set_target_fps(GLOBAL_DEF("application/target_fps",0));
+ OS::get_singleton()->set_target_fps(GLOBAL_DEF("debug/force_fps",0));
if (!OS::get_singleton()->_verbose_stdout) //overrided
OS::get_singleton()->_verbose_stdout=GLOBAL_DEF("debug/verbose_stdout",false);
+ if (frame_delay==0) {
+ frame_delay=GLOBAL_DEF("application/frame_delay_msec",0);
+ }
+
+ OS::get_singleton()->set_frame_delay(frame_delay);
+
message_queue = memnew( MessageQueue );
Globals::get_singleton()->register_global_defaults();
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 001a94f251..89d7f8f3ce 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -1611,6 +1611,7 @@ void EditorNode::_edit_current() {
object_menu->set_disabled(true);
bool is_resource = current_obj->is_type("Resource");
+ bool is_node = current_obj->is_type("Node");
resource_save_button->set_disabled(!is_resource);
if (is_resource) {
@@ -1627,7 +1628,7 @@ void EditorNode::_edit_current() {
//top_pallete->set_current_tab(1);
- } else if (current_obj->is_type("Node")) {
+ } else if (is_node) {
Node * current_node = current_obj->cast_to<Node>();
ERR_FAIL_COND(!current_node);
@@ -1723,10 +1724,14 @@ void EditorNode::_edit_current() {
p->add_shortcut(ED_SHORTCUT("property_editor/copy_resource",TTR("Copy Resource")),RESOURCE_COPY);
p->add_shortcut(ED_SHORTCUT("property_editor/unref_resource",TTR("Make Built-In")),RESOURCE_UNREF);
}
- p->add_separator();
- p->add_shortcut(ED_SHORTCUT("property_editor/make_subresources_unique",TTR("Make Sub-Resources Unique")),OBJECT_UNIQUE_RESOURCES);
- p->add_separator();
- p->add_icon_shortcut(gui_base->get_icon("Help","EditorIcons"),ED_SHORTCUT("property_editor/open_help",TTR("Open in Help")),OBJECT_REQUEST_HELP);
+
+ if (is_resource || is_node) {
+ p->add_separator();
+ p->add_shortcut(ED_SHORTCUT("property_editor/make_subresources_unique",TTR("Make Sub-Resources Unique")),OBJECT_UNIQUE_RESOURCES);
+ p->add_separator();
+ p->add_icon_shortcut(gui_base->get_icon("Help","EditorIcons"),ED_SHORTCUT("property_editor/open_help",TTR("Open in Help")),OBJECT_REQUEST_HELP);
+ }
+
List<MethodInfo> methods;
current_obj->get_method_list(&methods);
diff --git a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
index 095c56a373..2c3ed2afd6 100644
--- a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
@@ -520,7 +520,7 @@ Error EditorMeshImportPlugin::import(const String& p_path, const Ref<ResourceImp
//new object/surface
if (generate_normals || force_smooth)
surf_tool->generate_normals();
- if (uvs.size() && (normals.size() || generate_normals))
+ if (uvs.size() && (normals.size() || generate_normals) && generate_tangents)
surf_tool->generate_tangents();
surf_tool->index();
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index d7d495ff5d..3b095d15f9 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -874,6 +874,15 @@ void ScriptEditor::_reload_scripts(){
}
+ uint64_t last_date = script->get_last_modified_time();
+ uint64_t date = FileAccess::get_modified_time(script->get_path());
+
+ //printf("last date: %lli vs date: %lli\n",last_date,date);
+ if (last_date==date) {
+ continue;
+ }
+
+
Ref<Script> rel_script = ResourceLoader::load(script->get_path(),script->get_type(),true);
ERR_CONTINUE(!rel_script.is_valid());
script->set_source_code( rel_script->get_source_code() );