Skip to content

Commit b1a8cba

Browse files
committed
Fix #17
also lowered resource importer priority, shouldn't be default now that scene importer has subdivision options.
1 parent 39847c7 commit b1a8cba

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

project/addons/godot_subdiv/resource_import_plugin.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func _get_preset_name(i):
2626
return "Default"
2727

2828
func _get_priority():
29-
return 2
29+
return 0
3030

3131
func _get_import_order():
3232
return IMPORT_ORDER_SCENE

src/import/topology_data_importer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ void TopologyDataImporter::_bind_methods() {
3131

3232
TopologyDataImporter::SurfaceVertexArrays::SurfaceVertexArrays(const Array &p_mesh_arrays) {
3333
vertex_array = p_mesh_arrays[Mesh::ARRAY_VERTEX];
34-
normal_array = p_mesh_arrays[Mesh::ARRAY_NORMAL];
34+
if (p_mesh_arrays[Mesh::ARRAY_NORMAL].get_type() == Variant::PACKED_VECTOR3_ARRAY) {
35+
normal_array = p_mesh_arrays[Mesh::ARRAY_NORMAL];
36+
}
3537
index_array = p_mesh_arrays[Mesh::ARRAY_INDEX];
3638
if (p_mesh_arrays[Mesh::ARRAY_TEX_UV].get_type() == Variant::PACKED_VECTOR2_ARRAY) {
3739
uv_array = p_mesh_arrays[Mesh::ARRAY_TEX_UV];

0 commit comments

Comments
 (0)