[Bf-blender-cvs] [238d30169f3] blender2.8: Templates: tweaks to startup templates, add sculpting template.

Brecht Van Lommel noreply at git.blender.org
Mon Oct 1 17:36:19 CEST 2018


Commit: 238d30169f35cd820379890e5b1d047ea89c06a5
Author: Brecht Van Lommel
Date:   Mon Oct 1 16:38:14 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB238d30169f35cd820379890e5b1d047ea89c06a5

Templates: tweaks to startup templates, add sculpting template.

===================================================================

M	release/datafiles/startup.blend
M	release/scripts/startup/bl_app_templates_system/2D_Animation/startup.blend
A	release/scripts/startup/bl_app_templates_system/Sculpting/__init__.py
A	release/scripts/startup/bl_app_templates_system/Sculpting/startup.blend
M	release/scripts/startup/bl_app_templates_system/VFX/startup.blend
M	release/scripts/startup/bl_app_templates_system/Video_Editing/startup.blend
M	release/scripts/startup/bl_operators/wm.py
M	source/blender/blenloader/intern/versioning_defaults.c

===================================================================

diff --git a/release/datafiles/startup.blend b/release/datafiles/startup.blend
index 8caec075138..c37e1199e58 100644
Binary files a/release/datafiles/startup.blend and b/release/datafiles/startup.blend differ
diff --git a/release/scripts/startup/bl_app_templates_system/2D_Animation/startup.blend b/release/scripts/startup/bl_app_templates_system/2D_Animation/startup.blend
index 3f77afa4037..70fbe1baae6 100644
Binary files a/release/scripts/startup/bl_app_templates_system/2D_Animation/startup.blend and b/release/scripts/startup/bl_app_templates_system/2D_Animation/startup.blend differ
diff --git a/release/scripts/startup/bl_app_templates_system/Sculpting/__init__.py b/release/scripts/startup/bl_app_templates_system/Sculpting/__init__.py
new file mode 100644
index 00000000000..73fbfa7c7b0
--- /dev/null
+++ b/release/scripts/startup/bl_app_templates_system/Sculpting/__init__.py
@@ -0,0 +1,24 @@
+
+import bpy
+from bpy.app.handlers import persistent
+
+
+ at persistent
+def load_handler(dummy):
+    import bpy
+    if bpy.data.filepath == "":
+        # Apply subdivision modifier on startup
+        bpy.ops.object.mode_set(mode='OBJECT')
+        bpy.ops.object.modifier_apply(modifier="Subdivision")
+        bpy.ops.object.mode_set(mode='EDIT')
+        bpy.ops.transform.tosphere(value=1.0)
+        bpy.ops.object.mode_set(mode='SCULPT')
+
+def register():
+    import bpy
+    bpy.app.handlers.load_post.append(load_handler)
+
+def unregister():
+    import bpy
+    bpy.app.handlers.load_post.remove(load_handler)
+
diff --git a/release/scripts/startup/bl_app_templates_system/Sculpting/startup.blend b/release/scripts/startup/bl_app_templates_system/Sculpting/startup.blend
new file mode 100644
index 00000000000..720f1d50a6d
Binary files /dev/null and b/release/scripts/startup/bl_app_templates_system/Sculpting/startup.blend differ
diff --git a/release/scripts/startup/bl_app_templates_system/VFX/startup.blend b/release/scripts/startup/bl_app_templates_system/VFX/startup.blend
index c2cef4e1cdf..43224a7d869 100644
Binary files a/release/scripts/startup/bl_app_templates_system/VFX/startup.blend and b/release/scripts/startup/bl_app_templates_system/VFX/startup.blend differ
diff --git a/release/scripts/startup/bl_app_templates_system/Video_Editing/startup.blend b/release/scripts/startup/bl_app_templates_system/Video_Editing/startup.blend
index 84c3c66f861..8718e2b06b9 100644
Binary files a/release/scripts/startup/bl_app_templates_system/Video_Editing/startup.blend and b/release/scripts/startup/bl_app_templates_system/Video_Editing/startup.blend differ
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 528e1a5f336..52b645685ba 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -2576,6 +2576,7 @@ class WM_MT_splash(Menu):
         #userpref = context.user_preferences
         #sub.prop(userpref.system, "language", text="")
 
+        col.label()
         col.label()
 
         layout.label()
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index a741d0ecc1f..1369c943de9 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -141,6 +141,7 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
 	/* For all builtin templates shipped with Blender. */
 	bool builtin_template = !app_template ||
 	                        STREQ(app_template, "2D_Animation") ||
+	                        STREQ(app_template, "Sculpting") ||
 	                        STREQ(app_template, "VFX") ||
 	                        STREQ(app_template, "Video_Editing");



More information about the Bf-blender-cvs mailing list