diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_settings.cpp | 3 | ||||
-rw-r--r-- | editor/import/resource_importer_texture_atlas.cpp | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index f5c1de9def..2cf0bed7d0 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -510,7 +510,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { hints["editors/3d/secondary_grid_color"] = PropertyInfo(Variant::COLOR, "editors/3d/secondary_grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT); // If a line is a multiple of this, it uses the primary grid color. - _initial_set("editors/3d/primary_grid_steps", 10); + // Use a power of 2 value by default as it's more common to use powers of 2 in level design. + _initial_set("editors/3d/primary_grid_steps", 8); hints["editors/3d/primary_grid_steps"] = PropertyInfo(Variant::INT, "editors/3d/primary_grid_steps", PROPERTY_HINT_RANGE, "1,100,1", PROPERTY_USAGE_DEFAULT); // At 1000, the grid mostly looks like it has no edge. diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp index 2423553d22..c9f689cc08 100644 --- a/editor/import/resource_importer_texture_atlas.cpp +++ b/editor/import/resource_importer_texture_atlas.cpp @@ -97,7 +97,7 @@ Error ResourceImporterTextureAtlas::import(const String &p_source_file, const St return OK; } -static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_transposed, Ref<Image> p_image, const Ref<Image> &p_src_image) { +static void _plot_triangle(Vector2i *vertices, const Vector2i &p_offset, bool p_transposed, Ref<Image> p_image, const Ref<Image> &p_src_image) { int width = p_image->get_width(); int height = p_image->get_height(); int src_width = p_src_image->get_width(); @@ -281,13 +281,13 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file for (int j = 0; j < pack_data.chart_pieces.size(); j++) { const EditorAtlasPacker::Chart &chart = charts[pack_data.chart_pieces[j]]; for (int k = 0; k < chart.faces.size(); k++) { - Vector2 positions[3]; + Vector2i positions[3]; for (int l = 0; l < 3; l++) { int vertex_idx = chart.faces[k].vertex[l]; - positions[l] = chart.vertices[vertex_idx]; + positions[l] = Vector2i(chart.vertices[vertex_idx]); } - _plot_triangle(positions, chart.final_offset, chart.transposed, new_atlas, pack_data.image); + _plot_triangle(positions, Vector2i(chart.final_offset), chart.transposed, new_atlas, pack_data.image); } } } |