diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-10-31 10:00:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-10-31 10:00:18 +0300 |
commit | 3252ef4aca7a112fa5c2c00567c455bd27c9d963 (patch) | |
tree | 8d17d2d5a4d273feaaf12bc77bff6c77ff058887 /release | |
parent | 59b16e28d974fcab3246b174dae3088b05d9daaa (diff) |
Cleanup: import functions from bpy.props
Some instances used bpy.props when the convention is to import them.
Diffstat (limited to 'release')
4 files changed, 15 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py index 0f95371d4c5..3ce06647cdc 100644 --- a/release/scripts/startup/bl_operators/add_mesh_torus.py +++ b/release/scripts/startup/bl_operators/add_mesh_torus.py @@ -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", diff --git a/release/scripts/startup/bl_operators/sequencer.py b/release/scripts/startup/bl_operators/sequencer.py index ab87dc47075..9a0028d1f14 100644 --- a/release/scripts/startup/bl_operators/sequencer.py +++ b/release/scripts/startup/bl_operators/sequencer.py @@ -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'), diff --git a/release/scripts/startup/bl_operators/userpref.py b/release/scripts/startup/bl_operators/userpref.py index 0cd90610cdc..4c5c269955a 100644 --- a/release/scripts/startup/bl_operators/userpref.py +++ b/release/scripts/startup/bl_operators/userpref.py @@ -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 diff --git a/release/scripts/startup/bl_operators/uvcalc_follow_active.py b/release/scripts/startup/bl_operators/uvcalc_follow_active.py index 7b25491764b..83d451fbc89 100644 --- a/release/scripts/startup/bl_operators/uvcalc_follow_active.py +++ b/release/scripts/startup/bl_operators/uvcalc_follow_active.py @@ -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=( |