Cleanup: import functions from bpy.props
Some instances used bpy.props when the convention is to import them.
This commit is contained in:
@@ -22,6 +22,7 @@ from bpy.types import Operator
|
||||
|
||||
from bpy.props import (
|
||||
BoolProperty,
|
||||
EnumProperty,
|
||||
FloatProperty,
|
||||
IntProperty,
|
||||
)
|
||||
@@ -147,7 +148,7 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
|
||||
min=3, max=256,
|
||||
default=12,
|
||||
)
|
||||
mode: bpy.props.EnumProperty(
|
||||
mode: EnumProperty(
|
||||
name="Torus Dimensions",
|
||||
items=(
|
||||
('MAJOR_MINOR', "Major/Minor",
|
||||
|
||||
@@ -21,7 +21,11 @@
|
||||
import bpy
|
||||
from bpy.types import Operator
|
||||
|
||||
from bpy.props import IntProperty
|
||||
from bpy.props import (
|
||||
EnumProperty,
|
||||
FloatProperty,
|
||||
IntProperty,
|
||||
)
|
||||
|
||||
|
||||
class SequencerCrossfadeSounds(Operator):
|
||||
@@ -170,12 +174,12 @@ class SequencerFadesAdd(Operator):
|
||||
bl_label = "Add Fades"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
duration_seconds: bpy.props.FloatProperty(
|
||||
duration_seconds: FloatProperty(
|
||||
name="Fade Duration",
|
||||
description="Duration of the fade in seconds",
|
||||
default=1.0,
|
||||
min=0.01)
|
||||
type: bpy.props.EnumProperty(
|
||||
type: EnumProperty(
|
||||
items=(
|
||||
('IN_OUT', 'Fade In And Out', 'Fade selected strips in and out'),
|
||||
('IN', 'Fade In', 'Fade in selected strips'),
|
||||
|
||||
@@ -1032,7 +1032,7 @@ class PREFERENCES_OT_studiolight_uninstall(Operator):
|
||||
"""Delete Studio Light"""
|
||||
bl_idname = "preferences.studiolight_uninstall"
|
||||
bl_label = "Uninstall Studio Light"
|
||||
index: bpy.props.IntProperty()
|
||||
index: IntProperty()
|
||||
|
||||
def execute(self, context):
|
||||
import os
|
||||
@@ -1055,7 +1055,7 @@ class PREFERENCES_OT_studiolight_copy_settings(Operator):
|
||||
"""Copy Studio Light settings to the Studio light editor"""
|
||||
bl_idname = "preferences.studiolight_copy_settings"
|
||||
bl_label = "Copy Studio Light settings"
|
||||
index: bpy.props.IntProperty()
|
||||
index: IntProperty()
|
||||
|
||||
def execute(self, context):
|
||||
prefs = context.preferences
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
import bpy
|
||||
from bpy.types import Operator
|
||||
|
||||
from bpy.props import (
|
||||
EnumProperty,
|
||||
)
|
||||
|
||||
STATUS_OK = (1 << 0)
|
||||
STATUS_ERR_ACTIVE_FACE = (1 << 1)
|
||||
@@ -253,7 +256,7 @@ class FollowActiveQuads(Operator):
|
||||
bl_label = "Follow Active Quads"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
mode: bpy.props.EnumProperty(
|
||||
mode: EnumProperty(
|
||||
name="Edge Length Mode",
|
||||
description="Method to space UV edge loops",
|
||||
items=(
|
||||
|
||||
Reference in New Issue
Block a user