+ export_all = bpy.props.BoolProperty(name="Export all animations", description="Export all animations present on the selected objects' NLA tracks")
+ collection = bpy.props.BoolProperty(name="As a collection", description="Export the animations as a single collection file", default=True)
+ looping_threshold = bpy.props.FloatProperty(name="Looping threshold", description="Tolerance for curve beginning and end values for looping", min=0.0, soft_max=1.0, precision=4, default=0.001)
+
+ def check(self, context):
+ result = False
+
+ ext = ".mdc" if self.export_all and self.collection else ".anim"
+ ext_changed = (ext!=self.filename_ext)
+ if ext_changed:
+ if self.filepath.endswith(self.filename_ext):
+ self.filepath = self.filepath[:-len(self.filename_ext)]
+ self.filename_ext = ext
+
+ super_result = super().check(context)
+
+ return ext_changed or super_result
+