diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-27 18:27:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-27 18:27:55 +0300 |
commit | ebeeb59020f86fa0504f364d7703aa9dd100978b (patch) | |
tree | 2390eb23a115908b0d21a3e4c76caa0ab4c6a749 | |
parent | 8bc9aa9df9885297fc32641e4ffbc333d4c20dfd (diff) |
replace imports from *, considered bad practice by python devs.
-rw-r--r-- | io_anim_bvh/__init__.py | 2 | ||||
-rw-r--r-- | io_anim_camera.py | 2 | ||||
-rw-r--r-- | io_curve_svg/__init__.py | 2 | ||||
-rw-r--r-- | io_import_scene_lwo.py | 2 | ||||
-rw-r--r-- | io_import_scene_mhx.py | 8 | ||||
-rw-r--r-- | io_mesh_ply/__init__.py | 2 | ||||
-rw-r--r-- | io_mesh_stl/__init__.py | 19 | ||||
-rw-r--r-- | io_scene_3ds/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_fbx/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_m3/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_obj/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_x3d/__init__.py | 2 | ||||
-rw-r--r-- | io_shape_mdd/__init__.py | 2 | ||||
-rw-r--r-- | render_povray/__init__.py | 2 | ||||
-rw-r--r-- | space_view3d_copy_attributes.py | 2 |
15 files changed, 29 insertions, 24 deletions
diff --git a/io_anim_bvh/__init__.py b/io_anim_bvh/__init__.py index 96e034f0..350297a5 100644 --- a/io_anim_bvh/__init__.py +++ b/io_anim_bvh/__init__.py @@ -38,7 +38,7 @@ if "bpy" in locals(): import bpy -from bpy.props import * +from bpy.props import StringProperty, FloatProperty, IntProperty, BoolProperty, EnumProperty from io_utils import ImportHelper, ExportHelper diff --git a/io_anim_camera.py b/io_anim_camera.py index 592c5944..b9e0355f 100644 --- a/io_anim_camera.py +++ b/io_anim_camera.py @@ -114,7 +114,7 @@ def writeCameras(context, filepath, frame_start, frame_end, only_selected=False) fw("\n") -from bpy.props import * +from bpy.props import StringProperty, IntProperty, BoolProperty from io_utils import ExportHelper diff --git a/io_curve_svg/__init__.py b/io_curve_svg/__init__.py index 66e9cac2..c20c6996 100644 --- a/io_curve_svg/__init__.py +++ b/io_curve_svg/__init__.py @@ -42,7 +42,7 @@ if "bpy" in locals(): import bpy -from bpy.props import * +from bpy.props import StringProperty from io_utils import ImportHelper, ExportHelper diff --git a/io_import_scene_lwo.py b/io_import_scene_lwo.py index 2181cf4b..dc9aa9ac 100644 --- a/io_import_scene_lwo.py +++ b/io_import_scene_lwo.py @@ -1209,7 +1209,7 @@ def build_objects(object_layers, object_surfs, object_tags, object_name, add_sub print("Done Importing LWO File") -from bpy.props import * +from bpy.props import StringProperty, BoolProperty class IMPORT_OT_lwo(bpy.types.Operator): diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py index e4993b3e..3e470390 100644 --- a/io_import_scene_mhx.py +++ b/io_import_scene_mhx.py @@ -66,7 +66,7 @@ import bpy import os import time import mathutils -from mathutils import * +from mathutils import Matrix #import geometry #import string @@ -2144,7 +2144,7 @@ def parseProcess(args, tokens): elif key == 'Bend': axis = val[1] angle = float(val[2]) - mat = mathutils.Matrix.Rotation(angle, 4, axis) + mat = Matrix.Rotation(angle, 4, axis) try: pb = pbones[val[0]] prod = pb.matrix_local * mat @@ -2602,8 +2602,8 @@ def writeDefaults(): # User interface # -DEBUG= False -from bpy.props import * +DEBUG = False +from bpy.props import StringProperty, FloatProperty, EnumProperty from io_utils import ImportHelper diff --git a/io_mesh_ply/__init__.py b/io_mesh_ply/__init__.py index 0249795b..a03c7f4c 100644 --- a/io_mesh_ply/__init__.py +++ b/io_mesh_ply/__init__.py @@ -41,7 +41,7 @@ if "bpy" in locals(): import os import bpy -from bpy.props import * +from bpy.props import CollectionProperty, StringProperty, BoolProperty from io_utils import ImportHelper, ExportHelper diff --git a/io_mesh_stl/__init__.py b/io_mesh_stl/__init__.py index f3b925ab..350c4e6c 100644 --- a/io_mesh_stl/__init__.py +++ b/io_mesh_stl/__init__.py @@ -51,17 +51,15 @@ Import: if "bpy" in locals(): import imp - imp.reload(stl_utils) - imp.reload(blender_utils) -else: - from . import stl_utils - from . import blender_utils + if "stl_utils" in locals(): + imp.reload(stl_utils) + if "blender_utils" in locals(): + imp.reload(blender_utils) -import itertools import os import bpy -from bpy.props import * +from bpy.props import StringProperty, BoolProperty, CollectionProperty from io_utils import ExportHelper, ImportHelper @@ -82,6 +80,9 @@ class ImportSTL(bpy.types.Operator, ImportHelper): directory = StringProperty() def execute(self, context): + from . import stl_utils + from . import blender_utils + paths = [os.path.join(self.directory, name.name) for name in self.files] if not paths: @@ -114,6 +115,10 @@ class ExportSTL(bpy.types.Operator, ExportHelper): default=True) def execute(self, context): + from . import stl_utils + from . import blender_utils + import itertools + faces = itertools.chain.from_iterable( blender_utils.faces_from_mesh(ob, self.apply_modifiers) for ob in context.selected_objects) diff --git a/io_scene_3ds/__init__.py b/io_scene_3ds/__init__.py index 4840a900..25165f5c 100644 --- a/io_scene_3ds/__init__.py +++ b/io_scene_3ds/__init__.py @@ -40,7 +40,7 @@ if "bpy" in locals(): import bpy -from bpy.props import * +from bpy.props import StringProperty, FloatProperty, BoolProperty from io_utils import ImportHelper, ExportHelper diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index 49f14a94..c2da7e2d 100644 --- a/io_scene_fbx/__init__.py +++ b/io_scene_fbx/__init__.py @@ -40,7 +40,7 @@ if "bpy" in locals(): import bpy -from bpy.props import * +from bpy.props import StringProperty, BoolProperty, FloatProperty from io_utils import ExportHelper diff --git a/io_scene_m3/__init__.py b/io_scene_m3/__init__.py index 088fd5a0..fde95973 100644 --- a/io_scene_m3/__init__.py +++ b/io_scene_m3/__init__.py @@ -46,7 +46,7 @@ if "bpy" in locals(): import time import datetime import bpy -from bpy.props import * +from bpy.props import StringProperty, BoolProperty from io_utils import ImportHelper, ExportHelper diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py index 137c56d7..3c9c5b5c 100644 --- a/io_scene_obj/__init__.py +++ b/io_scene_obj/__init__.py @@ -40,7 +40,7 @@ if "bpy" in locals(): import bpy -from bpy.props import * +from bpy.props import BoolProperty, FloatProperty, StringProperty from io_utils import ExportHelper, ImportHelper diff --git a/io_scene_x3d/__init__.py b/io_scene_x3d/__init__.py index b6ba16c8..3aff0e9f 100644 --- a/io_scene_x3d/__init__.py +++ b/io_scene_x3d/__init__.py @@ -40,7 +40,7 @@ if "bpy" in locals(): import bpy -from bpy.props import * +from bpy.props import StringProperty, BoolProperty from io_utils import ImportHelper, ExportHelper diff --git a/io_shape_mdd/__init__.py b/io_shape_mdd/__init__.py index f6e404a9..f76f7d38 100644 --- a/io_shape_mdd/__init__.py +++ b/io_shape_mdd/__init__.py @@ -40,7 +40,7 @@ if "bpy" in locals(): import bpy -from bpy.props import * +from bpy.props import StringProperty, IntProperty from io_utils import ExportHelper, ImportHelper diff --git a/render_povray/__init__.py b/render_povray/__init__.py index 2c54bf26..2a94a6f3 100644 --- a/render_povray/__init__.py +++ b/render_povray/__init__.py @@ -40,7 +40,7 @@ if "bpy" in locals(): else: import bpy - from bpy.props import * + from bpy.props import StringProperty, BoolProperty, IntProperty, FloatProperty, FloatVectorProperty, EnumProperty from render_povray import ui from render_povray import render diff --git a/space_view3d_copy_attributes.py b/space_view3d_copy_attributes.py index 8b622c3d..9f96e0e3 100644 --- a/space_view3d_copy_attributes.py +++ b/space_view3d_copy_attributes.py @@ -34,7 +34,7 @@ bl_info = { import bpy import mathutils -from mathutils import * +from mathutils import Matrix, Vector def build_exec(loopfunc, func): |