diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-26 20:41:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-26 20:58:56 +0300 |
commit | 532c8ac58384309e77791e32ab78f448ad2a76a6 (patch) | |
tree | cef77b98714aaed13ec8317bc9bb763d00aa1a02 /release/scripts/startup/bl_operators/wm.py | |
parent | ecb56eac57e66c1c925860e05438c9f245bff505 (diff) |
Cleanup: pep8 function indentation
Diffstat (limited to 'release/scripts/startup/bl_operators/wm.py')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 498 |
1 files changed, 249 insertions, 249 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 022ee1576d8..5b12f6196a4 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -32,28 +32,28 @@ from bpy.app.translations import pgettext_tip as tip_ rna_path_prop = StringProperty( - name="Context Attributes", - description="RNA context string", - maxlen=1024, - ) + name="Context Attributes", + description="RNA context string", + maxlen=1024, +) rna_reverse_prop = BoolProperty( - name="Reverse", - description="Cycle backwards", - default=False, - ) + name="Reverse", + description="Cycle backwards", + default=False, +) rna_wrap_prop = BoolProperty( - name="Wrap", - description="Wrap back to the first/last values", - default=False, - ) + name="Wrap", + description="Wrap back to the first/last values", + default=False, +) rna_relative_prop = BoolProperty( - name="Relative", - description="Apply relative to the current value (delta)", - default=False, - ) + name="Relative", + description="Apply relative to the current value (delta)", + default=False, +) def context_path_validate(context, data_path): @@ -150,14 +150,14 @@ class BRUSH_OT_active_index_set(Operator): bl_label = "Set Brush Number" mode = StringProperty( - name="Mode", - description="Paint mode to set brush for", - maxlen=1024, - ) + name="Mode", + description="Paint mode to set brush for", + maxlen=1024, + ) index = IntProperty( - name="Number", - description="Brush number", - ) + name="Number", + description="Brush number", + ) _attr_dict = { "sculpt": "use_paint_sculpt", @@ -188,10 +188,10 @@ class WM_OT_context_set_boolean(Operator): data_path = rna_path_prop value = BoolProperty( - name="Value", - description="Assignment value", - default=True, - ) + name="Value", + description="Assignment value", + default=True, + ) execute = execute_context_assign @@ -204,10 +204,10 @@ class WM_OT_context_set_int(Operator): # same as enum data_path = rna_path_prop value = IntProperty( - name="Value", - description="Assign value", - default=0, - ) + name="Value", + description="Assign value", + default=0, + ) relative = rna_relative_prop execute = execute_context_assign @@ -221,10 +221,10 @@ class WM_OT_context_scale_float(Operator): data_path = rna_path_prop value = FloatProperty( - name="Value", - description="Assign value", - default=1.0, - ) + name="Value", + description="Assign value", + default=1.0, + ) def execute(self, context): data_path = self.data_path @@ -249,15 +249,15 @@ class WM_OT_context_scale_int(Operator): data_path = rna_path_prop value = FloatProperty( - name="Value", - description="Assign value", - default=1.0, - ) + name="Value", + description="Assign value", + default=1.0, + ) always_step = BoolProperty( - name="Always Step", - description="Always adjust the value by a minimum of 1 when 'value' is not 1.0", - default=True, - ) + name="Always Step", + description="Always adjust the value by a minimum of 1 when 'value' is not 1.0", + default=True, + ) def execute(self, context): data_path = self.data_path @@ -292,10 +292,10 @@ class WM_OT_context_set_float(Operator): # same as enum data_path = rna_path_prop value = FloatProperty( - name="Value", - description="Assignment value", - default=0.0, - ) + name="Value", + description="Assignment value", + default=0.0, + ) relative = rna_relative_prop execute = execute_context_assign @@ -309,10 +309,10 @@ class WM_OT_context_set_string(Operator): # same as enum data_path = rna_path_prop value = StringProperty( - name="Value", - description="Assign value", - maxlen=1024, - ) + name="Value", + description="Assign value", + maxlen=1024, + ) execute = execute_context_assign @@ -325,10 +325,10 @@ class WM_OT_context_set_enum(Operator): data_path = rna_path_prop value = StringProperty( - name="Value", - description="Assignment value (as a string)", - maxlen=1024, - ) + name="Value", + description="Assignment value (as a string)", + maxlen=1024, + ) execute = execute_context_assign @@ -341,10 +341,10 @@ class WM_OT_context_set_value(Operator): data_path = rna_path_prop value = StringProperty( - name="Value", - description="Assignment value (as a string)", - maxlen=1024, - ) + name="Value", + description="Assignment value (as a string)", + maxlen=1024, + ) def execute(self, context): data_path = self.data_path @@ -381,15 +381,15 @@ class WM_OT_context_toggle_enum(Operator): data_path = rna_path_prop value_1 = StringProperty( - name="Value", - description="Toggle enum", - maxlen=1024, - ) + name="Value", + description="Toggle enum", + maxlen=1024, + ) value_2 = StringProperty( - name="Value", - description="Toggle enum", - maxlen=1024, - ) + name="Value", + description="Toggle enum", + maxlen=1024, + ) def execute(self, context): data_path = self.data_path @@ -413,7 +413,7 @@ class WM_OT_context_toggle_enum(Operator): class WM_OT_context_cycle_int(Operator): """Set a context value (useful for cycling active material, """ \ - """vertex keys, groups, etc.)""" + """vertex keys, groups, etc.)""" bl_idname = "wm.context_cycle_int" bl_label = "Context Int Cycle" bl_options = {'UNDO', 'INTERNAL'} @@ -506,7 +506,7 @@ class WM_OT_context_cycle_enum(Operator): class WM_OT_context_cycle_array(Operator): """Set a context array value """ \ - """(useful for cycling the active mesh edit mode)""" + """(useful for cycling the active mesh edit mode)""" bl_idname = "wm.context_cycle_array" bl_label = "Context Array Cycle" bl_options = {'UNDO', 'INTERNAL'} @@ -590,15 +590,15 @@ class WM_OT_operator_pie_enum(Operator): bl_label = "Operator Enum Pie" bl_options = {'UNDO', 'INTERNAL'} data_path = StringProperty( - name="Operator", - description="Operator name (in python as string)", - maxlen=1024, - ) + name="Operator", + description="Operator name (in python as string)", + maxlen=1024, + ) prop_string = StringProperty( - name="Property", - description="Property name (as a string)", - maxlen=1024, - ) + name="Property", + description="Property name (as a string)", + maxlen=1024, + ) def invoke(self, context, event): wm = context.window_manager @@ -635,10 +635,10 @@ class WM_OT_context_set_id(Operator): data_path = rna_path_prop value = StringProperty( - name="Value", - description="Assign value", - maxlen=1024, - ) + name="Value", + description="Assign value", + maxlen=1024, + ) def execute(self, context): value = self.value @@ -666,16 +666,16 @@ class WM_OT_context_set_id(Operator): doc_id = StringProperty( - name="Doc ID", - maxlen=1024, - options={'HIDDEN'}, - ) + name="Doc ID", + maxlen=1024, + options={'HIDDEN'}, +) data_path_iter = StringProperty( - description="The data path relative to the context, must point to an iterable") + description="The data path relative to the context, must point to an iterable") data_path_item = StringProperty( - description="The data path from each iterable to the value (int or float)") + description="The data path from each iterable to the value (int or float)") class WM_OT_context_collection_boolean_set(Operator): @@ -688,12 +688,12 @@ class WM_OT_context_collection_boolean_set(Operator): data_path_item = data_path_item type = EnumProperty( - name="Type", - items=(('TOGGLE', "Toggle", ""), - ('ENABLE', "Enable", ""), - ('DISABLE', "Disable", ""), - ), - ) + name="Type", + items=(('TOGGLE', "Toggle", ""), + ('ENABLE', "Enable", ""), + ('DISABLE', "Disable", ""), + ), + ) def execute(self, context): data_path_iter = self.data_path_iter @@ -746,18 +746,18 @@ class WM_OT_context_modal_mouse(Operator): data_path_iter = data_path_iter data_path_item = data_path_item header_text = StringProperty( - name="Header Text", - description="Text to display in header during scale", - ) + name="Header Text", + description="Text to display in header during scale", + ) input_scale = FloatProperty( - description="Scale the mouse movement by this value before applying the delta", - default=0.01, - ) + description="Scale the mouse movement by this value before applying the delta", + default=0.01, + ) invert = BoolProperty( - description="Invert the mouse input", - default=False, - ) + description="Invert the mouse input", + default=False, + ) initial_x = IntProperty(options={'HIDDEN'}) def _values_store(self, context): @@ -852,9 +852,9 @@ class WM_OT_url_open(Operator): bl_options = {'INTERNAL'} url = StringProperty( - name="URL", - description="URL to open", - ) + name="URL", + description="URL to open", + ) def execute(self, context): import webbrowser @@ -869,9 +869,9 @@ class WM_OT_path_open(Operator): bl_options = {'INTERNAL'} filepath = StringProperty( - subtype='FILE_PATH', - options={'SKIP_SAVE'}, - ) + subtype='FILE_PATH', + options={'SKIP_SAVE'}, + ) def execute(self, context): import sys @@ -1055,39 +1055,39 @@ class WM_OT_doc_view(Operator): rna_path = StringProperty( - name="Property Edit", - description="Property data_path edit", - maxlen=1024, - options={'HIDDEN'}, - ) + name="Property Edit", + description="Property data_path edit", + maxlen=1024, + options={'HIDDEN'}, +) rna_value = StringProperty( - name="Property Value", - description="Property value edit", - maxlen=1024, - ) + name="Property Value", + description="Property value edit", + maxlen=1024, +) rna_property = StringProperty( - name="Property Name", - description="Property name edit", - maxlen=1024, - ) + name="Property Name", + description="Property name edit", + maxlen=1024, +) rna_min = FloatProperty( - name="Min", - default=-10000.0, - precision=3, - ) + name="Min", + default=-10000.0, + precision=3, +) rna_max = FloatProperty( - name="Max", - default=10000.0, - precision=3, - ) + name="Max", + default=10000.0, + precision=3, +) rna_use_soft_limits = BoolProperty( - name="Use Soft Limits", - ) + name="Use Soft Limits", +) class WM_OT_properties_edit(Operator): @@ -1105,8 +1105,8 @@ class WM_OT_properties_edit(Operator): soft_min = rna_min soft_max = rna_max description = StringProperty( - name="Tooltip", - ) + name="Tooltip", + ) def _cmp_props_get(self): # Changing these properties will refresh the UI @@ -1339,9 +1339,9 @@ class WM_OT_properties_context_change(Operator): bl_options = {'INTERNAL'} context = StringProperty( - name="Context", - maxlen=64, - ) + name="Context", + maxlen=64, + ) def execute(self, context): context.space_data.context = self.context @@ -1377,8 +1377,8 @@ class WM_OT_keyconfig_activate(Operator): bl_label = "Activate Keyconfig" filepath = StringProperty( - subtype='FILE_PATH', - ) + subtype='FILE_PATH', + ) def execute(self, context): if bpy.utils.keyconfig_set(self.filepath, report=self.report): @@ -1412,8 +1412,8 @@ class WM_OT_appconfig_activate(Operator): bl_label = "Activate Application Configuration" filepath = StringProperty( - subtype='FILE_PATH', - ) + subtype='FILE_PATH', + ) def execute(self, context): import os @@ -1437,9 +1437,9 @@ class WM_OT_sysinfo(Operator): bl_label = "Save System Info" filepath = StringProperty( - subtype='FILE_PATH', - options={'SKIP_SAVE'}, - ) + subtype='FILE_PATH', + options={'SKIP_SAVE'}, + ) def execute(self, context): import sys_info @@ -1451,7 +1451,7 @@ class WM_OT_sysinfo(Operator): if not self.filepath: self.filepath = os.path.join( - os.path.expanduser("~"), "system-info.txt") + os.path.expanduser("~"), "system-info.txt") wm = context.window_manager wm.fileselect_add(self) @@ -1563,29 +1563,29 @@ class WM_OT_keyconfig_import(Operator): bl_label = "Import Key Configuration..." filepath = StringProperty( - subtype='FILE_PATH', - default="keymap.py", - ) + subtype='FILE_PATH', + default="keymap.py", + ) filter_folder = BoolProperty( - name="Filter folders", - default=True, - options={'HIDDEN'}, - ) + name="Filter folders", + default=True, + options={'HIDDEN'}, + ) filter_text = BoolProperty( - name="Filter text", - default=True, - options={'HIDDEN'}, - ) + name="Filter text", + default=True, + options={'HIDDEN'}, + ) filter_python = BoolProperty( - name="Filter python", - default=True, - options={'HIDDEN'}, - ) + name="Filter python", + default=True, + options={'HIDDEN'}, + ) keep_original = BoolProperty( - name="Keep original", - description="Keep original file after copying to configuration folder", - default=True, - ) + name="Keep original", + description="Keep original file after copying to configuration folder", + default=True, + ) def execute(self, context): import os @@ -1630,24 +1630,24 @@ class WM_OT_keyconfig_export(Operator): bl_label = "Export Key Configuration..." filepath = StringProperty( - subtype='FILE_PATH', - default="keymap.py", - ) + subtype='FILE_PATH', + default="keymap.py", + ) filter_folder = BoolProperty( - name="Filter folders", - default=True, - options={'HIDDEN'}, - ) + name="Filter folders", + default=True, + options={'HIDDEN'}, + ) filter_text = BoolProperty( - name="Filter text", - default=True, - options={'HIDDEN'}, - ) + name="Filter text", + default=True, + options={'HIDDEN'}, + ) filter_python = BoolProperty( - name="Filter python", - default=True, - options={'HIDDEN'}, - ) + name="Filter python", + default=True, + options={'HIDDEN'}, + ) def execute(self, context): from bpy_extras import keyconfig_utils @@ -1680,9 +1680,9 @@ class WM_OT_keymap_restore(Operator): bl_label = "Restore Key Map(s)" all = BoolProperty( - name="All Keymaps", - description="Restore all keymaps to default", - ) + name="All Keymaps", + description="Restore all keymaps to default", + ) def execute(self, context): wm = context.window_manager @@ -1703,9 +1703,9 @@ class WM_OT_keyitem_restore(Operator): bl_label = "Restore Key Map Item" item_id = IntProperty( - name="Item Identifier", - description="Identifier of the item to remove", - ) + name="Item Identifier", + description="Identifier of the item to remove", + ) @classmethod def poll(cls, context): @@ -1750,9 +1750,9 @@ class WM_OT_keyitem_remove(Operator): bl_label = "Remove Key Map Item" item_id = IntProperty( - name="Item Identifier", - description="Identifier of the item to remove", - ) + name="Item Identifier", + description="Identifier of the item to remove", + ) @classmethod def poll(cls, context): @@ -1818,9 +1818,9 @@ class WM_OT_addon_enable(Operator): bl_label = "Enable Add-on" module = StringProperty( - name="Module", - description="Module name of the add-on to enable", - ) + name="Module", + description="Module name of the add-on to enable", + ) def execute(self, context): import addon_utils @@ -1864,9 +1864,9 @@ class WM_OT_addon_disable(Operator): bl_label = "Disable Add-on" module = StringProperty( - name="Module", - description="Module name of the add-on to disable", - ) + name="Module", + description="Module name of the add-on to disable", + ) def execute(self, context): import addon_utils @@ -1893,22 +1893,22 @@ class WM_OT_theme_install(Operator): bl_label = "Install Theme..." overwrite = BoolProperty( - name="Overwrite", - description="Remove existing theme file if exists", - default=True, - ) + name="Overwrite", + description="Remove existing theme file if exists", + default=True, + ) filepath = StringProperty( - subtype='FILE_PATH', - ) + subtype='FILE_PATH', + ) filter_folder = BoolProperty( - name="Filter folders", - default=True, - options={'HIDDEN'}, - ) + name="Filter folders", + default=True, + options={'HIDDEN'}, + ) filter_glob = StringProperty( - default="*.xml", - options={'HIDDEN'}, - ) + default="*.xml", + options={'HIDDEN'}, + ) def execute(self, context): import os @@ -1970,33 +1970,33 @@ class WM_OT_addon_install(Operator): bl_label = "Install Add-on from File..." overwrite = BoolProperty( - name="Overwrite", - description="Remove existing add-ons with the same ID", - default=True, - ) + name="Overwrite", + description="Remove existing add-ons with the same ID", + default=True, + ) target = EnumProperty( - name="Target Path", - items=(('DEFAULT', "Default", ""), - ('PREFS', "User Prefs", "")), - ) + name="Target Path", + items=(('DEFAULT', "Default", ""), + ('PREFS', "User Prefs", "")), + ) filepath = StringProperty( - subtype='FILE_PATH', - ) + subtype='FILE_PATH', + ) filter_folder = BoolProperty( - name="Filter folders", - default=True, - options={'HIDDEN'}, - ) + name="Filter folders", + default=True, + options={'HIDDEN'}, + ) filter_python = BoolProperty( - name="Filter python", - default=True, - options={'HIDDEN'}, - ) + name="Filter python", + default=True, + options={'HIDDEN'}, + ) filter_glob = StringProperty( - default="*.py;*.zip", - options={'HIDDEN'}, - ) + default="*.py;*.zip", + options={'HIDDEN'}, + ) def execute(self, context): import addon_utils @@ -2124,9 +2124,9 @@ class WM_OT_addon_remove(Operator): bl_label = "Remove Add-on" module = StringProperty( - name="Module", - description="Module name of the add-on to remove", - ) + name="Module", + description="Module name of the add-on to remove", + ) @staticmethod def path_from_addon(module): @@ -2184,9 +2184,9 @@ class WM_OT_addon_expand(Operator): bl_options = {'INTERNAL'} module = StringProperty( - name="Module", - description="Module name of the add-on to expand", - ) + name="Module", + description="Module name of the add-on to expand", + ) def execute(self, context): import addon_utils @@ -2208,9 +2208,9 @@ class WM_OT_addon_userpref_show(Operator): bl_options = {'INTERNAL'} module = StringProperty( - name="Module", - description="Module name of the add-on to expand", - ) + name="Module", + description="Module name of the add-on to expand", + ) def execute(self, context): import addon_utils @@ -2239,23 +2239,23 @@ class WM_OT_app_template_install(Operator): bl_label = "Install Template from File..." overwrite = BoolProperty( - name="Overwrite", - description="Remove existing template with the same ID", - default=True, - ) + name="Overwrite", + description="Remove existing template with the same ID", + default=True, + ) filepath = StringProperty( - subtype='FILE_PATH', - ) + subtype='FILE_PATH', + ) filter_folder = BoolProperty( - name="Filter folders", - default=True, - options={'HIDDEN'}, - ) + name="Filter folders", + default=True, + options={'HIDDEN'}, + ) filter_glob = StringProperty( - default="*.zip", - options={'HIDDEN'}, - ) + default="*.zip", + options={'HIDDEN'}, + ) def execute(self, context): import traceback |