Templates: tweaks to startup templates, add sculpting template.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 1 Oct 2018 14:38:14 +0000 (16:38 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 1 Oct 2018 15:32:59 +0000 (17:32 +0200)
release/datafiles/startup.blend
release/scripts/startup/bl_app_templates_system/2D_Animation/startup.blend
release/scripts/startup/bl_app_templates_system/Sculpting/__init__.py [new file with mode: 0644]
release/scripts/startup/bl_app_templates_system/Sculpting/startup.blend [new file with mode: 0644]
release/scripts/startup/bl_app_templates_system/VFX/startup.blend
release/scripts/startup/bl_app_templates_system/Video_Editing/startup.blend
release/scripts/startup/bl_operators/wm.py
source/blender/blenloader/intern/versioning_defaults.c

index 8caec075138449519d326a988049172d789a8d42..c37e1199e588f777794bfaba246c7e308f1c5b77 100644 (file)
Binary files a/release/datafiles/startup.blend and b/release/datafiles/startup.blend differ
index 3f77afa4037cec85cf8fb6fdc1e898081a0ac15c..70fbe1baae6848ab82e9e942b58c8f6645f8e8fb 100644 (file)
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 (file)
index 0000000..73fbfa7
--- /dev/null
@@ -0,0 +1,24 @@
+
+import bpy
+from bpy.app.handlers import persistent
+
+
+@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 (file)
index 0000000..720f1d5
Binary files /dev/null and b/release/scripts/startup/bl_app_templates_system/Sculpting/startup.blend differ
index c2cef4e1cdf881e2ee8b07a22cbaef9dee9b82b7..43224a7d8694d0e04c0aa0453d98dcfb6b174008 100644 (file)
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
index 84c3c66f861e8235daf97a58b4e14dbcae017335..8718e2b06b9be4720f61f11e93027d6ee2b3f825 100644 (file)
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
index 528e1a5f336e35c14271463abc1666aa4eae1ac5..52b645685baf21b27d873baaf28e4766ff7ba4d6 100644 (file)
@@ -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()
index a741d0ecc1f7782b1fd901b56fd857eb51577ab6..1369c943de90c42be6ea4bf57c8a52d05730b935 100644 (file)
@@ -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");