Skip to content

Commit

Permalink
Fix ASS import error
Browse files Browse the repository at this point in the history
  • Loading branch information
General-101 committed Nov 28, 2024
1 parent d70f2ca commit abf051b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion io_scene_halo/file_ass/build_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def build_scene(context, filepath, report):
instance.ass_jms.name_override = instance_name_override
instance.ass_jms.unique_id = str(instance_element.unique_id)

if (4, 1, 0) > bpy.app.version:
if (4, 1, 0) > bpy.app.version and instance.type == 'MESH':
instance.data.use_auto_smooth = True

if not object_setings == None:
Expand Down
8 changes: 4 additions & 4 deletions io_scene_halo/global_functions/mesh_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,25 +739,25 @@ def generate_mesh_retail(context, asset, object_vertices, object_triangles, obje
mat = bpy.data.materials.new(name=material_name)

ass_mat_name = ass_mat.name
if not global_functions.string_empty_check(mat.asset_name):
if not global_functions.string_empty_check(ass_mat.asset_name):
ass_mat_name = ass_mat.asset_name

if game_title == "halo1":
shader = shader_processing.find_h1_shader_tag(asset.filepath, mat.asset_name)
shader = shader_processing.find_h1_shader_tag(asset.filepath, ass_mat_name)
if not shader == None:
shader_processing.generate_h1_shader(mat, shader, 0, print)
else:
print("Halo 1 Shader tag returned as None. Something went terribly wrong")

elif game_title == "halo2":
shader = shader_processing.find_h2_shader_tag(asset.filepath, mat.asset_name)
shader = shader_processing.find_h2_shader_tag(asset.filepath, ass_mat_name)
if not shader == None:
shader_processing.generate_h2_shader(mat, shader, print)
else:
print("Halo 2 Shader tag returned as None. Something went terribly wrong")

elif game_title == "halo3":
shader_path = shader_processing.find_h3_shader_tag(asset.filepath, mat.asset_name)
shader_path = shader_processing.find_h3_shader_tag(asset.filepath, ass_mat_name)
if not shader_path == None:
shader_processing.generate_h3_shader(mat, shader_path, print)
else:
Expand Down

0 comments on commit abf051b

Please sign in to comment.