properly export sample compression type option

This commit is contained in:
Juan Linietsky 2016-01-14 11:50:24 -03:00
parent 4248c84e20
commit d222229149
2 changed files with 10 additions and 1 deletions

View file

@ -1849,6 +1849,15 @@ void EditorImportExport::load_config() {
if (cf->has_section("convert_samples")) { 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")) if (cf->has_section_key("convert_samples","max_hz"))
sample_action_max_hz=cf->get_value("convert_samples","max_hz"); sample_action_max_hz=cf->get_value("convert_samples","max_hz");

View file

@ -3624,7 +3624,7 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
} }
if (ResourceCache::has(lpath)) { if (ResourceCache::has(lpath)) {
//used from somewhere else? no problem! update state //used from somewhere else? no problem! update state and replace sdata
Ref<PackedScene> ps = Ref<PackedScene>( ResourceCache::get(lpath)->cast_to<PackedScene>() ); Ref<PackedScene> ps = Ref<PackedScene>( ResourceCache::get(lpath)->cast_to<PackedScene>() );
if (ps.is_valid()) { if (ps.is_valid()) {
ps->replace_state( sdata->get_state() ); ps->replace_state( sdata->get_state() );