[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30554] branches/soc-2008-mxcurioni: Merged changes in the trunk up to revision 30551.
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Tue Jul 20 21:39:08 CEST 2010
Revision: 30554
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30554
Author: kjym3
Date: 2010-07-20 21:39:07 +0200 (Tue, 20 Jul 2010)
Log Message:
-----------
Merged changes in the trunk up to revision 30551.
Revision Links:
--------------
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30551
Modified Paths:
--------------
branches/soc-2008-mxcurioni/SConstruct
branches/soc-2008-mxcurioni/build_files/scons/tools/btools.py
branches/soc-2008-mxcurioni/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_EventDragnDrop.h
branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.h
branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.mm
branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemWin32.h
branches/soc-2008-mxcurioni/intern/iksolver/intern/TNT/vec.h
branches/soc-2008-mxcurioni/intern/itasc/MovingFrame.cpp
branches/soc-2008-mxcurioni/intern/string/intern/STR_String.cpp
branches/soc-2008-mxcurioni/release/VERSION
branches/soc-2008-mxcurioni/release/datafiles/splash.png
branches/soc-2008-mxcurioni/release/scripts/io/export_3ds.py
branches/soc-2008-mxcurioni/release/scripts/io/export_fbx.py
branches/soc-2008-mxcurioni/release/scripts/io/export_obj.py
branches/soc-2008-mxcurioni/release/scripts/io/import_scene_obj.py
branches/soc-2008-mxcurioni/release/scripts/io/netrender/master_html.py
branches/soc-2008-mxcurioni/release/scripts/io/netrender/repath.py
branches/soc-2008-mxcurioni/release/scripts/io/netrender/slave.py
branches/soc-2008-mxcurioni/release/scripts/io/netrender/utils.py
branches/soc-2008-mxcurioni/release/scripts/modules/bpy/utils.py
branches/soc-2008-mxcurioni/release/scripts/modules/rigify/spine_pivot_flex.py
branches/soc-2008-mxcurioni/release/scripts/op/sequencer.py
branches/soc-2008-mxcurioni/release/scripts/op/uvcalc_smart_project.py
branches/soc-2008-mxcurioni/release/scripts/presets/interaction/maya.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_material.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_render.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_world.py
branches/soc-2008-mxcurioni/release/scripts/ui/space_info.py
branches/soc-2008-mxcurioni/release/scripts/ui/space_sequencer.py
branches/soc-2008-mxcurioni/release/scripts/ui/space_userpref.py
branches/soc-2008-mxcurioni/release/scripts/ui/space_view3d.py
branches/soc-2008-mxcurioni/release/scripts/ui/space_view3d_toolbar.py
branches/soc-2008-mxcurioni/release/text/readme.html
branches/soc-2008-mxcurioni/source/blender/avi/AVI_avi.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_blender.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_brush.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_fcurve.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_library.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_object.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_particle.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_sequencer.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_sound.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/action.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/brush.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/collision.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/curve.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/fmodifier.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/icons.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/image.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/ipo.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/library.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/object.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/particle.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/particle_system.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/sca.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/sequencer.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/softbody.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/sound.c
branches/soc-2008-mxcurioni/source/blender/blenlib/intern/fileops.c
branches/soc-2008-mxcurioni/source/blender/blenlib/intern/math_color.c
branches/soc-2008-mxcurioni/source/blender/blenlib/intern/math_geom.c
branches/soc-2008-mxcurioni/source/blender/blenlib/intern/path_util.c
branches/soc-2008-mxcurioni/source/blender/blenlib/intern/scanfill.c
branches/soc-2008-mxcurioni/source/blender/blenlib/intern/storage.c
branches/soc-2008-mxcurioni/source/blender/blenloader/intern/readfile.c
branches/soc-2008-mxcurioni/source/blender/editors/animation/anim_channels_edit.c
branches/soc-2008-mxcurioni/source/blender/editors/animation/anim_markers.c
branches/soc-2008-mxcurioni/source/blender/editors/animation/anim_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/armature/armature_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/armature/editarmature.c
branches/soc-2008-mxcurioni/source/blender/editors/armature/poseobject.c
branches/soc-2008-mxcurioni/source/blender/editors/curve/curve_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/SConscript
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/splash.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/startup.blend.c
branches/soc-2008-mxcurioni/source/blender/editors/interface/interface_icons.c
branches/soc-2008-mxcurioni/source/blender/editors/interface/interface_templates.c
branches/soc-2008-mxcurioni/source/blender/editors/mesh/editmesh_add.c
branches/soc-2008-mxcurioni/source/blender/editors/mesh/editmesh_mods.c
branches/soc-2008-mxcurioni/source/blender/editors/mesh/editmesh_tools.c
branches/soc-2008-mxcurioni/source/blender/editors/mesh/mesh_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/metaball/mball_edit.c
branches/soc-2008-mxcurioni/source/blender/editors/metaball/mball_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/object/object_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/object/object_transform.c
branches/soc-2008-mxcurioni/source/blender/editors/physics/physics_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/render/render_preview.c
branches/soc-2008-mxcurioni/source/blender/editors/screen/screen_edit.c
branches/soc-2008-mxcurioni/source/blender/editors/screen/screen_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/sculpt_paint/paint_image.c
branches/soc-2008-mxcurioni/source/blender/editors/sculpt_paint/paint_stroke.c
branches/soc-2008-mxcurioni/source/blender/editors/sculpt_paint/sculpt.c
branches/soc-2008-mxcurioni/source/blender/editors/space_action/action_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/space_file/filelist.c
branches/soc-2008-mxcurioni/source/blender/editors/space_file/space_file.c
branches/soc-2008-mxcurioni/source/blender/editors/space_graph/graph_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/space_logic/logic_window.c
branches/soc-2008-mxcurioni/source/blender/editors/space_nla/nla_draw.c
branches/soc-2008-mxcurioni/source/blender/editors/space_nla/nla_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/space_node/node_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/space_node/node_state.c
branches/soc-2008-mxcurioni/source/blender/editors/space_sequencer/sequencer_draw.c
branches/soc-2008-mxcurioni/source/blender/editors/space_sequencer/sequencer_edit.c
branches/soc-2008-mxcurioni/source/blender/editors/space_sequencer/sequencer_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/space_text/text_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/space_view3d/drawobject.c
branches/soc-2008-mxcurioni/source/blender/editors/space_view3d/view3d_draw.c
branches/soc-2008-mxcurioni/source/blender/editors/space_view3d/view3d_edit.c
branches/soc-2008-mxcurioni/source/blender/editors/space_view3d/view3d_view.c
branches/soc-2008-mxcurioni/source/blender/editors/transform/transform_conversions.c
branches/soc-2008-mxcurioni/source/blender/imbuf/intern/anim.c
branches/soc-2008-mxcurioni/source/blender/imbuf/intern/imageprocess.c
branches/soc-2008-mxcurioni/source/blender/imbuf/intern/png.c
branches/soc-2008-mxcurioni/source/blender/imbuf/intern/thumbs_blend.c
branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_actuator_types.h
branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_brush_types.h
branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_curve_types.h
branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_object_types.h
branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_sdna_types.h
branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_world_types.h
branches/soc-2008-mxcurioni/source/blender/makesdna/intern/dna_genfile.c
branches/soc-2008-mxcurioni/source/blender/makesdna/intern/makesdna.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/makesrna.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_action.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_actuator.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_brush.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_controller.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_curve.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_image.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_object.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_sequencer.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_userdef.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_world.c
branches/soc-2008-mxcurioni/source/blender/makesrna/rna_cleanup/rna_cleaner.py
branches/soc-2008-mxcurioni/source/blender/modifiers/intern/MOD_screw.c
branches/soc-2008-mxcurioni/source/blender/python/doc/epy/Geometry.py
branches/soc-2008-mxcurioni/source/blender/python/generic/blf_api.c
branches/soc-2008-mxcurioni/source/blender/python/generic/bpy_internal_import.c
branches/soc-2008-mxcurioni/source/blender/python/generic/geometry.c
branches/soc-2008-mxcurioni/source/blender/python/generic/mathutils.c
branches/soc-2008-mxcurioni/source/blender/python/generic/mathutils.h
branches/soc-2008-mxcurioni/source/blender/python/generic/mathutils_vector.c
branches/soc-2008-mxcurioni/source/blender/python/intern/bpy.c
branches/soc-2008-mxcurioni/source/blender/python/intern/bpy_rna.c
branches/soc-2008-mxcurioni/source/blender/render/SConscript
branches/soc-2008-mxcurioni/source/blender/render/intern/raytrace/reorganize.h
branches/soc-2008-mxcurioni/source/blender/render/intern/source/convertblender.c
branches/soc-2008-mxcurioni/source/blender/render/intern/source/pipeline.c
branches/soc-2008-mxcurioni/source/blender/render/intern/source/texture.c
branches/soc-2008-mxcurioni/source/blender/windowmanager/WM_api.h
branches/soc-2008-mxcurioni/source/blender/windowmanager/intern/wm_event_system.c
branches/soc-2008-mxcurioni/source/blender/windowmanager/intern/wm_files.c
branches/soc-2008-mxcurioni/source/blender/windowmanager/intern/wm_jobs.c
branches/soc-2008-mxcurioni/source/blender/windowmanager/intern/wm_operators.c
branches/soc-2008-mxcurioni/source/blenderplayer/bad_level_call_stubs/stubs.c
branches/soc-2008-mxcurioni/source/creator/CMakeLists.txt
branches/soc-2008-mxcurioni/source/gameengine/Expressions/PyObjectPlus.cpp
branches/soc-2008-mxcurioni/source/gameengine/GameLogic/SCA_PythonController.cpp
branches/soc-2008-mxcurioni/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_GameObject.cpp
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_PythonSeq.cpp
branches/soc-2008-mxcurioni/source/gameengine/Network/NG_NetworkScene.cpp
branches/soc-2008-mxcurioni/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
branches/soc-2008-mxcurioni/source/gameengine/PyDoc/VideoTexture.py
Added Paths:
-----------
branches/soc-2008-mxcurioni/bin/blender-thumbnailer.py
branches/soc-2008-mxcurioni/release/datafiles/brushicons/
branches/soc-2008-mxcurioni/release/datafiles/brushicons/blob.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/clay.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/crease.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/draw.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/fill.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/flatten.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/grab.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/inflate.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/layer.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/nudge.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/pinch.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/scrape.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/smooth.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/snake_hook.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/thumb.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/twist.png
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/blob.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/clay.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/crease.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/draw.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/fill.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/flatten.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/grab.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/inflate.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/layer.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/nudge.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/pinch.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/scrape.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/smooth.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/snake_hook.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/thumb.png.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/twist.png.c
branches/soc-2008-mxcurioni/source/blender/python/generic/noise.c
Removed Paths:
-------------
branches/soc-2008-mxcurioni/release/datafiles/brushicons/blob.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/clay.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/crease.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/draw.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/fill.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/flatten.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/grab.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/inflate.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/layer.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/nudge.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/pinch.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/scrape.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/smooth.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/snake_hook.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/thumb.png
branches/soc-2008-mxcurioni/release/datafiles/brushicons/twist.png
branches/soc-2008-mxcurioni/release/freedesktop/blender-thumbnailer.py
Modified: branches/soc-2008-mxcurioni/SConstruct
===================================================================
--- branches/soc-2008-mxcurioni/SConstruct 2010-07-20 19:26:53 UTC (rev 30553)
+++ branches/soc-2008-mxcurioni/SConstruct 2010-07-20 19:39:07 UTC (rev 30554)
@@ -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-2008-mxcurioni/bin/blender-thumbnailer.py (from rev 30551, trunk/blender/bin/blender-thumbnailer.py)
===================================================================
--- branches/soc-2008-mxcurioni/bin/blender-thumbnailer.py (rev 0)
+++ branches/soc-2008-mxcurioni/bin/blender-thumbnailer.py 2010-07-20 19:39:07 UTC (rev 30554)
@@ -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/application at x-blender/enable true
+ gconftool --type string --set /desktop/gnome/thumbnailers/application at 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-2008-mxcurioni/build_files/scons/tools/btools.py
===================================================================
--- branches/soc-2008-mxcurioni/build_files/scons/tools/btools.py 2010-07-20 19:26:53 UTC (rev 30553)
+++ branches/soc-2008-mxcurioni/build_files/scons/tools/btools.py 2010-07-20 19:39:07 UTC (rev 30554)
@@ -15,7 +15,7 @@
Variables = SCons.Variables
BoolVariable = SCons.Variables.BoolVariable
-VERSION = '2.52' # This is used in creating the local config directories
+VERSION = '2.53' # This is used in creating the local config directories
def print_arguments(args, bc):
if len(args):
Modified: branches/soc-2008-mxcurioni/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
===================================================================
--- branches/soc-2008-mxcurioni/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp 2010-07-20 19:26:53 UTC (rev 30553)
+++ branches/soc-2008-mxcurioni/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp 2010-07-20 19:39:07 UTC (rev 30554)
@@ -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-2008-mxcurioni/intern/ghost/intern/GHOST_EventDragnDrop.h
===================================================================
--- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_EventDragnDrop.h 2010-07-20 19:26:53 UTC (rev 30553)
+++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_EventDragnDrop.h 2010-07-20 19:39:07 UTC (rev 30554)
@@ -69,7 +69,7 @@
* @param time The time this event was generated.
* @param type The type of this event.
* @param dataType The type of the drop candidate object
- * @param window The window where the event occured
+ * @param window The window where the event occurred
* @param x The x-coordinate of the location the cursor was at at the time of the event.
* @param y The y-coordinate of the location the cursor was at at the time of the event.
* @param data The "content" dropped in the window
Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.h
===================================================================
--- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.h 2010-07-20 19:26:53 UTC (rev 30553)
+++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.h 2010-07-20 19:39:07 UTC (rev 30554)
@@ -155,7 +155,7 @@
* @param draggedObjectType The type object concerned (currently array of file names, string, TIFF image)
* @param mouseX x mouse coordinate (in cocoa base window coordinates)
* @param mouseY y mouse coordinate
- * @param window The window on which the event occured
+ * @param window The window on which the event occurred
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleDraggingEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType,
@@ -236,7 +236,7 @@
/**
* Handles a window event. Called by GHOST_WindowCocoa window delegate
* @param eventType The type of window event
- * @param window The window on which the event occured
+ * @param window The window on which the event occurred
* @return Indication whether the event was handled.
*/
GHOST_TSuccess handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa* window);
Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.mm
===================================================================
--- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.mm 2010-07-20 19:26:53 UTC (rev 30553)
+++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.mm 2010-07-20 19:39:07 UTC (rev 30554)
@@ -1550,7 +1550,7 @@
NSPoint mousePos = [event locationInWindow];
pushEvent(new GHOST_EventCursor([event timestamp]*1000, GHOST_kEventCursorMove, window, mousePos.x, mousePos.y));
m_cursorDelta_x=0;
- m_cursorDelta_y=0; //Mouse motion occured between two cursor warps, so we can reset the delta counter
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list