Updated to use Blender 4.3.2

This commit is contained in:
itdominator 2025-02-25 17:42:09 -06:00
parent 0cc8beb830
commit 3e066bbe64
3 changed files with 3 additions and 6 deletions

View File

@ -2,7 +2,7 @@ bl_info = {
'name': 'SWBF .msh Import-Export',
'author': 'Will Snyder, PrismaticFlower',
"version": (1, 3, 3),
'blender': (3, 0, 0),
'blender': (4, 3, 2),
'location': 'File > Import-Export',
'description': 'Export as SWBF .msh file',
'warning': '',

View File

@ -107,4 +107,4 @@ def extract_and_apply_anim(filename : str, scene : Scene):
arma.animation_data.action = action
track = arma.animation_data.nla_tracks.new()
track.strips.new(action.name, action.frame_range[0], action)
track.strips.new(action.name, int(action.frame_range[0]), action)

View File

@ -128,7 +128,6 @@ def model_to_mesh_object(model: Model, scene : Scene, materials_map : Dict[str,
blender_mesh.loops.foreach_set("vertex_index", flat_indices)
# Normals
blender_mesh.create_normals_split()
blender_mesh.loops.foreach_set("normal", [component for i in flat_indices for component in vertex_normals[i]])
# UVs
@ -175,7 +174,6 @@ def model_to_mesh_object(model: Model, scene : Scene, materials_map : Dict[str,
reset_normals = [0.0] * (len(blender_mesh.loops) * 3)
blender_mesh.loops.foreach_get("normal", reset_normals)
blender_mesh.normals_split_custom_set(tuple(zip(*(iter(reset_normals),) * 3)))
blender_mesh.use_auto_smooth = True
blender_mesh_object = bpy.data.objects.new(model.name, blender_mesh)
@ -198,4 +196,3 @@ def model_to_mesh_object(model: Model, scene : Scene, materials_map : Dict[str,
return blender_mesh_object