-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
71 lines (52 loc) · 2.03 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# SPDX-FileCopyrightText: 2020-2023 Blender Authors
#
# SPDX-License-Identifier: GPL-2.0-or-later
# Custom template works best with lockview, ERF-levelbuddy and ERF-Gridsnapper
#link to lockview https://gist.github.com/Fweeb/bb61c15139bff338cb17
#link to ERF-levelbuddy https://github.com/EvilReFlex/ERF_LevelBuddyBlender
#link to ERF-Gridsnapper https://discord.gg/bGmQvbKV
import bpy
from bpy.app.handlers import persistent
def update_factory_startup_screens():
# Map Making kinda like the hammer editor
screen = bpy.data.screens["Map Making"]
@persistent
def load_handler(dummy):
pass
def register():
bpy.app.handlers.load_factory_startup_post.append(load_handler)
def unregister():
bpy.app.handlers.load_factory_startup_post.remove(load_handler)
''' for area in screen.areas:
if area.type == 'PROPERTIES':
# Set Tool settings as default in properties panel.
space = area.spaces.active
space.context = 'TOOL'
elif area.type == 'DOPESHEET_EDITOR':
# Open sidebar in Dope-sheet.
space = area.spaces.active
space.show_region_ui = True
# 2D Full Canvas.
screen = bpy.data.screens["2D Full Canvas"]
for area in screen.areas:
if area.type == 'VIEW_3D':
space = area.spaces.active
space.shading.type = 'MATERIAL'
space.shading.use_scene_world = True
def update_factory_startup_scenes():
for scene in bpy.data.scenes:
scene.tool_settings.use_keyframe_insert_auto = True
scene.tool_settings.gpencil_sculpt.use_scale_thickness = True
def update_factory_startup_grease_pencils():
for gpd in bpy.data.grease_pencils:
gpd.onion_keyframe_type = 'ALL'
@persistent
def load_handler(_):
update_factory_startup_screens()
update_factory_startup_scenes()
update_factory_startup_grease_pencils()
def register():
bpy.app.handlers.load_factory_startup_post.append(load_handler)
def unregister():
bpy.app.handlers.load_factory_startup_post.remove(load_handler)
'''