diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 10 | ||||
-rw-r--r-- | editor/import/resource_importer_scene.cpp | 120 | ||||
-rw-r--r-- | editor/spatial_editor_gizmos.cpp | 2 |
3 files changed, 3 insertions, 129 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index cb8407386d..0eb8ea6e46 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -444,15 +444,7 @@ void EditorNode::_fs_changed() { continue; if (E->get()->get_import_path() != String()) { -//this is an imported resource, will be reloaded if reimported via the _resources_reimported() callback -//imported resource -#if 0 - uint64_t mt = FileAccess::get_modified_time(E->get()->get_import_path()); - - if (mt != E->get()->get_import_last_modified_time()) { - changed.push_back(E->get()); - } -#endif + //this is an imported resource, will be reloaded if reimported via the _resources_reimported() callback continue; } diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index ed7c6dba79..74f23cd052 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -515,127 +515,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array s->set_transform(Transform()); p_node = bv; -#if 0 - } else if (_teststr(name, "room") && Object::cast_to<MeshInstance>(p_node)) { - if (isroot) - return p_node; - - MeshInstance *mi = Object::cast_to<MeshInstance>(p_node); - PoolVector<Face3> faces = mi->get_faces(VisualInstance::FACES_SOLID); - - BSP_Tree bsptree(faces); - - Ref<RoomBounds> area = memnew(RoomBounds); - //area->set_bounds(faces); - //area->set_geometry_hint(faces); - - Room *room = memnew(Room); - room->set_name(_fixstr(name, "room")); - room->set_transform(mi->get_transform()); - room->set_room(area); - - p_node->replace_by(room); - memdelete(p_node); - p_node = room; - - } else if (_teststr(name, "room")) { - - if (isroot) - return p_node; - - Spatial *dummy = Object::cast_to<Spatial>(p_node); - ERR_FAIL_COND_V(!dummy, NULL); - - Room *room = memnew(Room); - room->set_name(_fixstr(name, "room")); - room->set_transform(dummy->get_transform()); - - p_node->replace_by(room); - memdelete(p_node); - p_node = room; - - //room->compute_room_from_subtree(); - - } else if (_teststr(name, "portal") && Object::cast_to<MeshInstance>(p_node)) { - - if (isroot) - return p_node; - - MeshInstance *mi = Object::cast_to<MeshInstance>(p_node); - PoolVector<Face3> faces = mi->get_faces(VisualInstance::FACES_SOLID); - - ERR_FAIL_COND_V(faces.size() == 0, NULL); - //step 1 compute the plane - Set<Vector3> points; - Plane plane; - - Vector3 center; - - for (int i = 0; i < faces.size(); i++) { - - Face3 f = faces.get(i); - Plane p = f.get_plane(); - plane.normal += p.normal; - plane.d += p.d; - - for (int i = 0; i < 3; i++) { - - Vector3 v = f.vertex[i].snapped(Vector3(0.01, 0.01, 0.01)); - if (!points.has(v)) { - points.insert(v); - center += v; - } - } - } - - plane.normal.normalize(); - plane.d /= faces.size(); - center /= points.size(); - - //step 2, create points - - Transform t; - t.basis.from_z(plane.normal); - t.basis.transpose(); - t.origin = center; - - Vector<Point2> portal_points; - - for (Set<Vector3>::Element *E = points.front(); E; E = E->next()) { - - Vector3 local = t.xform_inv(E->get()); - portal_points.push_back(Point2(local.x, local.y)); - } - // step 3 bubbly sort points - - int swaps = 0; - - do { - swaps = 0; - - for (int i = 0; i < portal_points.size() - 1; i++) { - - float a = portal_points[i].angle(); - float b = portal_points[i + 1].angle(); - - if (a > b) { - SWAP(portal_points[i], portal_points[i + 1]); - swaps++; - } - } - - } while (swaps); - - Portal *portal = memnew(Portal); - - portal->set_shape(portal_points); - portal->set_transform(mi->get_transform() * t); - - p_node->replace_by(portal); - memdelete(p_node); - p_node = portal; -#endif } else if (Object::cast_to<MeshInstance>(p_node)) { //last attempt, maybe collision inside the mesh data diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp index f0e8d438fa..5359f9894c 100644 --- a/editor/spatial_editor_gizmos.cpp +++ b/editor/spatial_editor_gizmos.cpp @@ -1529,6 +1529,8 @@ SkeletonSpatialGizmo::SkeletonSpatialGizmo(Skeleton *p_skel) { skel = p_skel; set_spatial_node(p_skel); } + +// FIXME: Kept as reference for reimplementation in 3.1+ #if 0 void RoomSpatialGizmo::redraw() { |