Skip to content
Snippets Groups Projects
Commit c9175b41 authored by Campbell Barton's avatar Campbell Barton
Browse files

Cleanup: autopep8 3DS i/o

parent dff14c58
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,19 @@ ...@@ -18,6 +18,19 @@
# <pep8-80 compliant> # <pep8-80 compliant>
from bpy_extras.io_utils import (
ImportHelper,
ExportHelper,
orientation_helper,
axis_conversion,
)
from bpy.props import (
BoolProperty,
EnumProperty,
FloatProperty,
StringProperty,
)
import bpy
bl_info = { bl_info = {
"name": "Autodesk 3DS format", "name": "Autodesk 3DS format",
"author": "Bob Holcomb, Campbell Barton, Andreas Atteneder, Sebastian Schrand", "author": "Bob Holcomb, Campbell Barton, Andreas Atteneder, Sebastian Schrand",
...@@ -40,21 +53,6 @@ if "bpy" in locals(): ...@@ -40,21 +53,6 @@ if "bpy" in locals():
importlib.reload(export_3ds) importlib.reload(export_3ds)
import bpy
from bpy.props import (
BoolProperty,
EnumProperty,
FloatProperty,
StringProperty,
)
from bpy_extras.io_utils import (
ImportHelper,
ExportHelper,
orientation_helper,
axis_conversion,
)
@orientation_helper(axis_forward='Y', axis_up='Z') @orientation_helper(axis_forward='Y', axis_up='Z')
class Import3DS(bpy.types.Operator, ImportHelper): class Import3DS(bpy.types.Operator, ImportHelper):
"""Import from 3DS file format (.3ds)""" """Import from 3DS file format (.3ds)"""
...@@ -66,31 +64,31 @@ class Import3DS(bpy.types.Operator, ImportHelper): ...@@ -66,31 +64,31 @@ class Import3DS(bpy.types.Operator, ImportHelper):
filter_glob: StringProperty(default="*.3ds", options={'HIDDEN'}) filter_glob: StringProperty(default="*.3ds", options={'HIDDEN'})
constrain_size: FloatProperty( constrain_size: FloatProperty(
name="Size Constraint", name="Size Constraint",
description="Scale the model by 10 until it reaches the " description="Scale the model by 10 until it reaches the "
"size constraint (0 to disable)", "size constraint (0 to disable)",
min=0.0, max=1000.0, min=0.0, max=1000.0,
soft_min=0.0, soft_max=1000.0, soft_min=0.0, soft_max=1000.0,
default=10.0, default=10.0,
) )
use_image_search: BoolProperty( use_image_search: BoolProperty(
name="Image Search", name="Image Search",
description="Search subdirectories for any associated images " description="Search subdirectories for any associated images "
"(Warning, may be slow)", "(Warning, may be slow)",
default=True, default=True,
) )
use_apply_transform: BoolProperty( use_apply_transform: BoolProperty(
name="Apply Transform", name="Apply Transform",
description="Workaround for object transformations " description="Workaround for object transformations "
"importing incorrectly", "importing incorrectly",
default=True, default=True,
) )
read_keyframe: bpy.props.BoolProperty( read_keyframe: bpy.props.BoolProperty(
name="Read Keyframe", name="Read Keyframe",
description="Read the keyframe data", description="Read the keyframe data",
default=True, default=True,
) )
def execute(self, context): def execute(self, context):
from . import import_3ds from . import import_3ds
...@@ -116,15 +114,15 @@ class Export3DS(bpy.types.Operator, ExportHelper): ...@@ -116,15 +114,15 @@ class Export3DS(bpy.types.Operator, ExportHelper):
filename_ext = ".3ds" filename_ext = ".3ds"
filter_glob: StringProperty( filter_glob: StringProperty(
default="*.3ds", default="*.3ds",
options={'HIDDEN'}, options={'HIDDEN'},
) )
use_selection: BoolProperty( use_selection: BoolProperty(
name="Selection Only", name="Selection Only",
description="Export selected objects only", description="Export selected objects only",
default=False, default=False,
) )
def execute(self, context): def execute(self, context):
from . import export_3ds from . import export_3ds
...@@ -174,5 +172,6 @@ def unregister(): ...@@ -174,5 +172,6 @@ def unregister():
# disabled scaling to size, this requires exposing bb (easy) and understanding # disabled scaling to size, this requires exposing bb (easy) and understanding
# how it works (needs some time) # how it works (needs some time)
if __name__ == "__main__": if __name__ == "__main__":
register() register()
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment