[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16061] branches/fluidcontrol: svn merge -r 15973:16060 https://svn.blender.org/svnroot/bf-blender/trunk/ blender
Daniel Genrich
daniel.genrich at gmx.net
Tue Aug 12 11:49:48 CEST 2008
Revision: 16061
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16061
Author: genscher
Date: 2008-08-12 11:49:46 +0200 (Tue, 12 Aug 2008)
Log Message:
-----------
svn merge -r 15973:16060 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Modified Paths:
--------------
branches/fluidcontrol/CMakeLists.txt
branches/fluidcontrol/config/linux2-config.py
branches/fluidcontrol/projectfiles_vc7/blender/BPY_python/BPY_python.vcproj
branches/fluidcontrol/projectfiles_vc7/blender/blender.sln
branches/fluidcontrol/projectfiles_vc7/blender/blenkernel/BKE_blenkernel.vcproj
branches/fluidcontrol/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj
branches/fluidcontrol/release/scripts/flt_export.py
branches/fluidcontrol/release/scripts/flt_palettemanager.py
branches/fluidcontrol/release/scripts/import_dxf.py
branches/fluidcontrol/release/scripts/ply_export.py
branches/fluidcontrol/source/blender/blenkernel/intern/anim.c
branches/fluidcontrol/source/blender/blenkernel/intern/modifier.c
branches/fluidcontrol/source/blender/blenkernel/intern/particle_system.c
branches/fluidcontrol/source/blender/blenkernel/intern/softbody.c
branches/fluidcontrol/source/blender/blenkernel/intern/texture.c
branches/fluidcontrol/source/blender/blenlib/BLI_kdopbvh.h
branches/fluidcontrol/source/blender/blenlib/intern/BLI_kdopbvh.c
branches/fluidcontrol/source/blender/include/BIF_editarmature.h
branches/fluidcontrol/source/blender/include/BIF_editmesh.h
branches/fluidcontrol/source/blender/include/butspace.h
branches/fluidcontrol/source/blender/python/api2_2x/Texture.c
branches/fluidcontrol/source/blender/python/api2_2x/doc/Render.py
branches/fluidcontrol/source/blender/python/api2_2x/doc/Texture.py
branches/fluidcontrol/source/blender/render/intern/source/rayshade.c
branches/fluidcontrol/source/blender/src/buttons_editing.c
branches/fluidcontrol/source/blender/src/editarmature.c
branches/fluidcontrol/source/blender/src/editmesh_mods.c
branches/fluidcontrol/source/blender/src/editobject.c
branches/fluidcontrol/source/blender/src/poselib.c
branches/fluidcontrol/source/blender/src/transform_conversions.c
branches/fluidcontrol/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
branches/fluidcontrol/source/gameengine/Converter/BL_BlenderDataConversion.cpp
branches/fluidcontrol/source/gameengine/Converter/KX_IpoConvert.cpp
branches/fluidcontrol/source/gameengine/GamePlayer/ActiveX/BlenderPlayerCtl.cpp
branches/fluidcontrol/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
branches/fluidcontrol/source/gameengine/GamePlayer/netscape/src/ketsji/KXH_ketsji_hooks.cpp
branches/fluidcontrol/source/gameengine/Ketsji/CMakeLists.txt
branches/fluidcontrol/source/gameengine/Ketsji/KX_GameObject.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_PythonInit.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_PythonInit.h
branches/fluidcontrol/source/gameengine/Ketsji/KX_RadarSensor.cpp
branches/fluidcontrol/source/gameengine/Ketsji/KX_TouchEventManager.cpp
branches/fluidcontrol/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
branches/fluidcontrol/source/gameengine/Physics/Bullet/CcdPhysicsController.h
branches/fluidcontrol/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
branches/fluidcontrol/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
branches/fluidcontrol/tools/btools.py
Added Paths:
-----------
branches/fluidcontrol/intern/bmfont/intern/BDF2BMF.py
branches/fluidcontrol/source/blender/blenkernel/BKE_bvhutils.h
branches/fluidcontrol/source/blender/blenkernel/intern/bvhutils.c
Modified: branches/fluidcontrol/CMakeLists.txt
===================================================================
--- branches/fluidcontrol/CMakeLists.txt 2008-08-12 09:36:51 UTC (rev 16060)
+++ branches/fluidcontrol/CMakeLists.txt 2008-08-12 09:49:46 UTC (rev 16061)
@@ -183,9 +183,9 @@
SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++")
IF(WITH_OPENMP)
- SET(LLIBS "${LLIBS} -lgomp ")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
+ SET(LLIBS "${LLIBS} -lgomp")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
ENDIF(WITH_OPENMP)
Modified: branches/fluidcontrol/config/linux2-config.py
===================================================================
--- branches/fluidcontrol/config/linux2-config.py 2008-08-12 09:36:51 UTC (rev 16060)
+++ branches/fluidcontrol/config/linux2-config.py 2008-08-12 09:49:46 UTC (rev 16061)
@@ -139,7 +139,7 @@
BF_OPENJPEG_INC = '${BF_OPENJPEG}/include'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
-WITH_BF_REDCODE = 'true'
+WITH_BF_REDCODE = 'false'
BF_REDCODE = '#extern/libredcode'
BF_REDCODE_LIB = ''
# Uncomment the following two lines to use system's ffmpeg
Copied: branches/fluidcontrol/intern/bmfont/intern/BDF2BMF.py (from rev 16060, trunk/blender/intern/bmfont/intern/BDF2BMF.py)
===================================================================
--- branches/fluidcontrol/intern/bmfont/intern/BDF2BMF.py (rev 0)
+++ branches/fluidcontrol/intern/bmfont/intern/BDF2BMF.py 2008-08-12 09:49:46 UTC (rev 16061)
@@ -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/fluidcontrol/projectfiles_vc7/blender/BPY_python/BPY_python.vcproj
===================================================================
--- branches/fluidcontrol/projectfiles_vc7/blender/BPY_python/BPY_python.vcproj 2008-08-12 09:36:51 UTC (rev 16060)
+++ branches/fluidcontrol/projectfiles_vc7/blender/BPY_python/BPY_python.vcproj 2008-08-12 09:49:46 UTC (rev 16061)
@@ -118,6 +118,114 @@
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
+ <Configuration
+ Name="BlenderPlayer Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem"
+ PreprocessorDefinitions="_DEBUG,WIN32,_LIB;WITH_FFMPEG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ DisableLanguageExtensions="FALSE"
+ DefaultCharIsUnsigned="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile="..\..\..\..\build\msvc_7\source\blender\python\debug\BPY_python.pch"
+ AssemblerListingLocation="..\..\..\..\build\msvc_7\source\blender\python\debug\"
+ ObjectFile="..\..\..\..\build\msvc_7\source\blender\python\debug\"
+ ProgramDataBaseFileName="..\..\..\..\build\msvc_7\source\blender\python\debug\"
+ WarningLevel="4"
+ SuppressStartupBanner="TRUE"
+ Detect64BitPortabilityProblems="FALSE"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4100"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="..\..\..\..\build\msvc_7\libs\debug\BPY_python.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="BlenderPlayer Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_7\intern\bsp\include;..\..\..\..\build\msvc_7\intern\bmfont\include;..\..\..\..\build\msvc_7\intern\iksolver\include;..\..\..\..\build\msvc_7\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python2.5;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\lib\windows\ffmpeg\include"
+ PreprocessorDefinitions="WIN32,NDEBUG,_LIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="0"
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list