diff options
author | NBurn <7nburn@gmail.com> | 2019-01-18 00:48:54 +0300 |
---|---|---|
committer | NBurn <7nburn@gmail.com> | 2019-01-18 00:48:54 +0300 |
commit | aeabdc02a83a976b2f594cd66873c6d2b537e669 (patch) | |
tree | 3ac5922be25219ab666aae4b8d04002bce2e70a6 /space_view3d_display_tools | |
parent | ba97e19e5b3df449784a4cc4ed89ce7b511ec3e4 (diff) |
Update Add-ons class properties to annotations
This should take care of most of the class property conversions to
use the new annotation format (colon instead of equals) for
assignment. There may still be a few edge cases that were missed.
Diffstat (limited to 'space_view3d_display_tools')
-rw-r--r-- | space_view3d_display_tools/__init__.py | 34 | ||||
-rw-r--r-- | space_view3d_display_tools/display.py | 8 | ||||
-rw-r--r-- | space_view3d_display_tools/fast_navigate.py | 4 | ||||
-rw-r--r-- | space_view3d_display_tools/modifier_tools.py | 10 | ||||
-rw-r--r-- | space_view3d_display_tools/select_tools.py | 14 | ||||
-rw-r--r-- | space_view3d_display_tools/selection_restrictor.py | 6 | ||||
-rw-r--r-- | space_view3d_display_tools/useless_tools.py | 20 |
7 files changed, 48 insertions, 48 deletions
diff --git a/space_view3d_display_tools/__init__.py b/space_view3d_display_tools/__init__.py index 343f9d64..693fca44 100644 --- a/space_view3d_display_tools/__init__.py +++ b/space_view3d_display_tools/__init__.py @@ -467,11 +467,11 @@ class DisplayToolsPanel(Panel): # define scene props class display_tools_scene_props(PropertyGroup): # Init delay variables - Delay = BoolProperty( + Delay: BoolProperty( default=False, description="Activate delay return to normal viewport mode" ) - DelayTime = IntProperty( + DelayTime: IntProperty( default=30, min=0, max=500, @@ -480,7 +480,7 @@ class display_tools_scene_props(PropertyGroup): description="Delay time to return to normal viewport" "mode after move your mouse cursor" ) - DelayTimeGlobal = IntProperty( + DelayTimeGlobal: IntProperty( default=30, min=1, max=500, @@ -490,40 +490,40 @@ class display_tools_scene_props(PropertyGroup): "mode after move your mouse cursor" ) # Init variable for fast navigate - EditActive = BoolProperty( + EditActive: BoolProperty( default=True, description="Activate for fast navigate in edit mode too" ) # Init properties for scene - FastNavigateStop = BoolProperty( + FastNavigateStop: BoolProperty( name="Fast Navigate Stop", description="Stop fast navigate mode", default=False ) - OriginalMode = EnumProperty( + OriginalMode: EnumProperty( items=[('TEXTURED', 'Texture', 'Texture display mode'), ('SOLID', 'Solid', 'Solid display mode')], name="Normal", default='SOLID' ) - BoundingMode = EnumProperty( + BoundingMode: EnumProperty( items=[('BOX', 'Box', 'Box shape'), ('SPHERE', 'Sphere', 'Sphere shape'), ('CYLINDER', 'Cylinder', 'Cylinder shape'), ('CONE', 'Cone', 'Cone shape')], name="BB Mode" ) - FastMode = EnumProperty( + FastMode: EnumProperty( items=[('WIREFRAME', 'Wireframe', 'Wireframe display'), ('BOUNDBOX', 'Bounding Box', 'Bounding Box display')], name="Fast" ) - ShowParticles = BoolProperty( + ShowParticles: BoolProperty( name="Show Particles", description="Show or hide particles on fast navigate mode", default=True ) - ParticlesPercentageDisplay = IntProperty( + ParticlesPercentageDisplay: IntProperty( name="Fast Display", description="Display only a percentage of particles when active", default=25, @@ -533,7 +533,7 @@ class display_tools_scene_props(PropertyGroup): soft_max=100, subtype='FACTOR' ) - InitialParticles = IntProperty( + InitialParticles: IntProperty( name="Normal Display", description="When idle, how much particles are displayed\n" "Overrides the Particles settings", @@ -543,11 +543,11 @@ class display_tools_scene_props(PropertyGroup): soft_min=0, soft_max=100 ) - Symplify = IntProperty( + Symplify: IntProperty( name="Integer", description="Enter an integer" ) - ScreenStart = IntProperty( + ScreenStart: IntProperty( name="Left Limit", default=0, min=0, @@ -556,7 +556,7 @@ class display_tools_scene_props(PropertyGroup): description="Limit the screen active area width from the left side\n" "Changed values will take effect on the next run", ) - ScreenEnd = IntProperty( + ScreenEnd: IntProperty( name="Right Limit", default=0, min=0, @@ -572,10 +572,10 @@ class display_tools_scene_props(PropertyGroup): default=(False,) * 6, size=6, ) - WT_handler_enable = BoolProperty( + WT_handler_enable: BoolProperty( default=False ) - WT_handler_previous_object = StringProperty( + WT_handler_previous_object: StringProperty( default="" ) @@ -608,7 +608,7 @@ class DisplayToolsPreferences(AddonPreferences): # when defining this in a submodule of a python package. bl_idname = __name__ - category = StringProperty( + category: StringProperty( name="Tab Category", description="Choose a name for the category of the panel", default="Display", diff --git a/space_view3d_display_tools/display.py b/space_view3d_display_tools/display.py index 6c1c6796..d0ff754d 100644 --- a/space_view3d_display_tools/display.py +++ b/space_view3d_display_tools/display.py @@ -63,7 +63,7 @@ class DisplayDrawChange(Operator, BasePollCheck): bl_label = "Draw Type" bl_description = "Change Display objects' mode" - drawing = EnumProperty( + drawing: EnumProperty( items=[('TEXTURED', 'Texture', 'Texture display mode'), ('SOLID', 'Solid', 'Solid display mode'), ('WIRE', 'Wire', 'Wire display mode'), @@ -99,7 +99,7 @@ class DisplayBoundsSwitch(Operator, BasePollCheck): bl_label = "On/Off" bl_description = "Display/Hide Bounding box overlay" - bounds = BoolProperty(default=False) + bounds: BoolProperty(default=False) def execute(self, context): try: @@ -129,7 +129,7 @@ class DisplayDoubleSidedSwitch(Operator, BasePollCheck): bl_label = "On/Off" bl_description = "Turn on/off face double shaded mode" - double_side = BoolProperty(default=False) + double_side: BoolProperty(default=False) def execute(self, context): try: @@ -156,7 +156,7 @@ class DisplayXRayOn(Operator, BasePollCheck): bl_label = "On" bl_description = "X-Ray display on/off" - xrays = BoolProperty(default=False) + xrays: BoolProperty(default=False) def execute(self, context): try: diff --git a/space_view3d_display_tools/fast_navigate.py b/space_view3d_display_tools/fast_navigate.py index 5d61138a..e3577df5 100644 --- a/space_view3d_display_tools/fast_navigate.py +++ b/space_view3d_display_tools/fast_navigate.py @@ -62,8 +62,8 @@ class FastNavigate(Operator): bl_description = ("Limit the objects drawing in the 3D view for faster navigation\n" "Runs in modal mode until Stop is pressed or Esc, Return, Space") - trigger = BoolProperty(default=False) - mode = BoolProperty(default=False) + trigger: BoolProperty(default=False) + mode: BoolProperty(default=False) screen_width = [0, 0] store_fail = False store_init_particles = {} diff --git a/space_view3d_display_tools/modifier_tools.py b/space_view3d_display_tools/modifier_tools.py index af2667dc..dbfbcea6 100644 --- a/space_view3d_display_tools/modifier_tools.py +++ b/space_view3d_display_tools/modifier_tools.py @@ -91,7 +91,7 @@ class DisplayModifiersRenderSwitch(Operator, BasePollCheck): bl_label = "On/Off" bl_description = "Display/Hide modifiers on render" - mod_render = BoolProperty(default=True) + mod_render: BoolProperty(default=True) def execute(self, context): try: @@ -122,7 +122,7 @@ class DisplayModifiersViewportSwitch(Operator, BasePollCheck): bl_label = "On/Off" bl_description = "Display/Hide modifiers in the viewport" - mod_switch = BoolProperty(default=True) + mod_switch: BoolProperty(default=True) def execute(self, context): try: @@ -149,7 +149,7 @@ class DisplayModifiersEditSwitch(Operator, BasePollCheck): bl_label = "On/Off" bl_description = "Display/Hide modifiers during edit mode" - mod_edit = BoolProperty(default=True) + mod_edit: BoolProperty(default=True) def execute(self, context): try: @@ -175,7 +175,7 @@ class DisplayModifiersCageSet(Operator, BasePollCheck): bl_label = "On/Off" bl_description = "Display modifiers editing cage during edit mode" - set_cage = BoolProperty(default=True) + set_cage: BoolProperty(default=True) def execute(self, context): selection = context.selected_objects @@ -200,7 +200,7 @@ class ModifiersSubsurfLevel_Set(Operator, BasePollCheck): bl_label = "Set Subsurf level" bl_description = "Change subsurf modifier level" - level = IntProperty( + level: IntProperty( name="Subsurf Level", description="Change subsurf modifier level", default=1, diff --git a/space_view3d_display_tools/select_tools.py b/space_view3d_display_tools/select_tools.py index 2eb79dfc..18f93185 100644 --- a/space_view3d_display_tools/select_tools.py +++ b/space_view3d_display_tools/select_tools.py @@ -221,7 +221,7 @@ class OBJECT_OT_HideShowByTypeTemplate(): bl_options = {'UNDO', 'REGISTER'} - type = EnumProperty( + type: EnumProperty( items=( ('MESH', 'Mesh', ''), ('CURVE', 'Curve', ''), @@ -285,18 +285,18 @@ class OBJECT_OT_HideByType(OBJECT_OT_HideShowByTypeTemplate, Operator): bl_idname = "object.hide_by_type" bl_label = "Hide By Type" - hide_or_show = BoolProperty( + hide_or_show: BoolProperty( name="Hide", description="Inverse effect", options={'HIDDEN'}, default=1 ) - hide_selected = BoolProperty( + hide_selected: BoolProperty( name="Selected", description="Hide only selected objects", default=0 ) - hide_render_restricted = BoolProperty( + hide_render_restricted: BoolProperty( name="Only Render-Restricted", description="Hide only render restricted objects", default=0 @@ -307,18 +307,18 @@ class OBJECT_OT_ShowByType(OBJECT_OT_HideShowByTypeTemplate, Operator): bl_idname = "object.show_by_type" bl_label = "Show By Type" - hide_or_show = BoolProperty( + hide_or_show: BoolProperty( name="Hide", description="Inverse effect", options={'HIDDEN'}, default=0 ) - hide_selected = BoolProperty( + hide_selected: BoolProperty( name="Selected", options={'HIDDEN'}, default=0 ) - hide_render_restricted = BoolProperty( + hide_render_restricted: BoolProperty( name="Only Renderable", description="Show only non render restricted objects", default=0 diff --git a/space_view3d_display_tools/selection_restrictor.py b/space_view3d_display_tools/selection_restrictor.py index 71561bfe..e5816409 100644 --- a/space_view3d_display_tools/selection_restrictor.py +++ b/space_view3d_display_tools/selection_restrictor.py @@ -190,7 +190,7 @@ class RestrictorShow(Operator): bl_option = {'REGISTER', 'UNDO'} bl_description = "Show/Hide Selection Restrictors" - hide = StringProperty() + hide: StringProperty() def execute(self, context): global show @@ -213,7 +213,7 @@ class IgnoreRestrictors(Operator): bl_label = "Ignore Restrictor by Selected Objects" bl_option = {'REGISTER', 'UNDO'} bl_description = "Ignore or do not ignore Restrictor by selected objects" - ignore = BoolProperty() + ignore: BoolProperty() def execute(self, context): if self.ignore is True: @@ -237,7 +237,7 @@ class RestrictorMesh(Operator): bl_label = "restrictor meshes" bl_option = {'REGISTER', 'UNDO'} bl_description = "Meshes selection restrictor" - mesh = StringProperty() + mesh: StringProperty() def execute(self, context): global mesh diff --git a/space_view3d_display_tools/useless_tools.py b/space_view3d_display_tools/useless_tools.py index 22931423..9c89d3fe 100644 --- a/space_view3d_display_tools/useless_tools.py +++ b/space_view3d_display_tools/useless_tools.py @@ -48,7 +48,7 @@ class UTSetSelectable(Operator): bl_label = "Set Selectable" bl_description = "Sets selectability for the selected objects" - selectable = BoolProperty() + selectable: BoolProperty() def execute(self, context): errors = [] @@ -72,7 +72,7 @@ class UTSetRenderable(Operator): bl_label = "Set Renderable" bl_description = "Sets renderability for the selected objects" - renderable = BoolProperty() + renderable: BoolProperty() def execute(self, context): errors = [] @@ -158,10 +158,10 @@ class UTWireShowHideSelAll(Operator): bl_label = "Show / Hide Wire Selected or All" bl_description = "Change the status of the Wire display on Selected Objects" - show = BoolProperty( + show: BoolProperty( default=False ) - selected = BoolProperty( + selected: BoolProperty( default=False ) @@ -192,10 +192,10 @@ class UTSubsurfHideSelAll(Operator): "Hide and Show operate on Selected Objects only\n" "Hide All and Show All operate on All Objects in the data") - show = BoolProperty( + show: BoolProperty( default=False ) - selected = BoolProperty( + selected: BoolProperty( default=False ) @@ -221,10 +221,10 @@ class UTOptimalDisplaySelAll(Operator): bl_label = "Optimal Display" bl_description = "Disables Optimal Display for all Subsurf modifiers on objects" - on = BoolProperty( + on: BoolProperty( default=False ) - selected = BoolProperty( + selected: BoolProperty( default=False ) @@ -250,7 +250,7 @@ class UTAllEdges(Operator): bl_label = "All Edges" bl_description = "Change the status of All Edges overlay on all objects" - on = BoolProperty( + on: BoolProperty( default=False ) @@ -274,7 +274,7 @@ class UTDoubleSided(Operator): bl_label = "Double Sided Normals" bl_description = "Disables Double Sided Normals for all objects" - on = BoolProperty( + on: BoolProperty( default=False ) |