Cleanup: Python imports

Split over lines to diff more easily.
This commit is contained in:
Campbell Barton
2017-11-29 18:00:41 +11:00
parent c17c6557b4
commit ad7fb1c028
14 changed files with 67 additions and 47 deletions

View File

@@ -24,7 +24,11 @@
import os
import bpy
from mathutils import Vector, Euler, Matrix
from mathutils import (
Euler,
Matrix,
Vector,
)
INTERN_PREVIEW_TYPES = {'MATERIAL', 'LAMP', 'WORLD', 'TEXTURE', 'IMAGE'}
@@ -39,7 +43,7 @@ def rna_backup_gen(data, include_props=None, exclude_props=None, root=()):
# only writable properties...
for p in data.bl_rna.properties:
pid = p.identifier
if pid in {'rna_type', }:
if pid == "rna_type":
continue
path = root + (pid,)
if include_props is not None and path not in include_props:

View File

@@ -35,10 +35,19 @@ __all__ = (
# internal blender C module
from _bpy import types, props, app, data, context
from _bpy import (
app,
context,
data,
props,
types,
)
# python modules
from . import utils, path
from . import (
path,
utils,
)
# fake operator module
from .ops import ops_fake_module as ops

View File

@@ -36,9 +36,9 @@ __all__ = (
import bpy
from bpy.props import (
StringProperty,
BoolProperty,
EnumProperty,
StringProperty,
)

View File

@@ -21,7 +21,11 @@
import bpy as _bpy
import bpyml
from bpyml import TAG, ARGS, CHILDREN
from bpyml import (
TAG,
ARGS,
CHILDREN,
)
_uilayout_rna = _bpy.types.UILayout.bl_rna

View File

@@ -21,9 +21,9 @@ import bpy
from bpy.types import Operator
from bpy.props import (
BoolProperty,
FloatProperty,
IntProperty,
BoolProperty,
)
from bpy.app.translations import pgettext_data as data_

View File

@@ -21,9 +21,9 @@
import bpy
from bpy.types import Operator
from bpy.props import (
StringProperty,
BoolProperty,
CollectionProperty,
StringProperty,
)
# ########## Datablock previews... ##########

View File

@@ -1,4 +1,5 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -351,8 +352,8 @@ def align_objects(context,
from bpy.props import (
BoolProperty,
EnumProperty,
BoolProperty
)

View File

@@ -24,9 +24,9 @@ from bpy.types import Operator
from bpy.props import (
BoolProperty,
EnumProperty,
IntProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
)

View File

@@ -90,9 +90,11 @@ def randomize_selected(context, seed, delta,
uniform(0.0, 0.0), uniform(0.0, 0.0), uniform(0.0, 0.0)
from bpy.props import (IntProperty,
from bpy.props import (
BoolProperty,
FloatVectorProperty)
FloatVectorProperty,
IntProperty,
)
class RandomizeLocRotSize(Operator):

View File

@@ -21,11 +21,11 @@
import bpy
from bpy.types import Operator
from bpy.props import (
StringProperty,
BoolProperty,
IntProperty,
FloatProperty,
EnumProperty,
FloatProperty,
IntProperty,
StringProperty,
)
from bpy.app.translations import pgettext_tip as tip_