diff options
Diffstat (limited to 'editor/import')
-rw-r--r-- | editor/import/collada.cpp | 10 | ||||
-rw-r--r-- | editor/import/collada.h | 2 | ||||
-rw-r--r-- | editor/import/dynamic_font_import_settings.h | 1 | ||||
-rw-r--r-- | editor/import/editor_import_collada.cpp | 12 | ||||
-rw-r--r-- | editor/import/resource_importer_scene.cpp | 4 | ||||
-rw-r--r-- | editor/import/resource_importer_scene.h | 2 | ||||
-rw-r--r-- | editor/import/scene_import_settings.h | 4 |
7 files changed, 18 insertions, 17 deletions
diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp index 71b5ddc216..f4d19fe8b6 100644 --- a/editor/import/collada.cpp +++ b/editor/import/collada.cpp @@ -2029,7 +2029,7 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) { NodeGeometry *gnode = static_cast<NodeGeometry *>(p_node); if (gnode->controller) { // recount skeletons used - RBSet<NodeSkeleton *> skeletons; + HashSet<NodeSkeleton *> skeletons; for (int i = 0; i < gnode->skeletons.size(); i++) { String nodeid = gnode->skeletons[i]; @@ -2049,11 +2049,11 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) { if (skeletons.size() > 1) { //do the merger!! - RBSet<NodeSkeleton *>::Element *E = skeletons.front(); - NodeSkeleton *base = E->get(); + HashSet<NodeSkeleton *>::Iterator E = skeletons.begin(); + NodeSkeleton *base = *E; - for (E = E->next(); E; E = E->next()) { - NodeSkeleton *merged = E->get(); + for (++E; E; ++E) { + NodeSkeleton *merged = *E; _remove_node(p_vscene, merged); for (int i = 0; i < merged->children.size(); i++) { _joint_set_owner(merged->children[i], base); diff --git a/editor/import/collada.h b/editor/import/collada.h index 6ac6181769..f1d9c5593f 100644 --- a/editor/import/collada.h +++ b/editor/import/collada.h @@ -493,7 +493,7 @@ public: HashMap<String, VisualScene> visual_scene_map; HashMap<String, Node *> scene_map; - RBSet<String> idref_joints; + HashSet<String> idref_joints; HashMap<String, String> sid_to_node_map; //RBMap<String,NodeJoint*> bone_map; diff --git a/editor/import/dynamic_font_import_settings.h b/editor/import/dynamic_font_import_settings.h index 4e2135a13c..154f347b77 100644 --- a/editor/import/dynamic_font_import_settings.h +++ b/editor/import/dynamic_font_import_settings.h @@ -33,6 +33,7 @@ #include "editor/import/resource_importer_dynamic_font.h" +#include "core/templates/rb_set.h" #include "scene/gui/dialogs.h" #include "scene/gui/item_list.h" #include "scene/gui/option_button.h" diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 03fda0a1c3..8d44329022 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -76,12 +76,12 @@ struct ColladaImport { HashMap<Skeleton3D *, HashMap<String, int>> skeleton_bone_map; - RBSet<String> valid_animated_nodes; + HashSet<String> valid_animated_nodes; Vector<int> valid_animated_properties; HashMap<String, bool> bones_with_animation; - RBSet<String> mesh_unique_names; - RBSet<String> material_unique_names; + HashSet<String> mesh_unique_names; + HashSet<String> material_unique_names; Error _populate_skeleton(Skeleton3D *p_skeleton, Collada::Node *p_node, int &r_bone, int p_parent); Error _create_scene_skeletons(Collada::Node *p_node); @@ -94,7 +94,7 @@ struct ColladaImport { void create_animation(int p_clip, bool p_import_value_tracks); void create_animations(bool p_import_value_tracks); - RBSet<String> tracks_in_clips; + HashSet<String> tracks_in_clips; Vector<String> missing_textures; void _pre_process_lights(Collada::Node *p_node); @@ -875,7 +875,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p Vector<Collada::Vertex> vertex_array; //there we go, vertex array vertex_array.resize(vertex_set.size()); - for (Collada::Vertex &F : vertex_set) { + for (const Collada::Vertex &F : vertex_set) { vertex_array.write[F.idx] = F; } @@ -1452,7 +1452,7 @@ void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) { //main anim } - RBSet<int> track_filter; + HashSet<int> track_filter; if (p_clip == -1) { for (int i = 0; i < collada.state.animation_clips.size(); i++) { diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 4f666730d5..80230bc316 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -704,7 +704,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, HashMap<R return p_node; } -Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, RBSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) { +Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, HashSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) { // children first for (int i = 0; i < p_node->get_child_count(); i++) { Node *r = _post_fix_node(p_node->get_child(i), p_root, collision_map, r_occluder_arrays, r_scanned_meshes, p_node_data, p_material_data, p_animation_data, p_animation_fps); @@ -1994,7 +1994,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p animation_data = subresources["animations"]; } - RBSet<Ref<ImporterMesh>> scanned_meshes; + HashSet<Ref<ImporterMesh>> scanned_meshes; HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map; Pair<PackedVector3Array, PackedInt32Array> occluder_arrays; List<Pair<NodePath, Node *>> node_renames; diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index 92bd267216..16cf3d651d 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -272,7 +272,7 @@ public: virtual int get_import_order() const override { return ResourceImporter::IMPORT_ORDER_SCENE; } Node *_pre_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &r_collision_map, Pair<PackedVector3Array, PackedInt32Array> *r_occluder_arrays, List<Pair<NodePath, Node *>> &r_node_renames); - Node *_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, RBSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps); + Node *_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, HashSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps); Ref<Animation> _save_animation_to_file(Ref<Animation> anim, bool p_save_to_file, String p_save_to_path, bool p_keep_custom_tracks); void _create_clips(AnimationPlayer *anim, const Array &p_clips, bool p_bake_all); diff --git a/editor/import/scene_import_settings.h b/editor/import/scene_import_settings.h index cbd105045a..a4008582ce 100644 --- a/editor/import/scene_import_settings.h +++ b/editor/import/scene_import_settings.h @@ -139,8 +139,8 @@ class SceneImportSettings : public ConfirmationDialog { void _fill_animation(Tree *p_tree, const Ref<Animation> &p_anim, const String &p_name, TreeItem *p_parent); void _fill_scene(Node *p_node, TreeItem *p_parent_item); - RBSet<Ref<Mesh>> mesh_set; - RBSet<Ref<Material>> material_set; + HashSet<Ref<Mesh>> mesh_set; + HashSet<Ref<Material>> material_set; String selected_type; String selected_id; |