Fix for error reporting if populate_bone_collection_list encountered an error
This commit is contained in:
@@ -70,7 +70,11 @@ class PSK_OT_populate_bone_collection_list(Operator):
|
|||||||
if export_operator is None:
|
if export_operator is None:
|
||||||
self.report({'ERROR_INVALID_CONTEXT'}, 'No valid export operator found in context')
|
self.report({'ERROR_INVALID_CONTEXT'}, 'No valid export operator found in context')
|
||||||
return {'CANCELLED'}
|
return {'CANCELLED'}
|
||||||
|
try:
|
||||||
input_objects = get_psk_input_objects_for_collection(context.collection)
|
input_objects = get_psk_input_objects_for_collection(context.collection)
|
||||||
|
except RuntimeError as e:
|
||||||
|
self.report({'ERROR_INVALID_CONTEXT'}, str(e))
|
||||||
|
return {'CANCELLED'}
|
||||||
if input_objects.armature_object is None:
|
if input_objects.armature_object is None:
|
||||||
self.report({'ERROR_INVALID_CONTEXT'}, 'No armature found in collection')
|
self.report({'ERROR_INVALID_CONTEXT'}, 'No armature found in collection')
|
||||||
return {'CANCELLED'}
|
return {'CANCELLED'}
|
||||||
|
|||||||
Reference in New Issue
Block a user