diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/fbx/editor_scene_importer_fbx.cpp | 2 | ||||
-rw-r--r-- | modules/gdscript/tests/test_gdscript.cpp | 7 | ||||
-rw-r--r-- | modules/gltf/editor_scene_importer_gltf.cpp | 4 | ||||
-rw-r--r-- | modules/gridmap/grid_map_editor_plugin.cpp | 7 |
4 files changed, 12 insertions, 8 deletions
diff --git a/modules/fbx/editor_scene_importer_fbx.cpp b/modules/fbx/editor_scene_importer_fbx.cpp index a2bb547216..e18ebe3930 100644 --- a/modules/fbx/editor_scene_importer_fbx.cpp +++ b/modules/fbx/editor_scene_importer_fbx.cpp @@ -628,7 +628,7 @@ Node3D *EditorSceneImporterFBX::_generate_scene( mesh_data_precached->mesh_node = fbx_node; // mesh node, mesh id - mesh_node = mesh_data_precached->create_fbx_mesh(state, mesh_geometry, fbx_node->fbx_model, (p_flags & IMPORT_USE_COMPRESSION) != 0); + mesh_node = mesh_data_precached->create_fbx_mesh(state, mesh_geometry, fbx_node->fbx_model, 0); if (!state.MeshNodes.has(mesh_id)) { state.MeshNodes.insert(mesh_id, fbx_node); } diff --git a/modules/gdscript/tests/test_gdscript.cpp b/modules/gdscript/tests/test_gdscript.cpp index 898ac653f5..3cc0eee672 100644 --- a/modules/gdscript/tests/test_gdscript.cpp +++ b/modules/gdscript/tests/test_gdscript.cpp @@ -118,10 +118,10 @@ static void test_parser(const String &p_code, const String &p_script_path, const print_line(vformat("%02d:%02d: %s", error.line, error.column, error.message)); } } - +#ifdef TOOLS_ENABLED GDScriptParser::TreePrinter printer; - printer.print_tree(parser); +#endif } static void test_compiler(const String &p_code, const String &p_script_path, const Vector<String> &p_lines) { @@ -175,8 +175,9 @@ static void test_compiler(const String &p_code, const String &p_script_path, con signature += func->get_argument_name(i); } print_line(signature + ")"); - +#ifdef TOOLS_ENABLED func->disassemble(p_lines); +#endif print_line(""); print_line(""); } diff --git a/modules/gltf/editor_scene_importer_gltf.cpp b/modules/gltf/editor_scene_importer_gltf.cpp index 6ea722a216..35f44ca122 100644 --- a/modules/gltf/editor_scene_importer_gltf.cpp +++ b/modules/gltf/editor_scene_importer_gltf.cpp @@ -99,7 +99,9 @@ Node *PackedSceneGLTF::import_scene(const String &p_path, uint32_t p_flags, Ref<GLTFDocument> gltf_document; gltf_document.instance(); Error err = gltf_document->parse(r_state, p_path); - *r_err = err; + if (r_err) { + *r_err = err; + } ERR_FAIL_COND_V(err != Error::OK, nullptr); Node3D *root = memnew(Node3D); diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index da9cdb9bc5..3472f29505 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -386,13 +386,13 @@ bool GridMapEditor::do_input_action(Camera3D *p_camera, const Point2 &p_point, b } int cell[3]; - float cell_size[3] = { node->get_cell_size().x, node->get_cell_size().y, node->get_cell_size().z }; + Vector3 cell_size = node->get_cell_size(); for (int i = 0; i < 3; i++) { if (i == edit_axis) { cell[i] = edit_floor[i]; } else { - cell[i] = inters[i] / node->get_cell_size()[i]; + cell[i] = inters[i] / cell_size[i]; if (inters[i] < 0) { cell[i] -= 1; // Compensate negative. } @@ -436,6 +436,7 @@ bool GridMapEditor::do_input_action(Camera3D *p_camera, const Point2 &p_point, b } return true; } + if (input_action == INPUT_PAINT) { SetItem si; si.position = Vector3i(cell[0], cell[1], cell[2]); @@ -545,7 +546,7 @@ void GridMapEditor::_update_paste_indicator() { return; } - Vector3 center = 0.5 * Vector3(float(node->get_center_x()), float(node->get_center_y()), float(node->get_center_z())); + Vector3 center = 0.5 * Vector3(real_t(node->get_center_x()), real_t(node->get_center_y()), real_t(node->get_center_z())); Vector3 scale = (Vector3(1, 1, 1) + (paste_indicator.end - paste_indicator.begin)) * node->get_cell_size(); Transform xf; xf.scale(scale); |