diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-05-14 17:32:38 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-05-14 17:32:38 +0300 |
commit | fa23e313f1c0fcb8a40036502ee7ff952df9ce82 (patch) | |
tree | 68947f95dc1010125c6857b6f84f3f07059e4502 /release | |
parent | bd80c216355655830bde7f4b569b554dbd34d575 (diff) | |
parent | e58525706328f902baaa0252cb28b4a33534259c (diff) |
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py | 46 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 3 |
2 files changed, 47 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py b/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py new file mode 100644 index 00000000000..62c1edbee85 --- /dev/null +++ b/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py @@ -0,0 +1,46 @@ +# Initialization script for 2D Animation template + +import bpy +from bpy.app.handlers import persistent + + +@persistent +def load_handler(dummy): + import bpy + + # 2D Animation + screen = bpy.data.screens['2D Animation'] + if screen: + for area in screen.areas: + # Set Tool settings as default in properties panel. + if area.type == 'PROPERTIES': + for space in area.spaces: + if space.type != 'PROPERTIES': + continue + space.context = 'TOOL' + + # Open sidebar in Dopesheet. + elif area.type == 'DOPESHEET_EDITOR': + for space in area.spaces: + if space.type != 'DOPESHEET_EDITOR': + continue + space.show_region_ui = True + + # 2D Full Canvas + screen = bpy.data.screens['2D Full Canvas'] + if screen: + for area in screen.areas: + if area.type == 'VIEW_3D': + for space in area.spaces: + if space.type != 'VIEW_3D': + continue + space.shading.type = 'MATERIAL' + space.shading.use_scene_world = 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_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index c6f6c7e007d..83144b33c67 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1324,6 +1324,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_select(Panel, View3DPanel, GreasePenci class VIEW3D_PT_tools_grease_pencil_brush_settings(Panel, View3DPanel, GreasePencilPaintPanel): bl_label = "Brush Settings" + bl_options = {'DEFAULT_CLOSED'} # What is the point of brush presets? Seems to serve the exact same purpose as brushes themselves?? def draw_header_preset(self, _context): @@ -1993,7 +1994,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_mixcolor(View3DPanel, Panel): bl_context = ".greasepencil_paint" bl_label = "Color" bl_category = "Tool" - bl_options = {'DEFAULT_CLOSED'} @classmethod def poll(cls, context): @@ -2053,7 +2053,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_mix_palette(View3DPanel, Panel): bl_label = "Palette" bl_category = "Tool" bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_mixcolor' - bl_options = {'DEFAULT_CLOSED'} @classmethod def poll(cls, context): |