diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-10-14 19:44:41 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-10-14 19:44:41 -0300 |
commit | cd218b8c09482f9f9f2d15285d55ad955673697f (patch) | |
tree | 60a09595de85ac63027b916dc2344b6612975bf1 /tools | |
parent | 94e35ef316caa0f713eef1c3823c8fa035508090 (diff) |
Fixes
-=-=-
-Fixed normalmap depth parameter
-Fixes to DirAccess on Windows
-Double click on resource dock will open them
-Fixes to doc generator (should make github wiki on class list more up to date)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/collada/collada.cpp | 6 | ||||
-rw-r--r-- | tools/doc/doc_data.cpp | 5 | ||||
-rw-r--r-- | tools/editor/io_plugins/editor_import_collada.cpp | 21 | ||||
-rw-r--r-- | tools/editor/scenes_dock.cpp | 5 |
4 files changed, 20 insertions, 17 deletions
diff --git a/tools/collada/collada.cpp b/tools/collada/collada.cpp index f2e3a0e813..7f4f92e82d 100644 --- a/tools/collada/collada.cpp +++ b/tools/collada/collada.cpp @@ -444,9 +444,9 @@ Vector<String> Collada::_read_string_array(XMLParser& parser) { // parse String data String str = parser.get_node_data(); array=str.split_spaces(); - for(int i=0;i<array.size();i++) { - print_line(itos(i)+": "+array[i]); - } + //for(int i=0;i<array.size();i++) { + // print_line(itos(i)+": "+array[i]); + //} } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END) diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp index 319c1ad8b7..0bd21219bf 100644 --- a/tools/doc/doc_data.cpp +++ b/tools/doc/doc_data.cpp @@ -997,8 +997,8 @@ Error DocData::save(const String& p_path) { _write_string(f,1,"</constants>"); - _write_string(f,1,"<theme_items>"); if (c.theme_properties.size()) { + _write_string(f,1,"<theme_items>"); for(int i=0;i<c.theme_properties.size();i++) { @@ -1007,9 +1007,10 @@ Error DocData::save(const String& p_path) { _write_string(f,2,"</theme_item>"); } + _write_string(f,1,"</theme_items>"); } - _write_string(f,0,"</theme_items>"); + _write_string(f,0,"</class>"); } diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp index 405f8a01e8..e86356ebe9 100644 --- a/tools/editor/io_plugins/editor_import_collada.cpp +++ b/tools/editor/io_plugins/editor_import_collada.cpp @@ -1675,11 +1675,11 @@ void ColladaImport::_fix_param_animation_tracks() { source=skin.base; } else if (collada.state.morph_controller_data_map.has(source)) { - print_line("has morph"); + const Collada::MorphControllerData& morph = collada.state.morph_controller_data_map[source]; if (morph.targets.has("MORPH_WEIGHT") && morph.targets.has("MORPH_TARGET")) { - print_line("weight and target"); + String weights = morph.targets["MORPH_WEIGHT"]; String targets = morph.targets["MORPH_TARGET"]; @@ -1688,7 +1688,7 @@ void ColladaImport::_fix_param_animation_tracks() { if (morph.sources.has(targets) && morph.sources.has(weights)) { const Collada::MorphControllerData::Source &weight_src=morph.sources[weights]; const Collada::MorphControllerData::Source &target_src=morph.sources[targets]; - print_line("sources OK"); + ERR_FAIL_COND(weight_src.array.size() != target_src.sarray.size()); @@ -1697,7 +1697,6 @@ void ColladaImport::_fix_param_animation_tracks() { String track_name = weights+"("+itos(i)+")"; String mesh_name = target_src.sarray[i]; if (collada.state.mesh_name_map.has(mesh_name) && collada.state.referenced_tracks.has(track_name)) { - print_line("refe tracks"); const Vector<int>&rt = collada.state.referenced_tracks[track_name]; @@ -1730,7 +1729,7 @@ void ColladaImport::_fix_param_animation_tracks() { void ColladaImport::create_animations(bool p_make_tracks_in_all_bones) { - print_line("-=-=-=-=-PRE CA"); + _fix_param_animation_tracks(); for(int i=0;i<collada.state.animation_clips.size();i++) { @@ -1743,7 +1742,7 @@ void ColladaImport::create_animations(bool p_make_tracks_in_all_bones) { for(int i=0;i<collada.state.animation_tracks.size();i++) { Collada::AnimationTrack &at = collada.state.animation_tracks[i]; - print_line("CHANNEL: "+at.target+" PARAM: "+at.param); + //print_line("CHANNEL: "+at.target+" PARAM: "+at.param); if (!node_map.has(at.target)) { print_line("Coudlnt find node: "+at.target); continue; @@ -1762,7 +1761,7 @@ void ColladaImport::create_animations(bool p_make_tracks_in_all_bones) { } create_animation(-1,p_make_tracks_in_all_bones); - print_line("clipcount: "+itos(collada.state.animation_clips.size())); + //print_line("clipcount: "+itos(collada.state.animation_clips.size())); for(int i=0;i<collada.state.animation_clips.size();i++) create_animation(i,p_make_tracks_in_all_bones); @@ -1774,10 +1773,10 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones if (p_clip==-1) { - print_line("default"); + //print_line("default"); animation->set_name("default"); } else { - print_line("clip name: "+collada.state.animation_clips[p_clip].name); + //print_line("clip name: "+collada.state.animation_clips[p_clip].name); animation->set_name(collada.state.animation_clips[p_clip].name); } @@ -1849,7 +1848,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones base_snapshots.push_back(f); f+=snapshot_interval; } - print_line("anim len: "+rtos(anim_length)); + //print_line("anim len: "+rtos(anim_length)); animation->set_length(anim_length); bool tracks_found=false; @@ -1874,7 +1873,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones Collada::Node *cn = collada.state.scene_map[E->get()]; if (cn->ignore_anim) { - print_line("warning, ignoring animation on node: "+path); + //print_line("warning, ignoring animation on node: "+path); continue; } diff --git a/tools/editor/scenes_dock.cpp b/tools/editor/scenes_dock.cpp index 34422b4d50..3f7c82d988 100644 --- a/tools/editor/scenes_dock.cpp +++ b/tools/editor/scenes_dock.cpp @@ -200,9 +200,11 @@ void ScenesDock::_instance_pressed() { } void ScenesDock::_open_pressed(){ + TreeItem *sel = tree->get_selected(); - if (!sel) + if (!sel) { return; + } String path = sel->get_metadata(0); if (ResourceLoader::get_resource_type(path)=="PackedScene") { @@ -300,6 +302,7 @@ ScenesDock::ScenesDock(EditorNode *p_editor) { tree->set_v_size_flags(SIZE_EXPAND_FILL); tree->connect("item_edited",this,"_favorite_toggled"); + tree->connect("item_activated",this,"_open_pressed"); timer = memnew( Timer ); timer->set_one_shot(true); |