Revision: 30513 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30513 Author: nexyon Date: 2010-07-20 00:43:45 +0200 (Tue, 20 Jul 2010)
Log Message: ----------- svn merge -r 30418:30512 https://svn.blender.org/svnroot/bf-blender/trunk/blender Modified Paths: -------------- branches/soc-2010-nexyon/SConstruct branches/soc-2010-nexyon/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp branches/soc-2010-nexyon/intern/audaspace/Python/AUD_PyAPI.cpp branches/soc-2010-nexyon/release/scripts/io/export_3ds.py branches/soc-2010-nexyon/release/scripts/io/export_fbx.py branches/soc-2010-nexyon/release/scripts/io/export_obj.py branches/soc-2010-nexyon/release/scripts/io/netrender/master_html.py branches/soc-2010-nexyon/release/scripts/io/netrender/repath.py branches/soc-2010-nexyon/release/scripts/io/netrender/slave.py branches/soc-2010-nexyon/release/scripts/io/netrender/utils.py branches/soc-2010-nexyon/release/scripts/modules/bpy/utils.py branches/soc-2010-nexyon/release/scripts/op/sequencer.py branches/soc-2010-nexyon/release/scripts/op/uvcalc_smart_project.py branches/soc-2010-nexyon/release/scripts/presets/interaction/maya.py branches/soc-2010-nexyon/release/scripts/ui/properties_material.py branches/soc-2010-nexyon/release/scripts/ui/properties_render.py branches/soc-2010-nexyon/release/scripts/ui/properties_world.py branches/soc-2010-nexyon/release/scripts/ui/space_info.py branches/soc-2010-nexyon/release/scripts/ui/space_sequencer.py branches/soc-2010-nexyon/release/scripts/ui/space_userpref.py branches/soc-2010-nexyon/release/scripts/ui/space_view3d_toolbar.py branches/soc-2010-nexyon/source/blender/blenkernel/BKE_library.h branches/soc-2010-nexyon/source/blender/blenkernel/BKE_object.h branches/soc-2010-nexyon/source/blender/blenkernel/BKE_particle.h branches/soc-2010-nexyon/source/blender/blenkernel/BKE_sequencer.h branches/soc-2010-nexyon/source/blender/blenkernel/intern/brush.c branches/soc-2010-nexyon/source/blender/blenkernel/intern/curve.c branches/soc-2010-nexyon/source/blender/blenkernel/intern/image.c branches/soc-2010-nexyon/source/blender/blenkernel/intern/library.c branches/soc-2010-nexyon/source/blender/blenkernel/intern/object.c branches/soc-2010-nexyon/source/blender/blenkernel/intern/particle.c branches/soc-2010-nexyon/source/blender/blenkernel/intern/particle_system.c branches/soc-2010-nexyon/source/blender/blenkernel/intern/sca.c branches/soc-2010-nexyon/source/blender/blenkernel/intern/sequencer.c branches/soc-2010-nexyon/source/blender/blenlib/intern/fileops.c branches/soc-2010-nexyon/source/blender/blenlib/intern/math_color.c branches/soc-2010-nexyon/source/blender/blenlib/intern/path_util.c branches/soc-2010-nexyon/source/blender/blenlib/intern/storage.c branches/soc-2010-nexyon/source/blender/blenloader/intern/readfile.c branches/soc-2010-nexyon/source/blender/editors/animation/anim_channels_edit.c branches/soc-2010-nexyon/source/blender/editors/animation/anim_markers.c branches/soc-2010-nexyon/source/blender/editors/armature/armature_ops.c branches/soc-2010-nexyon/source/blender/editors/armature/poseobject.c branches/soc-2010-nexyon/source/blender/editors/curve/curve_ops.c branches/soc-2010-nexyon/source/blender/editors/datafiles/startup.blend.c branches/soc-2010-nexyon/source/blender/editors/interface/interface_templates.c branches/soc-2010-nexyon/source/blender/editors/mesh/editmesh_mods.c branches/soc-2010-nexyon/source/blender/editors/mesh/mesh_ops.c branches/soc-2010-nexyon/source/blender/editors/metaball/mball_ops.c branches/soc-2010-nexyon/source/blender/editors/object/object_ops.c branches/soc-2010-nexyon/source/blender/editors/physics/physics_ops.c branches/soc-2010-nexyon/source/blender/editors/screen/screen_edit.c branches/soc-2010-nexyon/source/blender/editors/screen/screen_ops.c branches/soc-2010-nexyon/source/blender/editors/sculpt_paint/paint_image.c branches/soc-2010-nexyon/source/blender/editors/sculpt_paint/sculpt.c branches/soc-2010-nexyon/source/blender/editors/space_action/action_ops.c branches/soc-2010-nexyon/source/blender/editors/space_file/space_file.c branches/soc-2010-nexyon/source/blender/editors/space_graph/graph_ops.c branches/soc-2010-nexyon/source/blender/editors/space_nla/nla_ops.c branches/soc-2010-nexyon/source/blender/editors/space_node/node_ops.c branches/soc-2010-nexyon/source/blender/editors/space_sequencer/sequencer_draw.c branches/soc-2010-nexyon/source/blender/editors/space_sequencer/sequencer_edit.c branches/soc-2010-nexyon/source/blender/editors/space_sequencer/sequencer_ops.c branches/soc-2010-nexyon/source/blender/editors/space_view3d/drawobject.c branches/soc-2010-nexyon/source/blender/editors/space_view3d/view3d_draw.c branches/soc-2010-nexyon/source/blender/editors/space_view3d/view3d_view.c branches/soc-2010-nexyon/source/blender/editors/transform/transform_conversions.c branches/soc-2010-nexyon/source/blender/imbuf/intern/anim.c branches/soc-2010-nexyon/source/blender/imbuf/intern/imageprocess.c branches/soc-2010-nexyon/source/blender/imbuf/intern/png.c branches/soc-2010-nexyon/source/blender/imbuf/intern/thumbs_blend.c branches/soc-2010-nexyon/source/blender/makesdna/DNA_object_types.h branches/soc-2010-nexyon/source/blender/makesdna/intern/dna_genfile.c branches/soc-2010-nexyon/source/blender/makesrna/intern/makesrna.c branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_action.c branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_actuator.c branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_controller.c branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_curve.c branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_object.c branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_scene.c branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_sequencer.c branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_world.c branches/soc-2010-nexyon/source/blender/makesrna/rna_cleanup/rna_cleaner.py branches/soc-2010-nexyon/source/blender/modifiers/intern/MOD_screw.c branches/soc-2010-nexyon/source/blender/python/generic/bpy_internal_import.c branches/soc-2010-nexyon/source/blender/python/generic/geometry.c branches/soc-2010-nexyon/source/blender/python/generic/mathutils.c branches/soc-2010-nexyon/source/blender/python/generic/mathutils_vector.c branches/soc-2010-nexyon/source/blender/python/intern/bpy_rna.c branches/soc-2010-nexyon/source/blender/render/intern/source/convertblender.c branches/soc-2010-nexyon/source/blender/render/intern/source/pipeline.c branches/soc-2010-nexyon/source/blender/windowmanager/WM_api.h branches/soc-2010-nexyon/source/blender/windowmanager/intern/wm_event_system.c branches/soc-2010-nexyon/source/blender/windowmanager/intern/wm_files.c branches/soc-2010-nexyon/source/blender/windowmanager/intern/wm_jobs.c branches/soc-2010-nexyon/source/blender/windowmanager/intern/wm_operators.c branches/soc-2010-nexyon/source/creator/CMakeLists.txt branches/soc-2010-nexyon/source/gameengine/Expressions/PyObjectPlus.cpp branches/soc-2010-nexyon/source/gameengine/GameLogic/SCA_PythonController.cpp branches/soc-2010-nexyon/source/gameengine/Ketsji/KX_PythonSeq.cpp branches/soc-2010-nexyon/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp Added Paths: ----------- branches/soc-2010-nexyon/bin/blender-thumbnailer.py branches/soc-2010-nexyon/release/datafiles/brushicons/ branches/soc-2010-nexyon/release/datafiles/brushicons/clay.png branches/soc-2010-nexyon/release/datafiles/brushicons/crease.png branches/soc-2010-nexyon/release/datafiles/brushicons/draw.png branches/soc-2010-nexyon/release/datafiles/brushicons/fill.png branches/soc-2010-nexyon/release/datafiles/brushicons/flatten.png branches/soc-2010-nexyon/release/datafiles/brushicons/grab.png branches/soc-2010-nexyon/release/datafiles/brushicons/inflate.png branches/soc-2010-nexyon/release/datafiles/brushicons/layer.png branches/soc-2010-nexyon/release/datafiles/brushicons/nudge.png branches/soc-2010-nexyon/release/datafiles/brushicons/pinch.png branches/soc-2010-nexyon/release/datafiles/brushicons/scrape.png branches/soc-2010-nexyon/release/datafiles/brushicons/smooth.png branches/soc-2010-nexyon/release/datafiles/brushicons/snake_hook.png branches/soc-2010-nexyon/release/datafiles/brushicons/thumb.png branches/soc-2010-nexyon/release/datafiles/brushicons/twist.png Removed Paths: ------------- branches/soc-2010-nexyon/release/datafiles/brushicons/clay.png branches/soc-2010-nexyon/release/datafiles/brushicons/crease.png branches/soc-2010-nexyon/release/datafiles/brushicons/draw.png branches/soc-2010-nexyon/release/datafiles/brushicons/fill.png branches/soc-2010-nexyon/release/datafiles/brushicons/flatten.png branches/soc-2010-nexyon/release/datafiles/brushicons/grab.png branches/soc-2010-nexyon/release/datafiles/brushicons/inflate.png branches/soc-2010-nexyon/release/datafiles/brushicons/layer.png branches/soc-2010-nexyon/release/datafiles/brushicons/nudge.png branches/soc-2010-nexyon/release/datafiles/brushicons/pinch.png branches/soc-2010-nexyon/release/datafiles/brushicons/scrape.png branches/soc-2010-nexyon/release/datafiles/brushicons/smooth.png branches/soc-2010-nexyon/release/datafiles/brushicons/snake_hook.png branches/soc-2010-nexyon/release/datafiles/brushicons/thumb.png branches/soc-2010-nexyon/release/datafiles/brushicons/twist.png branches/soc-2010-nexyon/release/freedesktop/blender-thumbnailer.py Modified: branches/soc-2010-nexyon/SConstruct =================================================================== --- branches/soc-2010-nexyon/SConstruct 2010-07-19 22:05:25 UTC (rev 30512) +++ branches/soc-2010-nexyon/SConstruct 2010-07-19 22:43:45 UTC (rev 30513) @@ -46,8 +46,11 @@ import re from tempfile import mkdtemp +# store path to tools +toolpath=os.path.join(".", "build_files", "scons", "tools") + # needed for importing tools -sys.path.append(os.path.join(".", "build_files", "scons", "tools")) +sys.path.append(toolpath) import Blender import btools @@ -121,7 +124,7 @@ print "Using " + toolset if toolset=='mstoolkit': env = BlenderEnvironment(ENV = os.environ) - env.Tool('mstoolkit', ['tools']) + env.Tool('mstoolkit', [toolpath]) else: env = BlenderEnvironment(tools=[toolset], ENV = os.environ) # xxx commented out, as was supressing warnings under mingw.. @@ -170,7 +173,7 @@ if crossbuild and env['PLATFORM'] != 'win32': print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC - env.Tool('crossmingw', ['tools']) + env.Tool('crossmingw', [toolpath]) # todo: determine proper libs/includes etc. # Needed for gui programs, console programs should do without it @@ -627,9 +630,6 @@ '${BF_FFMPEG_LIBPATH}/avdevice-52.dll', '${BF_FFMPEG_LIBPATH}/avutil-50.dll', '${BF_FFMPEG_LIBPATH}/swscale-0.dll'] - - if env['WITH_BF_JACK']: - dllsources += ['${LCGDIR}/jack/lib/libjack.dll'] windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources) allinstall += windlls Copied: branches/soc-2010-nexyon/bin/blender-thumbnailer.py (from rev 30512, trunk/blender/bin/blender-thumbnailer.py) =================================================================== --- branches/soc-2010-nexyon/bin/blender-thumbnailer.py (rev 0) +++ branches/soc-2010-nexyon/bin/blender-thumbnailer.py 2010-07-19 22:43:45 UTC (rev 30513) @@ -0,0 +1,131 @@ +#!/usr/bin/python + +# ##### 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 ##### + +""" +Thumbnailer runs with python 2.6 and 3.x. +To run automatically with nautilus: + gconftool --type boolean --set /desktop/gnome/thumbnailers/applicat...@x-blender/enable true + gconftool --type string --set /desktop/gnome/thumbnailers/applicat...@x-blender/command "blender-thumbnailer.py %i %o" +""" + +import struct + +def blend_extract_thumb(path): + import os + + # def MAKE_ID(tag): ord(tag[0])<<24 | ord(tag[1])<<16 | ord(tag[2])<<8 | ord(tag[3]) + REND = 1145980242 # MAKE_ID(b'REND') + TEST = 1414743380 # MAKE_ID(b'TEST') + + blendfile = open(path, 'rb') + + head = blendfile.read(12) + + if head[0:2] == b'\x1f\x8b': # gzip magic + import gzip + blendfile.close() + blendfile = gzip.open(path, 'rb') + head = blendfile.read(12) + + if not head.startswith(b'BLENDER'): + blendfile.close() + return None, 0, 0 + + is_64_bit = (head[7] == b'-') + + # true for PPC, false for X86 + is_big_endian = (head[8] == b'V') + + # blender pre 2.5 had no thumbs + if head[9:11] <= b'24': + return None, 0, 0 + + sizeof_bhead = 24 if is_64_bit else 20 + int_endian_pair = '>ii' if is_big_endian else '<ii' + + while True: + bhead = blendfile.read(sizeof_bhead) + + if len(bhead) < sizeof_bhead: + return None, 0, 0 + + code, length = struct.unpack(int_endian_pair, bhead[0:8]) # 8 == sizeof(int) * 2 + + if code == REND: + blendfile.seek(length, os.SEEK_CUR) + else: + break + + + if code != TEST: + return None, 0, 0 + + try: + x, y = struct.unpack(int_endian_pair, blendfile.read(8)) # 8 == sizeof(int) * 2 + except struct.error: + return None, 0, 0 + + length -= 8 # sizeof(int) * 2 + + if length != x * y * 4: + return None, 0, 0 + + image_buffer = blendfile.read(length) + + if len(image_buffer) != length: + return None, 0, 0 + + return image_buffer, x, y + + +def write_png(buf, width, height): + import zlib + + # reverse the vertical line order and add null bytes at the start + width_byte_4 = width * 4 + raw_data = b"".join([b'\x00' + buf[span:span + width_byte_4] for span in range((height - 1) * width * 4, -1, - width_byte_4)]) + + def png_pack(png_tag, data): + chunk_head = png_tag + data + return struct.pack("!I", len(data)) + chunk_head + struct.pack("!I", 0xFFFFFFFF & zlib.crc32(chunk_head)) + + return b"".join([ + b'\x89PNG\r\n\x1a\n', + png_pack(b'IHDR', struct.pack("!2I5B", width, height, 8, 6, 0, 0, 0)), + png_pack(b'IDAT', zlib.compress(raw_data, 9)), + png_pack(b'IEND', b'')]) + + +if __name__ == '__main__': + import sys + + if len(sys.argv) < 2: + print("Expected 2 arguments <input.blend> <output.png>") + else: + file_in = sys.argv[-2] + + buf, width, height = blend_extract_thumb(file_in) + + if buf: + file_out = sys.argv[-1] + + f = open(file_out, "wb") + f.write(write_png(buf, width, height)) + f.close() Modified: branches/soc-2010-nexyon/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp =================================================================== --- branches/soc-2010-nexyon/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp 2010-07-19 22:05:25 UTC (rev 30512) +++ branches/soc-2010-nexyon/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp 2010-07-19 22:43:45 UTC (rev 30513) @@ -601,7 +601,7 @@ m_solveSwingLimit = false; // compute rotation of A wrt B (in constraint space) if (m_bMotorEnabled && (!m_useSolveConstraintObsolete)) - { // it is assumed that setMotorTarget() was alredy called + { // it is assumed that setMotorTarget() was already called // and motor target m_qTarget is within constraint limits // TODO : split rotation to pure swing and pure twist // compute desired transforms in world Modified: branches/soc-2010-nexyon/intern/audaspace/Python/AUD_PyAPI.cpp =================================================================== --- branches/soc-2010-nexyon/intern/audaspace/Python/AUD_PyAPI.cpp 2010-07-19 22:05:25 UTC (rev 30512) +++ branches/soc-2010-nexyon/intern/audaspace/Python/AUD_PyAPI.cpp 2010-07-19 22:43:45 UTC (rev 30513) @@ -136,7 +136,8 @@ } PyDoc_STRVAR(M_aud_Sound_sine_doc, - "Creates a sine sound at a specific frequency."); + "sine()\n" + "\tCreates a sine sound at a specific frequency.\n"); static PyObject * Sound_sine(PyObject* nothing, PyObject* args); @@ -1652,7 +1653,9 @@ } PyDoc_STRVAR(M_aud_Device_lock_doc, - "Locks the sound device."); + ".. function:: lock()\n" + "\n" + " Locks the sound device.\n"); static PyObject * Device_lock(Device *self) Copied: branches/soc-2010-nexyon/release/datafiles/brushicons (from rev 30512, trunk/blender/release/datafiles/brushicons) Deleted: branches/soc-2010-nexyon/release/datafiles/brushicons/clay.png =================================================================== (Binary files differ) Copied: branches/soc-2010-nexyon/release/datafiles/brushicons/clay.png (from rev 30512, trunk/blender/release/datafiles/brushicons/clay.png) =================================================================== (Binary files differ) Deleted: branches/soc-2010-nexyon/release/datafiles/brushicons/crease.png =================================================================== (Binary files differ) Copied: branches/soc-2010-nexyon/release/datafiles/brushicons/crease.png (from rev 30512, trunk/blender/release/datafiles/brushicons/crease.png) =================================================================== (Binary files differ) Deleted: branches/soc-2010-nexyon/release/datafiles/brushicons/draw.png =================================================================== (Binary files differ) Copied: branches/soc-2010-nexyon/release/datafiles/brushicons/draw.png (from rev 30512, trunk/blender/release/datafiles/brushicons/draw.png) =================================================================== (Binary files differ) Deleted: branches/soc-2010-nexyon/release/datafiles/brushicons/fill.png =================================================================== (Binary files differ) Copied: branches/soc-2010-nexyon/release/datafiles/brushicons/fill.png (from rev 30512, trunk/blender/release/datafiles/brushicons/fill.png) =================================================================== (Binary files differ) Deleted: branches/soc-2010-nexyon/release/datafiles/brushicons/flatten.png =================================================================== (Binary files differ) Copied: branches/soc-2010-nexyon/release/datafiles/brushicons/flatten.png (from rev 30512, trunk/blender/release/datafiles/brushicons/flatten.png) =================================================================== (Binary files differ) Deleted: branches/soc-2010-nexyon/release/datafiles/brushicons/grab.png =================================================================== (Binary files differ) Copied: branches/soc-2010-nexyon/release/datafiles/brushicons/grab.png (from rev 30512, trunk/blender/release/datafiles/brushicons/grab.png) =================================================================== (Binary files differ) Deleted: branches/soc-2010-nexyon/release/datafiles/brushicons/inflate.png =================================================================== (Binary files differ) Copied: branches/soc-2010-nexyon/release/datafiles/brushicons/inflate.png (from rev 30512, trunk/blender/release/datafiles/brushicons/inflate.png) @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs