Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release')
-rw-r--r--release/environment-mswindows36
-rw-r--r--release/scripts/modules/bpy_extras/__init__.py31
-rw-r--r--release/scripts/modules/bpy_extras/image_utils.py (renamed from release/scripts/modules/image_utils.py)0
-rw-r--r--release/scripts/modules/bpy_extras/io_utils.py (renamed from release/scripts/modules/io_utils.py)0
-rw-r--r--release/scripts/modules/bpy_extras/mesh_utils.py (renamed from release/scripts/modules/mesh_utils.py)0
-rw-r--r--release/scripts/modules/bpy_extras/object_utils.py (renamed from release/scripts/modules/add_object_utils.py)0
-rw-r--r--release/scripts/modules/bpy_extras/view3d_utils.py121
-rw-r--r--release/scripts/startup/bl_operators/add_mesh_torus.py4
-rw-r--r--release/scripts/startup/bl_ui/__init__.py3
-rw-r--r--release/scripts/startup/bl_ui/properties_data_camera.py1
-rw-r--r--release/scripts/startup/bl_ui/properties_data_empty.py11
-rw-r--r--release/scripts/startup/bl_ui/properties_data_mesh.py5
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py4
-rw-r--r--release/scripts/startup/bl_ui/space_image.py3
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py7
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py3
-rw-r--r--release/scripts/templates/operator_export.py2
-rw-r--r--release/scripts/templates/operator_mesh_add.py4
-rw-r--r--release/windows/installer/00.sconsblender.nsi522
19 files changed, 465 insertions, 292 deletions
diff --git a/release/environment-mswindows b/release/environment-mswindows
index f8890f89af8..41308533e0b 100644
--- a/release/environment-mswindows
+++ b/release/environment-mswindows
@@ -1,18 +1,18 @@
-# This is a Blender Environment Variable config file.
-#
-# Comment lines start with "#", other lines will be split at the "="
-# and the part before will be used as env var name and the part after
-# as env var value. The value can make reference to previous or
-# prelaunch variables with "%%" and the content will be replaced.
-# Once set, values of variables will not be overwritten.
-#
-# BLENDER_SHARE should be COMMON_APPDATA\\Blender Foundation\\Blender for typical installs.
-# BLENDER_VERSION will be set by the program before processing this file.
-BLENDER_USER_BASE=%USERPROFILE%\\Blender Foundation\\Blender\\%BLENDER_VERSION%
-BLENDER_SYSTEM_BASE=%BLENDER_SHARE%\\%BLENDER_VERSION%
-BLENDER_USER_DATAFILES=%USERPROFILE%\\Blender Foundation\\%BLENDER_VERSION%\\datafiles
-BLENDER_SYSTEM_DATAFILES=%BLENDER_SHARE%\\%BLENDER_VERSION%\\datafiles
-BLENDER_USER_PY=%USERPROFILE%\\Blender Foundation\\%BLENDER_VERSION%\\py
-BLENDER_SYSTEM_PY=%BLENDER_SHARE%\\%BLENDER_VERSION%\\py
-BLENDER_USER_PLUGINS=%USERPROFILE%\\Blender Foundation\\%BLENDER_VERSION%\\plugins
-BLENDER_SYSTEM_PLUGINS=%BLENDER_SHARE%\\%BLENDER_VERSION%\\plugins
+# This is a Blender Environment Variable config file.
+#
+# Comment lines start with "#", other lines will be split at the "="
+# and the part before will be used as env var name and the part after
+# as env var value. The value can make reference to previous or
+# prelaunch variables with "%%" and the content will be replaced.
+# Once set, values of variables will not be overwritten.
+#
+# BLENDER_SHARE should be COMMON_APPDATA\\Blender Foundation\\Blender for typical installs.
+# BLENDER_VERSION will be set by the program before processing this file.
+BLENDER_USER_BASE=%USERPROFILE%\\Blender Foundation\\Blender\\%BLENDER_VERSION%
+BLENDER_SYSTEM_BASE=%BLENDER_SHARE%\\%BLENDER_VERSION%
+BLENDER_USER_DATAFILES=%USERPROFILE%\\Blender Foundation\\%BLENDER_VERSION%\\datafiles
+BLENDER_SYSTEM_DATAFILES=%BLENDER_SHARE%\\%BLENDER_VERSION%\\datafiles
+BLENDER_USER_PY=%USERPROFILE%\\Blender Foundation\\%BLENDER_VERSION%\\py
+BLENDER_SYSTEM_PY=%BLENDER_SHARE%\\%BLENDER_VERSION%\\py
+BLENDER_USER_PLUGINS=%USERPROFILE%\\Blender Foundation\\%BLENDER_VERSION%\\plugins
+BLENDER_SYSTEM_PLUGINS=%BLENDER_SHARE%\\%BLENDER_VERSION%\\plugins
diff --git a/release/scripts/modules/bpy_extras/__init__.py b/release/scripts/modules/bpy_extras/__init__.py
new file mode 100644
index 00000000000..e124d3c5b3d
--- /dev/null
+++ b/release/scripts/modules/bpy_extras/__init__.py
@@ -0,0 +1,31 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+
+"""
+Utility modules assosiated with the bpy module.
+"""
+
+__all__ = (
+ "object_utils",
+ "io_utils",
+ "image_utils",
+ "mesh_utils",
+ "view3d_utils",
+) \ No newline at end of file
diff --git a/release/scripts/modules/image_utils.py b/release/scripts/modules/bpy_extras/image_utils.py
index 39e49ee1f96..39e49ee1f96 100644
--- a/release/scripts/modules/image_utils.py
+++ b/release/scripts/modules/bpy_extras/image_utils.py
diff --git a/release/scripts/modules/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py
index 820d7cfa39d..820d7cfa39d 100644
--- a/release/scripts/modules/io_utils.py
+++ b/release/scripts/modules/bpy_extras/io_utils.py
diff --git a/release/scripts/modules/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py
index 5bacff7b0cc..5bacff7b0cc 100644
--- a/release/scripts/modules/mesh_utils.py
+++ b/release/scripts/modules/bpy_extras/mesh_utils.py
diff --git a/release/scripts/modules/add_object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py
index 1cf7fc2f4d5..1cf7fc2f4d5 100644
--- a/release/scripts/modules/add_object_utils.py
+++ b/release/scripts/modules/bpy_extras/object_utils.py
diff --git a/release/scripts/modules/bpy_extras/view3d_utils.py b/release/scripts/modules/bpy_extras/view3d_utils.py
new file mode 100644
index 00000000000..0e21eab7717
--- /dev/null
+++ b/release/scripts/modules/bpy_extras/view3d_utils.py
@@ -0,0 +1,121 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+
+
+def _is_persp_matrix(persmat, eps=0.00001):
+ """
+ crummy way to check if its a perspective matrix
+ """
+ return not (
+ abs(persmat[0][3]) < eps and \
+ abs(persmat[1][3]) < eps and \
+ abs(persmat[2][3]) < eps and \
+ abs(persmat[3][3] - 1.0) < eps)
+
+
+def region_2d_to_vector_3d(region, rv3d, coord):
+ """
+ Return a direction vector from the viewport at the spesific 2d region
+ coordinate.
+
+ :arg region: region of the 3D viewport, typically bpy.context.region.
+ :type region: :class:`Region`
+ :arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
+ :type rv3d: :class:`RegionView3D`
+ :arg coord: 2d coordinates relative to the region;
+ (event.mouse_region_x, event.mouse_region_y) for example.
+ :type coord: 2d vector
+ :return: normalized 3d vector.
+ :rtype: :class:`Vector`
+ """
+ from mathutils import Vector
+
+ persmat = rv3d.perspective_matrix.copy()
+ viewvec = rv3d.view_matrix.inverted()[2].xyz.normalized()
+
+ if _is_persp_matrix(persmat):
+ dx = (2.0 * coord[0] / region.width) - 1.0
+ dy = (2.0 * coord[1] / region.height) - 1.0
+
+ perspinv_x, perspinv_y = persmat.inverted().to_3x3()[0:2]
+ return ((perspinv_x * dx + perspinv_y * dy) - viewvec).normalized()
+ else:
+ return viewvec
+
+
+def region_2d_to_location_3d(region, rv3d, coord, depth_location):
+ """
+ Return a 3d location from the region relative 2d coords, aligned with
+ *depth_location*.
+
+ :arg region: region of the 3D viewport, typically bpy.context.region.
+ :type region: :class:`Region`
+ :arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
+ :type rv3d: :class:`RegionView3D`
+ :arg coord: 2d coordinates relative to the region;
+ (event.mouse_region_x, event.mouse_region_y) for example.
+ :type coord: 2d vector
+ :arg depth_location: the returned vectors depth is aligned with this since
+ there is no defined depth with a 2d region input.
+ :type depth_location: 3d vector
+ :return: normalized 3d vector.
+ :rtype: :class:`Vector`
+ """
+ from mathutils.geometry import intersect_point_line
+
+ persmat = rv3d.perspective_matrix.copy()
+
+ if _is_persp_matrix(persmat):
+ origin_start = rv3d.view_matrix.inverted()[3].to_3d()
+ else:
+ dx = (2.0 * coord[0] / region.width) - 1.0
+ dy = (2.0 * coord[1] / region.height) - 1.0
+ persinv = persmat.inverted()
+ viewinv = rv3d.view_matrix.inverted()
+ origin_start = (persinv[0].xyz * dx) + (persinv[1].xyz * dy) + viewinv[3].xyz
+
+ origin_end = origin_start + region_2d_to_vector_3d(region, rv3d, coord)
+
+ return intersect_point_line(depth_location, origin_start, origin_end)[0]
+
+
+def location_3d_to_region_2d(region, rv3d, coord):
+ """
+ Return the *region* relative 2d location of a 3d position.
+
+ :arg region: region of the 3D viewport, typically bpy.context.region.
+ :type region: :class:`Region`
+ :arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
+ :type rv3d: :class:`RegionView3D`
+ :arg coord: 3d worldspace location.
+ :type coord: 3d vector
+ :return: 2d location
+ :rtype: :class:`Vector`
+ """
+ prj = Vector((coord[0], coord[1], coord[2], 1.0)) * rv3d.perspective_matrix
+ if prj.w > 0.0:
+ width_half = region.width / 2.0
+ height_half = region.height / 2.0
+
+ return Vector((width_half + width_half * (prj.x / prj.w),
+ height_half + height_half * (prj.y / prj.w),
+ ))
+ else:
+ return None
diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py
index 460330a56a1..6ab803cc469 100644
--- a/release/scripts/startup/bl_operators/add_mesh_torus.py
+++ b/release/scripts/startup/bl_operators/add_mesh_torus.py
@@ -132,7 +132,7 @@ class AddTorus(bpy.types.Operator):
mesh.faces.foreach_set("vertices_raw", faces)
mesh.update()
- import add_object_utils
- add_object_utils.object_data_add(context, mesh, operator=self)
+ from bpy_extras import object_utils
+ object_utils.object_data_add(context, mesh, operator=self)
return {'FINISHED'}
diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py
index 5c565fbd300..2f933fb5771 100644
--- a/release/scripts/startup/bl_ui/__init__.py
+++ b/release/scripts/startup/bl_ui/__init__.py
@@ -102,7 +102,8 @@ def register():
('Render', "Render", ""),
('Rigging', "Rigging", ""),
('Text Editor', "Text Editor", ""),
- ('System', "System", "")
+ ('System', "System", ""),
+ ('Other', "Other", ""),
],
name="Category",
description="Filter add-ons by category",
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index e5076fd20d5..80cd5227fca 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -127,6 +127,7 @@ class DATA_PT_camera_display(CameraButtonsPanel, bpy.types.Panel):
col.prop(cam, "show_mist", text="Mist")
col.prop(cam, "show_title_safe", text="Title Safe")
col.prop(cam, "show_name", text="Name")
+ col.prop_menu_enum(cam, "show_guide")
col = split.column()
col.prop(cam, "draw_size", text="Size")
diff --git a/release/scripts/startup/bl_ui/properties_data_empty.py b/release/scripts/startup/bl_ui/properties_data_empty.py
index e46cd1270ad..80f83e7fabe 100644
--- a/release/scripts/startup/bl_ui/properties_data_empty.py
+++ b/release/scripts/startup/bl_ui/properties_data_empty.py
@@ -39,6 +39,17 @@ class DATA_PT_empty(DataButtonsPanel, bpy.types.Panel):
ob = context.object
layout.prop(ob, "empty_draw_type", text="Display")
+
+ if ob.empty_draw_type == 'IMAGE':
+ # layout.template_image(ob, "data", None)
+ layout.template_ID(ob, "data", open="image.open", unlink="image.unlink")
+
+ row = layout.row(align = True)
+ row.prop(ob, "color", text="Transparency", index=3, slider=True)
+ row = layout.row(align = True)
+ row.prop(ob, "empty_image_offset", text="Offset X", index=0)
+ row.prop(ob, "empty_image_offset", text="Offset Y", index=1)
+
layout.prop(ob, "empty_draw_size", text="Size")
if __name__ == "__main__": # only for live edit.
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index b1d1789fadd..7097988d25b 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -46,6 +46,8 @@ class MESH_MT_shape_key_specials(bpy.types.Menu):
layout.operator("object.shape_key_transfer", icon='COPY_ID') # icon is not ideal
layout.operator("object.join_shapes", icon='COPY_ID') # icon is not ideal
layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT')
+ op = layout.operator("object.shape_key_add", icon='ZOOMIN', text="New Shape From Mix")
+ op.from_mix = True
class MeshButtonsPanel():
@@ -193,7 +195,8 @@ class DATA_PT_shape_keys(MeshButtonsPanel, bpy.types.Panel):
col = row.column()
sub = col.column(align=True)
- sub.operator("object.shape_key_add", icon='ZOOMIN', text="")
+ op = sub.operator("object.shape_key_add", icon='ZOOMIN', text="")
+ op.from_mix = False
sub.operator("object.shape_key_remove", icon='ZOOMOUT', text="")
sub.menu("MESH_MT_shape_key_specials", icon='DOWNARROW_HLT', text="")
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 27af84dbcfb..75069993521 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -219,7 +219,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
col.label(text="Texture Coordinates:")
col.prop(md, "texture_coords", text="")
if md.texture_coords == 'OBJECT':
- layout.prop(md, "texture_coordinate_object", text="Object")
+ layout.prop(md, "texture_coords_object", text="Object")
elif md.texture_coords == 'UV' and ob.type == 'MESH':
layout.prop_search(md, "uv_layer", ob.data, "uv_textures")
@@ -673,7 +673,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
col.prop(md, "texture_coords", text="")
if md.texture_coords == 'OBJECT':
- layout.prop(md, "texture_coordinate_object", text="Object")
+ layout.prop(md, "texture_coords_object", text="Object")
elif md.texture_coords == 'UV' and ob.type == 'MESH':
layout.prop_search(md, "uv_layer", ob.data, "uv_textures")
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 77583b80824..44a1c814e28 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -436,7 +436,8 @@ class IMAGE_PT_game_properties(bpy.types.Panel):
def poll(cls, context):
rd = context.scene.render
sima = context.space_data
- return (sima and sima.image) and (rd.engine == 'BLENDER_GAME')
+ # display even when not in game mode because these settings effect the 3d view
+ return (sima and sima.image) # and (rd.engine == 'BLENDER_GAME')
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 2079aef6402..858c619d3c1 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -213,6 +213,7 @@ class SEQUENCER_MT_add_effect(bpy.types.Menu):
layout.operator("sequencer.effect_strip_add", text="Color").type = 'COLOR'
layout.operator("sequencer.effect_strip_add", text="Speed Control").type = 'SPEED'
layout.operator("sequencer.effect_strip_add", text="Multicam Selector").type = 'MULTICAM'
+ layout.operator("sequencer.effect_strip_add", text="Adjustment Layer").type = 'ADJUSTMENT'
class SEQUENCER_MT_strip(bpy.types.Menu):
@@ -391,7 +392,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel):
'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
'PLUGIN',
'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED',
- 'MULTICAM'}
+ 'MULTICAM', 'ADJUSTMENT'}
def draw(self, context):
layout = self.layout
@@ -530,7 +531,7 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, bpy.types.Panel):
'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
'PLUGIN',
'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
- 'MULTICAM', 'SPEED'}
+ 'MULTICAM', 'SPEED', 'ADJUSTMENT'}
def draw(self, context):
layout = self.layout
@@ -680,7 +681,7 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, bpy.types.Panel):
'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
'PLUGIN',
'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
- 'MULTICAM', 'SPEED'}
+ 'MULTICAM', 'SPEED', 'ADJUSTMENT'}
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 7d31bc39b0a..e6ce1d4c179 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2024,6 +2024,9 @@ class VIEW3D_PT_view3d_properties(bpy.types.Panel):
elif not view.lock_object:
col.prop(view, "lock_cursor", text="Lock to Cursor")
+ col = layout.column()
+ col.prop(view, "lock_camera")
+
col = layout.column(align=True)
col.label(text="Clip:")
col.prop(view, "clip_start", text="Start")
diff --git a/release/scripts/templates/operator_export.py b/release/scripts/templates/operator_export.py
index 1b1c90c8a21..4cf943a53b7 100644
--- a/release/scripts/templates/operator_export.py
+++ b/release/scripts/templates/operator_export.py
@@ -12,7 +12,7 @@ def write_some_data(context, filepath, use_some_setting):
# ExportHelper is a helper class, defines filename and
# invoke() function which calls the file selector.
-from io_utils import ExportHelper
+from bpy_extras.io_utils import ExportHelper
from bpy.props import StringProperty, BoolProperty, EnumProperty
diff --git a/release/scripts/templates/operator_mesh_add.py b/release/scripts/templates/operator_mesh_add.py
index 65b08eebb4e..10d23a6712d 100644
--- a/release/scripts/templates/operator_mesh_add.py
+++ b/release/scripts/templates/operator_mesh_add.py
@@ -80,8 +80,8 @@ class AddBox(bpy.types.Operator):
mesh.update()
# add the mesh as an object into the scene with this utility module
- import add_object_utils
- add_object_utils.object_data_add(context, mesh, operator=self)
+ from bpy_extras import object_utils
+ object_utils.object_data_add(context, mesh, operator=self)
return {'FINISHED'}
diff --git a/release/windows/installer/00.sconsblender.nsi b/release/windows/installer/00.sconsblender.nsi
index 2a37f7f6ba6..03f62f0df48 100644
--- a/release/windows/installer/00.sconsblender.nsi
+++ b/release/windows/installer/00.sconsblender.nsi
@@ -1,261 +1,261 @@
-;
-; $Id$
-;
-; Blender Self-Installer for Windows (NSIS - http://nsis.sourceforge.net)
-;
-
-SetCompressor /SOLID lzma
-
-Name "Blender [VERSION]"
-
-RequestExecutionLevel admin
-
-!include "MUI.nsh"
-!include "WinVer.nsh"
-!include "FileFunc.nsh"
-!include "WordFunc.nsh"
-!include "nsDialogs.nsh"
-!include "x64.nsh"
-
-!define MUI_ABORTWARNING
-
-!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of Blender. It is recommended that you close all other applications before starting Setup."
-!define MUI_WELCOMEFINISHPAGE_BITMAP "[RELDIR]\01.installer.bmp"
-!define MUI_HEADERIMAGE
-!define MUI_HEADERIMAGE_BITMAP "[RELDIR]\00.header.bmp"
-!define MUI_COMPONENTSPAGE_SMALLDESC
-!define MUI_FINISHPAGE_RUN "$INSTDIR\blender.exe"
-!define MUI_CHECKBITMAP "[RELDIR]\00.checked.bmp"
-!define MUI_UNWELCOMEFINISHPAGE_BITMAP "[RELDIR]\01.installer.bmp"
-
-!insertmacro MUI_PAGE_WELCOME
-!insertmacro MUI_PAGE_LICENSE "[DISTDIR]\Copyright.txt"
-!insertmacro MUI_PAGE_COMPONENTS
-
-!insertmacro MUI_PAGE_DIRECTORY
-Page custom DataLocation DataLocationOnLeave
-!insertmacro MUI_PAGE_INSTFILES
-!insertmacro MUI_PAGE_FINISH
-
-!insertmacro MUI_UNPAGE_WELCOME
-!insertmacro MUI_UNPAGE_CONFIRM
-!insertmacro MUI_UNPAGE_INSTFILES
-!insertmacro MUI_UNPAGE_FINISH
-
-!insertmacro Locate
-!insertmacro VersionCompare
-
-
-Icon "[RELDIR]\00.installer.ico"
-UninstallIcon "[RELDIR]\00.installer.ico"
-
-;--------------------------------
-;Languages
-
- !insertmacro MUI_LANGUAGE "English"
-
-;--------------------------------
-;Language Strings
-
- ;Description
- LangString DESC_InstallFiles ${LANG_ENGLISH} "Copy all required files to the application folder."
- LangString DESC_StartMenu ${LANG_ENGLISH} "Add shortcut items to the Start Menu. (Recommended)"
- LangString DESC_DesktopShortcut ${LANG_ENGLISH} "Add a shortcut to Blender on your desktop."
- LangString DESC_BlendRegister ${LANG_ENGLISH} "Blender can register itself with .blend files to allow double-clicking from Windows Explorer, etc."
- LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Specify User Data Location"
-;--------------------------------
-;Data
-
-Caption "Blender [VERSION] Installer"
-OutFile "[DISTDIR]\..\blender-[VERSION]-windows[BITNESS].exe"
-InstallDir $INSTDIR ; $INSTDIR is set inside .onInit
-BrandingText "Blender Foundation | http://www.blender.org"
-ComponentText "This will install Blender [VERSION] on your computer."
-
-DirText "Use the field below to specify the folder where you want Blender to be copied to. To specify a different folder, type a new name or use the Browse button to select an existing folder."
-
-SilentUnInstall normal
-
-Var BLENDERHOME
-Var SHORTVERSION ; This is blender_version_decimal() from path_util.c
-
-; Custom controls
-Var HWND
-
-Var HWND_APPDATA
-Var HWND_INSTDIR
-Var HWND_HOMEDIR
-
-Function .onInit
- ClearErrors
- StrCpy $SHORTVERSION "[SHORTVERSION]"
-
- ${If} ${RunningX64}
- ${If} "[BITNESS]" == "32"
- ${OrIf} "[BITNESS]" == "-mingw"
- StrCpy $INSTDIR "$PROGRAMFILES32\Blender Foundation\Blender" ; Can't use InstallDir inside Section
- ${ElseIf} "[BITNESS]" == "64"
- StrCpy $INSTDIR "$PROGRAMFILES64\Blender Foundation\Blender"
- ${EndIf}
- ${Else}
- StrCpy $INSTDIR "$PROGRAMFILES\Blender Foundation\Blender"
- ${EndIf}
-FunctionEnd
-
-Function un.onInit
-FunctionEnd
-
-Function DataLocation
- nsDialogs::Create /NOUNLOAD 1018
- Pop $HWND
-
- ${If} $HWND == error
- Abort
- ${EndIf}
-
- ${NSD_CreateLabel} 0 0 100% 24u "Please specify where you wish to install Blender's user data files. Be aware that if you choose to use your Application Data directory, your preferences and scripts will only be accessible by the current user account."
- ${NSD_CreateRadioButton} 0 50 100% 12u "Use Application Data directory (recommended)"
- Pop $HWND_APPDATA
- ${NSD_CreateRadioButton} 0 80 100% 12u "Use installation directory"
- Pop $HWND_INSTDIR
- ${NSD_CreateRadioButton} 0 110 100% 12u "I have defined a %HOME% variable, please install files there"
- Pop $HWND_HOMEDIR
-
- ${If} ${AtMostWinME}
- GetDlgItem $0 $HWND $HWND_APPDATA
- EnableWindow $0 0
- SendMessage $HWND_INSTDIR ${BM_SETCHECK} 1 0
- ${Else}
- SendMessage $HWND_APPDATA ${BM_SETCHECK} 1 0
- ${EndIf}
-
- nsDialogs::Show
-
-FunctionEnd
-
-Function DataLocationOnLeave
- ${NSD_GetState} $HWND_APPDATA $R0
- ${If} $R0 == "1"
- SetShellVarContext current
- StrCpy $BLENDERHOME "$APPDATA\Blender Foundation\Blender"
- SetShellVarContext all
- ${Else}
- ${NSD_GetState} $HWND_INSTDIR $R0
- ${If} $R0 == "1"
- StrCpy $BLENDERHOME $INSTDIR
- ${Else}
- ${NSD_GetState} $HWND_HOMEDIR $R0
- ${If} $R0 == "1"
- ReadEnvStr $BLENDERHOME "HOME"
- ${EndIf}
- ${EndIf}
- ${EndIf}
-FunctionEnd
-
-Section "Blender [VERSION] (required)" InstallFiles
- SectionIn RO
-
- ; Set output path to the installation directory.
- SetOutPath $INSTDIR
- ; The contents of Blender installation root dir
- [ROOTDIRCONTS]
-
- ; All datafiles (python, scripts, config)
- [DODATAFILES]
-
- SetOutPath $INSTDIR
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
- ; Write the installation path into the registry
- WriteRegStr HKLM "SOFTWARE\BlenderFoundation" "Install_Dir" "$INSTDIR"
- WriteRegStr HKLM "SOFTWARE\BlenderFoundation" "ConfigData_Dir" "$BLENDERHOME"
- WriteRegStr HKLM "SOFTWARE\BlenderFoundation" "ShortVersion" "[SHORTVERSION]"
- ; Write the uninstall keys for Windows
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "DisplayName" "Blender"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "Publisher" "Blender Foundation"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "URLInfoAbout" "http://www.blender.org/"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "DisplayVersion" "[VERSION]"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "DisplayIcon" "$INSTDIR\blender.exe"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "UninstallString" '"$INSTDIR\uninstall.exe"'
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "NoModify" 1
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "NoRepair " 1
- WriteUninstaller "uninstall.exe"
-
-SectionEnd
-
-Section "Add Start Menu Shortcuts" StartMenu
- SetShellVarContext all
- CreateDirectory "$SMPROGRAMS\Blender Foundation\Blender\"
- CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
- CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\Blender.lnk" "$INSTDIR\Blender.exe" "" "$INSTDIR\blender.exe" 0
- CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\Readme.lnk" "$INSTDIR\readme.html" "" "" 0
- CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\Copyright.lnk" "$INSTDIR\Copyright.txt" "" "$INSTDIR\copyright.txt" 0
- CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\GPL-license.lnk" "$INSTDIR\GPL-license.txt" "" "$INSTDIR\GPL-license.txt" 0
- System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)' ; refresh icons
-SectionEnd
-
-Section "Add Desktop Shortcut" DesktopShortcut
- CreateShortCut "$DESKTOP\Blender.lnk" "$INSTDIR\blender.exe" "" "$INSTDIR\blender.exe" 0
- System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)' ; refresh icons
-SectionEnd
-
-Section "Open .blend files with Blender" BlendRegister
- ExecWait '"$INSTDIR\blender.exe" -r'
-SectionEnd
-
-UninstallText "This will uninstall Blender [VERSION], and all installed files. Before continuing make sure you have created backup of all the files you may want to keep: startup.blend, bookmarks.txt, recent-files.txt. Hit 'Uninstall' to continue."
-
-Section "Uninstall"
- ; Remove registry keys
- ${If} ${RunningX64}
- SetRegView 64
- ${EndIf}
-
- ReadRegStr $BLENDERHOME HKLM "SOFTWARE\BlenderFoundation" "ConfigData_Dir"
- ReadRegStr $SHORTVERSION HKLM "SOFTWARE\BlenderFoundation" "ShortVersion"
- DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Blender"
- DeleteRegKey HKLM "SOFTWARE\BlenderFoundation"
- DeleteRegKey HKCR ".blend"
- DeleteRegKey HKCR "blendfile"
- DeleteRegKey HKCR "CLSID\{D45F043D-F17F-4e8a-8435-70971D9FA46D}"
- SetShellVarContext all
-
- ; Remove files
- [DELROOTDIRCONTS]
-
- Delete "$INSTDIR\uninstall.exe"
-
- MessageBox MB_YESNO "Recursively erase contents of $BLENDERHOME\$SHORTVERSION\scripts? NOTE: This includes all installed scripts and *any* file and directory you have manually created, installed later or copied. This also including .blend files." IDNO NextNoScriptRemove
- RMDir /r "$BLENDERHOME\$SHORTVERSION\scripts"
-NextNoScriptRemove:
- MessageBox MB_YESNO "Recursively erase contents from $BLENDERHOME\$SHORTVERSION\config? NOTE: This includes your startup.blend, bookmarks and any other file and directory you may have created in that directory" IDNO NextNoConfigRemove
- RMDir /r "$BLENDERHOME\$SHORTVERSION\config"
-NextNoConfigRemove:
- MessageBox MB_YESNO "Recursively erase contents from $BLENDERHOME\$SHORTVERSION\plugins? NOTE: This includes files and subdirectories in this directory" IDNO NextNoPluginRemove
- RMDir /r "$BLENDERHOME\$SHORTVERSION\plugins"
-NextNoPluginRemove:
- ; Try to remove dirs, but leave them if they contain anything
- RMDir "$BLENDERHOME\$SHORTVERSION\plugins"
- RMDir "$BLENDERHOME\$SHORTVERSION\config"
- RMDir "$BLENDERHOME\$SHORTVERSION\scripts"
- RMDir "$BLENDERHOME\$SHORTVERSION"
- RMDir "$BLENDERHOME"
- ; Remove shortcuts
- Delete "$SMPROGRAMS\Blender Foundation\Blender\*.*"
- Delete "$DESKTOP\Blender.lnk"
- ; Remove all link related directories and files
- RMDir /r "$SMPROGRAMS\Blender Foundation"
- ; Clear out installation dir
- RMDir /r "$INSTDIR"
-
- System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)' ; Refresh icons
-SectionEnd
-
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${InstallFiles} $(DESC_InstallFiles)
- !insertmacro MUI_DESCRIPTION_TEXT ${StartMenu} $(DESC_StartMenu)
- !insertmacro MUI_DESCRIPTION_TEXT ${DesktopShortcut} $(DESC_DesktopShortcut)
- !insertmacro MUI_DESCRIPTION_TEXT ${BlendRegister} $(DESC_BlendRegister)
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-
+;
+; $Id$
+;
+; Blender Self-Installer for Windows (NSIS - http://nsis.sourceforge.net)
+;
+
+SetCompressor /SOLID lzma
+
+Name "Blender [VERSION]"
+
+RequestExecutionLevel admin
+
+!include "MUI.nsh"
+!include "WinVer.nsh"
+!include "FileFunc.nsh"
+!include "WordFunc.nsh"
+!include "nsDialogs.nsh"
+!include "x64.nsh"
+
+!define MUI_ABORTWARNING
+
+!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of Blender. It is recommended that you close all other applications before starting Setup."
+!define MUI_WELCOMEFINISHPAGE_BITMAP "[RELDIR]\01.installer.bmp"
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP "[RELDIR]\00.header.bmp"
+!define MUI_COMPONENTSPAGE_SMALLDESC
+!define MUI_FINISHPAGE_RUN "$INSTDIR\blender.exe"
+!define MUI_CHECKBITMAP "[RELDIR]\00.checked.bmp"
+!define MUI_UNWELCOMEFINISHPAGE_BITMAP "[RELDIR]\01.installer.bmp"
+
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE "[DISTDIR]\Copyright.txt"
+!insertmacro MUI_PAGE_COMPONENTS
+
+!insertmacro MUI_PAGE_DIRECTORY
+Page custom DataLocation DataLocationOnLeave
+!insertmacro MUI_PAGE_INSTFILES
+!insertmacro MUI_PAGE_FINISH
+
+!insertmacro MUI_UNPAGE_WELCOME
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+!insertmacro MUI_UNPAGE_FINISH
+
+!insertmacro Locate
+!insertmacro VersionCompare
+
+
+Icon "[RELDIR]\00.installer.ico"
+UninstallIcon "[RELDIR]\00.installer.ico"
+
+;--------------------------------
+;Languages
+
+ !insertmacro MUI_LANGUAGE "English"
+
+;--------------------------------
+;Language Strings
+
+ ;Description
+ LangString DESC_InstallFiles ${LANG_ENGLISH} "Copy all required files to the application folder."
+ LangString DESC_StartMenu ${LANG_ENGLISH} "Add shortcut items to the Start Menu. (Recommended)"
+ LangString DESC_DesktopShortcut ${LANG_ENGLISH} "Add a shortcut to Blender on your desktop."
+ LangString DESC_BlendRegister ${LANG_ENGLISH} "Blender can register itself with .blend files to allow double-clicking from Windows Explorer, etc."
+ LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Specify User Data Location"
+;--------------------------------
+;Data
+
+Caption "Blender [VERSION] Installer"
+OutFile "[DISTDIR]\..\blender-[VERSION]-windows[BITNESS].exe"
+InstallDir $INSTDIR ; $INSTDIR is set inside .onInit
+BrandingText "Blender Foundation | http://www.blender.org"
+ComponentText "This will install Blender [VERSION] on your computer."
+
+DirText "Use the field below to specify the folder where you want Blender to be copied to. To specify a different folder, type a new name or use the Browse button to select an existing folder."
+
+SilentUnInstall normal
+
+Var BLENDERHOME
+Var SHORTVERSION ; This is blender_version_decimal() from path_util.c
+
+; Custom controls
+Var HWND
+
+Var HWND_APPDATA
+Var HWND_INSTDIR
+Var HWND_HOMEDIR
+
+Function .onInit
+ ClearErrors
+ StrCpy $SHORTVERSION "[SHORTVERSION]"
+
+ ${If} ${RunningX64}
+ ${If} "[BITNESS]" == "32"
+ ${OrIf} "[BITNESS]" == "-mingw"
+ StrCpy $INSTDIR "$PROGRAMFILES32\Blender Foundation\Blender" ; Can't use InstallDir inside Section
+ ${ElseIf} "[BITNESS]" == "64"
+ StrCpy $INSTDIR "$PROGRAMFILES64\Blender Foundation\Blender"
+ ${EndIf}
+ ${Else}
+ StrCpy $INSTDIR "$PROGRAMFILES\Blender Foundation\Blender"
+ ${EndIf}
+FunctionEnd
+
+Function un.onInit
+FunctionEnd
+
+Function DataLocation
+ nsDialogs::Create /NOUNLOAD 1018
+ Pop $HWND
+
+ ${If} $HWND == error
+ Abort
+ ${EndIf}
+
+ ${NSD_CreateLabel} 0 0 100% 24u "Please specify where you wish to install Blender's user data files. Be aware that if you choose to use your Application Data directory, your preferences and scripts will only be accessible by the current user account."
+ ${NSD_CreateRadioButton} 0 50 100% 12u "Use Application Data directory (recommended)"
+ Pop $HWND_APPDATA
+ ${NSD_CreateRadioButton} 0 80 100% 12u "Use installation directory"
+ Pop $HWND_INSTDIR
+ ${NSD_CreateRadioButton} 0 110 100% 12u "I have defined a %HOME% variable, please install files there"
+ Pop $HWND_HOMEDIR
+
+ ${If} ${AtMostWinME}
+ GetDlgItem $0 $HWND $HWND_APPDATA
+ EnableWindow $0 0
+ SendMessage $HWND_INSTDIR ${BM_SETCHECK} 1 0
+ ${Else}
+ SendMessage $HWND_APPDATA ${BM_SETCHECK} 1 0
+ ${EndIf}
+
+ nsDialogs::Show
+
+FunctionEnd
+
+Function DataLocationOnLeave
+ ${NSD_GetState} $HWND_APPDATA $R0
+ ${If} $R0 == "1"
+ SetShellVarContext current
+ StrCpy $BLENDERHOME "$APPDATA\Blender Foundation\Blender"
+ SetShellVarContext all
+ ${Else}
+ ${NSD_GetState} $HWND_INSTDIR $R0
+ ${If} $R0 == "1"
+ StrCpy $BLENDERHOME $INSTDIR
+ ${Else}
+ ${NSD_GetState} $HWND_HOMEDIR $R0
+ ${If} $R0 == "1"
+ ReadEnvStr $BLENDERHOME "HOME"
+ ${EndIf}
+ ${EndIf}
+ ${EndIf}
+FunctionEnd
+
+Section "Blender [VERSION] (required)" InstallFiles
+ SectionIn RO
+
+ ; Set output path to the installation directory.
+ SetOutPath $INSTDIR
+ ; The contents of Blender installation root dir
+ [ROOTDIRCONTS]
+
+ ; All datafiles (python, scripts, config)
+ [DODATAFILES]
+
+ SetOutPath $INSTDIR
+ ${If} ${RunningX64}
+ SetRegView 64
+ ${EndIf}
+ ; Write the installation path into the registry
+ WriteRegStr HKLM "SOFTWARE\BlenderFoundation" "Install_Dir" "$INSTDIR"
+ WriteRegStr HKLM "SOFTWARE\BlenderFoundation" "ConfigData_Dir" "$BLENDERHOME"
+ WriteRegStr HKLM "SOFTWARE\BlenderFoundation" "ShortVersion" "[SHORTVERSION]"
+ ; Write the uninstall keys for Windows
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "DisplayName" "Blender"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "Publisher" "Blender Foundation"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "URLInfoAbout" "http://www.blender.org/"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "DisplayVersion" "[VERSION]"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "DisplayIcon" "$INSTDIR\blender.exe"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "UninstallString" '"$INSTDIR\uninstall.exe"'
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "NoModify" 1
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "NoRepair " 1
+ WriteUninstaller "uninstall.exe"
+
+SectionEnd
+
+Section "Add Start Menu Shortcuts" StartMenu
+ SetShellVarContext all
+ CreateDirectory "$SMPROGRAMS\Blender Foundation\Blender\"
+ CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
+ CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\Blender.lnk" "$INSTDIR\Blender.exe" "" "$INSTDIR\blender.exe" 0
+ CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\Readme.lnk" "$INSTDIR\readme.html" "" "" 0
+ CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\Copyright.lnk" "$INSTDIR\Copyright.txt" "" "$INSTDIR\copyright.txt" 0
+ CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\GPL-license.lnk" "$INSTDIR\GPL-license.txt" "" "$INSTDIR\GPL-license.txt" 0
+ System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)' ; refresh icons
+SectionEnd
+
+Section "Add Desktop Shortcut" DesktopShortcut
+ CreateShortCut "$DESKTOP\Blender.lnk" "$INSTDIR\blender.exe" "" "$INSTDIR\blender.exe" 0
+ System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)' ; refresh icons
+SectionEnd
+
+Section "Open .blend files with Blender" BlendRegister
+ ExecWait '"$INSTDIR\blender.exe" -r'
+SectionEnd
+
+UninstallText "This will uninstall Blender [VERSION], and all installed files. Before continuing make sure you have created backup of all the files you may want to keep: startup.blend, bookmarks.txt, recent-files.txt. Hit 'Uninstall' to continue."
+
+Section "Uninstall"
+ ; Remove registry keys
+ ${If} ${RunningX64}
+ SetRegView 64
+ ${EndIf}
+
+ ReadRegStr $BLENDERHOME HKLM "SOFTWARE\BlenderFoundation" "ConfigData_Dir"
+ ReadRegStr $SHORTVERSION HKLM "SOFTWARE\BlenderFoundation" "ShortVersion"
+ DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Blender"
+ DeleteRegKey HKLM "SOFTWARE\BlenderFoundation"
+ DeleteRegKey HKCR ".blend"
+ DeleteRegKey HKCR "blendfile"
+ DeleteRegKey HKCR "CLSID\{D45F043D-F17F-4e8a-8435-70971D9FA46D}"
+ SetShellVarContext all
+
+ ; Remove files
+ [DELROOTDIRCONTS]
+
+ Delete "$INSTDIR\uninstall.exe"
+
+ MessageBox MB_YESNO "Recursively erase contents of $BLENDERHOME\$SHORTVERSION\scripts? NOTE: This includes all installed scripts and *any* file and directory you have manually created, installed later or copied. This also including .blend files." IDNO NextNoScriptRemove
+ RMDir /r "$BLENDERHOME\$SHORTVERSION\scripts"
+NextNoScriptRemove:
+ MessageBox MB_YESNO "Recursively erase contents from $BLENDERHOME\$SHORTVERSION\config? NOTE: This includes your startup.blend, bookmarks and any other file and directory you may have created in that directory" IDNO NextNoConfigRemove
+ RMDir /r "$BLENDERHOME\$SHORTVERSION\config"
+NextNoConfigRemove:
+ MessageBox MB_YESNO "Recursively erase contents from $BLENDERHOME\$SHORTVERSION\plugins? NOTE: This includes files and subdirectories in this directory" IDNO NextNoPluginRemove
+ RMDir /r "$BLENDERHOME\$SHORTVERSION\plugins"
+NextNoPluginRemove:
+ ; Try to remove dirs, but leave them if they contain anything
+ RMDir "$BLENDERHOME\$SHORTVERSION\plugins"
+ RMDir "$BLENDERHOME\$SHORTVERSION\config"
+ RMDir "$BLENDERHOME\$SHORTVERSION\scripts"
+ RMDir "$BLENDERHOME\$SHORTVERSION"
+ RMDir "$BLENDERHOME"
+ ; Remove shortcuts
+ Delete "$SMPROGRAMS\Blender Foundation\Blender\*.*"
+ Delete "$DESKTOP\Blender.lnk"
+ ; Remove all link related directories and files
+ RMDir /r "$SMPROGRAMS\Blender Foundation"
+ ; Clear out installation dir
+ RMDir /r "$INSTDIR"
+
+ System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)' ; Refresh icons
+SectionEnd
+
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${InstallFiles} $(DESC_InstallFiles)
+ !insertmacro MUI_DESCRIPTION_TEXT ${StartMenu} $(DESC_StartMenu)
+ !insertmacro MUI_DESCRIPTION_TEXT ${DesktopShortcut} $(DESC_DesktopShortcut)
+ !insertmacro MUI_DESCRIPTION_TEXT ${BlendRegister} $(DESC_BlendRegister)
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+