[Bf-extensions-cvs] [a107117] master: Style cleanup (pep8).
Bastien Montagne
noreply at git.blender.org
Wed Mar 12 21:05:15 CET 2014
Commit: a107117aee4b9eda2954f174c4d91240e42b6efc
Author: Bastien Montagne
Date: Wed Mar 12 20:56:49 2014 +0100
https://developer.blender.org/rBAa107117aee4b9eda2954f174c4d91240e42b6efc
Style cleanup (pep8).
===================================================================
M io_scene_fbx/__init__.py
M io_scene_fbx/export_fbx_bin.py
M io_scene_fbx/import_fbx.py
M io_scene_fbx/json2fbx.py
===================================================================
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 8adb5eb..b3e5257 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -56,6 +56,7 @@ from bpy_extras.io_utils import (ImportHelper,
axis_conversion,
)
+
class ImportFBX(bpy.types.Operator, ImportHelper):
"""Load a FBX geometry file"""
bl_idname = "import_scene.fbx"
@@ -68,54 +69,52 @@ class ImportFBX(bpy.types.Operator, ImportHelper):
filter_glob = StringProperty(default="*.fbx", options={'HIDDEN'})
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'}
+ )
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,
+ )
def execute(self, context):
from mathutils import Matrix
@@ -151,150 +150,146 @@ 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="Exporter Version",
- description="Choose which version of the exporter to use",
- default='BIN7400',
- )
+ 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="Exporter Version",
+ description="Choose which version of the exporter to use",
+ default='BIN7400',
+ )
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',
+ )
object_types = EnumProperty(
- name="Object Types",
- options={'ENUM_FLAG'},
- items=(('EMPTY', "Empty", ""),
- ('CAMERA', "Camera", ""),
- ('LAMP', "Lamp", ""),
- ('ARMATURE', "Armature", ""),
- ('MESH', "Mesh", ""),
- ),
- default={'EMPTY', 'CAMERA', 'LAMP', 'ARMATURE', 'MESH'},
- )
+ name="Object Types",
+ options={'ENUM_FLAG'},
+ items=(('EMPTY', "Empty", ""),
+ ('CAMERA', "Camera", ""),
+ ('LAMP', "Lamp", ""),
+ ('ARMATURE', "Armature", ""),
+ ('MESH', "Mesh", ""),
+ ),
+ default={'EMPTY', 'CAMERA', 'LAMP', 'ARMATURE', 'MESH'},
+ )
use_mesh_modifiers = BoolProperty(
- name="Apply Modifiers",
- description="Apply modifiers to mesh objects",
- default=True,
- )
+ name="Apply Modifiers",
+ description="Apply modifiers to mesh objects",
+ 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"),
- ),
- default='FACE',
- )
+ name="Smoothing",
+ items=(('OFF', "Off", "Don't write smoothing"),
+ ('FACE', "Face", "Write face smoothing"),
+ ('EDGE', "Edge", "Write edge smoothing"),
+ ),
+ default='FACE',
+ )
use_mesh_edges = BoolProperty(
- name="Include Loose Edges",
- default=False,
- )
+ name="Include Loose Edges",
+ default=False,
+ )
use_tspace = BoolProperty(
- name="Include Tangent Space",
- description=("Add binormal and tangent vectors, together with normal they form the tangent space "
- "(will only work correctly with tris/quads only meshes!)"),
- default=False,
- )
+ name="Include Tangent Space",
+ description=("Add binormal and tangent vectors, together with normal they form the tangent space "
+ "(will only work correctly with tris/quads only meshes!)"),
+ default=False,
+ )
use_custom_properties = BoolProperty(
- name="Custom Properties",
- description="Export custom properties",
- default=False,
- )
+ name="Custom Properties",
+ description="Export custom properties",
+ default=False,
+ )
use_armature_deform_only = BoolProperty(
- name="Only Deform Bones",
- description="Only write deforming bones",
- default=False,
- )
+ name="Only Deform Bones",
+ description="Only write deforming bones",
+ default=False,
+ )
use_anim = BoolProperty(
- name="Include Animation",
- description="Export keyframe animation",
- default=True,
- )
+ name="Include Animation",
+ description="Export keyframe animation",
+ default=True,
+ )
use_anim_action_all = BoolProperty(
- name="All Actions",
- description=("Export all actions for armatures or just the "
- "currently selected action"),
- default=True,
- )
+ name="All Actions",
+ description=("Export all actions for armatures or just the currently selected actio
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list