Skip to content

Commit

Permalink
Add exception for missing object type for root template
Browse files Browse the repository at this point in the history
  • Loading branch information
marekzajac97 committed Jan 8, 2024
1 parent 375e912 commit 1cfdd4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"author" : "Marek Zajac",
"description" : "",
"blender" : (3, 4, 0),
"version" : (0, 3, 1),
"version" : (0, 3, 2),
"location" : "",
"warning" : "",
"category" : "Import-Export"
Expand Down
2 changes: 2 additions & 0 deletions core/game_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def export_object(mesh_obj, con_file, geom_export=True, colmesh_export=True,
collmesh_parts, obj_to_col_part_id = _find_collmeshes(mesh_geoms)

root_obj_template = _create_object_template(main_lod, obj_to_geom_part_id, obj_to_col_part_id)
if root_obj_template is None:
raise ExportException(f"root object '{main_lod.name}' is missing ObjectTemplate type, check object properties!")
root_obj_template.save_in_separate_file = True
root_obj_template.creator_name = getuser()
root_obj_template.geom = GeometryTemplate(geometry_type, obj_name)
Expand Down

0 comments on commit 1cfdd4c

Please sign in to comment.