[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49758] branches/soc-2011-tomato: Merging r49738 through r49757 from trunk into soc-2011-tomato
Sergey Sharybin
sergey.vfx at gmail.com
Fri Aug 10 10:54:14 CEST 2012
Revision: 49758
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49758
Author: nazgul
Date: 2012-08-10 08:54:14 +0000 (Fri, 10 Aug 2012)
Log Message:
-----------
Merging r49738 through r49757 from trunk into soc-2011-tomato
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49738
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49757
Modified Paths:
--------------
branches/soc-2011-tomato/SConstruct
branches/soc-2011-tomato/intern/cycles/app/cycles_test.cpp
branches/soc-2011-tomato/release/scripts/startup/bl_operators/node.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_object_constraint.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_image.py
branches/soc-2011-tomato/source/blender/blenkernel/BKE_cloth.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/cloth.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/implicit.c
branches/soc-2011-tomato/source/blender/blenlib/intern/math_rotation.c
branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt
branches/soc-2011-tomato/source/blender/compositor/SConscript
branches/soc-2011-tomato/source/blender/compositor/intern/COM_WorkScheduler.cpp
branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_ops.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_nodetree.c
Added Paths:
-----------
branches/soc-2011-tomato/build_files/cmake/data_to_c.cmake
Removed Paths:
-------------
branches/soc-2011-tomato/release/datafiles/clkernelstoh.py
branches/soc-2011-tomato/source/blender/compositor/operations/COM_OpenCLKernels.cl.h
Property Changed:
----------------
branches/soc-2011-tomato/
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
branches/soc-2011-tomato/source/blender/editors/space_outliner/
Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49737
+ /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49757
Modified: branches/soc-2011-tomato/SConstruct
===================================================================
--- branches/soc-2011-tomato/SConstruct 2012-08-10 08:51:34 UTC (rev 49757)
+++ branches/soc-2011-tomato/SConstruct 2012-08-10 08:54:14 UTC (rev 49758)
@@ -92,7 +92,7 @@
if not use_color=='1':
B.bc.disable()
-
+
#on defaut white Os X terminal, some colors are totally unlegible
if platform=='darwin':
B.bc.OKGREEN = '\033[34m'
@@ -123,8 +123,8 @@
B.bitness = bitness
else:
B.bitness = tempbitness
-
+
# first check cmdline for toolset and we create env to work on
quickie = B.arguments.get('BF_QUICK', None)
quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
@@ -138,7 +138,7 @@
B.quickie=string.split(quickie,',')
else:
B.quickie=[]
-
+
toolset = B.arguments.get('BF_TOOLSET', None)
if toolset:
print "Using " + toolset
@@ -270,7 +270,7 @@
target_env_defs['WITH_BF_PYTHON'] = False
target_env_defs['WITH_BF_3DMOUSE'] = False
target_env_defs['WITH_BF_LIBMV'] = False
-
+
# Merge blenderlite, let command line to override
for k,v in target_env_defs.iteritems():
if k not in B.arguments:
@@ -319,7 +319,7 @@
if env['WITH_GHOST_COCOA'] == True:
env.Append(CPPFLAGS=['-DGHOST_COCOA'])
-
+
if env['USE_QTKIT'] == True:
env.Append(CPPFLAGS=['-DUSE_QTKIT'])
@@ -374,7 +374,7 @@
B.root_build_dir += os.sep
if not B.doc_build_dir[-1]==os.sep:
B.doc_build_dir += os.sep
-
+
# We do a shortcut for clean when no quicklist is given: just delete
# builddir without reading in SConscripts
do_clean = None
@@ -422,16 +422,16 @@
# with _any_ library but since we used a fixed python version this tends to
# be most problematic.
if env['WITH_BF_PYTHON']:
- py_h = os.path.join(Dir(env.subst('${BF_PYTHON_INC}')).abspath, "Python.h")
+ py_h = os.path.join(Dir(env.subst('${BF_PYTHON_INC}')).abspath, "Python.h")
- if not os.path.exists(py_h):
- print("\nMissing: \"" + env.subst('${BF_PYTHON_INC}') + os.sep + "Python.h\",\n"
- " Set 'BF_PYTHON_INC' to point "
- "to a valid python include path.\n Containing "
- "Python.h for python version \"" + env.subst('${BF_PYTHON_VERSION}') + "\"")
+ if not os.path.exists(py_h):
+ print("\nMissing: \"" + env.subst('${BF_PYTHON_INC}') + os.sep + "Python.h\",\n"
+ " Set 'BF_PYTHON_INC' to point "
+ "to a valid python include path.\n Containing "
+ "Python.h for python version \"" + env.subst('${BF_PYTHON_VERSION}') + "\"")
- Exit()
- del py_h
+ Exit()
+ del py_h
if not os.path.isdir ( B.root_build_dir):
@@ -445,9 +445,53 @@
# if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
# os.makedirs ( B.doc_build_dir )
+###################################
+# Ensure all data files are valid #
+###################################
+if not os.path.isdir ( B.root_build_dir + 'data_headers'):
+ os.makedirs ( B.root_build_dir + 'data_headers' )
+# use for includes
+env['DATA_HEADERS'] = "#" + env['BF_BUILDDIR'] + "/data_headers"
+def ensure_data(FILE_FROM, FILE_TO, VAR_NAME):
+ if os.sep == "\\":
+ FILE_FROM = FILE_FROM.replace("/", "\\")
+ FILE_TO = FILE_TO.replace("/", "\\")
+
+ # first check if we need to bother.
+ if os.path.exists(FILE_TO):
+ if os.path.getmtime(FILE_FROM) < os.path.getmtime(FILE_TO):
+ return
+
+ print(B.bc.HEADER + "Generating: " + B.bc.ENDC + "%r" % os.path.basename(FILE_TO))
+ fpin = open(FILE_FROM, "rb")
+ fpin.seek(0, os.SEEK_END)
+ size = fpin.tell()
+ fpin.seek(0)
+
+ fpout = open(FILE_TO, "w")
+ fpout.write("int %s_size = %d;\n" % (VAR_NAME, size))
+ fpout.write("char %s[] = {\n" % VAR_NAME)
+
+ while size > 0:
+ size -= 1
+ if size % 32 == 31:
+ fpout.write("\n")
+
+ fpout.write("%3d," % ord(fpin.read(1)))
+ fpout.write("\n 0};\n\n")
+
+ fpin.close()
+ fpout.close()
+
+ensure_data("source/blender/compositor/operations/COM_OpenCLKernels.cl",
+ B.root_build_dir + "data_headers/COM_OpenCLKernels.cl.h",
+ "clkernelstoh_COM_OpenCLKernels_cl")
+
+##### END DATAFILES ##########
+
Help(opts.GenerateHelpText(env))
-# default is new quieter output, but if you need to see the
+# default is new quieter output, but if you need to see the
# commands, do 'scons BF_QUIET=0'
bf_quietoutput = B.arguments.get('BF_QUIET', '1')
if env['BF_QUIET']:
@@ -534,7 +578,7 @@
for targetdir,srcfile in zip(datafilestargetlist, datafileslist):
td, tf = os.path.split(targetdir)
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
-
+
if env['WITH_BF_PYTHON']:
#-- local/VERSION/scripts
scriptpaths=['release/scripts']
@@ -634,10 +678,10 @@
if env['WITH_BF_INTERNATIONAL']:
internationalpaths=['release' + os.sep + 'datafiles']
-
+
def check_path(path, member):
return (member in path.split(os.sep))
-
+
for intpath in internationalpaths:
for dp, dn, df in os.walk(intpath):
if '.svn' in dn:
@@ -650,7 +694,7 @@
pass
else:
continue
-
+
dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
dir += os.sep + os.path.basename(intpath) + dp[len(intpath):]
@@ -758,7 +802,7 @@
# strict: the x86 build fails on x64 Windows. We need to ship
# both builds in x86 packages.
if bitness == 32:
- dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb.dll')
+ dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb.dll')
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')
if env['WITH_BF_OIIO'] and env['OURPLATFORM'] != 'win32-mingw':
@@ -774,7 +818,7 @@
if env['OURPLATFORM'] == 'win64-mingw':
dllsources = []
-
+
if env['WITH_BF_PYTHON']:
if env['BF_DEBUG']:
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
@@ -793,10 +837,10 @@
if env['WITH_BF_SDL']:
dllsources.append('${LCGDIR}/sdl/lib/SDL.dll')
-
- if(env['WITH_BF_OPENMP']):
- dllsources.append('${LCGDIR}/binaries/libgomp-1.dll')
-
+
+ if(env['WITH_BF_OPENMP']):
+ dllsources.append('${LCGDIR}/binaries/libgomp-1.dll')
+
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')
dllsources.append('${LCGDIR}/binaries/libgcc_s_sjlj-1.dll')
dllsources.append('${LCGDIR}/binaries/libwinpthread-1.dll')
Copied: branches/soc-2011-tomato/build_files/cmake/data_to_c.cmake (from rev 49757, trunk/blender/build_files/cmake/data_to_c.cmake)
===================================================================
--- branches/soc-2011-tomato/build_files/cmake/data_to_c.cmake (rev 0)
+++ branches/soc-2011-tomato/build_files/cmake/data_to_c.cmake 2012-08-10 08:54:14 UTC (rev 49758)
@@ -0,0 +1,25 @@
+# cmake script, to be called on its own with 3 defined args
+#
+# - FILE_FROM
+# - FILE_TO
+# - VAR_NAME
+
+# not highly optimal, may replace with generated C program like makesdna
+file(READ ${FILE_FROM} file_from_string HEX)
+string(LENGTH ${file_from_string} _max_index)
+math(EXPR size_on_disk ${_max_index}/2)
+
+file(REMOVE ${FILE_TO})
+
+file(APPEND ${FILE_TO} "int ${VAR_NAME}_size = ${size_on_disk};\n")
+file(APPEND ${FILE_TO} "char ${VAR_NAME}[] = {")
+
+set(_index 0)
+
+while(NOT _index EQUAL _max_index)
+ string(SUBSTRING "${file_from_string}" ${_index} 2 _pair)
+ file(APPEND ${FILE_TO} "0x${_pair},")
+ math(EXPR _index ${_index}+2)
+endwhile()
+# null terminator not essential but good if we want plane strings encoded
+file(APPEND ${FILE_TO} "0x00};\n")
Modified: branches/soc-2011-tomato/intern/cycles/app/cycles_test.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/app/cycles_test.cpp 2012-08-10 08:51:34 UTC (rev 49757)
+++ branches/soc-2011-tomato/intern/cycles/app/cycles_test.cpp 2012-08-10 08:54:14 UTC (rev 49758)
@@ -245,7 +245,7 @@
NULL);
if(ap.parse(argc, argv) < 0) {
- fprintf(stderr, "%s\n", ap.error_message().c_str());
+ fprintf(stderr, "%s\n", ap.geterror().c_str());
ap.usage();
exit(EXIT_FAILURE);
}
Deleted: branches/soc-2011-tomato/release/datafiles/clkernelstoh.py
===================================================================
--- branches/soc-2011-tomato/release/datafiles/clkernelstoh.py 2012-08-10 08:51:34 UTC (rev 49757)
+++ branches/soc-2011-tomato/release/datafiles/clkernelstoh.py 2012-08-10 08:54:14 UTC (rev 49758)
@@ -1,70 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-# ***** 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.
-#
-# The Original Code is Copyright (C) 2012 Blender Foundation.
-# All rights reserved.
-#
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list