[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2215] trunk/py/scripts/addons/ io_scene_3ds/__init__.py: style change only

Campbell Barton ideasman42 at gmail.com
Tue Aug 2 19:26:22 CEST 2011


Revision: 2215
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2215
Author:   campbellbarton
Date:     2011-08-02 17:26:21 +0000 (Tue, 02 Aug 2011)
Log Message:
-----------
style change only

Modified Paths:
--------------
    trunk/py/scripts/addons/io_scene_3ds/__init__.py

Modified: trunk/py/scripts/addons/io_scene_3ds/__init__.py
===================================================================
--- trunk/py/scripts/addons/io_scene_3ds/__init__.py	2011-08-02 17:15:56 UTC (rev 2214)
+++ trunk/py/scripts/addons/io_scene_3ds/__init__.py	2011-08-02 17:26:21 UTC (rev 2215)
@@ -16,7 +16,7 @@
 #
 # ##### END GPL LICENSE BLOCK #####
 
-# <pep8 compliant>
+# <pep8-80 compliant>
 
 bl_info = {
     "name": "Autodesk 3DS format",
@@ -24,15 +24,15 @@
     "blender": (2, 5, 7),
     "api": 35622,
     "location": "File > Import-Export",
-    "description": "Import-Export 3DS, meshes, uvs, materials, textures, cameras & lamps",
+    "description": ("Import-Export 3DS, meshes, uvs, materials, textures, "
+                    "cameras & lamps"),
     "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
-        "Scripts/Import-Export/Autodesk_3DS",
+    "wiki_url": ("http://wiki.blender.org/index.php/Extensions:2.5/Py/"
+                 "Scripts/Import-Export/Autodesk_3DS"),
     "tracker_url": "",
     "support": 'OFFICIAL',
     "category": "Import-Export"}
 
-# To support reload properly, try to access a package var, if it's there, reload everything
 if "bpy" in locals():
     import imp
     if "import_3ds" in locals():
@@ -59,9 +59,26 @@
     filename_ext = ".3ds"
     filter_glob = StringProperty(default="*.3ds", options={'HIDDEN'})
 
-    constrain_size = FloatProperty(name="Size Constraint", description="Scale the model by 10 until it reacehs the size constraint. Zero Disables.", min=0.0, max=1000.0, soft_min=0.0, soft_max=1000.0, default=10.0)
-    use_image_search = BoolProperty(name="Image Search", description="Search subdirectories for any assosiated images (Warning, may be slow)", default=True)
-    use_apply_transform = BoolProperty(name="Apply Transform", description="Workaround for object transformations importing incorrectly", default=True)
+    constrain_size = FloatProperty(
+            name="Size Constraint",
+            description=("Scale the model by 10 until it reacehs the "
+                         "size constraint. Zero Disables."),
+            min=0.0, max=1000.0,
+            soft_min=0.0, soft_max=1000.0,
+            default=10.0,
+            )
+    use_image_search = BoolProperty(
+            name="Image Search",
+            description=("Search subdirectories for any assosiated images "
+                         "(Warning, may be slow)"),
+            default=True,
+            )
+    use_apply_transform = BoolProperty(
+            name="Apply Transform",
+            description=("Workaround for object transformations "
+                         "importing incorrectly"),
+            default=True,
+            )
 
     axis_forward = EnumProperty(
             name="Forward",
@@ -93,9 +110,14 @@
     def execute(self, context):
         from . import import_3ds
 
-        keywords = self.as_keywords(ignore=("axis_forward", "axis_up", "filter_glob"))
+        keywords = self.as_keywords(ignore=("axis_forward",
+                                            "axis_up",
+                                            "filter_glob",
+                                            ))
 
-        global_matrix = axis_conversion(from_forward=self.axis_forward, from_up=self.axis_up).to_4x4()
+        global_matrix = axis_conversion(from_forward=self.axis_forward,
+                                        from_up=self.axis_up,
+                                        ).to_4x4()
         keywords["global_matrix"] = global_matrix
 
         return import_3ds.load(self, context, **keywords)
@@ -107,9 +129,16 @@
     bl_label = 'Export 3DS'
 
     filename_ext = ".3ds"
-    filter_glob = StringProperty(default="*.3ds", options={'HIDDEN'})
+    filter_glob = StringProperty(
+            default="*.3ds",
+            options={'HIDDEN'},
+            )
 
-    use_selection = BoolProperty(name="Selection Only", description="Export selected objects only", default=False)
+    use_selection = BoolProperty(
+            name="Selection Only",
+            description="Export selected objects only",
+            default=False,
+            )
 
     axis_forward = EnumProperty(
             name="Forward",
@@ -141,8 +170,14 @@
     def execute(self, context):
         from . import export_3ds
 
-        keywords = self.as_keywords(ignore=("axis_forward", "axis_up", "filter_glob", "check_existing"))
-        global_matrix = axis_conversion(to_forward=self.axis_forward, to_up=self.axis_up).to_4x4()
+        keywords = self.as_keywords(ignore=("axis_forward",
+                                            "axis_up",
+                                            "filter_glob",
+                                            "check_existing",
+                                            ))
+        global_matrix = axis_conversion(to_forward=self.axis_forward,
+                                        to_up=self.axis_up,
+                                        ).to_4x4()
         keywords["global_matrix"] = global_matrix
 
         return export_3ds.save(self, context, **keywords)
@@ -171,8 +206,12 @@
     bpy.types.INFO_MT_file_export.remove(menu_func_export)
 
 # NOTES:
-# why add 1 extra vertex? and remove it when done? - "Answer - eekadoodle - would need to re-order UV's without this since face order isnt always what we give blender, BMesh will solve :D"
-# disabled scaling to size, this requires exposing bb (easy) and understanding how it works (needs some time)
+# why add 1 extra vertex? and remove it when done? -
+#  "Answer - eekadoodle - would need to re-order UV's without this since face
+#  order isnt always what we give blender, BMesh will solve :D"
+#
+# disabled scaling to size, this requires exposing bb (easy) and understanding
+# how it works (needs some time)
 
 if __name__ == "__main__":
     register()



More information about the Bf-extensions-cvs mailing list