1
0
mirror of https://github.com/DarklightGames/io_scene_psk_psa.git synced 2024-11-23 22:40:59 +01:00

Selected non-mesh objects will now be ignored on PSK export instead of blocking the operator from being invoked

This commit is contained in:
Colin Basnett 2024-05-27 16:03:18 -07:00
parent fdb74ef7d0
commit 9dcd3778e0

View File

@ -28,10 +28,8 @@ class PskBuildOptions(object):
def get_psk_input_objects(context) -> PskInputObjects:
input_objects = PskInputObjects()
for selected_object in context.view_layer.objects.selected:
if selected_object.type != 'MESH':
raise RuntimeError(f'Selected object "{selected_object.name}" is not a mesh')
input_objects.mesh_objects = context.view_layer.objects.selected
if selected_object.type == 'MESH':
input_objects.mesh_objects.append(selected_object)
if len(input_objects.mesh_objects) == 0:
raise RuntimeError('At least one mesh must be selected')