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:
authorCampbell Barton <ideasman42@gmail.com>2011-08-11 08:53:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-11 08:53:57 +0400
commit226e424cb2cb52edfba0f098a4ac4537fd1db914 (patch)
treed49d1d0376872d008b7315d7600ceca346cd96bf /release
parent6f08f18d2708b84cab782b0019149b3cb552dbd7 (diff)
parent50277c48ba5bf9eae418453159e421489895dafd (diff)
svn merge -r39057:39286 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'release')
-rw-r--r--release/datafiles/splash.pngbin201866 -> 204738 bytes
-rw-r--r--release/scripts/modules/addon_utils.py25
-rw-r--r--release/scripts/modules/bpy_extras/io_utils.py2
-rw-r--r--release/scripts/modules/bpy_extras/mesh_utils.py4
-rw-r--r--release/scripts/modules/bpyml.py2
-rw-r--r--release/scripts/modules/bpyml_ui.py6
-rw-r--r--release/scripts/modules/rna_info.py8
-rw-r--r--release/scripts/startup/bl_operators/image.py10
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_lightmap.py66
-rw-r--r--release/scripts/startup/bl_operators/wm.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_data_curve.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py4
-rw-r--r--release/scripts/startup/bl_ui/space_info.py2
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py47
-rw-r--r--release/scripts/startup/bl_ui/space_userpref_keymap.py73
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py24
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py10
-rw-r--r--release/scripts/templates/operator_modal.py4
-rw-r--r--release/scripts/templates/operator_modal_draw.py2
-rw-r--r--release/scripts/templates/operator_modal_timer.py2
-rw-r--r--release/scripts/templates/operator_modal_view3d.py2
-rw-r--r--release/text/readme.html12
22 files changed, 189 insertions, 122 deletions
diff --git a/release/datafiles/splash.png b/release/datafiles/splash.png
index d6ccdb5b733..79339095b07 100644
--- a/release/datafiles/splash.png
+++ b/release/datafiles/splash.png
Binary files differ
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py
index 22936f4c209..0c5ef69e805 100644
--- a/release/scripts/modules/addon_utils.py
+++ b/release/scripts/modules/addon_utils.py
@@ -32,6 +32,7 @@ import bpy as _bpy
error_duplicates = False
+error_encoding = False
def paths():
@@ -51,14 +52,18 @@ def paths():
def modules(module_cache):
global error_duplicates
+ global error_encoding
import os
error_duplicates = False
+ error_encoding = False
path_list = paths()
# fake module importing
def fake_module(mod_name, mod_path, speedy=True):
+ global error_encoding
+
if _bpy.app.debug:
print("fake_module", mod_path, mod_name)
import ast
@@ -69,12 +74,28 @@ def modules(module_cache):
line_iter = iter(file_mod)
l = ""
while not l.startswith("bl_info"):
- l = line_iter.readline()
+ try:
+ l = line_iter.readline()
+ except UnicodeDecodeError as e:
+ if not error_encoding:
+ error_encoding = True
+ print("Error reading file as UTF-8:", mod_path, e)
+ file_mod.close()
+ return None
+
if len(l) == 0:
break
while l.rstrip():
lines.append(l)
- l = line_iter.readline()
+ try:
+ l = line_iter.readline()
+ except UnicodeDecodeError as e:
+ if not error_encoding:
+ error_encoding = True
+ print("Error reading file as UTF-8:", mod_path, e)
+ file_mod.close()
+ return None
+
data = "".join(lines)
else:
diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py
index 45664384efa..bb4e95c051f 100644
--- a/release/scripts/modules/bpy_extras/io_utils.py
+++ b/release/scripts/modules/bpy_extras/io_utils.py
@@ -379,7 +379,7 @@ def path_reference(filepath,
is_relative = filepath.startswith("//")
filepath_abs = os.path.normpath(bpy.path.abspath(filepath, base_src))
- if mode in ('ABSOLUTE', 'RELATIVE', 'STRIP'):
+ if mode in {'ABSOLUTE', 'RELATIVE', 'STRIP'}:
pass
elif mode == 'MATCH':
mode = 'RELATIVE' if is_relative else 'ABSOLUTE'
diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py
index f9400674138..c965169ff04 100644
--- a/release/scripts/modules/bpy_extras/mesh_utils.py
+++ b/release/scripts/modules/bpy_extras/mesh_utils.py
@@ -294,7 +294,7 @@ def ngon_tesselate(from_data, indices, fix_loops=True):
'''
Normal single concave loop filling
'''
- if type(from_data) in (tuple, list):
+ if type(from_data) in {tuple, list}:
verts = [Vector(from_data[i]) for ii, i in enumerate(indices)]
else:
verts = [from_data.vertices[i].co for ii, i in enumerate(indices)]
@@ -312,7 +312,7 @@ def ngon_tesselate(from_data, indices, fix_loops=True):
used twice. This is used by lightwave LWO files a lot
'''
- if type(from_data) in (tuple, list):
+ if type(from_data) in {tuple, list}:
verts = [vert_treplet(Vector(from_data[i]), ii)
for ii, i in enumerate(indices)]
else:
diff --git a/release/scripts/modules/bpyml.py b/release/scripts/modules/bpyml.py
index fdf5172a0b3..42d2bf94fba 100644
--- a/release/scripts/modules/bpyml.py
+++ b/release/scripts/modules/bpyml.py
@@ -120,7 +120,7 @@ def fromxml(data):
py_item = (xml_node.tagName, _fromxml_kwargs(xml_node), [])
#_fromxml_iter(py_item, xml_node.childNodes)
for xml_node_child in xml_node.childNodes:
- if xml_node_child.nodeType not in (xml_node_child.TEXT_NODE, xml_node_child.COMMENT_NODE):
+ if xml_node_child.nodeType not in {xml_node_child.TEXT_NODE, xml_node_child.COMMENT_NODE}:
py_item[CHILDREN].append(_fromxml(xml_node_child))
return py_item
diff --git a/release/scripts/modules/bpyml_ui.py b/release/scripts/modules/bpyml_ui.py
index 5df04b8bf34..f4b6de23dbb 100644
--- a/release/scripts/modules/bpyml_ui.py
+++ b/release/scripts/modules/bpyml_ui.py
@@ -40,13 +40,13 @@ def _parse_rna(prop, value):
elif prop.type == 'INT':
value = int(value)
elif prop.type == 'BOOLEAN':
- if value in (True, False):
+ if value in {True, False}:
pass
else:
- if value not in ("True", "False"):
+ if value not in {"True", "False"}:
raise Exception("invalid bool value: %s" % value)
value = bool(value == "True")
- elif prop.type in ('STRING', 'ENUM'):
+ elif prop.type in {'STRING', 'ENUM'}:
pass
elif prop.type == 'POINTER':
value = eval("_bpy." + value)
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index 93a344f4b09..943f86adecb 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -148,7 +148,7 @@ class InfoStructRNA:
import types
functions = []
for identifier, attr in self._get_py_visible_attrs():
- if type(attr) in (types.FunctionType, types.MethodType):
+ if type(attr) in {types.FunctionType, types.MethodType}:
functions.append((identifier, attr))
return functions
@@ -156,7 +156,7 @@ class InfoStructRNA:
import types
functions = []
for identifier, attr in self._get_py_visible_attrs():
- if type(attr) in (types.BuiltinMethodType, types.BuiltinFunctionType):
+ if type(attr) in {types.BuiltinMethodType, types.BuiltinFunctionType}:
functions.append((identifier, attr))
return functions
@@ -260,7 +260,7 @@ class InfoPropertyRNA:
if self.array_length:
type_str += " array of %d items" % (self.array_length)
- if self.type in ("float", "int"):
+ if self.type in {"float", "int"}:
type_str += " in [%s, %s]" % (range_str(self.min), range_str(self.max))
elif self.type == "enum":
if self.is_enum_flag:
@@ -595,7 +595,7 @@ def BuildRNAInfo():
for prop in rna_info.properties:
# ERROR CHECK
default = prop.default
- if type(default) in (float, int):
+ if type(default) in {float, int}:
if default < prop.min or default > prop.max:
print("\t %s.%s, %s not in [%s - %s]" % (rna_info.identifier, prop.identifier, default, prop.min, prop.max))
diff --git a/release/scripts/startup/bl_operators/image.py b/release/scripts/startup/bl_operators/image.py
index 23bafe2eaae..aca9b581b97 100644
--- a/release/scripts/startup/bl_operators/image.py
+++ b/release/scripts/startup/bl_operators/image.py
@@ -61,13 +61,19 @@ class EditExternally(bpy.types.Operator):
def execute(self, context):
import os
import subprocess
- filepath = os.path.normpath(bpy.path.abspath(self.filepath))
+
+ filepath = self.filepath
+
+ if not filepath:
+ self.report({'ERROR'}, "Image path not set")
+ return {'CANCELLED'}
+
+ filepath = os.path.normpath(bpy.path.abspath(filepath))
if not os.path.exists(filepath):
self.report({'ERROR'},
"Image path %r not found, image may be packed or "
"unsaved." % filepath)
-
return {'CANCELLED'}
cmd = self._editor_guess(context) + [filepath]
diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
index 9ae0cd0ddf9..d2371b0316a 100644
--- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py
+++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
@@ -23,7 +23,15 @@ import mathutils
class prettyface(object):
- __slots__ = "uv", "width", "height", "children", "xoff", "yoff", "has_parent", "rot"
+ __slots__ = ("uv",
+ "width",
+ "height",
+ "children",
+ "xoff",
+ "yoff",
+ "has_parent",
+ "rot",
+ )
def __init__(self, data):
self.has_parent = False
@@ -263,10 +271,9 @@ def lightmap_uvpack(meshes,
del trylens
def trilensdiff(t1, t2):
- return\
- abs(t1[1][t1[2][0]] - t2[1][t2[2][0]]) + \
- abs(t1[1][t1[2][1]] - t2[1][t2[2][1]]) + \
- abs(t1[1][t1[2][2]] - t2[1][t2[2][2]])
+ return (abs(t1[1][t1[2][0]] - t2[1][t2[2][0]]) +
+ abs(t1[1][t1[2][1]] - t2[1][t2[2][1]]) +
+ abs(t1[1][t1[2][2]] - t2[1][t2[2][2]]))
while tri_lengths:
tri1 = tri_lengths.pop()
@@ -520,7 +527,7 @@ def unwrap(operator, context, **kwargs):
if obj and obj.type == 'MESH':
meshes = [obj.data]
else:
- meshes = {me.name: me for obj in context.selected_objects if obj.type == 'MESH' for me in (obj.data,) if not me.library if len(me.faces)}.values()
+ meshes = list({me for obj in context.selected_objects if obj.type == 'MESH' for me in (obj.data,) if me.faces and me.library is None})
if not meshes:
operator.report({'ERROR'}, "No mesh object.")
@@ -543,22 +550,51 @@ class LightMapPack(bpy.types.Operator):
bl_options = {'REGISTER', 'UNDO'}
PREF_CONTEXT = bpy.props.EnumProperty(
+ name="Selection",
+ description="",
items=(("SEL_FACES", "Selected Faces", "Space all UVs evently"),
("ALL_FACES", "All Faces", "Average space UVs edge length of each loop"),
("ALL_OBJECTS", "Selected Mesh Object", "Average space UVs edge length of each loop")
),
- name="Selection",
- description="")
+ )
# Image & UVs...
- PREF_PACK_IN_ONE = BoolProperty(name="Share Tex Space", default=True, description="Objects Share texture space, map all objects into 1 uvmap")
- PREF_NEW_UVLAYER = BoolProperty(name="New UV Layer", default=False, description="Create a new UV layer for every mesh packed")
- PREF_APPLY_IMAGE = BoolProperty(name="New Image", default=False, description="Assign new images for every mesh (only one if shared tex space enabled)")
- PREF_IMG_PX_SIZE = IntProperty(name="Image Size", min=64, max=5000, default=512, description="Width and Height for the new image")
-
+ PREF_PACK_IN_ONE = BoolProperty(
+ name="Share Tex Space",
+ description=("Objects Share texture space, map all objects "
+ "into 1 uvmap"),
+ default=True,
+ )
+ PREF_NEW_UVLAYER = BoolProperty(
+ name="New UV Layer",
+ description="Create a new UV layer for every mesh packed",
+ default=False,
+ )
+ PREF_APPLY_IMAGE = BoolProperty(
+ name="New Image",
+ description=("Assign new images for every mesh (only one if "
+ "shared tex space enabled)"),
+ default=False,
+ )
+ PREF_IMG_PX_SIZE = IntProperty(
+ name="Image Size",
+ description="Width and Height for the new image",
+ min=64, max=5000,
+ default=512,
+ )
# UV Packing...
- PREF_BOX_DIV = IntProperty(name="Pack Quality", min=1, max=48, default=12, description="Pre Packing before the complex boxpack")
- PREF_MARGIN_DIV = FloatProperty(name="Margin", min=0.001, max=1.0, default=0.1, description="Size of the margin as a division of the UV")
+ PREF_BOX_DIV = IntProperty(
+ name="Pack Quality",
+ description="Pre Packing before the complex boxpack",
+ min=1, max=48,
+ default=12,
+ )
+ PREF_MARGIN_DIV = FloatProperty(
+ name="Margin",
+ description="Size of the margin as a division of the UV",
+ min=0.001, max=1.0,
+ default=0.1,
+ )
def execute(self, context):
kwargs = self.as_keywords()
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index af33e45668c..f9327aa6c40 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -586,7 +586,7 @@ class WM_OT_context_modal_mouse(bpy.types.Operator):
self._values_clear()
return {'FINISHED'}
- elif event_type in ('RIGHTMOUSE', 'ESC'):
+ elif event_type in {'RIGHTMOUSE', 'ESC'}:
self._values_restore()
return {'FINISHED'}
@@ -839,7 +839,7 @@ class WM_OT_properties_edit(bpy.types.Operator):
prop_ui = rna_idprop_ui_prop_get(item, prop)
- if prop_type in (float, int):
+ if prop_type in {float, int}:
prop_ui['soft_min'] = prop_ui['min'] = prop_type(self.min)
prop_ui['soft_max'] = prop_ui['max'] = prop_type(self.max)
diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py
index 3c88127c724..a0aacc4cec8 100644
--- a/release/scripts/startup/bl_ui/properties_data_curve.py
+++ b/release/scripts/startup/bl_ui/properties_data_curve.py
@@ -361,7 +361,7 @@ class DATA_PT_paragraph(CurveButtonsPanel, bpy.types.Panel):
col.prop(text, "offset_y", text="Y")
-class DATA_PT_textboxes(CurveButtonsPanel, bpy.types.Panel):
+class DATA_PT_text_boxes(CurveButtonsPanel, bpy.types.Panel):
bl_label = "Text Boxes"
@classmethod
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 4c92296dacd..2870aab75ef 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -462,7 +462,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
col.prop(part, "mass")
col.prop(part, "use_multiply_size_mass", text="Multiply mass with size")
- if part.physics_type in ('NEWTON', 'FLUID'):
+ if part.physics_type in {'NEWTON', 'FLUID'}:
split = layout.split()
col = split.column()
@@ -921,7 +921,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
col = row.column()
col.label(text="")
- if part.render_type in ('OBJECT', 'GROUP') and not part.use_advanced_hair:
+ if part.render_type in {'OBJECT', 'GROUP'} and not part.use_advanced_hair:
row = layout.row(align=True)
row.prop(part, "particle_size")
row.prop(part, "size_random", slider=True)
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index db67a25abb3..0f8173ae4af 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -354,7 +354,7 @@ class INFO_MT_help(bpy.types.Menu):
layout = self.layout
layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:Manual'
- layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-258/'
+ layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-259/'
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 1feb1eec0c5..944f5aaf4c1 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -755,6 +755,31 @@ class USERPREF_PT_file(bpy.types.Panel):
from bl_ui.space_userpref_keymap import InputKeyMapPanel
+class USERPREF_MT_ndof_settings(bpy.types.Menu):
+ # accessed from the window keybindings in C (only)
+ bl_label = "3D Mouse Settings"
+
+ def draw(self, context):
+ layout = self.layout
+ input_prefs = context.user_preferences.inputs
+
+ layout.separator()
+ layout.prop(input_prefs, "ndof_sensitivity")
+
+ if context.space_data.type == 'VIEW_3D':
+ layout.separator()
+ layout.prop(input_prefs, "ndof_show_guide")
+
+ layout.separator()
+ layout.label(text="orbit options")
+ layout.prop(input_prefs, "ndof_orbit_invert_axes")
+
+ layout.separator()
+ layout.label(text="fly options")
+ layout.prop(input_prefs, "ndof_fly_helicopter", icon='NDOF_FLY')
+ layout.prop(input_prefs, "ndof_lock_horizon", icon='NDOF_DOM')
+
+
class USERPREF_PT_input(bpy.types.Panel, InputKeyMapPanel):
bl_space_type = 'USER_PREFERENCES'
bl_label = "Input"
@@ -924,6 +949,12 @@ class USERPREF_PT_addons(bpy.types.Panel):
"(see console for details)",
)
+ if addon_utils.error_encoding:
+ self.draw_error(col,
+ "One or more addons do not have UTF-8 encoding\n"
+ "(see console for details)",
+ )
+
filter = context.window_manager.addon_filter
search = context.window_manager.addon_search.lower()
support = context.window_manager.addon_support
@@ -1045,17 +1076,25 @@ class WM_OT_addon_enable(bpy.types.Operator):
bl_idname = "wm.addon_enable"
bl_label = "Enable Add-On"
- module = StringProperty(name="Module", description="Module name of the addon to enable")
+ module = StringProperty(
+ name="Module",
+ description="Module name of the addon to enable",
+ )
def execute(self, context):
mod = addon_utils.enable(self.module)
if mod:
- # check if add-on is written for current blender version, or raise a warning
info = addon_utils.module_bl_info(mod)
- if info.get("blender", (0, 0, 0)) > bpy.app.version:
- self.report("WARNING','This script was written for a newer version of Blender and might not function (correctly).\nThe script is enabled though.")
+ info_ver = info.get("blender", (0, 0, 0))
+
+ if info_ver > bpy.app.version:
+ self.report({'WARNING'}, ("This script was written Blender "
+ "version %d.%d.%d and might not "
+ "function (correctly).\n"
+ "The script is enabled though.") %
+ info_ver)
return {'FINISHED'}
else:
return {'CANCELLED'}
diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py
index 585c3cffcb9..f63da6551de 100644
--- a/release/scripts/startup/bl_ui/space_userpref_keymap.py
+++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py
@@ -188,10 +188,10 @@ class InputKeyMapPanel:
if km.is_modal:
row.label(text="", icon='LINKED')
- if km.is_user_defined:
+ if km.is_user_modified:
row.operator("wm.keymap_restore", text="Restore")
else:
- row.operator("wm.keymap_edit", text="Edit")
+ row.label()
if km.show_expanded_children:
if children:
@@ -212,7 +212,6 @@ class InputKeyMapPanel:
# "Add New" at end of keymap item list
col = self.indented_layout(col, level + 1)
subcol = col.split(percentage=0.2).column()
- subcol.enabled = km.is_user_defined
subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
col.separator()
@@ -243,7 +242,7 @@ class InputKeyMapPanel:
col = self.indented_layout(layout, level)
- if km.is_user_defined:
+ if kmi.show_expanded:
col = col.column(align=True)
box = col.box()
else:
@@ -256,7 +255,6 @@ class InputKeyMapPanel:
row.prop(kmi, "show_expanded", text="", emboss=False)
row = split.row()
- row.enabled = km.is_user_defined
row.prop(kmi, "active", text="", emboss=False)
if km.is_modal:
@@ -265,7 +263,6 @@ class InputKeyMapPanel:
row.label(text=kmi.name)
row = split.row()
- row.enabled = km.is_user_defined
row.prop(kmi, "map_type", text="")
if map_type == 'KEYBOARD':
row.prop(kmi, "type", text="", full_event=True)
@@ -282,18 +279,17 @@ class InputKeyMapPanel:
else:
row.label()
- if not kmi.is_user_defined:
+ if (not kmi.is_user_defined) and kmi.is_user_modified:
op = row.operator("wm.keyitem_restore", text="", icon='BACK')
op.item_id = kmi.id
- op = row.operator("wm.keyitem_remove", text="", icon='X')
- op.item_id = kmi.id
+ else:
+ op = row.operator("wm.keyitem_remove", text="", icon='X')
+ op.item_id = kmi.id
# Expanded, additional event settings
if kmi.show_expanded:
box = col.box()
- box.enabled = km.is_user_defined
-
if map_type not in {'TEXTINPUT', 'TIMER'}:
split = box.split(percentage=0.4)
sub = split.row()
@@ -352,10 +348,10 @@ class InputKeyMapPanel:
row.label()
row.label()
- if km.is_user_defined:
+ if km.is_user_modified:
row.operator("wm.keymap_restore", text="Restore")
else:
- row.operator("wm.keymap_edit", text="Edit")
+ row.label()
for kmi in filtered_items:
self.draw_kmi(display_keymaps, kc, km, kmi, col, 1)
@@ -363,7 +359,6 @@ class InputKeyMapPanel:
# "Add New" at end of keymap item list
col = self.indented_layout(layout, 1)
subcol = col.split(percentage=0.2).column()
- subcol.enabled = km.is_user_defined
subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
def draw_hierarchy(self, display_keymaps, layout):
@@ -372,8 +367,7 @@ class InputKeyMapPanel:
def draw_keymaps(self, context, layout):
wm = context.window_manager
- kc = wm.keyconfigs.active
- defkc = wm.keyconfigs.default
+ kc = wm.keyconfigs.user
col = layout.column()
sub = col.column()
@@ -398,7 +392,7 @@ class InputKeyMapPanel:
col.separator()
- display_keymaps = _merge_keymaps(kc, defkc)
+ display_keymaps = _merge_keymaps(kc, kc)
if context.space_data.filter_text != "":
filter_text = context.space_data.filter_text.lower()
self.draw_filtered(display_keymaps, filter_text, col)
@@ -548,22 +542,24 @@ class WM_OT_keyconfig_import(bpy.types.Operator):
def execute(self, context):
from os.path import basename
import shutil
- if not self.filepath:
- raise Exception("Filepath not set")
- f = open(self.filepath, "r")
- if not f:
- raise Exception("Could not open file")
+ if not self.filepath:
+ self.report({'ERROR'}, "Filepath not set")
+ return {'CANCELLED'}
config_name = basename(self.filepath)
path = bpy.utils.user_resource('SCRIPTS', os.path.join("presets", "keyconfig"), create=True)
path = os.path.join(path, config_name)
- if self.keep_original:
- shutil.copy(self.filepath, path)
- else:
- shutil.move(self.filepath, path)
+ try:
+ if self.keep_original:
+ shutil.copy(self.filepath, path)
+ else:
+ shutil.move(self.filepath, path)
+ except Exception as e:
+ self.report({'ERROR'}, "Installing keymap failed: %s" % e)
+ return {'CANCELLED'}
# sneaky way to check we're actually running the code.
bpy.utils.keyconfig_set(path)
@@ -609,7 +605,7 @@ class WM_OT_keyconfig_export(bpy.types.Operator):
# Generate a list of keymaps to export:
#
- # First add all user_defined keymaps (found in inputs.edited_keymaps list),
+ # First add all user_modified keymaps (found in keyconfigs.user.keymaps list),
# then add all remaining keymaps from the currently active custom keyconfig.
#
# This will create a final list of keymaps that can be used as a 'diff' against
@@ -619,7 +615,9 @@ class WM_OT_keyconfig_export(bpy.types.Operator):
class FakeKeyConfig():
keymaps = []
edited_kc = FakeKeyConfig()
- edited_kc.keymaps.extend(context.user_preferences.inputs.edited_keymaps)
+ for km in wm.keyconfigs.user.keymaps:
+ if km.is_user_modified:
+ edited_kc.keymaps.append(km)
# merge edited keymaps with non-default keyconfig, if it exists
if kc != wm.keyconfigs.default:
export_keymaps = _merge_keymaps(edited_kc, kc)
@@ -669,17 +667,6 @@ class WM_OT_keyconfig_export(bpy.types.Operator):
return {'RUNNING_MODAL'}
-class WM_OT_keymap_edit(bpy.types.Operator):
- "Edit stored key map"
- bl_idname = "wm.keymap_edit"
- bl_label = "Edit Key Map"
-
- def execute(self, context):
- km = context.keymap
- km.copy_to_user()
- return {'FINISHED'}
-
-
class WM_OT_keymap_restore(bpy.types.Operator):
"Restore key map(s)"
bl_idname = "wm.keymap_restore"
@@ -691,7 +678,7 @@ class WM_OT_keymap_restore(bpy.types.Operator):
wm = context.window_manager
if self.all:
- for km in wm.keyconfigs.default.keymaps:
+ for km in wm.keyconfigs.user.keymaps:
km.restore_to_default()
else:
km = context.keymap
@@ -710,13 +697,13 @@ class WM_OT_keyitem_restore(bpy.types.Operator):
@classmethod
def poll(cls, context):
keymap = getattr(context, "keymap", None)
- return keymap and keymap.is_user_defined
+ return keymap
def execute(self, context):
km = context.keymap
kmi = km.keymap_items.from_id(self.item_id)
- if not kmi.is_user_defined:
+ if (not kmi.is_user_defined) and kmi.is_user_modified:
km.restore_item_to_default(kmi)
return {'FINISHED'}
@@ -753,7 +740,7 @@ class WM_OT_keyitem_remove(bpy.types.Operator):
@classmethod
def poll(cls, context):
- return hasattr(context, "keymap") and context.keymap.is_user_defined
+ return hasattr(context, "keymap")
def execute(self, context):
km = context.keymap
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 9f17020c254..f48804fa79c 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -349,30 +349,6 @@ class VIEW3D_MT_view_navigation(bpy.types.Menu):
layout.operator("view3d.fly")
-class VIEW3D_MT_ndof_settings(bpy.types.Menu):
- bl_label = "3D Mouse Settings"
-
- def draw(self, context):
- layout = self.layout
- input_prefs = context.user_preferences.inputs
-
- layout.separator()
- layout.prop(input_prefs, "ndof_sensitivity")
-
- if context.space_data.type == 'VIEW_3D':
- layout.separator()
- layout.prop(input_prefs, "ndof_show_guide")
-
- layout.separator()
- layout.label(text="orbit options")
- layout.prop(input_prefs, "ndof_orbit_invert_axes")
-
- layout.separator()
- layout.label(text="fly options")
- layout.prop(input_prefs, "ndof_fly_helicopter", icon='NDOF_FLY')
- layout.prop(input_prefs, "ndof_lock_horizon", icon='NDOF_DOM')
-
-
class VIEW3D_MT_view_align(bpy.types.Menu):
bl_label = "Align View"
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 91cfd22b3d6..85dd6f7da5e 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -88,8 +88,9 @@ class VIEW3D_PT_tools_objectmode(View3DPanel, bpy.types.Panel):
col = layout.column(align=True)
col.label(text="Shading:")
- col.operator("object.shade_smooth", text="Smooth")
- col.operator("object.shade_flat", text="Flat")
+ row = col.row(align=True)
+ row.operator("object.shade_smooth", text="Smooth")
+ row.operator("object.shade_flat", text="Flat")
draw_keyframing_tools(context, layout)
@@ -155,8 +156,9 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, bpy.types.Panel):
col = layout.column(align=True)
col.label(text="Shading:")
- col.operator("mesh.faces_shade_smooth", text="Smooth")
- col.operator("mesh.faces_shade_flat", text="Flat")
+ row = col.row(align=True)
+ row.operator("mesh.faces_shade_smooth", text="Smooth")
+ row.operator("mesh.faces_shade_flat", text="Flat")
draw_repeat_tools(context, layout)
diff --git a/release/scripts/templates/operator_modal.py b/release/scripts/templates/operator_modal.py
index 78dbd4c6b43..a428b097f82 100644
--- a/release/scripts/templates/operator_modal.py
+++ b/release/scripts/templates/operator_modal.py
@@ -18,7 +18,7 @@ class ModalOperator(bpy.types.Operator):
elif event.type == 'LEFTMOUSE':
return {'FINISHED'}
- elif event.type in ('RIGHTMOUSE', 'ESC'):
+ elif event.type in {'RIGHTMOUSE', 'ESC'}:
context.object.location.x = self.first_value
return {'CANCELLED'}
@@ -47,4 +47,4 @@ if __name__ == "__main__":
register()
# test call
- bpy.ops.object.modal_operator()
+ bpy.ops.object.modal_operator('INVOKE_DEFAULT')
diff --git a/release/scripts/templates/operator_modal_draw.py b/release/scripts/templates/operator_modal_draw.py
index e7a1f6e4ffe..b3d525a59bf 100644
--- a/release/scripts/templates/operator_modal_draw.py
+++ b/release/scripts/templates/operator_modal_draw.py
@@ -45,7 +45,7 @@ class ModalDrawOperator(bpy.types.Operator):
context.region.callback_remove(self._handle)
return {'FINISHED'}
- elif event.type in ('RIGHTMOUSE', 'ESC'):
+ elif event.type in {'RIGHTMOUSE', 'ESC'}:
context.region.callback_remove(self._handle)
return {'CANCELLED'}
diff --git a/release/scripts/templates/operator_modal_timer.py b/release/scripts/templates/operator_modal_timer.py
index d2267191cf5..ec47390da81 100644
--- a/release/scripts/templates/operator_modal_timer.py
+++ b/release/scripts/templates/operator_modal_timer.py
@@ -10,7 +10,7 @@ class ModalTimerOperator(bpy.types.Operator):
def modal(self, context, event):
if event.type == 'ESC':
- return self.cancel()
+ return self.cancel(context)
if event.type == 'TIMER':
# change theme color, silly!
diff --git a/release/scripts/templates/operator_modal_view3d.py b/release/scripts/templates/operator_modal_view3d.py
index c494f121017..925449835ca 100644
--- a/release/scripts/templates/operator_modal_view3d.py
+++ b/release/scripts/templates/operator_modal_view3d.py
@@ -29,7 +29,7 @@ class ViewOperator(bpy.types.Operator):
context.area.header_text_set()
return {'FINISHED'}
- elif event.type in ('RIGHTMOUSE', 'ESC'):
+ elif event.type in {'RIGHTMOUSE', 'ESC'}:
rv3d.view_location = self._initial_location
context.area.header_text_set()
return {'CANCELLED'}
diff --git a/release/text/readme.html b/release/text/readme.html
index 2b5a4071a7f..95094b9c0cb 100644
--- a/release/text/readme.html
+++ b/release/text/readme.html
@@ -12,22 +12,22 @@
</style>
</head>
<body>
-<p class="title"><b>Blender 2.58</b></p>
+<p class="title"><b>Blender 2.59</b></p>
<p><br></p>
<p class="header"><b>About</b></p>
<p class="body">Welcome to Blender, the free, open source 3D application for modeling, animation, rendering, compositing, video editing and game creation. Blender is available for Linux, Mac OS X, Windows, Solaris and FreeBSD and has a large world-wide community.</p>
<p class="body">Blender can be used freely for any purpose, including commercial use and distribution. It's free and open-source software, released under the GNU GPL licence. The entire source code is available on our website.</p>
<p class="body">For more information, visit <a href="http://www.blender.org">blender.org</a>.</p>
<p><br></p>
-<p class="header"><b>2.58</b></p>
-<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.58. This release is the second official stable release of the Blender 2.5 series, and represents the culmination of many years of redesign and development work. <a href="http://www.blender.org/development/release-logs/blender-258/">More information about this release</a>.</p>
+<p class="header"><b>2.59</b></p>
+<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.59. This release is the third official stable release of the Blender 2.5 series, and represents the culmination of many years of redesign and development work. <a href="http://www.blender.org/development/release-logs/blender-259/">More information about this release</a>.</p>
<p class="body">What to Expect:</p>
<p class="body"> • Big improvements - This is our most exciting version to date, already a significant improvement in many ways over 2.49</p>
<p class="body"> • Missing/Incomplete Features - Although most of it is there, not all functionality from pre-2.5 versions has been restored yet. Some functionality may be re-implemented a different way.</p>
<p class="body"> • Changes - If you're used to the old Blenders, Blender 2.5 may seem quite different at first, but it won't be long before it grows on you even more than before.</p>
<p><br></p>
<p class="header"><b>Bugs</b></p>
-<p class="body">Although Blender 2.58 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender 2.58. If it wasn’t reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
+<p class="body">Although Blender 2.59 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender 2.59. If it wasn’t reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
<p><br></p>
<p class="header"><b>Package Contents</b></p>
<p class="body">The downloaded Blender package includes:</p>
@@ -51,11 +51,11 @@
<p class="header"><b>Links</b></p>
<p class="body">Users:</p>
<p class="body"> General information <a href="http://www.blender.org">www.blender.org</a> <br>
- Full release log <a href="http://www.blender.org/development/release-logs/blender-258/">www.blender.org/development/release-logs/blender-258/</a><br>
+ Full release log <a href="http://www.blender.org/development/release-logs/blender-259/">www.blender.org/development/release-logs/blender-259/</a><br>
Tutorials <a href="http://www.blender.org/education-help/">www.blender.org/education-help/</a> <br>
Manual <a href="http://wiki.blender.org/index.php/Doc:Manual">wiki.blender.org/index.php/Doc:Manual</a><br>
User Forum <a href="http://www.blenderartists.org">www.blenderartists.org</a><br>
- IRC <a href="irc://irc.freenode.net/#blender">#blender on irc.freenode.net</a><br>
+ IRC <a href="irc://irc.freenode.net/#blenderchat">#blenderchat on irc.freenode.net</a><br>
</p>
<p class="body">Developers:</p>
<p class="body"> Development <a href="http://www.blender.org/development/">www.blender.org/development/</a><br>