cleanup: py imports

This commit is contained in:
2015-01-27 17:46:07 +11:00
parent 3e59092348
commit e17c6f79a5
26 changed files with 159 additions and 117 deletions

View File

@@ -20,9 +20,10 @@
import bpy
from bpy.types import Operator
from bpy.props import (FloatProperty,
IntProperty,
)
from bpy.props import (
FloatProperty,
IntProperty,
)
from bpy.app.translations import pgettext_data as data_
from bpy_extras import object_utils

View File

@@ -27,11 +27,12 @@ if "bpy" in locals():
import bpy
from bpy.types import Operator
from bpy.props import (IntProperty,
BoolProperty,
EnumProperty,
StringProperty,
)
from bpy.props import (
IntProperty,
BoolProperty,
EnumProperty,
StringProperty,
)
class ANIM_OT_keying_set_export(Operator):

View File

@@ -20,9 +20,10 @@
import bpy
from bpy.types import Operator
from bpy.props import (BoolProperty,
StringProperty,
)
from bpy.props import (
BoolProperty,
StringProperty,
)
def _lang_module_get(sc):

View File

@@ -16,10 +16,13 @@
#
# ##### END GPL LICENSE BLOCK #####
import sys
import bpy
from bpy.props import (BoolProperty, EnumProperty, StringProperty)
from bpy.props import (
BoolProperty,
EnumProperty,
StringProperty,
)
class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator):
@@ -29,11 +32,16 @@ class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator):
bl_label = "Fill Range by Selection"
bl_options = {'INTERNAL'}
type = EnumProperty(name="Type", description="Type of the modifier to work on",
items=(("COLOR", "Color", "Color modifier type"),
("ALPHA", "Alpha", "Alpha modifier type"),
("THICKNESS", "Thickness", "Thickness modifier type")))
name = StringProperty(name="Name", description="Name of the modifier to work on")
type = EnumProperty(
name="Type", description="Type of the modifier to work on",
items=(("COLOR", "Color", "Color modifier type"),
("ALPHA", "Alpha", "Alpha modifier type"),
("THICKNESS", "Thickness", "Thickness modifier type")),
)
name = StringProperty(
name="Name",
description="Name of the modifier to work on",
)
@classmethod
def poll(cls, context):
@@ -41,6 +49,8 @@ class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator):
return rl and rl.freestyle_settings.linesets.active
def execute(self, context):
import sys
scene = context.scene
rl = scene.render.layers.active
lineset = rl.freestyle_settings.linesets.active

View File

@@ -20,15 +20,17 @@
import bpy
import nodeitems_utils
from bpy.types import (Operator,
PropertyGroup,
)
from bpy.props import (BoolProperty,
CollectionProperty,
EnumProperty,
IntProperty,
StringProperty,
)
from bpy.types import (
Operator,
PropertyGroup,
)
from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
IntProperty,
StringProperty,
)
class NodeSetting(PropertyGroup):

View File

@@ -20,11 +20,13 @@
import bpy
from bpy.types import Operator
from bpy.props import (StringProperty,
BoolProperty,
EnumProperty,
IntProperty,
FloatProperty)
from bpy.props import (
StringProperty,
BoolProperty,
EnumProperty,
IntProperty,
FloatProperty,
)
class SelectPattern(Operator):

View File

@@ -21,12 +21,13 @@
from mathutils import Vector
import bpy
from bpy.types import Operator
from bpy.props import (BoolProperty,
EnumProperty,
IntProperty,
FloatProperty,
FloatVectorProperty,
)
from bpy.props import (
BoolProperty,
EnumProperty,
IntProperty,
FloatProperty,
FloatVectorProperty,
)
def object_ensure_material(obj, mat_name):

View File

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