diff options
Diffstat (limited to 'release/scripts')
10 files changed, 23 insertions, 17 deletions
diff --git a/release/scripts/startup/bl_app_templates_system/Sculpting/__init__.py b/release/scripts/startup/bl_app_templates_system/Sculpting/__init__.py index bf32d6672ca..4d1361ed22a 100644 --- a/release/scripts/startup/bl_app_templates_system/Sculpting/__init__.py +++ b/release/scripts/startup/bl_app_templates_system/Sculpting/__init__.py @@ -35,8 +35,10 @@ def load_handler(dummy): bpy.ops.mesh.subdivide(number_cuts=6, smoothness=1.0) bpy.ops.object.mode_set(mode='SCULPT') + def register(): bpy.app.handlers.load_factory_startup_post.append(load_handler) + def unregister(): bpy.app.handlers.load_factory_startup_post.remove(load_handler) diff --git a/release/scripts/startup/bl_app_templates_system/Video_Editing/__init__.py b/release/scripts/startup/bl_app_templates_system/Video_Editing/__init__.py index 4c769c69165..bfad66ec6cd 100644 --- a/release/scripts/startup/bl_app_templates_system/Video_Editing/__init__.py +++ b/release/scripts/startup/bl_app_templates_system/Video_Editing/__init__.py @@ -31,8 +31,10 @@ def load_handler(dummy): params = space.params params.use_filter_folder = True + def register(): bpy.app.handlers.load_factory_startup_post.append(load_handler) + def unregister(): bpy.app.handlers.load_factory_startup_post.remove(load_handler) diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py index f2124c094a7..c05ee01c72d 100644 --- a/release/scripts/startup/bl_operators/object.py +++ b/release/scripts/startup/bl_operators/object.py @@ -324,15 +324,15 @@ class ShapeTransfer(Operator): ('OFFSET', "Offset", "Apply the relative positional offset", - ), + ), ('RELATIVE_FACE', "Relative Face", "Calculate relative position (using faces)", - ), + ), ('RELATIVE_EDGE', "Relative Edge", "Calculate relative position (using edges)", - ), + ), ), name="Transformation Mode", description="Relative shape positions to the new shape method", diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py index 35807761567..14b96e1d5c1 100644 --- a/release/scripts/startup/bl_operators/object_quick_effects.py +++ b/release/scripts/startup/bl_operators/object_quick_effects.py @@ -46,11 +46,13 @@ def object_ensure_material(obj, mat_name): obj.data.materials.append(mat) return mat + class ObjectModeOperator: @classmethod def poll(cls, context): return context.mode == 'OBJECT' + class QuickFur(ObjectModeOperator, Operator): bl_idname = "object.quick_fur" bl_label = "Quick Fur" @@ -507,10 +509,11 @@ class QuickFluid(ObjectModeOperator, Operator): # and scale with initial velocity v = 0.5 * self.initial_velocity obj.location = 0.5 * (max_co + min_co) + Vector((0.0, 0.0, -1.0)) + v - obj.scale = (0.5 * (max_co - min_co) + - Vector((1.0, 1.0, 2.0)) + - Vector((abs(v[0]), abs(v[1]), abs(v[2]))) - ) + obj.scale = ( + 0.5 * (max_co - min_co) + + Vector((1.0, 1.0, 2.0)) + + Vector((abs(v[0]), abs(v[1]), abs(v[2]))) + ) # setup smoke domain bpy.ops.object.modifier_add(type='FLUID_SIMULATION') diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py index 58c915ce029..528513aa301 100644 --- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py +++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py @@ -583,10 +583,10 @@ def packIslands(islandList): w, h = maxx - minx, maxy - miny if USER_ISLAND_MARGIN: - minx -= USER_ISLAND_MARGIN * w/2 - miny -= USER_ISLAND_MARGIN * h/2 - maxx += USER_ISLAND_MARGIN * w/2 - maxy += USER_ISLAND_MARGIN * h/2 + minx -= USER_ISLAND_MARGIN * w / 2 + miny -= USER_ISLAND_MARGIN * h / 2 + maxx += USER_ISLAND_MARGIN * w / 2 + maxy += USER_ISLAND_MARGIN * h / 2 # recalc width and height w, h = maxx - minx, maxy - miny diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index c6f79d49d41..de811d42e00 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1423,7 +1423,6 @@ class WM_OT_sysinfo(Operator): return {'RUNNING_MODAL'} - class WM_OT_operator_cheat_sheet(Operator): """List all the Operators in a text-block, useful for scripting""" bl_idname = "wm.operator_cheat_sheet" @@ -1484,7 +1483,6 @@ class WM_OT_owner_disable(Operator): return {'FINISHED'} - class WM_OT_tool_set_by_id(Operator): """Set the tool by name (for keymaps)""" bl_idname = "wm.tool_set_by_id" @@ -1666,7 +1664,7 @@ class WM_MT_splash(Menu): # Draw setup screen if no preferences have been saved yet. import os - userconfig_path = bpy.utils.user_resource('CONFIG'); + userconfig_path = bpy.utils.user_resource('CONFIG') userdef_path = os.path.join(userconfig_path, "userpref.blend") if not os.path.isfile(userdef_path): diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py index e80f104b393..4e10ac205bf 100644 --- a/release/scripts/startup/bl_ui/properties_data_armature.py +++ b/release/scripts/startup/bl_ui/properties_data_armature.py @@ -26,6 +26,7 @@ from .properties_animviz import ( MotionPathButtonsPanel_display, ) + class ArmatureButtonsPanel: bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index 8cae779469a..84fe9fb1f3e 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -386,6 +386,7 @@ class DATA_PT_camera_display(CameraButtonsPanel, Panel): col = flow.column() col.prop(cam, "show_name", text="Name") + class DATA_PT_camera_display_composition_guides(CameraButtonsPanel, Panel): bl_label = "Composition Guides" bl_parent_id = "DATA_PT_camera_display" diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 42953a05ca6..16bc3ad29fa 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -121,15 +121,13 @@ class _defs_view3d_generic: else: kmi_add = None kmi_remove = None - return ( - tip_( + return tip_( "Measure distance and angles.\n" "\u2022 {} anywhere for new measurement.\n" "\u2022 Drag ruler segment to measure an angle.\n" "\u2022 {} to remove the active ruler.\n" "\u2022 Ctrl while dragging to snap.\n" "\u2022 Shift while dragging to measure surface thickness." - ) ).format( kmi_to_string_or_none(kmi_add), kmi_to_string_or_none(kmi_remove), diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 21b423923df..81c98740652 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -5862,6 +5862,7 @@ class VIEW3D_PT_sculpt_context_menu(Panel): if capabilities.has_height: layout.prop(brush, "height", slider=True, text="Height") + class TOPBAR_PT_gpencil_materials(GreasePencilMaterialsPanel, Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'HEADER' |