[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38715] branches/bmesh/blender: svn merge -r38500:38600 https://svn.blender.org/svnroot/bf-blender/trunk/ blender
Campbell Barton
ideasman42 at gmail.com
Tue Jul 26 06:17:17 CEST 2011
Revision: 38715
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38715
Author: campbellbarton
Date: 2011-07-26 04:17:15 +0000 (Tue, 26 Jul 2011)
Log Message:
-----------
svn merge -r38500:38600 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38500
Modified Paths:
--------------
branches/bmesh/blender/CMakeLists.txt
branches/bmesh/blender/GNUmakefile
branches/bmesh/blender/build_files/scons/tools/Blender.py
branches/bmesh/blender/release/scripts/modules/bpy/path.py
branches/bmesh/blender/release/scripts/modules/bpy/utils.py
branches/bmesh/blender/release/scripts/modules/bpy_extras/image_utils.py
branches/bmesh/blender/release/scripts/startup/bl_operators/image.py
branches/bmesh/blender/release/scripts/startup/bl_operators/object_align.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_material.py
branches/bmesh/blender/release/scripts/startup/bl_ui/space_image.py
branches/bmesh/blender/source/blender/blenkernel/CMakeLists.txt
branches/bmesh/blender/source/blender/blenkernel/SConscript
branches/bmesh/blender/source/blender/blenkernel/intern/image.c
branches/bmesh/blender/source/blender/blenkernel/intern/writeavi.c
branches/bmesh/blender/source/blender/blenkernel/intern/writeframeserver.c
branches/bmesh/blender/source/blender/blenlib/intern/path_util.c
branches/bmesh/blender/source/blender/blenloader/intern/readfile.c
branches/bmesh/blender/source/blender/bmesh/operators/mesh_conv.c
branches/bmesh/blender/source/blender/editors/object/object_bake.c
branches/bmesh/blender/source/blender/editors/render/render_shading.c
branches/bmesh/blender/source/blender/editors/space_image/image_buttons.c
branches/bmesh/blender/source/blender/editors/space_image/image_ops.c
branches/bmesh/blender/source/blender/editors/space_view3d/drawobject.c
branches/bmesh/blender/source/blender/editors/space_view3d/view3d_draw.c
branches/bmesh/blender/source/blender/editors/space_view3d/view3d_intern.h
branches/bmesh/blender/source/blender/editors/transform/transform.c
branches/bmesh/blender/source/blender/editors/transform/transform_ops.c
branches/bmesh/blender/source/blender/editors/uvedit/uvedit_ops.c
branches/bmesh/blender/source/blender/makesdna/DNA_image_types.h
branches/bmesh/blender/source/blender/makesdna/DNA_scene_types.h
branches/bmesh/blender/source/blender/makesrna/intern/CMakeLists.txt
branches/bmesh/blender/source/blender/makesrna/intern/SConscript
branches/bmesh/blender/source/blender/makesrna/intern/rna_image.c
branches/bmesh/blender/source/blender/makesrna/intern/rna_object.c
branches/bmesh/blender/source/blender/makesrna/intern/rna_object_api.c
branches/bmesh/blender/source/blender/makesrna/intern/rna_scene.c
branches/bmesh/blender/source/blender/nodes/intern/SHD_util.c
branches/bmesh/blender/source/blender/python/mathutils/mathutils_Matrix.c
branches/bmesh/blender/source/blender/render/intern/source/convertblender.c
branches/bmesh/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp
Added Paths:
-----------
branches/bmesh/blender/source/tests/check_deprecated.py
Property Changed:
----------------
branches/bmesh/blender/
branches/bmesh/blender/release/scripts/startup/bl_operators/add_mesh_torus.py
branches/bmesh/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py
branches/bmesh/blender/release/scripts/startup/bl_operators/vertexpaint_dirt.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_armature.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_bone.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_camera.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_empty.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_lamp.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_lattice.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_mesh.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_metaball.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_modifier.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_game.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_material.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_particle.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_physics_field.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_physics_smoke.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_texture.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_world.py
branches/bmesh/blender/release/scripts/startup/bl_ui/space_node.py
branches/bmesh/blender/source/blender/editors/render/render_update.c
branches/bmesh/blender/source/blender/editors/uvedit/uvedit_buttons.c
Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/blender:31524-38500
+ /trunk/blender:31524-38600
Modified: branches/bmesh/blender/CMakeLists.txt
===================================================================
--- branches/bmesh/blender/CMakeLists.txt 2011-07-26 03:55:23 UTC (rev 38714)
+++ branches/bmesh/blender/CMakeLists.txt 2011-07-26 04:17:15 UTC (rev 38715)
@@ -155,6 +155,7 @@
option(WITH_IMAGE_CINEON "Enable CINEON and DPX Image Support" ON)
option(WITH_IMAGE_HDR "Enable HDR Image Support" ON)
option(WITH_IMAGE_REDCODE "Enable RedCode Image Support" OFF)
+option(WITH_IMAGE_FRAMESERVER "Enable image FrameServer Support for rendering" ON)
# Audio/Video format support
option(WITH_CODEC_FFMPEG "Enable FFMPeg Support (http://ffmpeg.org)" OFF)
Modified: branches/bmesh/blender/GNUmakefile
===================================================================
--- branches/bmesh/blender/GNUmakefile 2011-07-26 03:55:23 UTC (rev 38714)
+++ branches/bmesh/blender/GNUmakefile 2011-07-26 04:17:15 UTC (rev 38715)
@@ -73,7 +73,7 @@
@echo
@echo Building Blender ...
- make -C $(BUILD_DIR) -s -j $(NPROCS) install
+ $(MAKE) -C $(BUILD_DIR) -s -j $(NPROCS) install
@echo
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
@echo blender installed, run from: "$(BUILD_DIR)/bin/blender"
@@ -112,6 +112,6 @@
python3 source/tests/check_deprecated.py
clean:
- make -C $(BUILD_DIR) clean
+ $(MAKE) -C $(BUILD_DIR) clean
.PHONY: all
Modified: branches/bmesh/blender/build_files/scons/tools/Blender.py
===================================================================
--- branches/bmesh/blender/build_files/scons/tools/Blender.py 2011-07-26 03:55:23 UTC (rev 38714)
+++ branches/bmesh/blender/build_files/scons/tools/Blender.py 2011-07-26 04:17:15 UTC (rev 38715)
@@ -320,11 +320,7 @@
defs.append('WITH_PYTHON')
if env['BF_DEBUG']:
defs.append('_DEBUG')
-
- if env['BF_BUILDINFO']:
- defs.append('BUILD_DATE')
- defs.append('NAN_BUILDINFO')
-
+
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs.append(env['BF_PTHREADS_INC'])
Modified: branches/bmesh/blender/release/scripts/modules/bpy/path.py
===================================================================
--- branches/bmesh/blender/release/scripts/modules/bpy/path.py 2011-07-26 03:55:23 UTC (rev 38714)
+++ branches/bmesh/blender/release/scripts/modules/bpy/path.py 2011-07-26 04:17:15 UTC (rev 38715)
@@ -35,7 +35,7 @@
:type start: string
"""
if path.startswith("//"):
- return _os.path.join(_os.path.dirname(_bpy.data.filepath if start is None else start), path[2:])
+ return _os.path.join(_os.path.dirname(_bpy.data.filepath) if start is None else start, path[2:])
return path
@@ -117,7 +117,7 @@
"""
Returns the path stripped of directort and extension, ensured to be utf8 compatible.
"""
- return _os.path.splitext(_os.path.basename(name))[0].encode("utf8", "replace").decode("utf8")
+ return _os.path.splitext(basename(name))[0].encode("utf8", "replace").decode("utf8")
def resolve_ncase(path):
@@ -231,3 +231,12 @@
modules.append(("%s.%s" % (filename, mod_name), mod_path))
return modules
+
+
+def basename(path):
+ """
+ Equivalent to os.path.basename, but skips a "//" suffix.
+
+ Use for Windows compatibility.
+ """
+ return _os.path.basename(path[2:] if path.startswith("//") else path)
Modified: branches/bmesh/blender/release/scripts/modules/bpy/utils.py
===================================================================
--- branches/bmesh/blender/release/scripts/modules/bpy/utils.py 2011-07-26 03:55:23 UTC (rev 38714)
+++ branches/bmesh/blender/release/scripts/modules/bpy/utils.py 2011-07-26 04:17:15 UTC (rev 38715)
@@ -298,11 +298,18 @@
def preset_paths(subdir):
"""
Returns a list of paths for a specific preset.
+
+ :arg subdir: preset subdirectory (must not be an absolute path).
+ :type subdir: string
+ :return: script paths.
+ :rtype: list
"""
dirs = []
for path in script_paths("presets", all=True):
directory = _os.path.join(path, subdir)
- if _os.path.isdir(directory):
+ if not directory.startswith(path):
+ raise Exception("invalid subdir given %r" % subdir)
+ elif _os.path.isdir(directory):
dirs.append(directory)
return dirs
Modified: branches/bmesh/blender/release/scripts/modules/bpy_extras/image_utils.py
===================================================================
--- branches/bmesh/blender/release/scripts/modules/bpy_extras/image_utils.py 2011-07-26 03:55:23 UTC (rev 38714)
+++ branches/bmesh/blender/release/scripts/modules/bpy_extras/image_utils.py 2011-07-26 04:17:15 UTC (rev 38715)
@@ -86,7 +86,9 @@
variants = [imagepath]
if dirname:
- variants += [os.path.join(dirname, imagepath), os.path.join(dirname, os.path.basename(imagepath))]
+ variants += [os.path.join(dirname, imagepath),
+ os.path.join(dirname, bpy.path.basename(imagepath)),
+ ]
for filepath_test in variants:
if ncase_cmp:
@@ -99,7 +101,7 @@
return _image_load(nfilepath)
if place_holder:
- image = bpy.data.images.new(os.path.basename(imagepath), 128, 128)
+ image = bpy.data.images.new(bpy.path.basename(imagepath), 128, 128)
# allow the path to be resolved later
image.filepath = imagepath
return image
Property changes on: branches/bmesh/blender/release/scripts/startup/bl_operators/add_mesh_torus.py
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py:36154-38500
+ /trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py:36154-38600
Modified: branches/bmesh/blender/release/scripts/startup/bl_operators/image.py
===================================================================
--- branches/bmesh/blender/release/scripts/startup/bl_operators/image.py 2011-07-26 03:55:23 UTC (rev 38714)
+++ branches/bmesh/blender/release/scripts/startup/bl_operators/image.py 2011-07-26 04:17:15 UTC (rev 38715)
@@ -163,7 +163,7 @@
filepath_final = filepath + ("%.3d.%s" % (i, EXT))
i += 1
- image_new.name = os.path.basename(filepath_final)
+ image_new.name = bpy.path.basename(filepath_final)
ProjectEdit._proj_hack[0] = image_new.name
image_new.filepath_raw = filepath_final # TODO, filepath raw is crummy
Modified: branches/bmesh/blender/release/scripts/startup/bl_operators/object_align.py
===================================================================
--- branches/bmesh/blender/release/scripts/startup/bl_operators/object_align.py 2011-07-26 03:55:23 UTC (rev 38714)
+++ branches/bmesh/blender/release/scripts/startup/bl_operators/object_align.py 2011-07-26 04:17:15 UTC (rev 38715)
@@ -21,13 +21,102 @@
import bpy
from mathutils import Vector
+def GlobalBB_LQ(bb_world):
+
+ # Initialize the variables with the 8th vertex
+ left, right, front, back, down, up =\
+ bb_world[7][0],\
+ bb_world[7][0],\
+ bb_world[7][1],\
+ bb_world[7][1],\
+ bb_world[7][2],\
+ bb_world[7][2]
+
+ # Test against the other 7 verts
+ for i in range (7):
+
+ # X Range
+ val = bb_world[i][0]
+ if val < left:
+ left = val
+
+ if val > right:
+ right = val
+
+ # Y Range
+ val = bb_world[i][1]
+ if val < front:
+ front = val
+
+ if val > back:
+ back = val
+
+ # Z Range
+ val = bb_world[i][2]
+ if val < down:
+ down = val
+
+ if val > up:
+ up = val
+
+ return (Vector((left, front, up)), Vector((right, back, down)))
-def align_objects(align_x, align_y, align_z, align_mode, relative_to):
+def GlobalBB_HQ(obj):
+
+ matrix_world = obj.matrix_world.copy()
+
+ # Initialize the variables with the last vertex
+
+ verts = obj.data.vertices
+
+ val = verts[-1].co * matrix_world
+
+ left, right, front, back, down, up =\
+ val[0],\
+ val[0],\
+ val[1],\
+ val[1],\
+ val[2],\
+ val[2]
+
+ # Test against all other verts
+ for i in range (len(verts)-1):
+
+ vco = verts[i].co * matrix_world
+
+ # X Range
+ val = vco[0]
+ if val < left:
+ left = val
+
+ if val > right:
+ right = val
+
+ # Y Range
+ val = vco[1]
+ if val < front:
+ front = val
+
+ if val > back:
+ back = val
+
+ # Z Range
+ val = vco[2]
+ if val < down:
+ down = val
+
+ if val > up:
+ up = val
+
+ return (Vector((left, front, up)), Vector((right, back, down)))
+
+def align_objects(align_x, align_y, align_z, align_mode, relative_to, bb_quality):
+
cursor = bpy.context.scene.cursor_location
- Left_Up_Front_SEL = [0.0, 0.0, 0.0]
- Right_Down_Back_SEL = [0.0, 0.0, 0.0]
+ Left_Front_Up_SEL = [0.0, 0.0, 0.0]
+ Right_Back_Down_SEL = [0.0, 0.0, 0.0]
flag_first = True
@@ -42,79 +131,90 @@
return False
for obj, bb_world in objs:
- Left_Up_Front = bb_world[1]
- Right_Down_Back = bb_world[7]
+
+ if bb_quality:
+ GBB = GlobalBB_HQ(obj)
+ else:
+ GBB = GlobalBB_LQ(bb_world)
+
+ Left_Front_Up = GBB[0]
+ Right_Back_Down = GBB[1]
# Active Center
if obj == bpy.context.active_object:
- center_active_x = (Left_Up_Front[0] + Right_Down_Back[0]) / 2.0
- center_active_y = (Left_Up_Front[1] + Right_Down_Back[1]) / 2.0
- center_active_z = (Left_Up_Front[2] + Right_Down_Back[2]) / 2.0
+ center_active_x = (Left_Front_Up[0] + Right_Back_Down[0]) / 2.0
+ center_active_y = (Left_Front_Up[1] + Right_Back_Down[1]) / 2.0
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list