[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16124] branches/soc-2008-quorn: Merge from trunk 16031:16122
Ian Thompson
quornian at googlemail.com
Fri Aug 15 02:00:28 CEST 2008
Revision: 16124
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16124
Author: quorn
Date: 2008-08-15 02:00:27 +0200 (Fri, 15 Aug 2008)
Log Message:
-----------
Merge from trunk 16031:16122
Modified Paths:
--------------
branches/soc-2008-quorn/release/VERSION
branches/soc-2008-quorn/release/datafiles/splash.jpg
branches/soc-2008-quorn/release/scripts/ply_export.py
branches/soc-2008-quorn/source/blender/blenkernel/BKE_blender.h
branches/soc-2008-quorn/source/blender/blenkernel/intern/bvhutils.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/softbody.c
branches/soc-2008-quorn/source/blender/include/BIF_editarmature.h
branches/soc-2008-quorn/source/blender/python/api2_2x/Texture.c
branches/soc-2008-quorn/source/blender/python/api2_2x/doc/Render.py
branches/soc-2008-quorn/source/blender/python/api2_2x/doc/Texture.py
branches/soc-2008-quorn/source/blender/render/intern/source/rayshade.c
branches/soc-2008-quorn/source/blender/src/buttons_logic.c
branches/soc-2008-quorn/source/blender/src/editarmature.c
branches/soc-2008-quorn/source/blender/src/editobject.c
branches/soc-2008-quorn/source/blender/src/header_view3d.c
branches/soc-2008-quorn/source/blender/src/splash.jpg.c
branches/soc-2008-quorn/source/blender/src/transform_conversions.c
branches/soc-2008-quorn/source/gameengine/Converter/BL_ActionActuator.cpp
branches/soc-2008-quorn/source/gameengine/Converter/BL_ShapeActionActuator.cpp
branches/soc-2008-quorn/source/gameengine/Converter/KX_ConvertActuators.cpp
branches/soc-2008-quorn/source/gameengine/Expressions/InputParser.cpp
branches/soc-2008-quorn/source/gameengine/Expressions/ListValue.cpp
branches/soc-2008-quorn/source/gameengine/Expressions/PyObjectPlus.cpp
branches/soc-2008-quorn/source/gameengine/Expressions/PyObjectPlus.h
branches/soc-2008-quorn/source/gameengine/Expressions/Value.cpp
branches/soc-2008-quorn/source/gameengine/Expressions/Value.h
branches/soc-2008-quorn/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
branches/soc-2008-quorn/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
branches/soc-2008-quorn/source/gameengine/GameLogic/SCA_PythonController.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/BL_Shader.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_CameraActuator.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_CameraActuator.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_GameObject.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_GameObject.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_IpoActuator.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_MeshProxy.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_ObjectActuator.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_ParentActuator.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_ParentActuator.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_PythonInit.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_TrackToActuator.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_TrackToActuator.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
branches/soc-2008-quorn/source/gameengine/PyDoc/KX_CameraActuator.py
branches/soc-2008-quorn/source/gameengine/PyDoc/KX_ParentActuator.py
branches/soc-2008-quorn/source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py
branches/soc-2008-quorn/source/gameengine/PyDoc/KX_TrackToActuator.py
branches/soc-2008-quorn/tools/btools.py
Added Paths:
-----------
branches/soc-2008-quorn/intern/bmfont/intern/BDF2BMF.py
branches/soc-2008-quorn/release/text/release_247.txt
Removed Paths:
-------------
branches/soc-2008-quorn/release/text/release_246.txt
Copied: branches/soc-2008-quorn/intern/bmfont/intern/BDF2BMF.py (from rev 16122, trunk/blender/intern/bmfont/intern/BDF2BMF.py)
===================================================================
--- branches/soc-2008-quorn/intern/bmfont/intern/BDF2BMF.py (rev 0)
+++ branches/soc-2008-quorn/intern/bmfont/intern/BDF2BMF.py 2008-08-15 00:00:27 UTC (rev 16124)
@@ -0,0 +1,177 @@
+#!/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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# ***** END GPL LICENCE BLOCK *****
+# --------------------------------------------------------------------------
+
+HELP_TXT = \
+'''
+Convert BDF pixmap fonts into C++ files Blender can read.
+Use to replace bitmap fonts or add new ones.
+
+Usage
+ python bdf2bmf.py -name=SomeName myfile.bdf
+
+Blender currently supports fonts with a maximum width of 8 pixels.
+'''
+
+# -------- Simple BDF parser
+import sys
+def parse_bdf(f, MAX_CHARS=256):
+ lines = [l.strip().upper().split() for l in f.readlines()]
+
+ is_bitmap = False
+ dummy = {'BITMAP':[]}
+ char_data = [dummy.copy() for i in xrange(MAX_CHARS)]
+ context_bitmap = []
+
+ for l in lines:
+ if l[0]=='ENCODING': enc = int(l[1])
+ elif l[0]=='BBX': bbx = [int(c) for c in l[1:]]
+ elif l[0]=='DWIDTH': dwidth = int(l[1])
+ elif l[0]=='BITMAP': is_bitmap = True
+ elif l[0]=='ENDCHAR':
+ if enc < MAX_CHARS:
+ char_data[enc]['BBX'] = bbx
+ char_data[enc]['DWIDTH'] = dwidth
+ char_data[enc]['BITMAP'] = context_bitmap
+
+ context_bitmap = []
+ enc = bbx = None
+ is_bitmap = False
+ else:
+ # None of the above, Ok, were reading a bitmap
+ if is_bitmap and enc < MAX_CHARS:
+ context_bitmap.append( int(l[0], 16) )
+
+ return char_data
+# -------- end simple BDF parser
+
+def bdf2cpp_name(path):
+ return path.split('.')[0] + '.cpp'
+
+def convert_to_blender(bdf_dict, font_name, origfilename, MAX_CHARS=256):
+
+ # first get a global width/height, also set the offsets
+ xmin = ymin = 10000000
+ xmax = ymax = -10000000
+
+ bitmap_offsets = [-1] * MAX_CHARS
+ bitmap_tot = 0
+ for i, c in enumerate(bdf_dict):
+ if c.has_key('BBX'):
+ bbx = c['BBX']
+ xmax = max(bbx[0], xmax)
+ ymax = max(bbx[1], ymax)
+ xmin = min(bbx[2], xmin)
+ ymin = min(bbx[3], ymin)
+
+ bitmap_offsets[i] = bitmap_tot
+ bitmap_tot += len(c['BITMAP'])
+
+ c['BITMAP'].reverse()
+
+ # Now we can write. Ok if we have no .'s in the path.
+ f = open(bdf2cpp_name(origfilename), 'w')
+
+ f.write('''
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "BMF_FontData.h"
+
+#include "BMF_Settings.h"
+''')
+
+ f.write('#if BMF_INCLUDE_%s\n\n' % font_name.upper())
+ f.write('static unsigned char bitmap_data[]= {')
+ newline = 8
+
+ for i, c in enumerate(bdf_dict):
+
+ for cdata in c['BITMAP']:
+ # Just formatting
+ newline+=1
+ if newline >= 8:
+ newline = 0
+ f.write('\n\t')
+ # End formatting
+
+ f.write('0x%.2hx,' % cdata) # 0x80 <- format
+
+ f.write("\n};\n")
+
+ f.write("BMF_FontData BMF_font_%s = {\n" % font_name)
+ f.write('\t%d, %d,\n' % (xmin, ymin))
+ f.write('\t%d, %d,\n' % (xmax, ymax))
+
+ f.write('\t{\n')
+
+
+ for i, c in enumerate(bdf_dict):
+ if bitmap_offsets[i] == -1 or c.has_key('BBX') == False:
+ f.write('\t\t{0,0,0,0,0, -1},\n')
+ else:
+ bbx = c['BBX']
+ f.write('\t\t{%d,%d,%d,%d,%d, %d},\n' % (bbx[0], bbx[1], -bbx[2], -bbx[3], c['DWIDTH'], bitmap_offsets[i]))
+
+ f.write('''
+ },
+ bitmap_data
+};
+
+#endif
+''')
+
+def main():
+ # replace "[-name=foo]" with "[-name] [foo]"
+ args = []
+ for arg in sys.argv:
+ for a in arg.replace('=', ' ').split():
+ args.append(a)
+
+ name = 'untitled'
+ done_anything = False
+ for i, arg in enumerate(args):
+ if arg == '-name':
+ if i==len(args)-1:
+ print 'no arg given for -name, aborting'
+ return
+ else:
+ name = args[i+1]
+
+ elif arg.lower().endswith('.bdf'):
+ try:
+ f = open(arg)
+ print '...Writing to:', bdf2cpp_name(arg)
+ except:
+ print 'could not open "%s", aborting' % arg
+
+
+ bdf_dict = parse_bdf(f)
+ convert_to_blender(bdf_dict, name, arg)
+ done_anything = True
+
+ if not done_anything:
+ print HELP_TXT
+ print '...nothing to do'
+
+if __name__ == '__main__':
+ main()
+
Modified: branches/soc-2008-quorn/release/VERSION
===================================================================
--- branches/soc-2008-quorn/release/VERSION 2008-08-14 23:55:40 UTC (rev 16123)
+++ branches/soc-2008-quorn/release/VERSION 2008-08-15 00:00:27 UTC (rev 16124)
@@ -1 +1 @@
-2.46
+2.47
Modified: branches/soc-2008-quorn/release/datafiles/splash.jpg
===================================================================
(Binary files differ)
Modified: branches/soc-2008-quorn/release/scripts/ply_export.py
===================================================================
--- branches/soc-2008-quorn/release/scripts/ply_export.py 2008-08-14 23:55:40 UTC (rev 16123)
+++ branches/soc-2008-quorn/release/scripts/ply_export.py 2008-08-15 00:00:27 UTC (rev 16124)
@@ -13,7 +13,7 @@
import BPyMesh
__author__ = "Bruce Merry"
-__version__ = "0.92"
+__version__ = "0.93"
__bpydoc__ = """\
This script exports Stanford PLY files from Blender. It supports normals,
colours, and texture coordinates per face or per vertex.
@@ -37,6 +37,8 @@
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Vector rounding se we can use as keys
#
+# Updated on Aug 11, 2008 by Campbell Barton
+# - added 'comment' prefix to comments - Needed to comply with the PLY spec.
#
# Updated on Jan 1, 2007 by Gabe Ghearing
# - fixed normals so they are correctly smooth/flat
@@ -162,7 +164,7 @@
file.write('ply\n')
file.write('format ascii 1.0\n')
- file.write('Created by Blender3D %s - www.blender.org, source file: %s\n' % (Blender.Get('version'), Blender.Get('filename').split('/')[-1].split('\\')[-1] ))
+ file.write('comment Created by Blender3D %s - www.blender.org, source file: %s\n' % (Blender.Get('version'), Blender.Get('filename').split('/')[-1].split('\\')[-1] ))
file.write('element vertex %d\n' % len(verts))
@@ -210,7 +212,6 @@
if faceUV: uvcoord= rvec2d(uv[j])
elif vertexUV: uvcoord= rvec2d(v.uvco)
if vertexColors: color= col[j].r, col[j].g, col[j].b
- co = v.co
file.write('%d ' % vdict[v.index][normal, uvcoord, color])
Deleted: branches/soc-2008-quorn/release/text/release_246.txt
===================================================================
--- branches/soc-2008-quorn/release/text/release_246.txt 2008-08-14 23:55:40 UTC (rev 16123)
+++ branches/soc-2008-quorn/release/text/release_246.txt 2008-08-15 00:00:27 UTC (rev 16124)
@@ -1,13 +0,0 @@
-------------------------- Blender 2.46 release ----------------
-
-May 2008
-
-This is the release of version 2.46, the result of 9 months of development,
-including everything as used to render the open movie Big Buck Bunny.
-
-For html versions of release logs, with images and examples, please check:
-http://www.blender.org
-
-Have fun!
-
-The blender.org team.
Copied: branches/soc-2008-quorn/release/text/release_247.txt (from rev 16122, trunk/blender/release/text/release_247.txt)
===================================================================
--- branches/soc-2008-quorn/release/text/release_247.txt (rev 0)
+++ branches/soc-2008-quorn/release/text/release_247.txt 2008-08-15 00:00:27 UTC (rev 16124)
@@ -0,0 +1,15 @@
+------------------------- Blender 2.47 release ----------------
+
+Aug 2008
+
+This is the upgrade release of 2.47, it is a bugfix release to stabilize
+the 2.4x series. No new feature have been added, but serious effort has
+been put in tracking bugs and fixing them. Some performance issues have
+also been addressed.
+
+For html versions of release logs, please check:
+http://www.blender.org
+
+Have fun!
+
+The blender.org team.
Modified: branches/soc-2008-quorn/source/blender/blenkernel/BKE_blender.h
===================================================================
--- branches/soc-2008-quorn/source/blender/blenkernel/BKE_blender.h 2008-08-14 23:55:40 UTC (rev 16123)
+++ branches/soc-2008-quorn/source/blender/blenkernel/BKE_blender.h 2008-08-15 00:00:27 UTC (rev 16124)
@@ -40,8 +40,8 @@
struct ListBase;
struct MemFile;
-#define BLENDER_VERSION 246
-#define BLENDER_SUBVERSION 1
+#define BLENDER_VERSION 247
+#define BLENDER_SUBVERSION 0
#define BLENDER_MINVERSION 245
#define BLENDER_MINSUBVERSION 15
Modified: branches/soc-2008-quorn/source/blender/blenkernel/intern/bvhutils.c
===================================================================
--- branches/soc-2008-quorn/source/blender/blenkernel/intern/bvhutils.c 2008-08-14 23:55:40 UTC (rev 16123)
+++ branches/soc-2008-quorn/source/blender/blenkernel/intern/bvhutils.c 2008-08-15 00:00:27 UTC (rev 16124)
@@ -48,9 +48,6 @@
/* Math stuff for ray casting on mesh faces and for nearest surface */
-static float nearest_point_in_tri_surface(const float *point, const float *v0, const float *v1, const float *v2, float *nearest);
-
-#define ISECT_EPSILON 1e-6
static float ray_tri_intersection(const BVHTreeRay *ray, const float m_dist, const float *v0, const float *v1, const float *v2)
{
float dist;
@@ -79,170 +76,324 @@
return FLT_MAX;
}
+
/*
- * This calculates the distance from point to the plane
- * Distance is negative if point is on the back side of plane
+ * Function adapted from David Eberly's distance tools (LGPL)
+ * http://www.geometrictools.com/LibFoundation/Distance/Distance.html
*/
-static float point_plane_distance(const float *point, const float *plane_point, const float *plane_normal)
+static float nearest_point_in_tri_surface(const float *v0,const float *v1,const float *v2,const float *p, int *v, int *e, float *d, float *nearest )
{
- float pp[3];
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list