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>2013-04-05 19:42:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-05 19:42:31 +0400
commit89926a0598a794043ed9b702f32d119fed888c04 (patch)
tree9d6dae64adcd31e738e32141fa9c15219c6cb981 /release
parent83fff218cca47147183c1177de9db1381cfa48e6 (diff)
parent12981b004891aa6dbd2334a4c732ba38c1b0c349 (diff)
svn merge ^/trunk/blender -r55776:55813
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bpy/path.py41
-rw-r--r--release/scripts/modules/bpy_extras/image_utils.py9
-rw-r--r--release/scripts/startup/bl_operators/node.py6
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py5
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_common.py17
-rw-r--r--release/scripts/startup/bl_ui/space_info.py4
-rw-r--r--release/scripts/startup/bl_ui/space_time.py2
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py2
-rw-r--r--release/text/readme.html10
9 files changed, 65 insertions, 31 deletions
diff --git a/release/scripts/modules/bpy/path.py b/release/scripts/modules/bpy/path.py
index 6c91568cbc1..cfc0f474215 100644
--- a/release/scripts/modules/bpy/path.py
+++ b/release/scripts/modules/bpy/path.py
@@ -48,6 +48,10 @@ from _bpy_path import (extensions_audio,
)
+def _getattr_bytes(var, attr):
+ return var.path_resolve(attr, False).as_bytes()
+
+
def abspath(path, start=None, library=None):
"""
Returns the absolute path relative to the current blend file
@@ -60,13 +64,22 @@ def abspath(path, start=None, library=None):
convenience, when the library is not None its path replaces *start*.
:type library: :class:`bpy.types.Library`
"""
- if path.startswith("//"):
- if library:
- start = _os.path.dirname(abspath(library.filepath))
- return _os.path.join(_os.path.dirname(_bpy.data.filepath)
- if start is None else start,
- path[2:],
- )
+ if isinstance(path, bytes):
+ if path.startswith(b"//"):
+ if library:
+ start = _os.path.dirname(abspath(_getattr_bytes(library, "filepath")))
+ return _os.path.join(_os.path.dirname(_getattr_bytes(_bpy.data, "filepath"))
+ if start is None else start,
+ path[2:],
+ )
+ else:
+ if path.startswith("//"):
+ if library:
+ start = _os.path.dirname(abspath(library.filepath))
+ return _os.path.join(_os.path.dirname(_bpy.data.filepath)
+ if start is None else start,
+ path[2:],
+ )
return path
@@ -79,10 +92,16 @@ def relpath(path, start=None):
when not set the current filename is used.
:type start: string
"""
- if not path.startswith("//"):
- if start is None:
- start = _os.path.dirname(_bpy.data.filepath)
- return "//" + _os.path.relpath(path, start)
+ if isinstance(path, bytes):
+ if not path.startswith(b"//"):
+ if start is None:
+ start = _os.path.dirname(_getattr_bytes(_bpy.data, "filepath"))
+ return b"//" + _os.path.relpath(path, start)
+ else:
+ if not path.startswith("//"):
+ if start is None:
+ start = _os.path.dirname(_bpy.data.filepath)
+ return "//" + _os.path.relpath(path, start)
return path
diff --git a/release/scripts/modules/bpy_extras/image_utils.py b/release/scripts/modules/bpy_extras/image_utils.py
index 36994d3fddd..5c63ce1218e 100644
--- a/release/scripts/modules/bpy_extras/image_utils.py
+++ b/release/scripts/modules/bpy_extras/image_utils.py
@@ -31,6 +31,7 @@ def load_image(imagepath,
ncase_cmp=True,
convert_callback=None,
verbose=False,
+ relpath=None,
):
"""
Return an image from the file path with options to search multiple paths
@@ -57,6 +58,8 @@ def load_image(imagepath,
convert it to a PNG and return the PNG's path.
For formats blender can read, simply return the path that is given.
:type convert_callback: function
+ :arg relpath: If not None, make the file relative to this path.
+ :type relpath: None or string
:return: an image or None
:rtype: :class:`bpy.types.Image`
"""
@@ -100,6 +103,12 @@ def load_image(imagepath,
if place_holder and image is None:
image = _image_load_placeholder(path)
+ if image:
+ if relpath is not None:
+ # make relative
+ from bpy.path import relpath as relpath_fn
+ image.filepath_raw = relpath_fn(path, start=relpath)
+
return image
# -------------------------------------------------------------------------
diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py
index c9063436bb3..8f9fa65cf46 100644
--- a/release/scripts/startup/bl_operators/node.py
+++ b/release/scripts/startup/bl_operators/node.py
@@ -29,10 +29,14 @@ class NodeAddOperator():
def store_mouse_cursor(context, event):
space = context.space_data
v2d = context.region.view2d
+ tree = space.edit_tree
# convert mouse position to the View2D for later node placement
- space.cursor_location = v2d.region_to_view(event.mouse_region_x,
+ if context.region.type == 'WINDOW':
+ space.cursor_location = v2d.region_to_view(event.mouse_region_x,
event.mouse_region_y)
+ else:
+ space.cursor_location = tree.view_center
def create_node(self, context, node_type):
space = context.space_data
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 391874ea3dc..b130a8a275d 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -82,6 +82,9 @@ def brush_texture_settings(layout, brush, sculpt):
else:
layout.row().prop(tex_slot, "tex_paint_map_mode", text="")
layout.separator()
+
+ if tex_slot.map_mode == 'STENCIL':
+ layout.operator("brush.stencil_fit_image_aspect")
# angle and texture_angle_source
col = layout.column()
@@ -117,7 +120,7 @@ def brush_texture_settings(layout, brush, sculpt):
def brush_mask_texture_settings(layout, brush):
mask_tex_slot = brush.mask_texture_slot
- if(brush.mask_texture):
+ if brush.mask_texture:
layout.label(text="Mask Mapping:")
col = layout.column()
col.active = brush.brush_capabilities.has_texture_angle
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py
index b02a53302e7..3d7fe59ff77 100644
--- a/release/scripts/startup/bl_ui/properties_physics_common.py
+++ b/release/scripts/startup/bl_ui/properties_physics_common.py
@@ -39,7 +39,7 @@ def physics_add(self, layout, md, name, type, typeicon, toggles):
if md:
sub.context_pointer_set("modifier", md)
sub.operator("object.modifier_remove", text=name, text_ctxt=i18n_contexts.default, icon='X')
- if(toggles):
+ if toggles:
sub.prop(md, "show_render", text="")
sub.prop(md, "show_viewport", text="")
else:
@@ -59,40 +59,39 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
bl_options = {'HIDE_HEADER'}
def draw(self, context):
- ob = context.object
+ obj = context.object
layout = self.layout
layout.label("Enable physics for:")
split = layout.split()
col = split.column()
- if(context.object.field.type == 'NONE'):
+ if obj.field.type == 'NONE':
col.operator("object.forcefield_toggle", text="Force Field", icon='FORCE_FORCE')
else:
col.operator("object.forcefield_toggle", text="Force Field", icon='X')
- if(ob.type == 'MESH'):
+ if obj.type == 'MESH':
physics_add(self, col, context.collision, "Collision", 'COLLISION', 'MOD_PHYSICS', False)
physics_add(self, col, context.cloth, "Cloth", 'CLOTH', 'MOD_CLOTH', True)
physics_add(self, col, context.dynamic_paint, "Dynamic Paint", 'DYNAMIC_PAINT', 'MOD_DYNAMICPAINT', True)
col = split.column()
- if(ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE'):
+ if obj.type in {'MESH', 'LATTICE', 'CURVE'}:
physics_add(self, col, context.soft_body, "Soft Body", 'SOFT_BODY', 'MOD_SOFT', True)
- if(ob.type == 'MESH'):
+ if obj.type == 'MESH':
physics_add(self, col, context.fluid, "Fluid", 'FLUID_SIMULATION', 'MOD_FLUIDSIM', True)
physics_add(self, col, context.smoke, "Smoke", 'SMOKE', 'MOD_SMOKE', True)
- if(ob.type == 'MESH'):
- physics_add_special(self, col, ob.rigid_body, "Rigid Body",
+ physics_add_special(self, col, obj.rigid_body, "Rigid Body",
"rigidbody.object_add",
"rigidbody.object_remove",
'MESH_ICOSPHERE') # XXX: need dedicated icon
# all types of objects can have rigid body constraint
- physics_add_special(self, col, ob.rigid_body_constraint, "Rigid Body Constraint",
+ physics_add_special(self, col, obj.rigid_body_constraint, "Rigid Body Constraint",
"rigidbody.constraint_add",
"rigidbody.constraint_remove",
'CONSTRAINT') # RB_TODO needs better icon
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index d782bb1b3b9..4ea366e3541 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -304,7 +304,7 @@ class INFO_MT_add(Menu):
layout.operator_menu_enum("object.effector_add", "type", text="Force Field", icon='OUTLINER_OB_EMPTY')
layout.separator()
- if(len(bpy.data.groups) > 10):
+ if len(bpy.data.groups) > 10:
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("object.group_instance_add", text="Group Instance...", icon='OUTLINER_OB_EMPTY')
else:
@@ -380,7 +380,7 @@ class INFO_MT_help(Menu):
layout = self.layout
layout.operator("wm.url_open", text="Manual", icon='HELP').url = "http://wiki.blender.org/index.php/Doc:2.6/Manual"
- layout.operator("wm.url_open", text="Release Log", icon='URL').url = "http://www.blender.org/development/release-logs/blender-266"
+ layout.operator("wm.url_open", text="Release Log", icon='URL').url = "http://www.blender.org/development/release-logs/blender-267"
layout.separator()
layout.operator("wm.url_open", text="Blender Website", icon='URL').url = "http://www.blender.org"
diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py
index 6af9f377237..becdc792230 100644
--- a/release/scripts/startup/bl_ui/space_time.py
+++ b/release/scripts/startup/bl_ui/space_time.py
@@ -214,7 +214,7 @@ def marker_menu_generic(layout):
layout.operator("marker.add", "Add Marker")
layout.operator("marker.duplicate", text="Duplicate Marker")
- if(len(bpy.data.scenes) > 10):
+ if len(bpy.data.scenes) > 10:
layout.operator_context = 'INVOKE_DEFAULT'
layout.operator("marker.make_links_scene", text="Duplicate Marker to Scene...", icon='OUTLINER_OB_EMPTY')
else:
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 8f65eb5b726..39ef38503da 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1113,7 +1113,7 @@ class VIEW3D_MT_make_links(Menu):
def draw(self, context):
layout = self.layout
operator_context_default = layout.operator_context
- if(len(bpy.data.scenes) > 10):
+ if len(bpy.data.scenes) > 10:
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("object.make_links_scene", text="Objects to Scene...", icon='OUTLINER_OB_EMPTY')
else:
diff --git a/release/text/readme.html b/release/text/readme.html
index 54d112c5e2b..f45ec47030a 100644
--- a/release/text/readme.html
+++ b/release/text/readme.html
@@ -12,18 +12,18 @@
</style>
</head>
<body>
-<p class="title"><b>Blender 2.66</b></p>
+<p class="title"><b>Blender 2.67</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 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.66</b></p>
-<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.66. This release is the seventh official stable release of the Blender 2.6 series, in which we will refine the 2.5 series and add exciting new features. <a href="http://www.blender.org/development/release-logs/blender-266/">More information about this release</a>.</p>
+<p class="header"><b>2.67</b></p>
+<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.67. This release is the eight official stable release of the Blender 2.6 series, in which we will refine the 2.5 series and add exciting new features. <a href="http://www.blender.org/development/release-logs/blender-267/">More information about this release</a>.</p>
<p><br></p>
<p class="header"><b>Bugs</b></p>
-<p class="body">Although Blender 2.66 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. 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.67 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. 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>
@@ -47,7 +47,7 @@
<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-266/">www.blender.org/development/release-logs/blender-266/</a><br>
+ Full release log <a href="http://www.blender.org/development/release-logs/blender-267/">www.blender.org/development/release-logs/blender-267/</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:2.6/Manual">wiki.blender.org/index.php/Doc:2.6/Manual</a><br>
User Forum <a href="http://www.blenderartists.org">www.blenderartists.org</a><br>