[Bf-extensions-cvs] [39a1b42] master: FBX: reformat props.

Campbell Barton noreply at git.blender.org
Wed Jul 30 10:51:10 CEST 2014


Commit: 39a1b42fc34543d6bb573f4de99ffd464d504612
Author: Campbell Barton
Date:   Wed Jul 30 18:47:03 2014 +1000
Branches: master
https://developer.blender.org/rBA39a1b42fc34543d6bb573f4de99ffd464d504612

FBX: reformat props.

This is style/convention all over for addons.
Better not to re-format large blocks of code without checking with authors.

===================================================================

M	io_scene_fbx/__init__.py

===================================================================

diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 6e0c105..858e212 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -30,7 +30,8 @@ bl_info = {
     "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
                 "Scripts/Import-Export/Autodesk_FBX",
     "support": 'OFFICIAL',
-    "category": "Import-Export"}
+    "category": "Import-Export",
+}
 
 
 if "bpy" in locals():
@@ -69,57 +70,57 @@ class ImportFBX(bpy.types.Operator, ImportHelper):
     filter_glob = StringProperty(default="*.fbx", options={'HIDDEN'})
 
     use_manual_orientation = BoolProperty(
-        name="Manual Orientation",
-        description="Specify orientation and scale, instead of using embedded data in FBX file",
-        default=False,
-    )
+            name="Manual Orientation",
+            description="Specify orientation and scale, instead of using embedded data in FBX file",
+            default=False,
+            )
     axis_forward = EnumProperty(
-        name="Forward",
-        items=(('X', "X Forward", ""),
-               ('Y', "Y Forward", ""),
-               ('Z', "Z Forward", ""),
-               ('-X', "-X Forward", ""),
-               ('-Y', "-Y Forward", ""),
-               ('-Z', "-Z Forward", ""),
-               ),
-        default='-Z',
-    )
+            name="Forward",
+            items=(('X', "X Forward", ""),
+                   ('Y', "Y Forward", ""),
+                   ('Z', "Z Forward", ""),
+                   ('-X', "-X Forward", ""),
+                   ('-Y', "-Y Forward", ""),
+                   ('-Z', "-Z Forward", ""),
+                   ),
+            default='-Z',
+            )
     axis_up = EnumProperty(
-        name="Up",
-        items=(('X', "X Up", ""),
-               ('Y', "Y Up", ""),
-               ('Z', "Z Up", ""),
-               ('-X', "-X Up", ""),
-               ('-Y', "-Y Up", ""),
-               ('-Z', "-Z Up", ""),
-               ),
-        default='Y',
-    )
+            name="Up",
+            items=(('X', "X Up", ""),
+                   ('Y', "Y Up", ""),
+                   ('Z', "Z Up", ""),
+                   ('-X', "-X Up", ""),
+                   ('-Y', "-Y Up", ""),
+                   ('-Z', "-Z Up", ""),
+                   ),
+            default='Y',
+            )
     global_scale = FloatProperty(
-        name="Scale",
-        min=0.001, max=1000.0,
-        default=1.0,
-    )
+            name="Scale",
+            min=0.001, max=1000.0,
+            default=1.0,
+            )
 
     use_image_search = BoolProperty(
-        name="Image Search",
-        description="Search subdirs for any associated images (Warning, may be slow)",
-        default=True,
-    )
+            name="Image Search",
+            description="Search subdirs for any associated images (Warning, may be slow)",
+            default=True,
+            )
 
     use_alpha_decals = BoolProperty(
-        name="Alpha Decals",
-        description="Treat materials with alpha as decals (no shadow casting)",
-        default=False,
-        options={'HIDDEN'}
-    )
+            name="Alpha Decals",
+            description="Treat materials with alpha as decals (no shadow casting)",
+            default=False,
+            options={'HIDDEN'}
+            )
     decal_offset = FloatProperty(
-        name="Decal Offset",
-        description="Displace geometry of alpha meshes",
-        min=0.0, max=1.0,
-        default=0.0,
-        options={'HIDDEN'}
-    )
+            name="Decal Offset",
+            description="Displace geometry of alpha meshes",
+            min=0.0, max=1.0,
+            default=0.0,
+            options={'HIDDEN'}
+            )
 
     def draw(self, context):
         layout = self.layout
@@ -132,7 +133,7 @@ class ImportFBX(bpy.types.Operator, ImportHelper):
         sub.prop(self, "global_scale")
 
         layout.prop(self, "use_image_search")
-        #layout.prop(self, "use_alpha_decals")
+        # layout.prop(self, "use_alpha_decals")
         layout.prop(self, "decal_offset")
 
     def execute(self, context):
