mirror of
https://github.com/DarklightGames/io_scene_psk_psa.git
synced 2025-02-17 10:08:31 +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:
parent
fdb74ef7d0
commit
9dcd3778e0
@ -28,10 +28,8 @@ class PskBuildOptions(object):
|
|||||||
def get_psk_input_objects(context) -> PskInputObjects:
|
def get_psk_input_objects(context) -> PskInputObjects:
|
||||||
input_objects = PskInputObjects()
|
input_objects = PskInputObjects()
|
||||||
for selected_object in context.view_layer.objects.selected:
|
for selected_object in context.view_layer.objects.selected:
|
||||||
if selected_object.type != 'MESH':
|
if selected_object.type == 'MESH':
|
||||||
raise RuntimeError(f'Selected object "{selected_object.name}" is not a mesh')
|
input_objects.mesh_objects.append(selected_object)
|
||||||
|
|
||||||
input_objects.mesh_objects = context.view_layer.objects.selected
|
|
||||||
|
|
||||||
if len(input_objects.mesh_objects) == 0:
|
if len(input_objects.mesh_objects) == 0:
|
||||||
raise RuntimeError('At least one mesh must be selected')
|
raise RuntimeError('At least one mesh must be selected')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user