From d2222291498dccb188204b72081a1e618b92baa9 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 14 Jan 2016 11:50:24 -0300 Subject: [PATCH] properly export sample compression type option --- tools/editor/editor_import_export.cpp | 9 +++++++++ tools/editor/editor_node.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index fde3d4e278c..5203ace125b 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -1849,6 +1849,15 @@ void EditorImportExport::load_config() { if (cf->has_section("convert_samples")) { + if (cf->has_section_key("convert_samples","action")) { + String action = cf->get_value("convert_samples","action"); + if (action=="none") { + sample_action=SAMPLE_ACTION_NONE; + } else if (action=="compress_ram") { + sample_action=SAMPLE_ACTION_COMPRESS_RAM; + } + } + if (cf->has_section_key("convert_samples","max_hz")) sample_action_max_hz=cf->get_value("convert_samples","max_hz"); diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 4b965ab9cfc..6008021b162 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -3624,7 +3624,7 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo } if (ResourceCache::has(lpath)) { - //used from somewhere else? no problem! update state + //used from somewhere else? no problem! update state and replace sdata Ref ps = Ref( ResourceCache::get(lpath)->cast_to() ); if (ps.is_valid()) { ps->replace_state( sdata->get_state() );