From 31ce3c5fd0300aac1e86bced1efc5f9ec94bdb6b Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 13 Mar 2014 22:57:24 -0300 Subject: -fix bug in cache for atlas import/export -fix some menus -fixed bug in out transition curves -detect and remove file:/// in collada -remove multiscript for now -remove dependencies on mouse in OS, moved to Input -avoid fscache from screwing up (fix might make it slower, but it works) -funcref was missing, it's there now --- tools/editor/editor_import_export.cpp | 88 +++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 3 deletions(-) (limited to 'tools/editor/editor_import_export.cpp') diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index 1a5dd7304..18c001090 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -447,12 +447,64 @@ void EditorExportPlatformPC::_get_property_list( List *p_list) con +static void _exp_add_dep(Map > &deps,const StringName& p_path) { + + + if (deps.has(p_path)) + return; //already done + + deps.insert(p_path,List()); + + List &deplist=deps[p_path]; + Set depset; + + List dl; + ResourceLoader::get_dependencies(p_path,&dl); + + //added in order so child dependencies are always added bfore parent dependencies + for (List::Element *E=dl.front();E;E=E->next()) { + + + if (!deps.has(E->get())) + _exp_add_dep(deps,E->get()); + + for(List::Element *F=deps[E->get()].front();F;F=F->next()) { + + + if (!depset.has(F->get())) { + depset.insert(F->get()); + deplist.push_back(F->get()); + } + } + + if (!depset.has(E->get())) { + depset.insert(E->get()); + deplist.push_back(E->get()); + } + + } +} + + + Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func, void* p_udata,bool p_make_bundles) { /* ALL FILES AND DEPENDENCIES */ Vector files=get_dependencies(p_make_bundles); + Map > deps; + + if (false) { + for(int i=0;i::Element *F=atlas_images.front();F;F=F->next()) { - imd->add_source(EditorImportPlugin::validate_source_path(F->get())); + imd->add_source(EditorImportPlugin::validate_source_path(F->get()),FileAccess::get_md5(F->get())); } @@ -683,7 +735,6 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func rects.resize(r_rects.size()); for(int i=0;i custom; + if (remap_files.size()) { Vector remapsprop; for(Map::Element *E=remap_files.front();E;E=E->next()) { + print_line("REMAP: "+String(E->key())+" -> "+E->get()); remapsprop.push_back(E->key()); remapsprop.push_back(E->get()); } custom["remap/all"]=remapsprop; } + + //add presaved dependencies + for(Map >::Element *E=deps.front();E;E=E->next()) { + + if (E->get().size()==0) + continue; //no deps + String key; + Vector deps; + //if bundle continue (when bundles supported obviously) + + if (remap_files.has(E->key())) { + key=remap_files[E->key()]; + } else { + key=E->key(); + } + + deps.resize(E->get().size()); + int i=0; + + for(List::Element *F=E->get().front();F;F=F->next()) { + deps[i++]=F->get(); + print_line(" -"+String(F->get())); + } + + NodePath prop(deps,true,String()); //seems best to use this for performance + + custom["deps/"+key.md5_text()]=prop; + + } + String remap_file="engine.cfb"; String engine_cfb =EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmp"+remap_file; Globals::get_singleton()->save_custom(engine_cfb,custom); -- cgit v1.2.3-70-g09d2