diff --git a/src/solstice/export_constraint.py b/src/solstice/export_constraint.py index c137e7e..d19e637 100644 --- a/src/solstice/export_constraint.py +++ b/src/solstice/export_constraint.py @@ -90,6 +90,11 @@ class ExportConstraint(bpy.types.Operator): filepath: bpy.props.StringProperty() def execute(self, context): + # Assert the selected file is a bone + if context.active_object.type != 'ARMATURE': + self.report({'ERROR'}, "Active object is not an armature.") + return {'CANCELLED'} + # Do something with the selected file path print("Selected file:", self.filepath) # Call the function or perform the desired actions using the file path