@@ -156,192 +157,193 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
     # to the class instance from the operator settings before calling.
 
     version = EnumProperty(
-        items=(('BIN7400', "FBX 7.4 binary", "Newer 7.4 binary version, still in development (no animation yet)"),
-               ('ASCII6100', "FBX 6.1 ASCII", "Legacy 6.1 ascii version"),
-               ),
-        name="Version",
-        description="Choose which version of the exporter to use",
-    )
+            items=(('BIN7400', "FBX 7.4 binary", "Newer 7.4 binary version, still in development (no animation yet)"),
+                   ('ASCII6100', "FBX 6.1 ASCII", "Legacy 6.1 ascii version"),
+                   ),
+            name="Version",
+            description="Choose which version of the exporter to use",
+            )
 
     use_selection = BoolProperty(
-        name="Selected Objects",
-        description="Export selected objects on visible layers",
-        default=False,
-    )
+            name="Selected Objects",
+            description="Export selected objects on visible layers",
+            default=False,
+            )
     global_scale = FloatProperty(
-        name="Scale",
-        description="Scale all data (Some importers do not support scaled armatures!)",
-        min=0.001, max=1000.0,
-        soft_min=0.01, soft_max=1000.0,
-        default=1.0,
-    )
+            name="Scale",
+            description="Scale all data (Some importers do not support scaled armatures!)",
+            min=0.001, max=1000.0,
+            soft_min=0.01, soft_max=1000.0,
+            default=1.0,
+            )
     axis_forward = EnumProperty(
-        name="Forward",
-        items=(('X', "X Forward", ""),
-               ('Y', "Y Forward", ""),
-               ('Z', "Z Forward", ""),
-               ('-X', "-X Forward", ""),
-               ('-Y', "-Y Forward", ""),
-               ('-Z', "-Z Forward", ""),
-               ),
-        default='-Z',
-    )
+            name="Forward",
+            items=(('X', "X Forward", ""),
+                   ('Y', "Y Forward", ""),
+                   ('Z', "Z Forward", ""),
+                   ('-X', "-X Forward", ""),
+                   ('-Y', "-Y Forward", ""),
+                   ('-Z', "-Z Forward", ""),
+                   ),
+            default='-Z',
+            )
     axis_up = EnumProperty(
-        name="Up",
-        items=(('X', "X Up", ""),
-               ('Y', "Y Up", ""),
-               ('Z', "Z Up", ""),
-               ('-X', "-X Up", ""),
-               ('-Y', "-Y Up", ""),
-               ('-Z', "-Z Up", ""),
-               ),
-        default='Y',
-    )
+            name="Up",
+            items=(('X', "X Up", ""),
+                   ('Y', "Y Up", ""),
+                   ('Z', "Z Up", ""),
+                   ('-X', "-X Up", ""),
+                   ('-Y', "-Y Up", ""),
+                   ('-Z', "-Z Up", ""),
+                   ),
+            default='Y',
+            )
     # 7.4 only
     bake_space_transform = BoolProperty(
-        name="Apply Transform",
-        description=("Bake space transform into object data, avoids getting unwanted rotations to objects when "
-                     "target space is not aligned with Blender's space "
-                     "(WARNING! experimental option, might give odd/wrong results)"),
-        default=False,
-    )
+            name="Apply Transform",
+            description=("Bake space transform into object data, avoids getting unwanted rotations to objects when "
+                         "target space is not aligned with Blender's space "
+                         "(WARNING! experimental option, might give odd/wrong results)"),
+            default=False,
+            )
 
     object_types = EnumProperty(
-        name="Object Types",
-        options={'ENUM_FLAG'},
-        items=(('EMPTY', "Empty", ""),
-               ('CAMERA', "Camera", ""),
-               ('LAMP', "Lamp", ""),
-               ('ARMATURE', "Armature", ""),
-               ('MESH', "Mesh", ""),
-               ('OTHER', "Other", "Other geometry types, like curve, metaball, etc. (converted to meshes)"),
-               ),
-        description="Which kind of object to export",
-        default={'EMPTY', 'CAMERA', 'LAMP', 'ARMATURE', 'MESH', 'OTHER'},
-    )
+            name="Object Types",
+            options={'ENUM_FLAG'},
+            items=(('EMPTY', "Empty", ""),
+                   ('CAMERA', "Camera", ""),
+                   ('LAMP', "Lamp", ""),
+                   ('ARMATURE', "Armature", ""),
+                   ('MESH', "Mesh", ""),
+                   ('OTHER', "Other", "Other geometry types, like curve, metaball, etc. (converted to meshes)"),
+                   ),
+            description="Which kind of object to export",
+            default={'EMPTY', 'CAMERA', 'LAMP', 'ARMATURE', 'MESH', 'OTHER'},
+            )
 
     use_mesh_modifiers = BoolProperty(
-        name="Apply Modifiers",
-        description="Apply modifiers to mesh objects (except Armature ones!)",
-        default=True,
-    )
+            name="Apply Modifiers",
+            description="Apply modifiers to mesh objects (except Armature ones!)",
+            default=True,
+            )
     mesh_smooth_type = EnumProperty(
-        name="Smoothing",
-        items=(('OFF', "Off", "Don't write smoothing"),
-               ('FACE', "Face", "Write face smoothing"),
-               ('EDGE', "Edge", "Write edge smoothing"),
-               ),
-        description="Export smoothing information (not mandatory if your target importer understand split normals)",
-        default='FACE',
-    )
+            name="Smoothing",
+            items=(('OFF', "Off", "Don't write smoothing"),
+                   ('FACE', "Face", "Write face smoothing"),
+                   ('EDGE', "Edge", "Write edge smoothing"),
+                   ),
+            description=("Export smoothing information "
+                         "(not mandatory if your target importer understand split normals)"),
+            default='FACE',
+            )
     use_mes

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list