Compare commits
141 Commits
Author | SHA1 | Date | |
---|---|---|---|
30bebec477 | |||
![]() |
1f9657ecc7 | ||
704d710ddc | |||
315d00f76b | |||
f03e2bf47a | |||
d42b85e2d8 | |||
ec6043cd66 | |||
4ce9447b08 | |||
e6e5fd5475 | |||
d73a57698b | |||
c8794563f1 | |||
ba4bc4c58e | |||
8323d88ef8 | |||
2b67bf7510 | |||
863fd8a4fc | |||
8e12efb431 | |||
485f9b88db | |||
c3b87fced2 | |||
4e52fac147 | |||
20cb5f7a3e | |||
5b5c8afb60 | |||
4fe223ab0e | |||
b7ad6b4437 | |||
567e062102 | |||
ed62c38730 | |||
b8801997b2 | |||
b892c8a452 | |||
664dc55305 | |||
0a3f279855 | |||
f52cdcf97c | |||
0ae03b6fa1 | |||
eb20ebe5c2 | |||
d60804b72d | |||
e38cafbe51 | |||
dcf5c52e44 | |||
b844da7750 | |||
5eae52ae96 | |||
759d772408 | |||
517d28ea26 | |||
90906db4fd | |||
0f34796ed9 | |||
6c4bab22db | |||
ba3acdeba0 | |||
7a4cec4c22 | |||
c18e168c09 | |||
9643f78cfe | |||
ba918f2f3d | |||
![]() |
f6fc2f5991 | ||
0b064ce2d4 | |||
da844af3a0 | |||
4a17f1bd62 | |||
65df2781fd | |||
ea3a11fa69 | |||
ab409e645d | |||
bc11096db4 | |||
336ca4e398 | |||
0ed8058347 | |||
06278f03dd | |||
5fd10b15a6 | |||
0d92435a71 | |||
c3f8a08fe4 | |||
b5ce99ddf7 | |||
8359fa245e | |||
cae1d7dab0 | |||
09977b40c4 | |||
45bff7af39 | |||
b192c1da74 | |||
69c0e5f175 | |||
6ac1a646ec | |||
87799657fe | |||
84b7035227 | |||
9241221ff1 | |||
37e9ab73e1 | |||
17d35f9e80 | |||
5529e51a21 | |||
42143ce873 | |||
02c7aa4455 | |||
53a1708860 | |||
8df8824f3a | |||
838c692b93 | |||
97ab366e44 | |||
fba08b9092 | |||
d00f63627b | |||
921b8d6907 | |||
a69ab5509a | |||
47c2250a7e | |||
eade6e7b66 | |||
af8d5d2b24 | |||
285bea9949 | |||
3a969f52ee | |||
795592dc90 | |||
83d713c606 | |||
4c84e89761 | |||
a613ef67df | |||
e748662785 | |||
dc77502804 | |||
6c9216fc49 | |||
6a27e8ed0b | |||
8eb5aa1c35 | |||
3a7899c5eb | |||
cb2aca5833 | |||
6fbd801713 | |||
989bdf6748 | |||
0c7fd1622a | |||
20a570f6b7 | |||
b94eaf041f | |||
a3128b0c95 | |||
74432c94f3 | |||
882e6de2fa | |||
25175306e3 | |||
6d1f76d21b | |||
c5b7841b78 | |||
a209b323dc | |||
9ad2623d0d | |||
4349505c6e | |||
8d838f02e2 | |||
814df8ca34 | |||
bd5aa57c35 | |||
208d21d63f | |||
15c2ed08a6 | |||
69667a7e1f | |||
1709562a04 | |||
8df7e10f30 | |||
c6f727c667 | |||
bc032b9880 | |||
cfb0ae2a17 | |||
929033a13b | |||
1f7a59ce7b | |||
8947cfe30c | |||
e767a7bd44 | |||
d13a194bb7 | |||
95dca123d2 | |||
faf41c6c20 | |||
bbd0f6d37f | |||
1f4337b770 | |||
49e4866312 | |||
e13bc48780 | |||
c3b6b8d86a | |||
a1fbb85c76 | |||
f268dfe88e | |||
39dd7ec5b4 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -11,6 +11,10 @@ __pycache__/
|
||||
*.swo
|
||||
*#
|
||||
|
||||
# conflicts
|
||||
*.orig
|
||||
*.rej
|
||||
|
||||
# QtCreator
|
||||
CMakeLists.txt.user
|
||||
|
||||
|
890
CMakeLists.txt
890
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
110
GNUmakefile
110
GNUmakefile
@@ -52,10 +52,6 @@ ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_debug
|
||||
BUILD_TYPE:=Debug
|
||||
endif
|
||||
ifneq "$(findstring full, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_full
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_full.cmake"
|
||||
endif
|
||||
ifneq "$(findstring lite, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_lite
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake"
|
||||
@@ -65,7 +61,7 @@ ifneq "$(findstring cycles, $(MAKECMDGOALS))" ""
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake"
|
||||
endif
|
||||
ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_headless
|
||||
BUILD_DIR:=$(BUILD_DIR)_bpy
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake"
|
||||
endif
|
||||
ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
|
||||
@@ -113,7 +109,7 @@ endif
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Build Blender
|
||||
all: FORCE
|
||||
all:
|
||||
@echo
|
||||
@echo Configuring Blender ...
|
||||
|
||||
@@ -133,7 +129,6 @@ all: FORCE
|
||||
@echo
|
||||
|
||||
debug: all
|
||||
full: all
|
||||
lite: all
|
||||
cycles: all
|
||||
headless: all
|
||||
@@ -142,17 +137,16 @@ bpy: all
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Configuration (save some cd'ing around)
|
||||
config: FORCE
|
||||
config:
|
||||
$(CMAKE_CONFIG_TOOL) "$(BUILD_DIR)"
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Help for build targets
|
||||
help: FORCE
|
||||
help:
|
||||
@echo ""
|
||||
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
|
||||
@echo " * debug - build a debug binary"
|
||||
@echo " * full - enable all supported dependencies & options"
|
||||
@echo " * lite - disable non essential features for a smaller binary and faster build"
|
||||
@echo " * headless - build without an interface (renderfarm or server automation)"
|
||||
@echo " * cycles - build Cycles standalone only, without Blender"
|
||||
@@ -171,7 +165,7 @@ help: FORCE
|
||||
@echo ""
|
||||
@echo "Package Targets"
|
||||
@echo " * package_debian - build a debian package"
|
||||
@echo " * package_pacman - build an arch linux pacman package"
|
||||
@echo " * package_pacman - build an arch linux pacmanpackage"
|
||||
@echo " * package_archive - build an archive package"
|
||||
@echo ""
|
||||
@echo "Testing Targets (not associated with building blender)"
|
||||
@@ -198,8 +192,7 @@ help: FORCE
|
||||
@echo ""
|
||||
@echo "Utilities (not associated with building blender)"
|
||||
@echo " * icons - updates PNG icons from SVG files."
|
||||
@echo " * tgz - create a compressed archive of the source code."
|
||||
@echo " * update - updates git and all submodules"
|
||||
@echo " * tbz - create a compressed svn export 'blender_archive.tar.bz2'"
|
||||
@echo ""
|
||||
@echo "Documentation Targets (not associated with building blender)"
|
||||
@echo " * doc_py - generate sphinx python api docs"
|
||||
@@ -207,20 +200,17 @@ help: FORCE
|
||||
@echo " * doc_dna - generate blender file format reference"
|
||||
@echo " * doc_man - generate manpage"
|
||||
@echo ""
|
||||
@echo "Information"
|
||||
@echo " * help - this help message"
|
||||
@echo " * help_features - show a list of optional features when building"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Packages
|
||||
#
|
||||
package_debian: FORCE
|
||||
package_debian:
|
||||
cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh
|
||||
|
||||
package_pacman: FORCE
|
||||
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg
|
||||
package_pacman:
|
||||
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg --asroot
|
||||
|
||||
package_archive: FORCE
|
||||
package_archive:
|
||||
make -C "$(BUILD_DIR)" -s package_archive
|
||||
@echo archive in "$(BUILD_DIR)/release"
|
||||
|
||||
@@ -228,24 +218,24 @@ package_archive: FORCE
|
||||
# -----------------------------------------------------------------------------
|
||||
# Tests
|
||||
#
|
||||
test: FORCE
|
||||
test:
|
||||
cd $(BUILD_DIR) ; ctest . --output-on-failure
|
||||
|
||||
# run pep8 check check on scripts we distribute.
|
||||
test_pep8: FORCE
|
||||
test_pep8:
|
||||
python3 tests/python/pep8.py > test_pep8.log 2>&1
|
||||
@echo "written: test_pep8.log"
|
||||
|
||||
# run some checks on our cmakefiles.
|
||||
test_cmake: FORCE
|
||||
test_cmake:
|
||||
python3 build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
|
||||
@echo "written: test_cmake_consistency.log"
|
||||
|
||||
# run deprecation tests, see if we have anything to remove.
|
||||
test_deprecated: FORCE
|
||||
test_deprecated:
|
||||
python3 tests/check_deprecated.py
|
||||
|
||||
test_style_c: FORCE
|
||||
test_style_c:
|
||||
# run our own checks on C/C++ style
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||
@@ -253,7 +243,7 @@ test_style_c: FORCE
|
||||
"$(BLENDER_DIR)/source/creator" \
|
||||
--no-length-check
|
||||
|
||||
test_style_c_qtc: FORCE
|
||||
test_style_c_qtc:
|
||||
# run our own checks on C/C++ style
|
||||
USE_QTC_TASK=1 \
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
@@ -266,7 +256,7 @@ test_style_c_qtc: FORCE
|
||||
@echo "written: test_style.tasks"
|
||||
|
||||
|
||||
test_style_osl: FORCE
|
||||
test_style_osl:
|
||||
# run our own checks on C/C++ style
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||
@@ -274,7 +264,7 @@ test_style_osl: FORCE
|
||||
"$(BLENDER_DIR)/release/scripts/templates_osl"
|
||||
|
||||
|
||||
test_style_osl_qtc: FORCE
|
||||
test_style_osl_qtc:
|
||||
# run our own checks on C/C++ style
|
||||
USE_QTC_TASK=1 \
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
@@ -289,13 +279,13 @@ test_style_osl_qtc: FORCE
|
||||
# Project Files
|
||||
#
|
||||
|
||||
project_qtcreator: FORCE
|
||||
project_qtcreator:
|
||||
python3 build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
|
||||
|
||||
project_netbeans: FORCE
|
||||
project_netbeans:
|
||||
python3 build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
|
||||
|
||||
project_eclipse: FORCE
|
||||
project_eclipse:
|
||||
cmake -G"Eclipse CDT4 - Unix Makefiles" -H"$(BLENDER_DIR)" -B"$(BUILD_DIR)"
|
||||
|
||||
|
||||
@@ -303,40 +293,40 @@ project_eclipse: FORCE
|
||||
# Static Checking
|
||||
#
|
||||
|
||||
check_cppcheck: FORCE
|
||||
check_cppcheck:
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
|
||||
"$(BLENDER_DIR)/check_cppcheck.txt"
|
||||
@echo "written: check_cppcheck.txt"
|
||||
|
||||
check_clang_array: FORCE
|
||||
check_clang_array:
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py"
|
||||
|
||||
check_splint: FORCE
|
||||
check_splint:
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py"
|
||||
|
||||
check_sparse: FORCE
|
||||
check_sparse:
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py"
|
||||
|
||||
check_smatch: FORCE
|
||||
check_smatch:
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
python3 "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
|
||||
|
||||
check_spelling_py: FORCE
|
||||
check_spelling_py:
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/release/scripts"
|
||||
|
||||
check_spelling_c: FORCE
|
||||
check_spelling_c:
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
@@ -345,7 +335,7 @@ check_spelling_c: FORCE
|
||||
"$(BLENDER_DIR)/intern/guardedalloc" \
|
||||
"$(BLENDER_DIR)/intern/ghost" \
|
||||
|
||||
check_spelling_c_qtc: FORCE
|
||||
check_spelling_c_qtc:
|
||||
cd "$(BUILD_DIR)" ; USE_QTC_TASK=1 \
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
@@ -356,13 +346,13 @@ check_spelling_c_qtc: FORCE
|
||||
> \
|
||||
"$(BLENDER_DIR)/check_spelling_c.tasks"
|
||||
|
||||
check_spelling_osl: FORCE
|
||||
check_spelling_osl:
|
||||
cd "$(BUILD_DIR)" ;\
|
||||
PYTHONIOENCODING=utf_8 python3 \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
|
||||
|
||||
check_descriptions: FORCE
|
||||
check_descriptions:
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
|
||||
|
||||
@@ -370,56 +360,40 @@ check_descriptions: FORCE
|
||||
# Utilities
|
||||
#
|
||||
|
||||
tgz: FORCE
|
||||
./build_files/utils/build_tgz.sh
|
||||
tbz:
|
||||
svn export . blender_archive
|
||||
tar cjf blender_archive.tar.bz2 blender_archive/
|
||||
rm -rf blender_archive/
|
||||
@echo "blender_archive.tar.bz2 written"
|
||||
|
||||
icons: FORCE
|
||||
icons:
|
||||
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
|
||||
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
|
||||
|
||||
update: FORCE
|
||||
if [ -d "../lib" ]; then \
|
||||
svn update ../lib/* ; \
|
||||
fi
|
||||
git pull --rebase
|
||||
git submodule foreach git pull --rebase origin master
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Documentation
|
||||
#
|
||||
|
||||
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
|
||||
doc_py: FORCE
|
||||
doc_py:
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python doc/python_api/sphinx_doc_gen.py
|
||||
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
|
||||
|
||||
doc_doxy: FORCE
|
||||
doc_doxy:
|
||||
cd doc/doxygen; doxygen Doxyfile
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
|
||||
|
||||
doc_dna: FORCE
|
||||
doc_dna:
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python doc/blender_file_format/BlendFileDnaExporter_25.py
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
|
||||
|
||||
doc_man: FORCE
|
||||
doc_man:
|
||||
python3 doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
|
||||
|
||||
help_features: FORCE
|
||||
@python3 -c \
|
||||
"import re; \
|
||||
print('\n'.join([ \
|
||||
w for l in open('"$(BLENDER_DIR)"/CMakeLists.txt', 'r').readlines() \
|
||||
if not l.lstrip().startswith('#') \
|
||||
for w in (re.sub(\
|
||||
r'.*\boption\s*\(\s*(WITH_[a-zA-Z0-9_]+)\s+(\".*\")\s*.*', r'\g<1> - \g<2>', l).strip('() \n'),) \
|
||||
if w.startswith('WITH_')]))" | uniq
|
||||
|
||||
|
||||
clean: FORCE
|
||||
clean:
|
||||
$(MAKE) -C "$(BUILD_DIR)" clean
|
||||
|
||||
.PHONY: all
|
||||
|
||||
FORCE:
|
||||
|
199
SConstruct
199
SConstruct
@@ -210,16 +210,9 @@ if sys.platform=='win32':
|
||||
if B.bitness==64:
|
||||
env.Append(CPPFLAGS=['-DWIN64']) # -DWIN32 needed too, as it's used all over to target Windows generally
|
||||
|
||||
if env['BF_DEBUG']:
|
||||
env.Append(CPPDEFINES=['_DEBUG', 'DEBUG'])
|
||||
else:
|
||||
env.Append(CPPDEFINES=['NDEBUG'])
|
||||
|
||||
if not env['BF_FANCY']:
|
||||
B.bc.disable()
|
||||
|
||||
if env['WITH_BF_SDL_DYNLOAD']:
|
||||
env['BF_SDL_INC'] = '#extern/sdlew/include/SDL2'
|
||||
|
||||
# remove install dir so old and new files are not mixed.
|
||||
# NOTE: only do the scripts directory for now, otherwise is too disruptive for developers
|
||||
@@ -266,7 +259,6 @@ if 'blenderlite' in B.targets:
|
||||
target_env_defs['WITH_BF_BOOLEAN'] = False
|
||||
target_env_defs['WITH_BF_REMESH'] = False
|
||||
target_env_defs['WITH_BF_PYTHON'] = False
|
||||
target_env_defs['WITH_BF_IME'] = False
|
||||
target_env_defs['WITH_BF_3DMOUSE'] = False
|
||||
target_env_defs['WITH_BF_LIBMV'] = False
|
||||
target_env_defs['WITH_BF_FREESTYLE'] = False
|
||||
@@ -423,9 +415,6 @@ if env['OURPLATFORM']=='darwin':
|
||||
env.Append(LINKFLAGS=['-F/Library/Frameworks','-Xlinker','-weak_framework','-Xlinker','Jackmp'])
|
||||
print B.bc.OKGREEN + "Using Jack"
|
||||
|
||||
if env['WITH_BF_SDL']:
|
||||
env.Append(LINKFLAGS=['-lazy_framework','ForceFeedback'])
|
||||
|
||||
if env['WITH_BF_QUICKTIME'] == 1:
|
||||
env['PLATFORM_LINKFLAGS'] = env['PLATFORM_LINKFLAGS']+['-framework','QTKit']
|
||||
|
||||
@@ -444,7 +433,6 @@ if env['OURPLATFORM']=='darwin':
|
||||
print B.bc.OKGREEN + "Disabled OpenMP, not supported by compiler"
|
||||
|
||||
if env['WITH_BF_CYCLES_OSL'] == 1:
|
||||
env['WITH_BF_LLVM'] = 1
|
||||
OSX_OSL_LIBPATH = Dir(env.subst(env['BF_OSL_LIBPATH'])).abspath
|
||||
# we need 2 variants of passing the oslexec with the force_load option, string and list type atm
|
||||
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.8' or env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4':
|
||||
@@ -452,8 +440,6 @@ if env['OURPLATFORM']=='darwin':
|
||||
else:
|
||||
env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-force_load '+ OSX_OSL_LIBPATH +'/liboslexec.a','-loslquery'])
|
||||
env.Append(BF_PROGRAM_LINKFLAGS=['-Xlinker','-force_load','-Xlinker',OSX_OSL_LIBPATH +'/liboslexec.a'])
|
||||
else:
|
||||
env['WITH_BF_LLVM'] = 0
|
||||
|
||||
if env['WITH_BF_LLVM'] == 0:
|
||||
# Due duplicated generic UTF functions, we pull them either from LLVMSupport or COLLADA
|
||||
@@ -480,13 +466,6 @@ if env['WITH_BF_OPENMP'] == 1:
|
||||
else:
|
||||
env.Append(CCFLAGS=['-fopenmp'])
|
||||
|
||||
if env['WITH_BF_CPP11']:
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
# Nothing special is needed, C++11 features are available by default.
|
||||
pass
|
||||
else:
|
||||
env['CXXFLAGS'].append('-std=c++11')
|
||||
|
||||
#check for additional debug libnames
|
||||
|
||||
if env.has_key('BF_DEBUG_LIBS'):
|
||||
@@ -539,49 +518,6 @@ env['CPPFLAGS'].append('-DWITH_OPENNL')
|
||||
if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
|
||||
env['CPPFLAGS'].append('-DHAVE_STDBOOL_H')
|
||||
|
||||
# OpenGL
|
||||
|
||||
if env['WITH_BF_GL_PROFILE_COMPAT']:
|
||||
env['BF_GL_DEFINITIONS'].append('WITH_GL_PROFILE_COMPAT')
|
||||
|
||||
if env['WITH_BF_GL_PROFILE_CORE']:
|
||||
env['BF_GL_DEFINITIONS'].append('WITH_GL_PROFILE_CORE')
|
||||
|
||||
if env['WITH_BF_GL_PROFILE_ES20']:
|
||||
env['BF_GL_DEFINITIONS'].append('WITH_GL_PROFILE_ES20')
|
||||
|
||||
if env['WITH_BF_GL_EGL']:
|
||||
env['BF_GL_DEFINITIONS'].append('WITH_EGL')
|
||||
|
||||
# GLEW
|
||||
|
||||
if env['WITH_BF_GLEW_MX']:
|
||||
env['BF_GL_DEFINITIONS'].append('WITH_GLEW_MX')
|
||||
|
||||
if env['WITH_BF_GLEW_ES']:
|
||||
env['BF_GLEW_INC'] = '#extern/glew-es/include'
|
||||
|
||||
env['BF_GL_DEFINITIONS'] += ['GLEW_STATIC', 'WITH_GLEW_ES']
|
||||
|
||||
if not env['WITH_BF_GL_PROFILE_ES20']:
|
||||
# No ES functions are needed
|
||||
env['BF_GL_DEFINITIONS'].append('GLEW_NO_ES')
|
||||
elif not (env['WITH_BF_GL_PROFILE_CORE'] or env['WITH_BF_GL_PROFILE_COMPAT']):
|
||||
# ES is enabled, but the other functions are all disabled
|
||||
env['BF_GL_DEFINITIONS'].append('GLEW_ES_ONLY')
|
||||
|
||||
if env['WITH_BF_GL_PROFILE_ES20']:
|
||||
if env['WITH_BF_GL_EGL']:
|
||||
env['BF_GL_DEFINITIONS'].append('GLEW_USE_LIB_ES20')
|
||||
|
||||
if env['WITH_BF_GL_EGL']:
|
||||
env['BF_GL_DEFINITIONS'].append('GLEW_INC_EGL')
|
||||
|
||||
else:
|
||||
env['BF_GLEW_INC'] = '#extern/glew/include'
|
||||
|
||||
env['BF_GL_DEFINITIONS'].append('GLEW_STATIC')
|
||||
|
||||
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
|
||||
B.root_build_dir = env['BF_BUILDDIR']
|
||||
B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc')
|
||||
@@ -683,36 +619,31 @@ def data_to_c(FILE_FROM, FILE_TO, VAR_NAME):
|
||||
FILE_FROM = FILE_FROM.replace("/", "\\")
|
||||
FILE_TO = FILE_TO.replace("/", "\\")
|
||||
|
||||
try:
|
||||
# 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
|
||||
# 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)
|
||||
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)
|
||||
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")
|
||||
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")
|
||||
fpout.write("%3d," % ord(fpin.read(1)))
|
||||
fpout.write("\n 0};\n\n")
|
||||
|
||||
fpin.close()
|
||||
fpout.close()
|
||||
except KeyboardInterrupt:
|
||||
if os.path.exists(FILE_TO):
|
||||
os.remove(FILE_TO)
|
||||
raise KeyboardInterrupt
|
||||
fpin.close()
|
||||
fpout.close()
|
||||
|
||||
def data_to_c_simple(FILE_FROM):
|
||||
filename_only = os.path.basename(FILE_FROM)
|
||||
@@ -737,12 +668,7 @@ def data_to_c_simple_icon(PATH_FROM):
|
||||
FILE_TO_PNG = os.path.join(env['DATA_SOURCES'], filename_only + ".png")
|
||||
FILE_TO = FILE_TO_PNG + ".c"
|
||||
argv = [PATH_FROM, FILE_TO_PNG]
|
||||
try:
|
||||
datatoc_icon.main_ex(argv)
|
||||
except KeyboardInterrupt:
|
||||
if os.path.exists(FILE_TO_PNG):
|
||||
os.remove(FILE_TO_PNG)
|
||||
raise KeyboardInterrupt
|
||||
datatoc_icon.main_ex(argv)
|
||||
|
||||
# then the png to a c file
|
||||
data_to_c_simple(FILE_TO_PNG)
|
||||
@@ -765,18 +691,8 @@ if B.targets != ['cudakernels']:
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vertex.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vertex_world.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_ssao_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_vert.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_hq_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_lib.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_depth_resolve.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_vert.glsl")
|
||||
data_to_c_simple("intern/opencolorio/gpu_shader_display_transform.glsl")
|
||||
|
||||
# --- blender ---
|
||||
@@ -871,21 +787,17 @@ B.init_lib_dict()
|
||||
|
||||
##### END SETUP ##########
|
||||
|
||||
## Auto-configuration run-time tests
|
||||
if B.targets != ['cudakernels']:
|
||||
# Put all auto configuration run-time tests here
|
||||
|
||||
from FindSharedPtr import FindSharedPtr
|
||||
from FindUnorderedMap import FindUnorderedMap
|
||||
from FindSharedPtr import FindSharedPtr
|
||||
from FindUnorderedMap import FindUnorderedMap
|
||||
|
||||
conf = Configure(env)
|
||||
old_linkflags = conf.env['LINKFLAGS']
|
||||
conf.env.Append(LINKFLAGS=env['PLATFORM_LINKFLAGS'])
|
||||
|
||||
# Put all tests here
|
||||
FindSharedPtr(conf)
|
||||
FindUnorderedMap(conf)
|
||||
|
||||
conf.env['LINKFLAGS'] = old_linkflags
|
||||
env = conf.Finish()
|
||||
conf = Configure(env)
|
||||
conf.env.Append(LINKFLAGS=env['PLATFORM_LINKFLAGS'])
|
||||
FindSharedPtr(conf)
|
||||
FindUnorderedMap(conf)
|
||||
env = conf.Finish()
|
||||
|
||||
# End of auto configuration
|
||||
|
||||
@@ -914,6 +826,11 @@ creob = B.creator(env)
|
||||
thestatlibs, thelibincs = B.setup_staticlibs(env)
|
||||
thesyslibs = B.setup_syslibs(env)
|
||||
|
||||
# Hack to pass OSD libraries to linker before extern_{clew,cuew}
|
||||
for x in B.create_blender_liblist(env, 'system'):
|
||||
thesyslibs.append(os.path.basename(x))
|
||||
thelibincs.append(os.path.dirname(x))
|
||||
|
||||
if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
|
||||
blender_progname = "blender"
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
|
||||
@@ -923,7 +840,7 @@ if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
|
||||
lenv.Append(LINKFLAGS = env['PLATFORM_LINKFLAGS'])
|
||||
targetpath = B.root_build_dir + '/blender'
|
||||
launcher_obj = [env.Object(B.root_build_dir + 'source/creator/creator/creator_launch_win', ['#source/creator/creator_launch_win.c'])]
|
||||
env.BlenderProg(B.root_build_dir, 'blender', [launcher_obj] + B.resources, ['bf_utfconv'] + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
|
||||
env.BlenderProg(B.root_build_dir, 'blender', [launcher_obj] + B.resources, [], [], 'blender')
|
||||
|
||||
env.BlenderProg(B.root_build_dir, blender_progname, creob + mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
|
||||
if env['WITH_BF_PLAYER']:
|
||||
@@ -975,9 +892,8 @@ if env['OURPLATFORM']!='darwin':
|
||||
td, tf = os.path.split(targetdir)
|
||||
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
|
||||
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
|
||||
scriptinstall.append(env.InstallAs(env['BF_INSTALLDIR'] + '/blender-app.exe.manifest',
|
||||
'source/icons/blender.exe.manifest'))
|
||||
scriptinstall.append(env.InstallAs(env['BF_INSTALLDIR'] + '/blender-app.exe.manifest',
|
||||
'source/icons/blender.exe.manifest'))
|
||||
|
||||
if env['WITH_BF_PYTHON']:
|
||||
#-- local/VERSION/scripts
|
||||
@@ -1028,7 +944,6 @@ if env['OURPLATFORM']!='darwin':
|
||||
source.append('intern/cycles/util/util_color.h')
|
||||
source.append('intern/cycles/util/util_half.h')
|
||||
source.append('intern/cycles/util/util_math.h')
|
||||
source.append('intern/cycles/util/util_math_fast.h')
|
||||
source.append('intern/cycles/util/util_transform.h')
|
||||
source.append('intern/cycles/util/util_types.h')
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
@@ -1065,9 +980,8 @@ if env['OURPLATFORM']!='darwin':
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'lib')
|
||||
for arch in env['BF_CYCLES_CUDA_BINARIES_ARCH']:
|
||||
kernel_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel')
|
||||
for suffix in ('', '_experimental'):
|
||||
cubin_file = os.path.join(kernel_build_dir, "kernel%s_%s.cubin" % (suffix, arch))
|
||||
cubininstall.append(env.Install(dir=dir,source=cubin_file))
|
||||
cubin_file = os.path.join(kernel_build_dir, "kernel_%s.cubin" % arch)
|
||||
cubininstall.append(env.Install(dir=dir,source=cubin_file))
|
||||
|
||||
# osl shaders
|
||||
if env['WITH_BF_CYCLES_OSL']:
|
||||
@@ -1179,37 +1093,9 @@ if env['OURPLATFORM']=='linuxcross':
|
||||
textlist = []
|
||||
texttargetlist = []
|
||||
for tp, tn, tf in os.walk('release/text'):
|
||||
tf.remove("readme.html")
|
||||
for f in tf:
|
||||
textlist.append(tp+os.sep+f)
|
||||
|
||||
def readme_version_patch():
|
||||
readme_src = "release/text/readme.html"
|
||||
readme_dst = os.path.abspath(os.path.normpath(os.path.join(env['BF_BUILDDIR'], "readme.html")))
|
||||
|
||||
if not os.path.exists(readme_dst) or (os.path.getmtime(readme_dst) < os.path.getmtime(readme_src)):
|
||||
f = open(readme_src, "r")
|
||||
data = f.read()
|
||||
f.close()
|
||||
|
||||
data = data.replace("BLENDER_VERSION", VERSION)
|
||||
f = open(readme_dst, "w")
|
||||
f.write(data)
|
||||
f.close()
|
||||
|
||||
textlist.append(readme_dst)
|
||||
|
||||
readme_version_patch()
|
||||
del readme_version_patch
|
||||
|
||||
|
||||
'''Command(
|
||||
"release/text/readme.html"
|
||||
|
||||
)
|
||||
Command("file.out", "file.in", Copy(env['BF_INSTALLDIR'], "release/text/readme.html"))
|
||||
'''
|
||||
|
||||
# Font licenses
|
||||
textlist.append('release/datafiles/LICENSE-bfont.ttf.txt')
|
||||
if env['WITH_BF_INTERNATIONAL']:
|
||||
@@ -1236,15 +1122,13 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
|
||||
dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
|
||||
|
||||
if env['WITH_BF_SDL']:
|
||||
dllsources.append('${BF_SDL_LIBPATH}/SDL2.dll')
|
||||
dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
|
||||
|
||||
if env['WITH_BF_PYTHON']:
|
||||
if env['BF_DEBUG']:
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/sqlite3_d.dll')
|
||||
else:
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/sqlite3.dll')
|
||||
|
||||
if env['WITH_BF_ICONV']:
|
||||
if env['OURPLATFORM'] == 'win64-vc':
|
||||
@@ -1255,6 +1139,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
|
||||
|
||||
if env['WITH_BF_OPENAL']:
|
||||
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
|
||||
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
|
||||
|
||||
if env['WITH_BF_SNDFILE']:
|
||||
dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
|
||||
|
@@ -25,12 +25,10 @@
|
||||
ARGS=$( \
|
||||
getopt \
|
||||
-o s:i:t:h \
|
||||
--long source:,install:,tmp:,info:,threads:,help,no-sudo,with-all,with-opencollada,\
|
||||
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,\
|
||||
--long source:,install:,tmp:,threads:,help,no-sudo,with-all,with-opencollada,ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,\
|
||||
force-all,force-python,force-numpy,force-boost,force-ocio,force-oiio,force-llvm,force-osl,force-opencollada,\
|
||||
force-ffmpeg,\
|
||||
skip-python,skip-numpy,skip-boost,skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-ffmpeg,skip-opencollada,\
|
||||
required-numpy: \
|
||||
force-ffmpeg,skip-python,skip-numpy,skip-boost,skip-ocio,skip-oiio,skip-llvm,skip-osl,skip-ffmpeg,\
|
||||
skip-opencollada,required-numpy: \
|
||||
-- "$@" \
|
||||
)
|
||||
|
||||
@@ -40,7 +38,6 @@ SRC="$HOME/src/blender-deps"
|
||||
INST="/opt/lib"
|
||||
TMP="/tmp"
|
||||
CWD=$PWD
|
||||
INFO_PATH=$CWD
|
||||
|
||||
# Do not install some optional, potentially conflicting libs by default...
|
||||
WITH_ALL=false
|
||||
@@ -77,13 +74,10 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--tmp=<path>
|
||||
Use a specific temp path (defaults to '\$TMP').
|
||||
|
||||
--info=<path>
|
||||
Use a specific info path (to store BUILD_NOTES.txt, defaults to '\$INFO_PATH').
|
||||
|
||||
-t n, --threads=n
|
||||
Use a specific number of threads when building the libraries (auto-detected as '\$THREADS').
|
||||
|
||||
--no-sudo
|
||||
--no_sudo
|
||||
Disable use of sudo (this script won't be able to do much though, will just print needed packages...).
|
||||
|
||||
--with-all
|
||||
@@ -209,14 +203,14 @@ OCIO_VERSION_MIN="1.0"
|
||||
OCIO_FORCE_REBUILD=false
|
||||
OCIO_SKIP=false
|
||||
|
||||
OPENEXR_VERSION="2.2.0"
|
||||
OPENEXR_VERSION="2.1.0"
|
||||
OPENEXR_VERSION_MIN="2.0.1"
|
||||
ILMBASE_VERSION="2.2.0"
|
||||
ILMBASE_VERSION="2.1.0"
|
||||
OPENEXR_FORCE_REBUILD=false
|
||||
OPENEXR_SKIP=false
|
||||
_with_built_openexr=false
|
||||
|
||||
OIIO_VERSION="1.4.16"
|
||||
OIIO_VERSION="1.4.11"
|
||||
OIIO_VERSION_MIN="1.4.0"
|
||||
OIIO_FORCE_REBUILD=false
|
||||
OIIO_SKIP=false
|
||||
@@ -228,7 +222,7 @@ LLVM_FORCE_REBUILD=false
|
||||
LLVM_SKIP=false
|
||||
|
||||
# OSL needs to be compiled for now!
|
||||
OSL_VERSION="1.5.11"
|
||||
OSL_VERSION="1.5.0"
|
||||
OSL_VERSION_MIN=$OSL_VERSION
|
||||
OSL_FORCE_REBUILD=false
|
||||
OSL_SKIP=false
|
||||
@@ -326,9 +320,6 @@ while true; do
|
||||
--tmp)
|
||||
TMP="$2"; shift; shift; continue
|
||||
;;
|
||||
--info)
|
||||
INFO_PATH="$2"; shift; shift; continue
|
||||
;;
|
||||
-t|--threads)
|
||||
THREADS="$2"; shift; shift; continue
|
||||
;;
|
||||
@@ -471,12 +462,11 @@ while true; do
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $WITH_ALL == true -a $OPENCOLLADA_SKIP == false ]; then
|
||||
if $WITH_ALL; then
|
||||
WITH_OPENCOLLADA=true
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# This has to be done here, because user might force some versions...
|
||||
PYTHON_SOURCE=( "http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz" )
|
||||
NUMPY_SOURCE=( "http://sourceforge.net/projects/numpy/files/NumPy/$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz" )
|
||||
@@ -485,29 +475,21 @@ BOOST_SOURCE=( "http://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION
|
||||
|
||||
OCIO_SOURCE=( "https://github.com/imageworks/OpenColorIO/tarball/v$OCIO_VERSION" )
|
||||
|
||||
OPENEXR_USE_REPO=false
|
||||
OPENEXR_SOURCE=( "http://download.savannah.nongnu.org/releases/openexr/openexr-$OPENEXR_VERSION.tar.gz" )
|
||||
OPENEXR_SOURCE_REPO=( "https://github.com/mont29/openexr.git" )
|
||||
OPENEXR_SOURCE_REPO_UID="2787aa1cf652d244ed45ae124eb1553f6cff11ee"
|
||||
#OPENEXR_SOURCE=( "http://download.savannah.nongnu.org/releases/openexr/openexr-$OPENEXR_VERSION.tar.gz" )
|
||||
OPENEXR_SOURCE=( "https://github.com/mont29/openexr.git" )
|
||||
OPENEXR_REPO_UID="2787aa1cf652d244ed45ae124eb1553f6cff11ee"
|
||||
ILMBASE_SOURCE=( "http://download.savannah.nongnu.org/releases/openexr/ilmbase-$ILMBASE_VERSION.tar.gz" )
|
||||
|
||||
OIIO_USE_REPO=false
|
||||
OIIO_SOURCE=( "https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION.tar.gz" )
|
||||
OIIO_SOURCE_REPO=( "https://github.com/OpenImageIO/oiio.git" )
|
||||
OIIO_SOURCE_REPO_UID="c9e67275a0b248ead96152f6d2221cc0c0f278a4"
|
||||
#OIIO_SOURCE=( "https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION.tar.gz" )
|
||||
OIIO_SOURCE=( "https://github.com/OpenImageIO/oiio.git" )
|
||||
OIIO_REPO_UID="c9e67275a0b248ead96152f6d2221cc0c0f278a4"
|
||||
|
||||
LLVM_SOURCE=( "http://llvm.org/releases/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.gz" )
|
||||
LLVM_CLANG_SOURCE=( "http://llvm.org/releases/$LLVM_VERSION/clang-$LLVM_VERSION.src.tar.gz" "http://llvm.org/releases/$LLVM_VERSION/cfe-$LLVM_VERSION.src.tar.gz" )
|
||||
OSL_USE_REPO=true
|
||||
#~ OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz" )
|
||||
OSL_SOURCE=( "https://github.com/Nazg-Gul/OpenShadingLanguage/archive/Release-1.5.11.tar.gz" )
|
||||
#~ OSL_SOURCE_REPO=( "https://github.com/imageworks/OpenShadingLanguage.git" )
|
||||
#~ OSL_SOURCE_REPO=( "https://github.com/mont29/OpenShadingLanguage.git" )
|
||||
#~ OSL_SOURCE_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
|
||||
#~ OSL_SOURCE_REPO_BRANCH="master"
|
||||
OSL_SOURCE_REPO=( "https://github.com/Nazg-Gul/OpenShadingLanguage.git" )
|
||||
OSL_SOURCE_REPO_UID="22ee5ea298fd215430dfbd160b5aefd507f06db0"
|
||||
OSL_SOURCE_REPO_BRANCH="blender-fixes"
|
||||
#OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz" )
|
||||
#OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage.git" )
|
||||
OSL_SOURCE=( "https://github.com/mont29/OpenShadingLanguage.git" )
|
||||
OSL_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
|
||||
|
||||
OPENCOLLADA_SOURCE=( "https://github.com/KhronosGroup/OpenCOLLADA.git" )
|
||||
OPENCOLLADA_REPO_UID="18da7f4109a8eafaa290a33f5550501cc4c8bae8"
|
||||
@@ -983,7 +965,7 @@ clean_ILMBASE() {
|
||||
|
||||
compile_ILMBASE() {
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
ilmbase_magic=10
|
||||
ilmbase_magic=9
|
||||
_init_ilmbase
|
||||
|
||||
# Clean install if needed!
|
||||
@@ -1007,7 +989,8 @@ compile_ILMBASE() {
|
||||
download ILMBASE_SOURCE[@] $_src.tar.gz
|
||||
|
||||
INFO "Unpacking ILMBase-$ILMBASE_VERSION"
|
||||
tar -C $SRC --transform "s,(.*/?)ilmbase-[^/]*(.*),\1ILMBase-$ILMBASE_VERSION\2,x" -xf $_src.tar.gz
|
||||
tar -C $SRC --transform "s,(.*/?)ilmbase-[^/]*(.*),\1ILMBase-$ILMBASE_VERSION\2,x" \
|
||||
-xf $_src.tar.gz
|
||||
|
||||
fi
|
||||
|
||||
@@ -1023,7 +1006,6 @@ compile_ILMBASE() {
|
||||
cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
|
||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
|
||||
cmake_d="$cmake_d -D NAMESPACE_VERSIONING=OFF" # VERY IMPORTANT!!!
|
||||
|
||||
if file /bin/cp | grep -q '32-bit'; then
|
||||
cflags="-fPIC -m32 -march=i686"
|
||||
@@ -1096,28 +1078,24 @@ compile_OPENEXR() {
|
||||
INFO "Downloading OpenEXR-$OPENEXR_VERSION"
|
||||
mkdir -p $SRC
|
||||
|
||||
if [ $OPENEXR_USE_REPO == true ]; then
|
||||
git clone ${OPENEXR_SOURCE_REPO[0]} $_src
|
||||
else
|
||||
download OPENEXR_SOURCE[@] $_src.tar.gz
|
||||
INFO "Unpacking OpenEXR-$OPENEXR_VERSION"
|
||||
tar -C $SRC --transform "s,(.*/?)openexr[^/]*(.*),\1OpenEXR-$OPENEXR_VERSION\2,x" -xf $_src.tar.gz
|
||||
fi
|
||||
# download OPENEXR_SOURCE[@] $_src.tar.gz
|
||||
|
||||
# INFO "Unpacking OpenEXR-$OPENEXR_VERSION"
|
||||
# tar -C $SRC --transform "s,(.*/?)openexr[^/]*(.*),\1OpenEXR-$OPENEXR_VERSION\2,x" \
|
||||
# -xf $_src.tar.gz
|
||||
|
||||
git clone ${OPENEXR_SOURCE[0]} $_src
|
||||
|
||||
fi
|
||||
|
||||
cd $_src
|
||||
|
||||
if [ $OPENEXR_USE_REPO == true ]; then
|
||||
# XXX For now, always update from latest repo...
|
||||
git pull origin master
|
||||
# Stick to same rev as windows' libs...
|
||||
git checkout $OPENEXR_SOURCE_REPO_UID
|
||||
git reset --hard
|
||||
oiio_src_path="../OpenEXR"
|
||||
else
|
||||
oiio_src_path=".."
|
||||
fi
|
||||
# XXX For now, always update from latest repo...
|
||||
git pull origin master
|
||||
|
||||
# Stick to same rev as windows' libs...
|
||||
git checkout $OPENEXR_REPO_UID
|
||||
git reset --hard
|
||||
|
||||
# Always refresh the whole build!
|
||||
if [ -d build ]; then
|
||||
@@ -1131,7 +1109,6 @@ compile_OPENEXR() {
|
||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
cmake_d="$cmake_d -D ILMBASE_PACKAGE_PREFIX=$_ilmbase_inst"
|
||||
cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
|
||||
cmake_d="$cmake_d -D NAMESPACE_VERSIONING=OFF" # VERY IMPORTANT!!!
|
||||
|
||||
if file /bin/cp | grep -q '32-bit'; then
|
||||
cflags="-fPIC -m32 -march=i686"
|
||||
@@ -1139,7 +1116,7 @@ compile_OPENEXR() {
|
||||
cflags="-fPIC"
|
||||
fi
|
||||
|
||||
cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" $oiio_src_path
|
||||
cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" ../OpenEXR
|
||||
|
||||
make -j$THREADS && make install
|
||||
|
||||
@@ -1203,25 +1180,24 @@ compile_OIIO() {
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
#download OIIO_SOURCE[@] "$_src.tar.gz"
|
||||
#
|
||||
#INFO "Unpacking OpenImageIO-$OIIO_VERSION"
|
||||
#tar -C $SRC --transform "s,(.*/?)oiio-Release-[^/]*(.*),\1OpenImageIO-$OIIO_VERSION\2,x" \
|
||||
#-xf $_src.tar.gz
|
||||
|
||||
git clone ${OIIO_SOURCE[0]} $_src
|
||||
|
||||
if [ $OIIO_USE_REPO == true ]; then
|
||||
git clone ${OIIO_SOURCE_REPO[0]} $_src
|
||||
else
|
||||
download OIIO_SOURCE[@] "$_src.tar.gz"
|
||||
INFO "Unpacking OpenImageIO-$OIIO_VERSION"
|
||||
tar -C $SRC --transform "s,(.*/?)oiio-Release-[^/]*(.*),\1OpenImageIO-$OIIO_VERSION\2,x" -xf $_src.tar.gz
|
||||
fi
|
||||
fi
|
||||
|
||||
cd $_src
|
||||
|
||||
if [ $OIIO_USE_REPO == true ]; then
|
||||
# XXX For now, always update from latest repo...
|
||||
git pull origin master
|
||||
# Stick to same rev as windows' libs...
|
||||
git checkout $OIIO_SOURCE_REPO_UID
|
||||
git reset --hard
|
||||
fi
|
||||
# XXX For now, always update from latest repo...
|
||||
git pull origin master
|
||||
|
||||
# Stick to same rev as windows' libs...
|
||||
git checkout $OIIO_REPO_UID
|
||||
git reset --hard
|
||||
|
||||
# Always refresh the whole build!
|
||||
if [ -d build ]; then
|
||||
@@ -1243,7 +1219,6 @@ compile_OIIO() {
|
||||
if [ $_with_built_openexr == true ]; then
|
||||
cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr"
|
||||
cmake_d="$cmake_d -D OPENEXR_HOME=$INST/openexr"
|
||||
INFO "ILMBASE_HOME=$INST/openexr"
|
||||
fi
|
||||
|
||||
# Optional tests and cmd tools
|
||||
@@ -1420,15 +1395,14 @@ clean_OSL() {
|
||||
|
||||
compile_OSL() {
|
||||
# To be changed each time we make edits that would modify the compiled result!
|
||||
osl_magic=17
|
||||
osl_magic=15
|
||||
_init_osl
|
||||
|
||||
# Clean install if needed!
|
||||
magic_compile_check osl-$OSL_VERSION $osl_magic
|
||||
#~ if [ $? -eq 1 -o $OSL_FORCE_REBUILD == true ]; then
|
||||
#~ rm -Rf $_src # XXX Radical, but not easy to change remote repo fully automatically
|
||||
#~ clean_OSL
|
||||
#~ fi
|
||||
if [ $? -eq 1 -o $OSL_FORCE_REBUILD == true ]; then
|
||||
clean_OSL
|
||||
fi
|
||||
|
||||
if [ ! -d $_inst ]; then
|
||||
INFO "Building OpenShadingLanguage-$OSL_VERSION"
|
||||
@@ -1438,26 +1412,26 @@ compile_OSL() {
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
|
||||
if [ $OSL_USE_REPO == true ]; then
|
||||
git clone ${OSL_SOURCE_REPO[0]} $_src
|
||||
else
|
||||
download OSL_SOURCE[@] "$_src.tar.gz"
|
||||
INFO "Unpacking OpenShadingLanguage-$OSL_VERSION"
|
||||
tar -C $SRC --transform "s,(.*/?)OpenShadingLanguage-[^/]*(.*),\1OpenShadingLanguage-$OSL_VERSION\2,x" \
|
||||
-xf $_src.tar.gz
|
||||
fi
|
||||
#download OSL_SOURCE[@] "$_src.tar.gz"
|
||||
|
||||
#INFO "Unpacking OpenShadingLanguage-$OSL_VERSION"
|
||||
#tar -C $SRC --transform "s,(.*/?)OpenShadingLanguage-[^/]*(.*),\1OpenShadingLanguage-$OSL_VERSION\2,x" \
|
||||
#-xf $_src.tar.gz
|
||||
|
||||
git clone ${OSL_SOURCE[0]} $_src
|
||||
|
||||
fi
|
||||
|
||||
cd $_src
|
||||
|
||||
if [ $OSL_USE_REPO == true ]; then
|
||||
git remote set-url origin ${OSL_SOURCE_REPO[0]}
|
||||
# XXX For now, always update from latest repo...
|
||||
git pull --no-edit -X theirs origin $OSL_SOURCE_REPO_BRANCH
|
||||
# Stick to same rev as windows' libs...
|
||||
git checkout $OSL_SOURCE_REPO_UID
|
||||
git reset --hard
|
||||
fi
|
||||
git remote set-url origin $OSL_SOURCE
|
||||
|
||||
# XXX For now, always update from latest repo...
|
||||
git pull -X theirs origin master
|
||||
|
||||
# Stick to same rev as windows' libs...
|
||||
git checkout $OSL_REPO_UID
|
||||
git reset --hard
|
||||
|
||||
# Always refresh the whole build!
|
||||
if [ -d build ]; then
|
||||
@@ -1472,14 +1446,11 @@ compile_OSL() {
|
||||
cmake_d="$cmake_d -D STOP_ON_WARNING=OFF"
|
||||
cmake_d="$cmake_d -D BUILDSTATIC=OFF"
|
||||
|
||||
#~ cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
|
||||
cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
|
||||
|
||||
if [ $_with_built_openexr == true ]; then
|
||||
INFO "ILMBASE_HOME=$INST/openexr"
|
||||
cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr"
|
||||
# XXX Temp workaround... sigh, ILMBase really messed the things up by defining their custom names ON by default :(
|
||||
cmake_d="$cmake_d -D ILMBASE_CUSTOM=ON"
|
||||
cmake_d="$cmake_d -D ILMBASE_CUSTOM_LIBRARIES='Half;Iex;Imath;IlmThread'"
|
||||
fi
|
||||
|
||||
if [ -d $INST/boost ]; then
|
||||
@@ -1493,7 +1464,7 @@ compile_OSL() {
|
||||
if [ ! -z $LLVM_VERSION_FOUND ]; then
|
||||
cmake_d="$cmake_d -D LLVM_VERSION=$LLVM_VERSION_FOUND"
|
||||
if [ -d $INST/llvm ]; then
|
||||
cmake_d="$cmake_d -D LLVM_ROOT_DIR=$INST/llvm"
|
||||
cmake_d="$cmake_d -D LLVM_DIRECTORY=$INST/llvm"
|
||||
cmake_d="$cmake_d -D LLVM_STATIC=ON"
|
||||
fi
|
||||
fi
|
||||
@@ -1723,7 +1694,7 @@ check_package_DEB() {
|
||||
}
|
||||
|
||||
check_package_installed_DEB() {
|
||||
r=`dpkg-query -W -f='${Status}' $1 | grep -c "install ok"`
|
||||
r=`dpkg -s $1 | grep -c '$1'`
|
||||
|
||||
if [ $r -ge 1 ]; then
|
||||
return 0
|
||||
@@ -1815,7 +1786,7 @@ install_DEB() {
|
||||
_packages="gawk cmake cmake-curses-gui scons build-essential libjpeg-dev libpng-dev \
|
||||
libfreetype6-dev libx11-dev libxi-dev wget libsqlite3-dev libbz2-dev \
|
||||
libncurses5-dev libssl-dev liblzma-dev libreadline-dev $OPENJPEG_DEV \
|
||||
libopenal-dev libglew-dev libglewmx-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \
|
||||
libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \
|
||||
libsdl1.2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev"
|
||||
|
||||
OPENJPEG_USE=true
|
||||
@@ -1883,7 +1854,7 @@ install_DEB() {
|
||||
# Only install jack if jack2 is not already installed!
|
||||
JACK="libjack-dev"
|
||||
JACK2="libjack-jackd2-dev"
|
||||
check_package_installed_DEB $JACK2
|
||||
check_package_installed_DEB JACK2
|
||||
if [ $? -eq 0 ]; then
|
||||
_packages="$_packages $JACK2"
|
||||
else
|
||||
@@ -1992,7 +1963,7 @@ install_DEB() {
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_DEB libboost-locale$boost_version-dev libboost-filesystem$boost_version-dev \
|
||||
libboost-regex$boost_version-dev libboost-system$boost_version-dev \
|
||||
libboost-thread$boost_version-dev libboost-wave$boost_version-dev
|
||||
libboost-thread$boost_version-dev
|
||||
clean_Boost
|
||||
else
|
||||
compile_Boost
|
||||
@@ -2997,7 +2968,7 @@ print_info() {
|
||||
_buildargs="$_buildargs $_1"
|
||||
fi
|
||||
if [ -d $INST/llvm ]; then
|
||||
_1="-D LLVM_ROOT_DIR=$INST/llvm"
|
||||
_1="-D LLVM_DIRECTORY=$INST/llvm"
|
||||
_2="-D LLVM_STATIC=ON"
|
||||
PRINT " $_1"
|
||||
PRINT " $_2"
|
||||
@@ -3053,10 +3024,10 @@ print_info() {
|
||||
PRINT "BF_OPENEXR = '$INST/openexr'"
|
||||
|
||||
_ilm_libs_ext=""
|
||||
#~ version_ge $OPENEXR_VERSION "2.1.0"
|
||||
#~ if [ $? -eq 0 ]; then
|
||||
#~ _ilm_libs_ext=`echo $OPENEXR_VERSION | sed -r 's/([0-9]+)\.([0-9]+).*/-\1_\2/'`
|
||||
#~ fi
|
||||
version_ge $OPENEXR_VERSION "2.1.0"
|
||||
if [ $? -eq 0 ]; then
|
||||
_ilm_libs_ext=`echo $OPENEXR_VERSION | sed -r 's/([0-9]+)\.([0-9]+).*/-\1_\2/'`
|
||||
fi
|
||||
PRINT "BF_OPENEXR_LIB = 'Half IlmImf$_ilm_libs_ext Iex$_ilm_libs_ext Imath$_ilm_libs_ext '"
|
||||
# BF_OPENEXR_LIB does not work, things like '-lIlmImf-2_1' do not suit ld.
|
||||
# For now, hack around!!!
|
||||
@@ -3127,9 +3098,9 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_info | tee $INFO_PATH/BUILD_NOTES.txt
|
||||
print_info | tee BUILD_NOTES.txt
|
||||
PRINT ""
|
||||
PRINT "This information has been written to $INFO_PATH/BUILD_NOTES.txt"
|
||||
PRINT "This information has been written to BUILD_NOTES.txt"
|
||||
PRINT ""
|
||||
|
||||
# Switch back to user language.
|
||||
|
@@ -2,4 +2,4 @@ BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
|
||||
BF_NUMJOBS = 1
|
||||
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
|
||||
|
@@ -2,4 +2,4 @@ BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
|
||||
BF_NUMJOBS = 1
|
||||
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
|
||||
|
@@ -49,7 +49,7 @@ BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7.1/libstdc++.a'
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
@@ -79,8 +79,6 @@ WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
@@ -124,15 +122,13 @@ BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
BF_IS_NEW_OSL = False
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
WITH_BF_STATICOSL = BF_IS_NEW_OSL
|
||||
WITH_BF_STATICOSL = False
|
||||
BF_OSL = '/opt/lib/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
# note oslexec would passed via program linkflags, which is needed to
|
||||
# make llvm happy with osl_allocate_closure_component
|
||||
BF_OSL_LIB = 'oslcomp oslexec oslquery'
|
||||
BF_OSL_LIB_STATIC = '${BF_OSL}/lib/liboslcomp.a ${BF_OSL}/lib/liboslexec.a ${BF_OSL}/lib/liboslquery.a'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
@@ -159,8 +155,6 @@ BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
|
||||
${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_BOOST_LIB_STATIC += ' ${BF_BOOST_LIBPATH}/libboost_wave.a'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
# Ocean Simulation
|
||||
@@ -170,7 +164,4 @@ WITH_BF_OCEANSIM = True
|
||||
BF_DEBUG = False
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
|
||||
PLATFORM_LINKFLAGS = ['-lrt']
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--version-script=source/creator/blender.map']
|
||||
else:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
|
||||
|
@@ -49,7 +49,7 @@ BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7.1/libstdc++.a'
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
@@ -79,8 +79,6 @@ WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
@@ -124,15 +122,13 @@ BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
BF_IS_NEW_OSL = False
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
WITH_BF_STATICOSL = BF_IS_NEW_OSL
|
||||
WITH_BF_STATICOSL = False
|
||||
BF_OSL = '/opt/lib/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
# note oslexec would passed via program linkflags, which is needed to
|
||||
# make llvm happy with osl_allocate_closure_component
|
||||
BF_OSL_LIB = 'oslcomp oslexec oslquery'
|
||||
BF_OSL_LIB_STATIC = '${BF_OSL}/lib/liboslcomp.a ${BF_OSL}/lib/liboslexec.a ${BF_OSL}/lib/liboslquery.a'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
@@ -159,8 +155,6 @@ BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
|
||||
${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_BOOST_LIB_STATIC += ' ${BF_BOOST_LIBPATH}/libboost_wave.a'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
# Ocean Simulation
|
||||
@@ -170,7 +164,4 @@ WITH_BF_OCEANSIM = True
|
||||
BF_DEBUG = False
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
|
||||
PLATFORM_LINKFLAGS = ['-lrt']
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--version-script=source/creator/blender.map']
|
||||
else:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
|
||||
|
@@ -5,3 +5,4 @@ WITH_BF_CYCLES_CUDA_BINARIES = True
|
||||
|
||||
WITH_BF_CYCLES_OSL = False # OSL never worked on OSX 32bit !
|
||||
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
CC = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang"
|
||||
CXX = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang++"
|
||||
|
||||
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = True
|
||||
|
||||
|
@@ -34,7 +34,7 @@ BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7.1/libstdc++.a'
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
@@ -64,8 +64,6 @@ WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = False
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
@@ -34,7 +34,7 @@ BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7.1/libstdc++.a'
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
@@ -64,8 +64,6 @@ WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = False
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
@@ -3,12 +3,6 @@
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# List of the branches being built automatically overnight
|
||||
NIGHT_SCHEDULE_BRANCHES = [None, "gooseberry"]
|
||||
|
||||
# List of the branches available for force build
|
||||
FORCE_SCHEDULE_BRANCHES = ["master", "gooseberry", "experimental-build"]
|
||||
|
||||
"""
|
||||
Stock Twisted directory lister doesn't provide any information about last file
|
||||
modification time, we hack the class a bit in order to have such functionaliity
|
||||
@@ -98,7 +92,6 @@ all_repositories = {
|
||||
r'https://svn.blender.org/svnroot/bf-blender/': 'lib svn',
|
||||
}
|
||||
|
||||
|
||||
def codebaseGenerator(chdict):
|
||||
return all_repositories[chdict['repository']]
|
||||
|
||||
@@ -114,14 +107,13 @@ from buildbot.schedulers import timed, forcesched
|
||||
|
||||
c['schedulers'] = []
|
||||
|
||||
|
||||
def schedule_force_build(name):
|
||||
c['schedulers'].append(forcesched.ForceScheduler(name='force ' + name,
|
||||
builderNames=[name],
|
||||
codebases=[forcesched.CodebaseParameter(
|
||||
codebase="blender",
|
||||
branch=forcesched.ChoiceStringParameter(
|
||||
name="branch", choices=FORCE_SCHEDULE_BRANCHES, default="master"),
|
||||
name="branch", choices=["master", "testbuild"], default="master"),
|
||||
# Do not hide revision, can be handy!
|
||||
repository=forcesched.FixedParameter(name="repository", default="", hide=True),
|
||||
project=forcesched.FixedParameter(name="project", default="", hide=True)),
|
||||
@@ -135,22 +127,18 @@ def schedule_force_build(name):
|
||||
|
||||
|
||||
def schedule_build(name, hour, minute=0):
|
||||
for current_branch in NIGHT_SCHEDULE_BRANCHES:
|
||||
scheduler_name = "nightly " + name
|
||||
if current_branch:
|
||||
scheduler_name += ' ' + current_branch
|
||||
c['schedulers'].append(timed.Nightly(name=scheduler_name,
|
||||
codebases={
|
||||
"blender": {"repository": ""},
|
||||
"blender-translations": {"repository": "", "branch": "master"},
|
||||
"blender-addons": {"repository": "", "branch": "master"},
|
||||
"blender-addons-contrib": {"repository": "", "branch": "master"},
|
||||
"scons": {"repository": "", "branch": "master"},
|
||||
"lib svn": {"repository": "", "branch": "trunk"}},
|
||||
branch=current_branch,
|
||||
builderNames=[name],
|
||||
hour=hour,
|
||||
minute=minute))
|
||||
c['schedulers'].append(timed.Nightly(name='nightly ' + name,
|
||||
codebases={
|
||||
"blender": {"repository": ""},
|
||||
"blender-translations": {"repository": ""},
|
||||
"blender-addons": {"repository": ""},
|
||||
"blender-addons-contrib": {"repository": ""},
|
||||
"scons": {"repository": ""},
|
||||
"lib svn": {"repository": ""}},
|
||||
branch=None,
|
||||
builderNames=[name],
|
||||
hour=hour,
|
||||
minute=minute))
|
||||
|
||||
|
||||
# BUILDERS
|
||||
@@ -305,10 +293,12 @@ add_builder(c, 'mac_x86_64_10_6_scons', 'darwin-9.x.universal', generic_builder,
|
||||
add_builder(c, 'mac_i386_10_6_scons', 'darwin-9.x.universal', generic_builder, hour=11)
|
||||
add_builder(c, 'linux_glibc211_i386_scons', '', generic_builder, hour=1)
|
||||
add_builder(c, 'linux_glibc211_x86_64_scons', '', generic_builder, hour=2)
|
||||
add_builder(c, 'win32_scons', 'windows', generic_builder, hour=1)
|
||||
add_builder(c, 'win64_scons', 'win64', generic_builder, hour=2)
|
||||
#add_builder(c, 'win32_scons_vc2012', 'windows_vc11', generic_builder, hour=1)
|
||||
#add_builder(c, 'win64_scons_vc2012', 'win64_vc11', generic_builder, hour=2)
|
||||
add_builder(c, 'win32_scons_vc2013', 'windows_vc12', generic_builder, hour=1)
|
||||
add_builder(c, 'win64_scons_vc2013', 'win64_vc12', generic_builder, hour=2)
|
||||
add_builder(c, 'win32_cmake_vc2013', 'windows_vc12', generic_builder, hour=3)
|
||||
add_builder(c, 'win64_cmake_vc2013', 'win64_vc12', generic_builder, hour=4)
|
||||
#add_builder(c, 'mingw_win32_scons', 'mingw32', generic_builder, hour=4)
|
||||
add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder, hour=3)
|
||||
#add_builder(c, 'freebsd_i386_cmake', '', generic_builder, hour=1)
|
||||
|
@@ -30,12 +30,11 @@ import zipfile
|
||||
# extension stripping
|
||||
def strip_extension(filename):
|
||||
extensions = '.zip', '.tar', '.bz2', '.gz', '.tgz', '.tbz', '.exe'
|
||||
|
||||
for ext in extensions:
|
||||
if filename.endswith(ext):
|
||||
filename = filename[:-len(ext)]
|
||||
|
||||
return filename
|
||||
filename_noext, ext = os.path.splitext(filename)
|
||||
if ext in extensions:
|
||||
return strip_extension(filename_noext) # may have .tar.bz2
|
||||
else:
|
||||
return filename
|
||||
|
||||
|
||||
# extract platform from package name
|
||||
@@ -49,11 +48,12 @@ def get_platform(filename):
|
||||
tokens = filename.split("-")
|
||||
platforms = ('osx', 'mac', 'bsd',
|
||||
'win', 'linux', 'source',
|
||||
'irix', 'solaris', 'mingw')
|
||||
'solaris',
|
||||
'mingw')
|
||||
platform_tokens = []
|
||||
found = False
|
||||
|
||||
for i, token in enumerate(tokens):
|
||||
for token in tokens:
|
||||
if not found:
|
||||
for platform in platforms:
|
||||
if platform in token.lower():
|
||||
@@ -71,14 +71,14 @@ def get_branch(filename):
|
||||
branch = ""
|
||||
|
||||
for token in tokens:
|
||||
if token == "blender":
|
||||
return branch
|
||||
|
||||
if branch == "":
|
||||
branch = token
|
||||
else:
|
||||
branch = branch + "-" + token
|
||||
|
||||
if token == "blender":
|
||||
return branch
|
||||
|
||||
return ""
|
||||
|
||||
# get filename
|
||||
@@ -95,7 +95,7 @@ if not os.path.exists(filename):
|
||||
|
||||
try:
|
||||
z = zipfile.ZipFile(filename, "r")
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to open zip file: %s\n' % str(ex))
|
||||
sys.exit(1)
|
||||
|
||||
@@ -112,16 +112,11 @@ branch = get_branch(packagename)
|
||||
|
||||
if platform == '':
|
||||
sys.stderr.write('Failed to detect platform ' +
|
||||
'from package: %r\n' % packagename)
|
||||
'from package: %r\n' % packagename)
|
||||
sys.exit(1)
|
||||
|
||||
# extract
|
||||
if not branch or branch == 'master':
|
||||
directory = 'public_html/download'
|
||||
elif branch == 'experimental-build':
|
||||
directory = 'public_html/download/experimental'
|
||||
else:
|
||||
directory = 'public_html/download'
|
||||
directory = 'public_html/download'
|
||||
|
||||
try:
|
||||
zf = z.open(package)
|
||||
@@ -131,7 +126,9 @@ try:
|
||||
|
||||
zf.close()
|
||||
z.close()
|
||||
except Exception as ex:
|
||||
|
||||
os.remove(filename)
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to unzip package: %s\n' % str(ex))
|
||||
sys.exit(1)
|
||||
|
||||
@@ -141,6 +138,6 @@ try:
|
||||
if get_platform(f) == platform and get_branch(f) == branch:
|
||||
if f != packagename:
|
||||
os.remove(os.path.join(directory, f))
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to remove old packages: %s\n' % str(ex))
|
||||
sys.exit(1)
|
||||
|
@@ -33,7 +33,7 @@ builder = sys.argv[1]
|
||||
# we run from build/ directory
|
||||
blender_dir = '../blender.git'
|
||||
|
||||
if 'cmake' in builder:
|
||||
if builder.find('cmake') != -1:
|
||||
# cmake
|
||||
|
||||
# set build options
|
||||
@@ -46,30 +46,16 @@ if 'cmake' in builder:
|
||||
elif builder.endswith('mac_ppc_cmake'):
|
||||
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=ppc')
|
||||
|
||||
if 'win64' in builder:
|
||||
cmake_options.append(['-G', '"Visual Studio 12 2013 Win64"'])
|
||||
elif 'win32' in builder:
|
||||
cmake_options.append(['-G', '"Visual Studio 12 2013"'])
|
||||
|
||||
cmake_options.append("-C../blender.git/build_files/cmake/config/blender_full.cmake")
|
||||
cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=1")
|
||||
# configure and make
|
||||
retcode = subprocess.call(['cmake', blender_dir] + cmake_options)
|
||||
if retcode != 0:
|
||||
sys.exit(retcode)
|
||||
if 'win' in builder:
|
||||
retcode = subprocess.call(['msbuild', 'INSTALL.vcxproj', '/p:Configuration=Release'])
|
||||
else:
|
||||
retcode = subprocess.call(['make', '-s', '-j4', 'install'])
|
||||
retcode = subprocess.call(['make', '-s', '-j4', 'install'])
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
python_bin = 'python'
|
||||
if builder.find('linux') != -1:
|
||||
python_bin = '/opt/lib/python-2.7/bin/python2.7'
|
||||
|
||||
# scons
|
||||
os.chdir(blender_dir)
|
||||
scons_cmd = [python_bin, 'scons/scons.py']
|
||||
scons_cmd = ['python', 'scons/scons.py']
|
||||
scons_options = ['BF_FANCY=False']
|
||||
|
||||
# We're using the same rules as release builder, so tweak
|
||||
@@ -162,7 +148,7 @@ else:
|
||||
scons_options.append('MSVS_VERSION=12.0')
|
||||
scons_options.append('MSVC_VERSION=12.0')
|
||||
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=1')
|
||||
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
|
||||
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc')
|
||||
scons_options.append('BF_NUMJOBS=1')
|
||||
|
||||
elif builder.find('mac') != -1:
|
||||
@@ -178,6 +164,8 @@ else:
|
||||
os.makedirs(install_dir)
|
||||
if builder.endswith('vc2013'):
|
||||
dlls = ('msvcp120.dll', 'msvcr120.dll', 'vcomp120.dll')
|
||||
else:
|
||||
dlls = ('msvcm90.dll', 'msvcp90.dll', 'msvcr90.dll', 'vcomp90.dll', 'Microsoft.VC90.CRT.manifest', 'Microsoft.VC90.OpenMP.manifest')
|
||||
if builder.find('win64') == -1:
|
||||
dlls_path = '..\\..\\..\\redist\\x86'
|
||||
else:
|
||||
@@ -185,6 +173,6 @@ else:
|
||||
for dll in dlls:
|
||||
shutil.copyfile(os.path.join(dlls_path, dll), os.path.join(install_dir, dll))
|
||||
|
||||
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
|
||||
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
|
||||
|
||||
sys.exit(retcode)
|
||||
|
@@ -38,10 +38,6 @@ branch = sys.argv[2] if (len(sys.argv) >= 3 and sys.argv[2] != 'master') else ''
|
||||
|
||||
# scons does own packaging
|
||||
if builder.find('scons') != -1:
|
||||
python_bin = 'python'
|
||||
if builder.find('linux') != -1:
|
||||
python_bin = '/opt/lib/python-2.7/bin/python2.7'
|
||||
|
||||
os.chdir('../blender.git')
|
||||
scons_options = ['BF_QUICK=slnt', 'BUILDBOT_BRANCH=' + branch, 'buildslave', 'BF_FANCY=False']
|
||||
|
||||
@@ -84,7 +80,7 @@ if builder.find('scons') != -1:
|
||||
os.system('cp %s %s' % (software_gl, install_dir))
|
||||
os.system('chmod 755 %s' % (os.path.join(install_dir, 'blender-softwaregl')))
|
||||
|
||||
retcode = subprocess.call(['schroot', '-c', chroot_name, '--', python_bin, 'scons/scons.py'] + scons_options)
|
||||
retcode = subprocess.call(['schroot', '-c', chroot_name, '--', 'python', 'scons/scons.py'] + scons_options)
|
||||
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
@@ -113,30 +109,8 @@ if builder.find('scons') != -1:
|
||||
|
||||
scons_options.append('BF_CONFIG=' + os.path.join(config_dir, config))
|
||||
|
||||
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
|
||||
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
# CMake
|
||||
if 'win' in builder:
|
||||
files = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')]
|
||||
for f in files:
|
||||
os.remove(f)
|
||||
retcode = subprocess.call(['cpack', '-G', 'ZIP'])
|
||||
result_file = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')][0]
|
||||
os.rename(result_file, "{}.zip".format(builder))
|
||||
# create zip file
|
||||
try:
|
||||
upload_zip = "buildbot_upload.zip"
|
||||
if os.path.exists(upload_zip):
|
||||
os.remove(upload_zip)
|
||||
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
|
||||
z.write("{}.zip".format(builder))
|
||||
z.close()
|
||||
sys.exit(retcode)
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
# clean release directory if it already exists
|
||||
release_dir = 'release'
|
||||
@@ -149,7 +123,7 @@ if os.path.exists(release_dir):
|
||||
# create release package
|
||||
try:
|
||||
subprocess.call(['make', 'package_archive'])
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Make package release failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
@@ -180,6 +154,6 @@ try:
|
||||
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
|
||||
z.write(filepath, arcname=file)
|
||||
z.close()
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
@@ -1,56 +0,0 @@
|
||||
# - Find Eigen3 library
|
||||
# Find the native Eigen3 includes and library
|
||||
# This module defines
|
||||
# EIGEN3_INCLUDE_DIRS, where to find spnav.h, Set when
|
||||
# EIGEN3_INCLUDE_DIR is found.
|
||||
# EIGEN3_ROOT_DIR, The base directory to search for Eigen3.
|
||||
# This can also be an environment variable.
|
||||
# EIGEN3_FOUND, If false, do not try to use Eigen3.
|
||||
#
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If EIGEN3_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT EIGEN3_ROOT_DIR AND NOT $ENV{EIGEN3_ROOT_DIR} STREQUAL "")
|
||||
SET(EIGEN3_ROOT_DIR $ENV{EIGEN3_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_eigen3_SEARCH_DIRS
|
||||
${EIGEN3_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(EIGEN3_INCLUDE_DIR
|
||||
NAMES
|
||||
# header has no '.h' suffix
|
||||
Eigen/Eigen
|
||||
HINTS
|
||||
${_eigen3_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include/eigen3
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set EIGEN3_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eigen3 DEFAULT_MSG
|
||||
EIGEN3_INCLUDE_DIR)
|
||||
|
||||
IF(EIGEN3_FOUND)
|
||||
SET(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
|
||||
ENDIF(EIGEN3_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
EIGEN3_INCLUDE_DIR
|
||||
)
|
@@ -75,5 +75,3 @@ MARK_AS_ADVANCED(
|
||||
GLEW_LIBRARY
|
||||
GLEW_MX_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_glew_SEARCH_DIRS)
|
||||
|
@@ -33,7 +33,6 @@ SET(_jemalloc_SEARCH_DIRS
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/jemalloc
|
||||
)
|
||||
|
||||
FIND_PATH(JEMALLOC_INCLUDE_DIR
|
||||
|
@@ -1,68 +0,0 @@
|
||||
# - Find LZO library
|
||||
# Find the native LZO includes and library
|
||||
# This module defines
|
||||
# LZO_INCLUDE_DIRS, where to find lzo1x.h, Set when
|
||||
# LZO_INCLUDE_DIR is found.
|
||||
# LZO_LIBRARIES, libraries to link against to use LZO.
|
||||
# LZO_ROOT_DIR, The base directory to search for LZO.
|
||||
# This can also be an environment variable.
|
||||
# LZO_FOUND, If false, do not try to use LZO.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# LZO_LIBRARY, where to find the LZO library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If LZO_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT LZO_ROOT_DIR AND NOT $ENV{LZO_ROOT_DIR} STREQUAL "")
|
||||
SET(LZO_ROOT_DIR $ENV{LZO_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_lzo_SEARCH_DIRS
|
||||
${LZO_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(LZO_INCLUDE_DIR lzo/lzo1x.h
|
||||
HINTS
|
||||
${_lzo_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LZO_LIBRARY
|
||||
NAMES
|
||||
lzo2
|
||||
HINTS
|
||||
${_lzo_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set LZO_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO DEFAULT_MSG
|
||||
LZO_LIBRARY LZO_INCLUDE_DIR)
|
||||
|
||||
IF(LZO_FOUND)
|
||||
SET(LZO_LIBRARIES ${LZO_LIBRARY})
|
||||
SET(LZO_INCLUDE_DIRS ${LZO_INCLUDE_DIR})
|
||||
ENDIF(LZO_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
LZO_INCLUDE_DIR
|
||||
LZO_LIBRARY
|
||||
)
|
@@ -140,8 +140,3 @@ IF(OPENCOLLADA_FOUND)
|
||||
SET(OPENCOLLADA_LIBRARIES ${_opencollada_LIBRARIES})
|
||||
SET(OPENCOLLADA_INCLUDE_DIRS ${_opencollada_INCLUDES})
|
||||
ENDIF(OPENCOLLADA_FOUND)
|
||||
|
||||
UNSET(COMPONENT)
|
||||
UNSET(UPPERCOMPONENT)
|
||||
UNSET(_opencollada_LIBRARIES)
|
||||
UNSET(_opencollada_INCLUDES)
|
||||
|
@@ -63,12 +63,11 @@ FOREACH(COMPONENT ${_opencolorio_FIND_COMPONENTS})
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
IF(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
|
||||
if(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
|
||||
LIST(APPEND _opencolorio_LIBRARIES "${OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDIF()
|
||||
endif()
|
||||
ENDFOREACH()
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENCOLORIO_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
@@ -83,13 +82,5 @@ ENDIF(OPENCOLORIO_FOUND)
|
||||
MARK_AS_ADVANCED(
|
||||
OPENCOLORIO_INCLUDE_DIR
|
||||
OPENCOLORIO_LIBRARY
|
||||
OPENCOLORIO_OPENCOLORIO_LIBRARY
|
||||
OPENCOLORIO_TINYXML_LIBRARY
|
||||
OPENCOLORIO_YAML-CPP_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(COMPONENT)
|
||||
UNSET(UPPERCOMPONENT)
|
||||
UNSET(_opencolorio_FIND_COMPONENTS)
|
||||
UNSET(_opencolorio_LIBRARIES)
|
||||
UNSET(_opencolorio_SEARCH_DIRS)
|
||||
|
@@ -51,7 +51,6 @@ SET(_openexr_SEARCH_DIRS
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/openexr
|
||||
)
|
||||
|
||||
FIND_PATH(OPENEXR_INCLUDE_DIR
|
||||
@@ -138,9 +137,3 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
MARK_AS_ADVANCED(OPENEXR_${UPPERCOMPONENT}_LIBRARY)
|
||||
ENDFOREACH()
|
||||
|
||||
UNSET(COMPONENT)
|
||||
UNSET(UPPERCOMPONENT)
|
||||
UNSET(_openexr_FIND_COMPONENTS)
|
||||
UNSET(_openexr_LIBRARIES)
|
||||
UNSET(_openexr_SEARCH_DIRS)
|
||||
|
@@ -1,78 +0,0 @@
|
||||
# - Try to find OpenGLES
|
||||
# Once done this will define
|
||||
#
|
||||
# OPENGLES_FOUND - system has OpenGLES and EGL
|
||||
# OPENGL_EGL_FOUND - system has EGL
|
||||
# OPENGLES_INCLUDE_DIR - the GLES include directory
|
||||
# OPENGLES_LIBRARY - the GLES library
|
||||
# OPENGLES_EGL_INCLUDE_DIR - the EGL include directory
|
||||
# OPENGLES_EGL_LIBRARY - the EGL library
|
||||
# OPENGLES_LIBRARIES - all libraries needed for OpenGLES
|
||||
# OPENGLES_INCLUDES - all includes needed for OpenGLES
|
||||
|
||||
# If OPENGLES_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENGLES_ROOT_DIR AND NOT $ENV{OPENGLES_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENGLES_ROOT_DIR $ENV{OPENGLES_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_opengles_SEARCH_DIRS
|
||||
${OPENGLES_ROOT_DIR}
|
||||
/usr/local
|
||||
)
|
||||
|
||||
FIND_PATH(OPENGLES_INCLUDE_DIR
|
||||
NAMES
|
||||
GLES2/gl2.h
|
||||
HINTS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENGLES_LIBRARY
|
||||
NAMES
|
||||
GLESv2
|
||||
PATHS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_PATH(OPENGLES_EGL_INCLUDE_DIR
|
||||
NAMES
|
||||
EGL/egl.h
|
||||
HINTS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENGLES_EGL_LIBRARY
|
||||
NAMES
|
||||
EGL
|
||||
HINTS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
IF(OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
|
||||
SET(OPENGL_EGL_FOUND "YES")
|
||||
ELSE()
|
||||
SET(OPENGL_EGL_FOUND "NO")
|
||||
ENDIF()
|
||||
|
||||
IF(OPENGLES_LIBRARY AND OPENGLES_INCLUDE_DIR AND
|
||||
OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
|
||||
SET(OPENGLES_LIBRARIES ${OPENGLES_LIBRARY} ${OPENGLES_LIBRARIES}
|
||||
${OPENGLES_EGL_LIBRARY})
|
||||
SET(OPENGLES_INCLUDES ${OPENGLES_INCLUDE_DIR} ${OPENGLES_EGL_INCLUDE_DIR})
|
||||
SET(OPENGLES_FOUND "YES")
|
||||
ELSE()
|
||||
SET(OPENGLES_FOUND "NO")
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENGLES_EGL_INCLUDE_DIR
|
||||
OPENGLES_EGL_LIBRARY
|
||||
OPENGLES_LIBRARY
|
||||
OPENGLES_INCLUDE_DIR
|
||||
)
|
||||
|
||||
UNSET(_opengles_SEARCH_DIRS)
|
@@ -7,8 +7,6 @@
|
||||
# OPENIMAGEIO_ROOT_DIR, The base directory to search for OpenImageIO.
|
||||
# This can also be an environment variable.
|
||||
# OPENIMAGEIO_FOUND, If false, do not try to use OpenImageIO.
|
||||
# OPENIMAGEIO_PUGIXML_FOUND, Indicates whether OIIO has biltin PuguXML parser.
|
||||
# OPENIMAGEIO_IDIFF, full path to idiff application if found.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENIMAGEIO_LIBRARY, where to find the OpenImageIO library.
|
||||
@@ -56,14 +54,6 @@ FIND_LIBRARY(OPENIMAGEIO_LIBRARY
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_FILE(OPENIMAGEIO_IDIFF
|
||||
NAMES
|
||||
idiff
|
||||
${OPENIMAGEIO_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
bin
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEIO_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
@@ -73,17 +63,9 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenImageIO DEFAULT_MSG
|
||||
IF(OPENIMAGEIO_FOUND)
|
||||
SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY})
|
||||
SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
|
||||
IF(EXISTS ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/pugixml.hpp)
|
||||
SET(OPENIMAGEIO_PUGIXML_FOUND TRUE)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(OPENIMAGEIO_PUGIXML_FOUND FALSE)
|
||||
ENDIF()
|
||||
ENDIF(OPENIMAGEIO_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENIMAGEIO_INCLUDE_DIR
|
||||
OPENIMAGEIO_LIBRARY
|
||||
OPENIMAGEIO_IDIFF
|
||||
)
|
||||
|
||||
UNSET(_openimageio_SEARCH_DIRS)
|
||||
|
@@ -69,5 +69,3 @@ MARK_AS_ADVANCED(
|
||||
OPENJPEG_INCLUDE_DIR
|
||||
OPENJPEG_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_openjpeg_SEARCH_DIRS)
|
||||
|
@@ -1,98 +0,0 @@
|
||||
# - Find OpenShadingLanguage library
|
||||
# Find the native OpenShadingLanguage includes and library
|
||||
# This module defines
|
||||
# OSL_INCLUDE_DIRS, where to find OSL headers, Set when
|
||||
# OSL_INCLUDE_DIR is found.
|
||||
# OSL_LIBRARIES, libraries to link against to use OSL.
|
||||
# OSL_ROOT_DIR, the base directory to search for OSL.
|
||||
# This can also be an environment variable.
|
||||
# OSL_COMPILER, full path to OSL script compiler.
|
||||
# OSL_FOUND, if false, do not try to use OSL.
|
||||
# OSL_LIBRARY_VERSION_MAJOR, OSL_LIBRARY_VERSION_MINOR, the major
|
||||
# and minor versions of OSL library if found.
|
||||
#
|
||||
#=============================================================================
|
||||
# Copyright 2014 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If OSL_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OSL_ROOT_DIR AND NOT $ENV{OSL_ROOT_DIR} STREQUAL "")
|
||||
SET(OSL_ROOT_DIR $ENV{OSL_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_osl_FIND_COMPONENTS
|
||||
oslcomp
|
||||
oslexec
|
||||
oslquery
|
||||
)
|
||||
|
||||
SET(_osl_SEARCH_DIRS
|
||||
${OSL_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/osl
|
||||
)
|
||||
|
||||
FIND_PATH(OSL_INCLUDE_DIR
|
||||
NAMES
|
||||
OSL/oslversion.h
|
||||
HINTS
|
||||
${_osl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
SET(_osl_LIBRARIES)
|
||||
FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OSL_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_osl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
LIST(APPEND _osl_LIBRARIES "${OSL_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDFOREACH()
|
||||
|
||||
FIND_PROGRAM(OSL_COMPILER oslc
|
||||
HINTS ${_osl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES bin)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OSL_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSL DEFAULT_MSG _osl_LIBRARIES OSL_INCLUDE_DIR OSL_COMPILER)
|
||||
|
||||
IF(OSL_FOUND)
|
||||
SET(OSL_LIBRARIES ${_osl_LIBRARIES})
|
||||
SET(OSL_INCLUDE_DIRS ${OSL_INCLUDE_DIR})
|
||||
|
||||
FILE(STRINGS "${OSL_INCLUDE_DIR}/OSL/oslversion.h" OSL_LIBRARY_VERSION_MAJOR
|
||||
REGEX "^[ \t]*#define[ \t]+OSL_LIBRARY_VERSION_MAJOR[ \t]+[0-9]+.*$")
|
||||
FILE(STRINGS "${OSL_INCLUDE_DIR}/OSL/oslversion.h" OSL_LIBRARY_VERSION_MINOR
|
||||
REGEX "^[ \t]*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+[0-9]+.*$")
|
||||
STRING(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MAJOR[ \t]+([.0-9]+).*"
|
||||
"\\1" OSL_LIBRARY_VERSION_MAJOR ${OSL_LIBRARY_VERSION_MAJOR})
|
||||
STRING(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+([.0-9]+).*"
|
||||
"\\1" OSL_LIBRARY_VERSION_MINOR ${OSL_LIBRARY_VERSION_MINOR})
|
||||
ENDIF(OSL_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OSL_INCLUDE_DIR
|
||||
)
|
||||
FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
MARK_AS_ADVANCED(OSL_${UPPERCOMPONENT}_LIBRARY)
|
||||
ENDFOREACH()
|
@@ -40,6 +40,7 @@ FIND_PATH(PCRE_INCLUDE_DIR pcre.h
|
||||
${_pcre_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(PCRE_LIBRARY
|
||||
|
@@ -1,73 +0,0 @@
|
||||
# - Find PugiXML library
|
||||
# Find the native PugiXML includes and library
|
||||
# This module defines
|
||||
# PUGIXML_INCLUDE_DIRS, where to find pugixml.hpp, Set when
|
||||
# PugiXML is found.
|
||||
# PUGIXML_LIBRARIES, libraries to link against to use PugiiXML.
|
||||
# PUGIXML_ROOT_DIR, The base directory to search for PugiXML.
|
||||
# This can also be an environment variable.
|
||||
# PUGIXML_FOUND, If false, do not try to use PugiXML.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# PUGIXML_LIBRARY, where to find the PugiXML library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2014 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If PUGIXML_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT PUGIXML_ROOT_DIR AND NOT $ENV{PUGIXML_ROOT_DIR} STREQUAL "")
|
||||
SET(PUGIXML_ROOT_DIR $ENV{PUGIXML_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_pugixml_SEARCH_DIRS
|
||||
${PUGIXML_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/oiio
|
||||
)
|
||||
|
||||
FIND_PATH(PUGIXML_INCLUDE_DIR
|
||||
NAMES
|
||||
pugixml.hpp
|
||||
HINTS
|
||||
${_pugixml_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(PUGIXML_LIBRARY
|
||||
NAMES
|
||||
pugixml
|
||||
HINTS
|
||||
${_pugixml_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set PUGIXML_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PUGIXML DEFAULT_MSG
|
||||
PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR)
|
||||
|
||||
IF(PUGIXML_FOUND)
|
||||
SET(PUGIXML_LIBRARIES ${PUGIXML_LIBRARY})
|
||||
SET(PUGIXML_INCLUDE_DIRS ${PUGIXML_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(PUGIXML_PUGIXML_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
PUGIXML_INCLUDE_DIR
|
||||
PUGIXML_LIBRARY
|
||||
)
|
@@ -14,7 +14,6 @@
|
||||
# PYTHON_INCLUDE_CONFIG_DIRS
|
||||
# PYTHON_LIBRARIES
|
||||
# PYTHON_LIBPATH, Used for installation
|
||||
# PYTHON_SITE_PACKAGES, Used for installation (as a Python module)
|
||||
# PYTHON_LINKFLAGS
|
||||
# PYTHON_ROOT_DIR, The base directory to search for Python.
|
||||
# This can also be an environment variable.
|
||||
@@ -188,15 +187,6 @@ IF(PYTHONLIBSUNIX_FOUND)
|
||||
SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR} ${PYTHON_INCLUDE_CONFIG_DIR})
|
||||
SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
|
||||
|
||||
FIND_FILE(PYTHON_SITE_PACKAGES
|
||||
NAMES
|
||||
# debian specific
|
||||
dist-packages
|
||||
site-packages
|
||||
HINTS
|
||||
${PYTHON_LIBPATH}/python${PYTHON_VERSION}
|
||||
)
|
||||
|
||||
# we need this for installation
|
||||
# XXX No more valid with debian-like py3.4 packages...
|
||||
# GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH)
|
||||
@@ -210,5 +200,4 @@ MARK_AS_ADVANCED(
|
||||
PYTHON_INCLUDE_CONFIG_DIR
|
||||
PYTHON_LIBRARY
|
||||
PYTHON_LIBPATH
|
||||
PYTHON_SITE_PACKAGES
|
||||
)
|
||||
|
@@ -1,72 +0,0 @@
|
||||
# - Find SDL library
|
||||
# Find the native SDL includes and library
|
||||
# This module defines
|
||||
# SDL2_INCLUDE_DIRS, where to find SDL.h, Set when SDL2_INCLUDE_DIR is found.
|
||||
# SDL2_LIBRARIES, libraries to link against to use SDL.
|
||||
# SDL2_ROOT_DIR, The base directory to search for SDL.
|
||||
# This can also be an environment variable.
|
||||
# SDL2_FOUND, If false, do not try to use SDL.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# SDL2_LIBRARY, where to find the SDL library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If SDL2_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT SDL2_ROOT_DIR AND NOT $ENV{SDL2_ROOT_DIR} STREQUAL "")
|
||||
SET(SDL2_ROOT_DIR $ENV{SDL2_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_sdl2_SEARCH_DIRS
|
||||
${SDL2_ROOT_DIR}
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(SDL2_INCLUDE_DIR
|
||||
NAMES
|
||||
SDL.h
|
||||
HINTS
|
||||
${_sdl2_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include/SDL2 include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(SDL2_LIBRARY
|
||||
NAMES
|
||||
SDL2
|
||||
HINTS
|
||||
${_sdl2_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set SDL2_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 DEFAULT_MSG
|
||||
SDL2_LIBRARY SDL2_INCLUDE_DIR)
|
||||
|
||||
IF(SDL2_FOUND)
|
||||
SET(SDL2_LIBRARIES ${SDL2_LIBRARY})
|
||||
SET(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR})
|
||||
ENDIF(SDL2_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
SDL2_INCLUDE_DIR
|
||||
SDL2_LIBRARY
|
||||
)
|
@@ -32,8 +32,6 @@ macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
|
||||
bf_testing_main
|
||||
bf_intern_guardedalloc
|
||||
extern_gtest
|
||||
# needed for glog
|
||||
${PTHREADS_LIBRARIES}
|
||||
extern_glog)
|
||||
set_target_properties(${NAME}_test PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}"
|
||||
|
@@ -60,8 +60,7 @@ if(EXISTS ${SOURCE_DIR}/.git)
|
||||
execute_process(COMMAND git log HEAD..@{u}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_below_check
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT _git_below_check STREQUAL "")
|
||||
# If there're commits between HEAD and upstream this means
|
||||
# that we're reset-ed to older revision. Use it's hash then.
|
||||
@@ -147,14 +146,6 @@ file(WRITE buildinfo.h.txt
|
||||
"#define BUILD_TIME \"${BUILD_TIME}\"\n"
|
||||
)
|
||||
|
||||
# cleanup
|
||||
unset(MY_WC_HASH)
|
||||
unset(MY_WC_COMMIT_TIMESTAMP)
|
||||
unset(MY_WC_BRANCH)
|
||||
unset(BUILD_DATE)
|
||||
unset(BUILD_TIME)
|
||||
|
||||
|
||||
# Copy the file to the final header only if the version changes
|
||||
# and avoid needless rebuilds
|
||||
# TODO: verify this comment is true, as BUILD_TIME probably changes
|
||||
|
@@ -174,7 +174,7 @@ def cmake_get_src(f):
|
||||
elif is_c(new_file):
|
||||
sources_c.append(new_file)
|
||||
global_refs.setdefault(new_file, []).append((f, i))
|
||||
elif l in {"PARENT_SCOPE", }:
|
||||
elif l in ("PARENT_SCOPE", ):
|
||||
# cmake var, ignore
|
||||
pass
|
||||
elif new_file.endswith(".list"):
|
||||
@@ -187,8 +187,6 @@ def cmake_get_src(f):
|
||||
pass
|
||||
elif new_file.endswith(".osl"): # open shading language
|
||||
pass
|
||||
elif new_file.endswith(".glsl"):
|
||||
pass
|
||||
else:
|
||||
raise Exception("unknown file type - not c or h %s -> %s" % (f, new_file))
|
||||
|
||||
@@ -203,7 +201,7 @@ def cmake_get_src(f):
|
||||
# replace_line(f, i - 1, new_path_rel)
|
||||
|
||||
else:
|
||||
raise Exception("non existent include %s:%d -> %s" % (f, i, new_file))
|
||||
raise Exception("non existant include %s:%d -> %s" % (f, i, new_file))
|
||||
|
||||
# print(new_file)
|
||||
|
||||
@@ -307,7 +305,7 @@ if UTF8_CHECK:
|
||||
try:
|
||||
for l in open(f, "r", encoding="utf8"):
|
||||
i += 1
|
||||
except UnicodeDecodeError:
|
||||
except:
|
||||
print("Non utf8: %s:%d" % (f, i))
|
||||
if i > 1:
|
||||
traceback.print_exc()
|
||||
|
@@ -29,19 +29,18 @@ Example linux usage
|
||||
Windows not supported so far
|
||||
"""
|
||||
|
||||
from project_info import (
|
||||
SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
# is_py,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
project_name_get,
|
||||
)
|
||||
from project_info import (SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
# is_py,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
project_name_get,
|
||||
)
|
||||
|
||||
|
||||
import os
|
||||
@@ -126,8 +125,6 @@ def create_nb_project_main():
|
||||
f.write(' </configuration>\n')
|
||||
f.write('</project>\n')
|
||||
|
||||
f.close()
|
||||
|
||||
f = open(join(PROJECT_DIR_NB, "configurations.xml"), 'w')
|
||||
|
||||
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
|
||||
@@ -246,8 +243,6 @@ def create_nb_project_main():
|
||||
|
||||
f.write('</configurationDescriptor>\n')
|
||||
|
||||
f.close()
|
||||
|
||||
|
||||
def main():
|
||||
create_nb_project_main()
|
||||
|
@@ -22,27 +22,26 @@
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
r"""
|
||||
Example Linux usage:
|
||||
python ~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py ~/blender-git/cmake
|
||||
|
||||
"""
|
||||
Example Win32 usage:
|
||||
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py c:\blender_dev\cmake_build
|
||||
|
||||
example linux usage
|
||||
python .~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py ~/blender-git/cmake
|
||||
"""
|
||||
|
||||
from project_info import (
|
||||
SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
# CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
is_py,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
project_name_get,
|
||||
)
|
||||
from project_info import (SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
# CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
is_py,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
project_name_get,
|
||||
)
|
||||
|
||||
import os
|
||||
import sys
|
||||
@@ -64,22 +63,21 @@ def create_qtc_project_main():
|
||||
if SIMPLE_PROJECTFILE:
|
||||
# --- qtcreator specific, simple format
|
||||
PROJECT_NAME = "Blender"
|
||||
FILE_NAME = PROJECT_NAME.lower()
|
||||
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(files_rel))
|
||||
f = open(os.path.join(PROJECT_DIR, "%s.files" % PROJECT_NAME), 'w')
|
||||
f.write("\n".join(files_rel))
|
||||
|
||||
with open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(sorted(list(set(os.path.dirname(f)
|
||||
for f in files_rel if is_c_header(f))))))
|
||||
f = open(os.path.join(PROJECT_DIR, "%s.includes" % PROJECT_NAME), 'w')
|
||||
f.write("\n".join(sorted(list(set(os.path.dirname(f)
|
||||
for f in files_rel if is_c_header(f))))))
|
||||
|
||||
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
|
||||
with open(qtc_prj, 'w') as f:
|
||||
f.write("[General]\n")
|
||||
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % PROJECT_NAME)
|
||||
f = open(qtc_prj, 'w')
|
||||
f.write("[General]\n")
|
||||
|
||||
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
|
||||
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % PROJECT_NAME)
|
||||
if not os.path.exists(qtc_cfg):
|
||||
with open(qtc_cfg, 'w') as f:
|
||||
f.write("// ADD PREDEFINED MACROS HERE!\n")
|
||||
f = open(qtc_cfg, 'w')
|
||||
f.write("// ADD PREDEFINED MACROS HERE!\n")
|
||||
else:
|
||||
includes, defines = cmake_advanced_info()
|
||||
|
||||
@@ -98,30 +96,29 @@ def create_qtc_project_main():
|
||||
PROJECT_NAME = project_name_get()
|
||||
|
||||
FILE_NAME = PROJECT_NAME.lower()
|
||||
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(files_rel))
|
||||
f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w')
|
||||
f.write("\n".join(files_rel))
|
||||
|
||||
with open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w', encoding='utf-8') as f:
|
||||
f.write("\n".join(sorted(includes)))
|
||||
f = open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w', encoding='utf-8')
|
||||
f.write("\n".join(sorted(includes)))
|
||||
|
||||
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
|
||||
with open(qtc_prj, 'w') as f:
|
||||
f.write("[General]\n")
|
||||
f = open(qtc_prj, 'w')
|
||||
f.write("[General]\n")
|
||||
|
||||
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
|
||||
with open(qtc_cfg, 'w') as f:
|
||||
f.write("// ADD PREDEFINED MACROS TO %s_custom.config!\n" % FILE_NAME)
|
||||
|
||||
qtc_custom_cfg = os.path.join(PROJECT_DIR, "%s_custom.config" % FILE_NAME)
|
||||
if os.path.exists(qtc_custom_cfg):
|
||||
with open(qtc_custom_cfg, 'r') as fc:
|
||||
f.write(fc.read())
|
||||
f.write("\n")
|
||||
|
||||
defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
|
||||
if sys.platform != "win32":
|
||||
defines_final += cmake_compiler_defines()
|
||||
f.write("\n".join(defines_final))
|
||||
f = open(qtc_cfg, 'w')
|
||||
f.write("// ADD PREDEFINED MACROS TO %s_custom.config!\n" % FILE_NAME)
|
||||
qtc_custom_cfg = os.path.join(PROJECT_DIR, "%s_custom.config" % FILE_NAME)
|
||||
if os.path.exists(qtc_custom_cfg):
|
||||
fc = open(qtc_custom_cfg, 'r')
|
||||
f.write(fc.read())
|
||||
fc.close()
|
||||
f.write("\n")
|
||||
defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
|
||||
if sys.platform != "win32":
|
||||
defines_final += cmake_compiler_defines()
|
||||
f.write("\n".join(defines_final))
|
||||
|
||||
print("Blender project file written to: %r" % qtc_prj)
|
||||
# --- end
|
||||
@@ -140,17 +137,17 @@ def create_qtc_project_python():
|
||||
PROJECT_NAME = project_name_get() + "_Python"
|
||||
|
||||
FILE_NAME = PROJECT_NAME.lower()
|
||||
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(files_rel))
|
||||
f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w')
|
||||
f.write("\n".join(files_rel))
|
||||
|
||||
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
|
||||
with open(qtc_prj, 'w') as f:
|
||||
f.write("[General]\n")
|
||||
f = open(qtc_prj, 'w')
|
||||
f.write("[General]\n")
|
||||
|
||||
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
|
||||
if not os.path.exists(qtc_cfg):
|
||||
with open(qtc_cfg, 'w') as f:
|
||||
f.write("// ADD PREDEFINED MACROS HERE!\n")
|
||||
f = open(qtc_cfg, 'w')
|
||||
f.write("// ADD PREDEFINED MACROS HERE!\n")
|
||||
|
||||
print("Python project file written to: %r" % qtc_prj)
|
||||
|
||||
|
@@ -1,62 +0,0 @@
|
||||
# turn everything OFF except for python which defaults to ON
|
||||
# and is needed for the UI
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/blender_full.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_BUILDINFO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_BULLET ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GAMEENGINE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IK_SOLVER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IK_ITASC ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_CINEON ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_DDS ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_FRAMESERVER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_HDR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENEXR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_REDCODE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE)
|
||||
set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE)
|
||||
set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LZMA ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LZO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_BOOLEAN ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_SMOKE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_OCEANSIM ON CACHE BOOL "" FORCE)
|
||||
set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENNL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_RAYOPTIMIZATION ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set(WITH_CODEC_QUICKTIME ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
@@ -44,7 +44,6 @@ set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLORIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENIMAGEIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENNL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL OFF CACHE BOOL "" FORCE)
|
||||
|
@@ -118,19 +118,6 @@ macro(target_link_libraries_debug TARGET LIBS)
|
||||
unset(_LIB)
|
||||
endmacro()
|
||||
|
||||
macro(target_link_libraries_decoupled target libraries_var)
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(${target} ${${libraries_var}})
|
||||
else()
|
||||
# For MSVC we link to different libraries depending whether
|
||||
# release or debug target is being built.
|
||||
file_list_suffix(_libraries_debug "${${libraries_var}}" "_d")
|
||||
target_link_libraries_debug(${target} "${_libraries_debug}")
|
||||
target_link_libraries_optimized(${target} "${${libraries_var}}")
|
||||
unset(_libraries_debug)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Nicer makefiles with -I/1/foo/ instead of -I/1/2/3/../../foo/
|
||||
# use it instead of include_directories()
|
||||
macro(blender_include_dirs
|
||||
@@ -234,7 +221,7 @@ macro(SETUP_LIBDIRS)
|
||||
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
|
||||
link_directories(${PYTHON_LIBPATH})
|
||||
endif()
|
||||
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
|
||||
if(WITH_SDL)
|
||||
link_directories(${SDL_LIBPATH})
|
||||
endif()
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
@@ -296,13 +283,9 @@ macro(setup_liblinks
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
|
||||
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
|
||||
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
|
||||
|
||||
target_link_libraries(${target}
|
||||
${OPENGL_gl_LIBRARY}
|
||||
${OPENGL_glu_LIBRARY}
|
||||
${PNG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${FREETYPE_LIBRARY})
|
||||
@@ -321,11 +304,8 @@ macro(setup_liblinks
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_LZO AND WITH_SYSTEM_LZO)
|
||||
target_link_libraries(${target} ${LZO_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_SYSTEM_GLEW)
|
||||
target_link_libraries(${target} ${BLENDER_GLEW_LIBRARIES})
|
||||
target_link_libraries(${target} ${GLEW_LIBRARY})
|
||||
endif()
|
||||
if(WITH_BULLET AND WITH_SYSTEM_BULLET)
|
||||
target_link_libraries(${target} ${BULLET_LIBRARIES})
|
||||
@@ -342,7 +322,7 @@ macro(setup_liblinks
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
target_link_libraries(${target} ${SNDFILE_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
|
||||
if(WITH_SDL)
|
||||
target_link_libraries(${target} ${SDL_LIBRARY})
|
||||
endif()
|
||||
if(WITH_CODEC_QUICKTIME)
|
||||
@@ -357,9 +337,6 @@ macro(setup_liblinks
|
||||
if(WITH_OPENCOLORIO)
|
||||
target_link_libraries(${target} ${OPENCOLORIO_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_CYCLES_OSL)
|
||||
target_link_libraries(${target} ${OSL_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_BOOST)
|
||||
target_link_libraries(${target} ${BOOST_LIBRARIES})
|
||||
if(Boost_USE_STATIC_LIBS AND Boost_USE_ICU)
|
||||
@@ -381,6 +358,11 @@ macro(setup_liblinks
|
||||
target_link_libraries(${target} ${OPENJPEG_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_CODEC_FFMPEG)
|
||||
|
||||
# Strange!, without this ffmpeg gives linking errors (on linux)
|
||||
# even though its linked above
|
||||
target_link_libraries(${target} ${OPENGL_glu_LIBRARY})
|
||||
|
||||
target_link_libraries(${target} ${FFMPEG_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_OPENCOLLADA)
|
||||
@@ -418,6 +400,9 @@ macro(setup_liblinks
|
||||
if(WITH_MOD_CLOTH_ELTOPO)
|
||||
target_link_libraries(${target} ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_CYCLES_OSL)
|
||||
target_link_libraries(${target} ${OSL_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_LLVM)
|
||||
target_link_libraries(${target} ${LLVM_LIBRARY})
|
||||
endif()
|
||||
@@ -425,17 +410,13 @@ macro(setup_liblinks
|
||||
target_link_libraries(${target} ${PTHREADS_LIBRARIES})
|
||||
endif()
|
||||
|
||||
target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
|
||||
|
||||
# We put CLEW and CUEW here because OPENSUBDIV_LIBRARIES dpeends on them..
|
||||
if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
|
||||
target_link_libraries(${target} "extern_clew")
|
||||
target_link_libraries(${target} "extern_cuew")
|
||||
endif()
|
||||
|
||||
#system libraries with no dependencies such as platform link libs or opengl should go last
|
||||
target_link_libraries(${target}
|
||||
${BLENDER_GL_LIBRARIES})
|
||||
|
||||
target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
|
||||
endmacro()
|
||||
|
||||
macro(SETUP_BLENDER_SORTED_LIBS)
|
||||
@@ -517,7 +498,6 @@ macro(SETUP_BLENDER_SORTED_LIBS)
|
||||
bf_modifiers
|
||||
bf_bmesh
|
||||
bf_blenkernel
|
||||
bf_physics
|
||||
bf_nodes
|
||||
bf_rna
|
||||
bf_gpu
|
||||
@@ -542,6 +522,7 @@ macro(SETUP_BLENDER_SORTED_LIBS)
|
||||
ge_phys_dummy
|
||||
ge_phys_bullet
|
||||
bf_intern_smoke
|
||||
extern_minilzo
|
||||
extern_lzma
|
||||
extern_colamd
|
||||
ge_logic_ketsji
|
||||
@@ -576,9 +557,6 @@ macro(SETUP_BLENDER_SORTED_LIBS)
|
||||
extern_wcwidth
|
||||
extern_libmv
|
||||
extern_glog
|
||||
extern_sdlew
|
||||
|
||||
bf_intern_glew_mx
|
||||
)
|
||||
|
||||
if(WITH_COMPOSITOR)
|
||||
@@ -595,12 +573,8 @@ macro(SETUP_BLENDER_SORTED_LIBS)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_eltopo)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_SYSTEM_LZO)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_minilzo)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_SYSTEM_GLEW)
|
||||
list(APPEND BLENDER_SORTED_LIBS ${BLENDER_GLEW_LIBRARIES})
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_glew)
|
||||
endif()
|
||||
|
||||
if(WITH_BINRELOC)
|
||||
@@ -744,8 +718,6 @@ macro(TEST_SSE_SUPPORT
|
||||
endmacro()
|
||||
|
||||
macro(TEST_STDBOOL_SUPPORT)
|
||||
include(CheckCSourceRuns)
|
||||
|
||||
# This program will compile correctly if and only if
|
||||
# this C compiler supports C99 stdbool.
|
||||
check_c_source_runs("
|
||||
@@ -931,7 +903,6 @@ macro(remove_strict_flags)
|
||||
remove_cc_flag("-Wstrict-prototypes")
|
||||
remove_cc_flag("-Wmissing-prototypes")
|
||||
remove_cc_flag("-Wunused-parameter")
|
||||
remove_cc_flag("-Wunused-macros")
|
||||
remove_cc_flag("-Wwrite-strings")
|
||||
remove_cc_flag("-Wredundant-decls")
|
||||
remove_cc_flag("-Wundef")
|
||||
@@ -961,20 +932,6 @@ macro(remove_strict_flags)
|
||||
|
||||
endmacro()
|
||||
|
||||
macro(remove_extra_strict_flags)
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
remove_cc_flag("-Wunused-parameter")
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
remove_cc_flag("-Wunused-parameter")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# TODO
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# note, we can only append flags on a single file so we need to negate the options.
|
||||
# at the moment we cant shut up ffmpeg deprecations, so use this, but will
|
||||
# probably add more removals here.
|
||||
@@ -1035,16 +992,7 @@ macro(ADD_CHECK_CXX_COMPILER_FLAG
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
function(get_blender_version)
|
||||
# extracts header vars and defines them in the parent scope:
|
||||
#
|
||||
# - BLENDER_VERSION (major.minor)
|
||||
# - BLENDER_VERSION_MAJOR
|
||||
# - BLENDER_VERSION_MINOR
|
||||
# - BLENDER_SUBVERSION (used for internal versioning mainly)
|
||||
# - BLENDER_VERSION_CHAR (a, b, c, ...or empty string)
|
||||
# - BLENDER_VERSION_CYCLE (alpha, beta, rc, release)
|
||||
|
||||
macro(get_blender_version)
|
||||
# So cmake depends on BKE_blender.h, beware of inf-loops!
|
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h
|
||||
${CMAKE_BINARY_DIR}/source/blender/blenkernel/BKE_blender.h.done)
|
||||
@@ -1077,29 +1025,33 @@ function(get_blender_version)
|
||||
message(FATAL_ERROR "Version parsing failed for BLENDER_VERSION_CYCLE")
|
||||
endif()
|
||||
|
||||
math(EXPR _out_version_major "${_out_version} / 100")
|
||||
math(EXPR _out_version_minor "${_out_version} % 100")
|
||||
math(EXPR BLENDER_VERSION_MAJOR "${_out_version} / 100")
|
||||
math(EXPR BLENDER_VERSION_MINOR "${_out_version} % 100")
|
||||
set(BLENDER_VERSION "${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}")
|
||||
|
||||
set(BLENDER_SUBVERSION ${_out_subversion})
|
||||
set(BLENDER_VERSION_CHAR ${_out_version_char})
|
||||
set(BLENDER_VERSION_CYCLE ${_out_version_cycle})
|
||||
|
||||
# for packaging, alpha to numbers
|
||||
string(COMPARE EQUAL "${_out_version_char}" "" _out_version_char_empty)
|
||||
string(COMPARE EQUAL "${BLENDER_VERSION_CHAR}" "" _out_version_char_empty)
|
||||
if(${_out_version_char_empty})
|
||||
set(_out_version_char_index "0")
|
||||
set(BLENDER_VERSION_CHAR_INDEX "0")
|
||||
else()
|
||||
set(_char_ls a b c d e f g h i j k l m n o p q r s t u v w x y z)
|
||||
list(FIND _char_ls ${_out_version_char} _out_version_char_index)
|
||||
math(EXPR _out_version_char_index "${_out_version_char_index} + 1")
|
||||
list(FIND _char_ls ${BLENDER_VERSION_CHAR} _out_version_char_index)
|
||||
math(EXPR BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index} + 1")
|
||||
unset(_char_ls)
|
||||
unset(_out_version_char_index)
|
||||
endif()
|
||||
|
||||
# output vars
|
||||
set(BLENDER_VERSION "${_out_version_major}.${_out_version_minor}" PARENT_SCOPE)
|
||||
set(BLENDER_VERSION_MAJOR "${_out_version_major}" PARENT_SCOPE)
|
||||
set(BLENDER_VERSION_MINOR "${_out_version_minor}" PARENT_SCOPE)
|
||||
set(BLENDER_SUBVERSION "${_out_subversion}" PARENT_SCOPE)
|
||||
set(BLENDER_VERSION_CHAR "${_out_version_char}" PARENT_SCOPE)
|
||||
set(BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index}" PARENT_SCOPE)
|
||||
set(BLENDER_VERSION_CYCLE "${_out_version_cycle}" PARENT_SCOPE)
|
||||
unset(_out_subversion)
|
||||
unset(_out_version_char)
|
||||
unset(_out_version_char_empty)
|
||||
unset(_out_version_cycle)
|
||||
|
||||
endfunction()
|
||||
# message(STATUS "Version (Internal): ${BLENDER_VERSION}.${BLENDER_SUBVERSION}, Version (external): ${BLENDER_VERSION}${BLENDER_VERSION_CHAR}-${BLENDER_VERSION_CYCLE}")
|
||||
endmacro()
|
||||
|
||||
|
||||
# hacks to override initial project settings
|
||||
@@ -1136,7 +1088,7 @@ endmacro()
|
||||
macro(blender_project_hack_post)
|
||||
# --------------
|
||||
# MINGW HACK END
|
||||
if(_reset_standard_libraries)
|
||||
if (_reset_standard_libraries)
|
||||
# Must come after projecINCt(...)
|
||||
#
|
||||
# MINGW workaround for -ladvapi32 being included which surprisingly causes
|
||||
@@ -1196,7 +1148,6 @@ macro(delayed_install
|
||||
endif()
|
||||
set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_DESTINATIONS ${destination})
|
||||
endforeach()
|
||||
unset(f)
|
||||
endmacro()
|
||||
|
||||
# note this is a function instead of a macro so that ${BUILD_TYPE} in targetdir
|
||||
@@ -1216,7 +1167,6 @@ function(delayed_do_install
|
||||
list(GET destinations ${i} d)
|
||||
install(FILES ${f} DESTINATION ${targetdir}/${d})
|
||||
endforeach()
|
||||
unset(f)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -1431,14 +1381,3 @@ macro(find_python_package
|
||||
|
||||
unset(_upper_package)
|
||||
endmacro()
|
||||
|
||||
# like Python's 'print(dir())'
|
||||
macro(print_all_vars)
|
||||
get_cmake_property(_vars VARIABLES)
|
||||
foreach(_var ${_vars})
|
||||
message("${_var}=${${_var}}")
|
||||
endforeach()
|
||||
unset(_vars)
|
||||
unset(_var)
|
||||
endmacro()
|
||||
|
||||
|
@@ -2,6 +2,7 @@ set(PROJECT_DESCRIPTION "Blender is a very fast and versatile 3D modeller/rende
|
||||
set(PROJECT_COPYRIGHT "Copyright (C) 2001-2012 Blender Foundation")
|
||||
set(PROJECT_CONTACT "foundation@blender.org")
|
||||
set(PROJECT_VENDOR "Blender Foundation")
|
||||
set(ORG_WEBSITE "www.blender.org")
|
||||
|
||||
set(MAJOR_VERSION ${BLENDER_VERSION_MAJOR})
|
||||
set(MINOR_VERSION ${BLENDER_VERSION_MINOR})
|
||||
@@ -27,12 +28,10 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
|
||||
execute_process(COMMAND git rev-parse --short @{u}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
endif()
|
||||
set(BUILD_REV ${MY_WC_HASH})
|
||||
unset(MY_WC_HASH)
|
||||
|
||||
|
||||
# Force Package Name
|
||||
@@ -42,7 +41,7 @@ set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# RPM packages
|
||||
include(build_files/cmake/RpmBuild.cmake)
|
||||
if(RPMBUILD_FOUND)
|
||||
if(RPMBUILD_FOUND AND NOT WIN32)
|
||||
set(CPACK_GENERATOR "RPM")
|
||||
set(CPACK_RPM_PACKAGE_RELEASE "git${CPACK_DATE}.${BUILD_REV}")
|
||||
set(CPACK_SET_DESTDIR "true")
|
||||
@@ -62,25 +61,7 @@ if(APPLE)
|
||||
set(CPACK_COMPONENT_LIBRARIES_HIDDEN TRUE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Blender Foundation/Blender")
|
||||
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Blender Foundation/Blender")
|
||||
|
||||
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico)
|
||||
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
|
||||
|
||||
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt)
|
||||
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico)
|
||||
set(CPACK_WIX_UPGRADE_GUID "B767E4FD-7DE7-4094-B051-3AE62E13A17A")
|
||||
|
||||
set(CPACK_WIX_UI_BANNER ${LIBDIR}/package/installer_wix/WIX_UI_BANNER.bmp)
|
||||
set(CPACK_WIX_UI_DIALOG ${LIBDIR}/package/installer_wix/WIX_UI_DIALOG.bmp)
|
||||
|
||||
#force lzma instead of deflate
|
||||
set(CPACK_WIX_LIGHT_EXTRA_FLAGS -dcl:high)
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_EXECUTABLES "blender" "blender")
|
||||
set(CPACK_PACKAGE_EXECUTABLES "blender")
|
||||
include(CPack)
|
||||
|
||||
# Target for build_archive.py script, to automatically pass along
|
||||
@@ -95,8 +76,6 @@ macro(add_package_archive packagename extension)
|
||||
OUTPUT ${package_output}
|
||||
COMMAND ${build_archive} ${packagename} ${extension} bin release
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
unset(build_archive)
|
||||
unset(package_output)
|
||||
endmacro()
|
||||
|
||||
if(APPLE)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/python
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
|
@@ -12,12 +12,12 @@ blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' $blen
|
||||
# map the version a -> 1
|
||||
# not to be confused with blender's internal subversions
|
||||
if [ "$blender_version_char" ]; then
|
||||
blender_version_full=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
|
||||
blender_version_full=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
|
||||
else
|
||||
blender_version_full=${blender_version}
|
||||
blender_version_full=${blender_version}
|
||||
fi
|
||||
|
||||
blender_ver_string=$blender_version+git$blender_version_full
|
||||
blender_ver_string=$blender_version+svn$blender_version_full
|
||||
|
||||
pkgname=blender-snapshot
|
||||
pkgver=$blender_ver_string
|
||||
@@ -27,8 +27,8 @@ arch=('i686' 'x86_64')
|
||||
url="www.blender.org"
|
||||
license=('GPL')
|
||||
groups=()
|
||||
depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'python>=3.4' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'ffmpeg')
|
||||
makedepends=('cmake' 'git')
|
||||
depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'python>=3.2' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'ffmpeg')
|
||||
makedepends=('cmake' 'svn')
|
||||
optdepends=()
|
||||
provides=()
|
||||
conflicts=('blender')
|
||||
@@ -36,7 +36,7 @@ replaces=('blender')
|
||||
backup=()
|
||||
options=()
|
||||
install=blender.install
|
||||
# use current git to make the package.
|
||||
# use current svn to make the package.
|
||||
# source=(http://download.blender.org/source/$pkgname-$pkgver.tar.gz)
|
||||
# md5sums=('27edb80c82c25252d43d6a01980d953a') #generate with 'makepkg -g'
|
||||
source=()
|
||||
@@ -51,7 +51,11 @@ build() {
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DWITH_INSTALL_PORTABLE:BOOL=OFF \
|
||||
-DWITH_PYTHON_INSTALL:BOOL=OFF \
|
||||
-DWITH_OPENCOLLADA:BOOL=OFF
|
||||
-DWITH_OPENCOLLADA:BOOL=OFF \
|
||||
-DPYTHON_VERSION:STRING=3.2 \
|
||||
-DPYTHON_LIBPATH:STRING=/usr/lib \
|
||||
-DPYTHON_LIBRARY:STRING=python3.2mu \
|
||||
-DPYTHON_INCLUDE_DIRS:STRING=/usr/include/python3.2mu
|
||||
|
||||
make $MAKEFLAGS
|
||||
}
|
||||
@@ -60,7 +64,7 @@ package() {
|
||||
cd $srcdir/build
|
||||
make DESTDIR="$pkgdir" install
|
||||
python -m compileall \
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/startup \
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/modules \
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/addons
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/startup \
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/modules \
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/addons
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib ${BF_FFMPEG}/lib' #ogg libs are stored i
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL2' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
@@ -205,7 +205,7 @@ BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
@@ -237,7 +237,7 @@ LLIBS = ['stdc++']
|
||||
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||
|
||||
CC_WARN = ['-Wall']
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas', '-Wstrict-prototypes']
|
||||
@@ -253,7 +253,7 @@ BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g']
|
||||
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
|
||||
|
||||
#############################################################################
|
||||
################### Output directories ##################
|
||||
|
@@ -144,7 +144,7 @@ BF_REDCODE_LIB = ''
|
||||
BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
|
||||
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
|
||||
|
||||
# Mesa Libs should go here if you're using them as well....
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = '/usr'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
@@ -197,7 +197,7 @@ BF_BOOST = '/usr'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'boost_filesystem boost_regex boost_system boost_thread boost_date_time'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
@@ -241,7 +241,7 @@ if WITH_BF_FFMPEG:
|
||||
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type']
|
||||
CC_WARN = ['-Wall']
|
||||
@@ -254,7 +254,7 @@ BF_PROFILE_CCFLAGS = ['-pg','-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g']
|
||||
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
|
||||
|
||||
BF_BUILDDIR = '../build/linux'
|
||||
BF_INSTALLDIR='../install/linux'
|
||||
@@ -262,6 +262,6 @@ BF_INSTALLDIR='../install/linux'
|
||||
#Link against pthread
|
||||
PLATFORM_LINKFLAGS = ['-pthread']
|
||||
|
||||
#Fix for LLVM conflict with Mesa llvmpipe, SDL dynload also requires symbols to be hidden.
|
||||
# TODO(sergey): Move this to SConstruct, so we can have this line depended on user config.
|
||||
PLATFORM_LINKFLAGS += ['-Wl,--version-script=source/creator/blender.map']
|
||||
#Fix for LLVM conflict with Mesa llvmpipe
|
||||
if WITH_BF_LLVM:
|
||||
PLATFORM_LINKFLAGS += ['-Wl,--version-script=source/creator/blender.map']
|
||||
|
@@ -170,8 +170,6 @@ BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#CUDA
|
||||
@@ -192,16 +190,13 @@ CXXFLAGS = []
|
||||
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
|
||||
CC_WARN = [ '-Wall' ]
|
||||
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-ldbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('-limm32')
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi']
|
||||
|
||||
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
|
||||
|
||||
@@ -210,7 +205,7 @@ PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
|
||||
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS= ['-g']
|
||||
BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
|
||||
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
|
@@ -6,6 +6,9 @@ CL_STDOUT, CL_STDERR = CL_OUT.communicate()
|
||||
if "18.00." in CL_STDERR:
|
||||
VC_VERSION = '12.0'
|
||||
LCGDIR = '#../lib/windows_vc12'
|
||||
elif "15.00." in CL_STDERR:
|
||||
VC_VERSION = '9.0'
|
||||
LCGDIR = '#../lib/windows'
|
||||
else:
|
||||
import sys
|
||||
print("Visual C version not supported {}\n".format(CL_STDERR))
|
||||
@@ -33,7 +36,7 @@ WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include '
|
||||
BF_OPENAL_LIB = 'OpenAL32'
|
||||
BF_OPENAL_LIB = 'wrap_oal'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
@@ -57,7 +60,7 @@ BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL2.lib'
|
||||
BF_SDL_LIB = 'SDL.lib'
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
BF_PTHREADS = LIBDIR + '/pthreads'
|
||||
@@ -69,7 +72,10 @@ WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
|
||||
BF_OPENEXR_LIB = ' Iex-2_2 Half IlmImf-2_2 Imath-2_2 IlmThread-2_2 '
|
||||
if VC_VERSION == '12.0':
|
||||
BF_OPENEXR_LIB = ' Iex-2_1 Half IlmImf-2_1 Imath-2_1 IlmThread-2_1 '
|
||||
else:
|
||||
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
@@ -151,8 +157,6 @@ BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_3DMOUSE = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
@@ -192,14 +196,18 @@ WITH_BF_STATICOCIO = True
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = '${LIBDIR}/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
|
||||
if VC_VERSION == '12.0':
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
|
||||
else:
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_49 libboost_filesystem-vc90-mt-s-1_49 libboost_regex-vc90-mt-s-1_49 libboost_system-vc90-mt-s-1_49 libboost_thread-vc90-mt-s-1_49 libboost_wave-vc90-mt-s-1_49'
|
||||
BF_BOOST_LIB_INTERNATIONAL = 'libboost_locale-vc90-mt-s-1_49'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
#CUDA
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
@@ -231,16 +239,13 @@ BF_DEBUG_CCFLAGS = ['/Zi', '/Ob0', '/Od', '/FR${TARGET}.sbr']
|
||||
CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2', '/Ob2']
|
||||
REL_CCFLAGS = ['-O2', '/Ob2', '-DNDEBUG']
|
||||
|
||||
C_WARN = []
|
||||
CC_WARN = []
|
||||
CXX_WARN = []
|
||||
|
||||
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'Dbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('imm32')
|
||||
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi']
|
||||
|
||||
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/INCREMENTAL:NO', '/LARGEADDRESSAWARE', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
|
||||
|
||||
@@ -251,6 +256,11 @@ PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/IN
|
||||
|
||||
BF_BSC=False
|
||||
|
||||
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
||||
BF_BUILDDIR = '..\\build\\win32-vc'
|
||||
BF_INSTALLDIR='..\\install\\win32-vc'
|
||||
if VC_VERSION == '12.0':
|
||||
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
||||
BF_BUILDDIR = '..\\build\\win32-vc'
|
||||
BF_INSTALLDIR='..\\install\\win32-vc'
|
||||
else:
|
||||
BF_BUILDDIR = '..\\build\\win32-vc9'
|
||||
BF_INSTALLDIR='..\\install\\win32-vc9'
|
||||
BF_OPENCOLLADA_LIB = BF_OPENCOLLADA_LIB + ' UTF'
|
||||
|
@@ -169,8 +169,6 @@ BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#Freestyle
|
||||
@@ -186,17 +184,13 @@ CXXFLAGS = [ '-fpermissive' ]
|
||||
CPPFLAGS = ['-DWIN32', '-DMS_WIN64', '-DFREE_WINDOWS', '-DFREE_WINDOWS64', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2', '-ftree-vectorize']
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-ftree-vectorize']
|
||||
|
||||
# NOTE: C_WARN seems to get ignored - at least -Wno-char-subscripts doesn't work!
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
|
||||
CC_WARN = [ '-Wall', '-Wno-char-subscripts' ]
|
||||
CC_WARN = [ '-Wall' ]
|
||||
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread', '-ldbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('-limm32')
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread']
|
||||
|
||||
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
|
||||
|
||||
@@ -205,7 +199,7 @@ PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
|
||||
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS= ['-g']
|
||||
BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
|
||||
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
|
@@ -6,6 +6,9 @@ CL_STDOUT, CL_STDERR = CL_OUT.communicate()
|
||||
if "18.00." in CL_STDERR:
|
||||
VC_VERSION = '12.0'
|
||||
LCGDIR = '#../lib/win64_vc12'
|
||||
elif "15.00." in CL_STDERR:
|
||||
VC_VERSION = '9.0'
|
||||
LCGDIR = '#../lib/win64'
|
||||
else:
|
||||
import sys
|
||||
print("Visual C version not supported {}\n".format(CL_STDERR))
|
||||
@@ -34,7 +37,7 @@ WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include '
|
||||
BF_OPENAL_LIB = 'OpenAL32'
|
||||
BF_OPENAL_LIB = 'wrap_oal'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = True
|
||||
@@ -52,7 +55,7 @@ BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL2.lib'
|
||||
BF_SDL_LIB = 'SDL.lib'
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_JACK = False
|
||||
@@ -66,7 +69,10 @@ WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
|
||||
BF_OPENEXR_LIB = ' Iex-2_2 Half IlmImf-2_2 Imath-2_2 IlmThread-2_2 '
|
||||
if VC_VERSION == '12.0':
|
||||
BF_OPENEXR_LIB = ' Iex-2_1 Half IlmImf-2_1 Imath-2_1 IlmThread-2_1 '
|
||||
else:
|
||||
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
@@ -154,8 +160,6 @@ BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_3DMOUSE = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
@@ -195,14 +199,18 @@ WITH_BF_STATICOCIO = True
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = '${LIBDIR}/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
|
||||
if VC_VERSION == '12.0':
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
|
||||
else:
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_49 libboost_filesystem-vc90-mt-s-1_49 libboost_regex-vc90-mt-s-1_49 libboost_system-vc90-mt-s-1_49 libboost_thread-vc90-mt-s-1_49 libboost_wave-vc90-mt-s-1_49'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc90-mt-s-1_49'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
#CUDA
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
@@ -238,19 +246,19 @@ BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr', '/Od', '/Ob0']
|
||||
CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2', '/Ob2']
|
||||
REL_CCFLAGS = ['-O2', '/Ob2', '-DNDEBUG']
|
||||
|
||||
C_WARN = []
|
||||
CC_WARN = []
|
||||
CXX_WARN = []
|
||||
|
||||
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'Dbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('imm32')
|
||||
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi']
|
||||
|
||||
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
|
||||
|
||||
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
||||
BF_BUILDDIR = '..\\build\\win64-vc'
|
||||
BF_INSTALLDIR='..\\install\\win64-vc'
|
||||
if VC_VERSION == '12.0':
|
||||
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
||||
BF_BUILDDIR = '..\\build\\win64-vc'
|
||||
BF_INSTALLDIR='..\\install\\win64-vc'
|
||||
else:
|
||||
BF_BUILDDIR = '..\\build\\win64-vc9'
|
||||
BF_INSTALLDIR='..\\install\\win64-vc9'
|
||||
|
52
build_files/scons/tools/Blender.py
Normal file → Executable file
52
build_files/scons/tools/Blender.py
Normal file → Executable file
@@ -143,7 +143,7 @@ def setup_staticlibs(lenv):
|
||||
libincs += Split(lenv['BF_FREETYPE_LIBPATH'])
|
||||
if lenv['WITH_BF_PYTHON']:
|
||||
libincs += Split(lenv['BF_PYTHON_LIBPATH'])
|
||||
if lenv['WITH_BF_SDL'] and not lenv['WITH_BF_SDL_DYNLOAD']:
|
||||
if lenv['WITH_BF_SDL']:
|
||||
libincs += Split(lenv['BF_SDL_LIBPATH'])
|
||||
if lenv['WITH_BF_JACK'] and not lenv['WITH_BF_JACK_DYNLOAD']:
|
||||
libincs += Split(lenv['BF_JACK_LIBPATH'])
|
||||
@@ -216,16 +216,16 @@ def setup_staticlibs(lenv):
|
||||
if lenv['WITH_BF_STATICOCIO']:
|
||||
statlibs += Split(lenv['BF_OCIO_LIB_STATIC'])
|
||||
|
||||
if lenv['WITH_BF_CYCLES_OSL']:
|
||||
libincs += Split(lenv['BF_OSL_LIBPATH'])
|
||||
if lenv['WITH_BF_STATICOSL']:
|
||||
statlibs += Split(lenv['BF_OSL_LIB_STATIC'])
|
||||
|
||||
if lenv['WITH_BF_BOOST']:
|
||||
libincs += Split(lenv['BF_BOOST_LIBPATH'])
|
||||
if lenv['WITH_BF_STATICBOOST']:
|
||||
statlibs += Split(lenv['BF_BOOST_LIB_STATIC'])
|
||||
|
||||
if lenv['WITH_BF_CYCLES_OSL']:
|
||||
libincs += Split(lenv['BF_OSL_LIBPATH'])
|
||||
if lenv['WITH_BF_STATICOSL']:
|
||||
statlibs += Split(lenv['BF_OSL_LIB_STATIC'])
|
||||
|
||||
if lenv['WITH_BF_LLVM']:
|
||||
libincs += Split(lenv['BF_LLVM_LIBPATH'])
|
||||
if lenv['WITH_BF_STATICLLVM']:
|
||||
@@ -248,11 +248,6 @@ def setup_staticlibs(lenv):
|
||||
libincs = [e for e in libincs if SCons.Subst.scons_subst(e, lenv, gvars=lenv.Dictionary()) != "/usr/lib"]
|
||||
libincs.append('/usr/lib')
|
||||
|
||||
# Hack to pass OSD libraries to linker before extern_{clew,cuew}
|
||||
# Here we only store library path, actual library name will be added in setup_syslibs()
|
||||
for syslib in create_blender_liblist(lenv, 'system'):
|
||||
libincs.append(os.path.dirname(syslib))
|
||||
|
||||
return statlibs, libincs
|
||||
|
||||
def setup_syslibs(lenv):
|
||||
@@ -303,7 +298,7 @@ def setup_syslibs(lenv):
|
||||
if lenv['WITH_BF_ELTOPO']:
|
||||
syslibs += Split(lenv['BF_LAPACK_LIB'])
|
||||
'''
|
||||
if lenv['WITH_BF_SDL'] and not lenv['WITH_BF_SDL_DYNLOAD']:
|
||||
if lenv['WITH_BF_SDL']:
|
||||
syslibs += Split(lenv['BF_SDL_LIB'])
|
||||
if not lenv['WITH_BF_STATICOPENGL']:
|
||||
syslibs += Split(lenv['BF_OPENGL_LIB'])
|
||||
@@ -325,16 +320,16 @@ def setup_syslibs(lenv):
|
||||
if lenv['WITH_BF_3DMOUSE']:
|
||||
if not lenv['WITH_BF_STATIC3DMOUSE']:
|
||||
syslibs += Split(lenv['BF_3DMOUSE_LIB'])
|
||||
|
||||
if lenv['WITH_BF_BOOST'] and not lenv['WITH_BF_STATICBOOST']:
|
||||
syslibs += Split(lenv['BF_BOOST_LIB'])
|
||||
|
||||
if lenv['WITH_BF_INTERNATIONAL']:
|
||||
syslibs += Split(lenv['BF_BOOST_LIB_INTERNATIONAL'])
|
||||
|
||||
if lenv['WITH_BF_CYCLES_OSL'] and not lenv['WITH_BF_STATICOSL']:
|
||||
syslibs += Split(lenv['BF_OSL_LIB'])
|
||||
|
||||
if lenv['WITH_BF_BOOST'] and not lenv['WITH_BF_STATICBOOST']:
|
||||
syslibs += Split(lenv['BF_BOOST_LIB'])
|
||||
|
||||
if lenv['WITH_BF_INTERNATIONAL']:
|
||||
syslibs += Split(lenv['BF_BOOST_LIB_INTERNATIONAL'])
|
||||
|
||||
if lenv['WITH_BF_LLVM'] and not lenv['WITH_BF_STATICLLVM']:
|
||||
syslibs += Split(lenv['BF_LLVM_LIB'])
|
||||
|
||||
@@ -344,10 +339,6 @@ def setup_syslibs(lenv):
|
||||
if not lenv['WITH_BF_STATICPNG']:
|
||||
syslibs += Split(lenv['BF_PNG_LIB'])
|
||||
|
||||
# Hack to pass OSD libraries to linker before extern_{clew,cuew}
|
||||
for syslib in create_blender_liblist(lenv, 'system'):
|
||||
syslibs.append(os.path.basename(syslib))
|
||||
|
||||
syslibs += lenv['LLIBS']
|
||||
|
||||
return syslibs
|
||||
@@ -381,19 +372,12 @@ def creator(env):
|
||||
defs.append('WITH_BINRELOC')
|
||||
|
||||
if env['WITH_BF_SDL']:
|
||||
if env['WITH_BF_SDL_DYNLOAD']:
|
||||
defs.append('WITH_SDL_DYNLOAD')
|
||||
incs.append('#/extern/sdlew/include')
|
||||
defs.append('WITH_SDL')
|
||||
|
||||
if env['WITH_BF_LIBMV']:
|
||||
incs.append('#/extern/libmv')
|
||||
defs.append('WITH_LIBMV')
|
||||
|
||||
if env['WITH_BF_CYCLES'] and env['WITH_BF_CYCLES_LOGGING']:
|
||||
incs.append('#/intern/cycles/blender')
|
||||
defs.append('WITH_CYCLES_LOGGING')
|
||||
|
||||
if env['WITH_BF_FFMPEG']:
|
||||
defs.append('WITH_FFMPEG')
|
||||
|
||||
@@ -441,7 +425,7 @@ def buildinfo(lenv, build_type):
|
||||
no_upstream = False
|
||||
|
||||
try :
|
||||
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', '@{u}'], stderr=subprocess.STDOUT).strip()
|
||||
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', '@{u}']).strip()
|
||||
except subprocess.CalledProcessError:
|
||||
# assume branch has no upstream configured
|
||||
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
|
||||
@@ -654,7 +638,7 @@ def WinPyBundle(target=None, source=None, env=None):
|
||||
# Extract Numpy
|
||||
if env['WITH_BF_PYTHON_INSTALL_NUMPY']:
|
||||
py_tar = env.subst(env['LCGDIR']).lstrip("#")
|
||||
py_tar += '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '_numpy_1.9.tar.gz'
|
||||
py_tar += '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '_numpy_1.8.tar.gz'
|
||||
|
||||
py_target = env.subst(env['BF_INSTALLDIR']).lstrip("#")
|
||||
py_target = os.path.join(py_target, VERSION, 'python', 'lib', 'site-packages')
|
||||
@@ -762,7 +746,7 @@ def AppIt(target=None, source=None, env=None):
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/kernel/*.h %s/kernel/*.cl %s/kernel/*.cu %s/kernel/' % (croot, croot, croot, cinstalldir)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/kernel/svm %s/kernel/closure %s/kernel/geom %s/util/util_color.h %s/util/util_half.h %s/util/util_math.h %s/util/util_math_fast.h %s/util/util_transform.h %s/util/util_types.h %s/kernel/' % (croot, croot, croot, croot, croot, croot, croot, croot, croot, cinstalldir)
|
||||
cmd = 'cp -R %s/kernel/svm %s/kernel/closure %s/kernel/geom %s/util/util_color.h %s/util/util_half.h %s/util/util_math.h %s/util/util_transform.h %s/util/util_types.h %s/kernel/' % (croot, croot, croot, croot, croot, croot, croot, croot, cinstalldir)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/../intern/cycles/kernel/*.cubin %s/lib/' % (builddir, cinstalldir)
|
||||
commands.getoutput(cmd)
|
||||
@@ -816,6 +800,10 @@ def AppIt(target=None, source=None, env=None):
|
||||
instname = env['LCGDIR'][1:] # made libiomp5 part of blender libs
|
||||
cmd = 'ditto --arch %s %s/openmp/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libiomp5
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'install_name_tool -id @loader_path/../Resources/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/libiomp5.dylib'%(installdir, binary) # change id of libiomp5
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'install_name_tool -change @loader_path/libiomp5.dylib @loader_path/../Resources/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/%s'%(installdir, binary, binary) # change ref to libiomp5 ( blender )
|
||||
commands.getoutput(cmd)
|
||||
|
||||
# extract copy system python, be sure to update other build systems
|
||||
# when making changes to the files that are copied.
|
||||
|
@@ -108,7 +108,7 @@ def validate_arguments(args, bc):
|
||||
opts_list = [
|
||||
'WITH_BF_FREESTYLE', 'WITH_BF_PYTHON', 'WITH_BF_PYTHON_SAFETY', 'WITH_BF_PYTHON_SECURITY', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'BF_PYTHON_LIBPATH_ARCH', 'WITH_BF_STATICPYTHON', 'WITH_OSX_STATICPYTHON', 'BF_PYTHON_LIB_STATIC', 'BF_PYTHON_DLL', 'BF_PYTHON_ABI_FLAGS',
|
||||
'WITH_BF_OPENAL', 'BF_OPENAL', 'BF_OPENAL_INC', 'BF_OPENAL_LIB', 'BF_OPENAL_LIBPATH', 'WITH_BF_STATICOPENAL', 'BF_OPENAL_LIB_STATIC',
|
||||
'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH', 'WITH_BF_SDL_DYNLOAD',
|
||||
'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH',
|
||||
'WITH_BF_JACK', 'BF_JACK', 'BF_JACK_INC', 'BF_JACK_LIB', 'BF_JACK_LIBPATH', 'WITH_BF_JACK_DYNLOAD',
|
||||
'WITH_BF_SNDFILE', 'BF_SNDFILE', 'BF_SNDFILE_INC', 'BF_SNDFILE_LIB', 'BF_SNDFILE_LIBPATH', 'WITH_BF_STATICSNDFILE', 'BF_SNDFILE_LIB_STATIC',
|
||||
'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH',
|
||||
@@ -136,9 +136,6 @@ def validate_arguments(args, bc):
|
||||
'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH',
|
||||
'WITH_BF_FFTW3', 'BF_FFTW3', 'BF_FFTW3_INC', 'BF_FFTW3_LIB', 'BF_FFTW3_LIBPATH', 'WITH_BF_STATICFFTW3', 'BF_FFTW3_LIB_STATIC',
|
||||
'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC',
|
||||
'WITH_BF_EGL', 'WITH_BF_GLEW_ES', 'BF_GLEW_INC', 'WITH_BF_GL_PROFILE_CORE', 'WITH_BF_GL_PROFILE_COMPAT', 'WITH_BF_GL_PROFILE_ES20',
|
||||
'WITH_BF_GLEW_MX', 'WITH_BF_GL_EGL', 'WITH_BF_GL_ANGLE',
|
||||
|
||||
'WITH_BF_COLLADA', 'BF_COLLADA', 'BF_COLLADA_INC', 'BF_COLLADA_LIB', 'BF_OPENCOLLADA', 'BF_OPENCOLLADA_INC', 'BF_OPENCOLLADA_LIB', 'BF_OPENCOLLADA_LIBPATH', 'BF_PCRE', 'BF_PCRE_LIB', 'BF_PCRE_LIBPATH', 'BF_EXPAT', 'BF_EXPAT_LIB', 'BF_EXPAT_LIBPATH',
|
||||
'WITH_BF_STATICOPENCOLLADA', 'BF_OPENCOLLADA_LIB_STATIC',
|
||||
'WITH_BF_PLAYER',
|
||||
@@ -174,13 +171,12 @@ def validate_arguments(args, bc):
|
||||
'WITH_BF_CXX_GUARDEDALLOC',
|
||||
'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
|
||||
'BUILDBOT_BRANCH',
|
||||
'WITH_BF_IME',
|
||||
'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC',
|
||||
'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES', 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE', 'BF_CYCLES_CUDA_ENV',
|
||||
'WITH_BF_OIIO', 'WITH_BF_STATICOIIO', 'BF_OIIO', 'BF_OIIO_INC', 'BF_OIIO_LIB', 'BF_OIIO_LIB_STATIC', 'BF_OIIO_LIBPATH',
|
||||
'WITH_BF_OCIO', 'WITH_BF_STATICOCIO', 'BF_OCIO', 'BF_OCIO_INC', 'BF_OCIO_LIB', 'BF_OCIO_LIB_STATIC', 'BF_OCIO_LIBPATH',
|
||||
'WITH_BF_BOOST', 'WITH_BF_STATICBOOST', 'BF_BOOST', 'BF_BOOST_INC', 'BF_BOOST_LIB', 'BF_BOOST_LIB_INTERNATIONAL', 'BF_BOOST_LIB_STATIC', 'BF_BOOST_LIBPATH',
|
||||
'WITH_BF_LIBMV', 'WITH_BF_LIBMV_SCHUR_SPECIALIZATIONS',
|
||||
'WITH_BF_LIBMV',
|
||||
'WITH_BF_CYCLES_OSL', 'WITH_BF_STATICOSL', 'BF_OSL', 'BF_OSL_INC', 'BF_OSL_LIB', 'BF_OSL_LIBPATH', 'BF_OSL_LIB_STATIC', 'BF_OSL_COMPILER',
|
||||
'WITH_BF_LLVM', 'WITH_BF_STATICLLVM', 'BF_LLVM', 'BF_LLVM_LIB', 'BF_LLVM_LIBPATH', 'BF_LLVM_LIB_STATIC', 'BF_PROGRAM_LINKFLAGS'
|
||||
]
|
||||
@@ -189,7 +185,6 @@ def validate_arguments(args, bc):
|
||||
opts_list_split = [
|
||||
'BF_PYTHON_LINKFLAGS',
|
||||
'BF_OPENGL_LINKFLAGS',
|
||||
'BF_GL_DEFINITIONS',
|
||||
'CFLAGS', 'CCFLAGS', 'CXXFLAGS', 'CPPFLAGS',
|
||||
'REL_CFLAGS', 'REL_CCFLAGS', 'REL_CXXFLAGS',
|
||||
'BGE_CXXFLAGS',
|
||||
@@ -197,9 +192,7 @@ def validate_arguments(args, bc):
|
||||
'BF_DEBUG_CFLAGS', 'BF_DEBUG_CCFLAGS', 'BF_DEBUG_CXXFLAGS',
|
||||
'C_WARN', 'CC_WARN', 'CXX_WARN',
|
||||
'LLIBS', 'PLATFORM_LINKFLAGS', 'MACOSX_ARCHITECTURE', 'MACOSX_SDK', 'XCODE_CUR_VER', 'C_COMPILER_ID',
|
||||
'BF_CYCLES_CUDA_BINARIES_ARCH', 'BF_PROGRAM_LINKFLAGS', 'MACOSX_DEPLOYMENT_TARGET',
|
||||
'WITH_BF_CYCLES_DEBUG', 'WITH_BF_CYCLES_LOGGING',
|
||||
'WITH_BF_CPP11'
|
||||
'BF_CYCLES_CUDA_BINARIES_ARCH', 'BF_PROGRAM_LINKFLAGS', 'MACOSX_DEPLOYMENT_TARGET'
|
||||
]
|
||||
|
||||
|
||||
@@ -302,7 +295,6 @@ def read_opts(env, cfg, args):
|
||||
('BF_SDL_INC', 'SDL include path', ''),
|
||||
('BF_SDL_LIB', 'SDL library', ''),
|
||||
('BF_SDL_LIBPATH', 'SDL library path', ''),
|
||||
(BoolVariable('WITH_BF_SDL_DYNLOAD', 'Enable runtime dynamic SDL libraries loading (works only on Linux)', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_JACK', 'Enable jack support if true', True)),
|
||||
('BF_JACK', 'jack base path', ''),
|
||||
@@ -469,18 +461,6 @@ def read_opts(env, cfg, args):
|
||||
('BF_OPENGL_LIB_STATIC', 'OpenGL static libraries', ''),
|
||||
('BF_OPENGL_LINKFLAGS', 'OpenGL link flags', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_GLEW_MX', '', False)),
|
||||
(BoolVariable('WITH_BF_GLEW_ES', '', False)),
|
||||
(BoolVariable('WITH_BF_GL_EGL', '', False)),
|
||||
(BoolVariable('WITH_BF_GL_PROFILE_COMPAT', '', True)),
|
||||
(BoolVariable('WITH_BF_GL_PROFILE_CORE', '', False)),
|
||||
(BoolVariable('WITH_BF_GL_PROFILE_ES20', '', False)),
|
||||
(BoolVariable('WITH_BF_GL_ANGLE', '', False)),
|
||||
('BF_GL_DEFINITIONS', '', []),
|
||||
('BF_GLEW_INC', '', ''),
|
||||
) # end of opts.AddVariables()
|
||||
|
||||
localopts.AddVariables(
|
||||
(BoolVariable('WITH_BF_COLLADA', 'Build COLLADA import/export module if true', False)),
|
||||
(BoolVariable('WITH_BF_STATICOPENCOLLADA', 'Staticly link to OpenCollada', False)),
|
||||
('BF_COLLADA', 'COLLADA base path', ''),
|
||||
@@ -509,8 +489,6 @@ def read_opts(env, cfg, args):
|
||||
(BoolVariable('WITH_BF_PLAYER', 'Build blenderplayer if true', False)),
|
||||
(BoolVariable('WITH_BF_NOBLENDER', 'Do not build blender if true', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_IME', 'Enable Input Method Editor (IME) for complex Asian character input', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_3DMOUSE', 'Build blender with support of 3D mouses', False)),
|
||||
(BoolVariable('WITH_BF_STATIC3DMOUSE', 'Staticly link to 3d mouse library', False)),
|
||||
('BF_3DMOUSE', '3d mouse library base path', ''),
|
||||
@@ -578,7 +556,6 @@ def read_opts(env, cfg, args):
|
||||
(BoolVariable('WITH_BF_LZMA', 'Enable best LZMA pointcache compression', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_LIBMV', 'Enable libmv structure from motion library', True)),
|
||||
(BoolVariable('WITH_BF_LIBMV_SCHUR_SPECIALIZATIONS', 'Enable fixed-size schur specializations', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_COMPOSITOR', 'Enable the tile based nodal compositor', True)),
|
||||
) # end of opts.AddOptions()
|
||||
@@ -608,8 +585,6 @@ def read_opts(env, cfg, args):
|
||||
('BF_CYCLES_CUDA_NVCC', 'CUDA nvcc compiler path', ''),
|
||||
('BF_CYCLES_CUDA_ENV', 'preset environement nvcc will execute in', ''),
|
||||
('BF_CYCLES_CUDA_BINARIES_ARCH', 'CUDA architectures to compile binaries for', []),
|
||||
(BoolVariable('WITH_BF_CYCLES_DEBUG', 'Build Cycles engine with extra debugging capabilities', False)),
|
||||
(BoolVariable('WITH_BF_CYCLES_LOGGING', 'Build Cycles engine with logging support', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_OIIO', 'Build with OpenImageIO', False)),
|
||||
(BoolVariable('WITH_BF_STATICOIIO', 'Statically link to OpenImageIO', False)),
|
||||
@@ -654,9 +629,7 @@ def read_opts(env, cfg, args):
|
||||
('BF_LLVM_LIBPATH', 'LLVM library path', ''),
|
||||
('BF_LLVM_LIB_STATIC', 'LLVM static library', ''),
|
||||
|
||||
('BF_PROGRAM_LINKFLAGS', 'Link flags applied only to final binaries (blender and blenderplayer, not makesrna/makesdna)', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_CPP11', '"Build with C++11 standard enabled, for development use only!', False)),
|
||||
('BF_PROGRAM_LINKFLAGS', 'Link flags applied only to final binaries (blender and blenderplayer, not makesrna/makesdna)', '')
|
||||
) # end of opts.AddOptions()
|
||||
|
||||
return localopts
|
||||
@@ -713,6 +686,9 @@ def buildslave(target=None, source=None, env=None):
|
||||
else:
|
||||
platform = env['OURPLATFORM'].split('-')[0]
|
||||
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc') and env['MSVC_VERSION'] == '9.0':
|
||||
platform = platform + '-vc9'
|
||||
|
||||
if platform == 'linux':
|
||||
import platform
|
||||
|
||||
|
@@ -1,72 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script can run from any location,
|
||||
# output is created in the $CWD
|
||||
|
||||
BASE_DIR="$PWD"
|
||||
|
||||
blender_srcdir=$(dirname -- $0)/../..
|
||||
blender_version=$(grep "BLENDER_VERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
|
||||
if [ "$blender_version_cycle" = "release" ] ; then
|
||||
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)$blender_version_char
|
||||
SUBMODULE_EXCLUDE="^\(release/scripts/addons_contrib\)$"
|
||||
else
|
||||
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)_$blender_subversion
|
||||
SUBMODULE_EXCLUDE="^$" # dummy regex
|
||||
fi
|
||||
|
||||
MANIFEST="blender-$VERSION-manifest.txt"
|
||||
TARBALL="blender-$VERSION.tar.gz"
|
||||
|
||||
cd "$blender_srcdir"
|
||||
|
||||
# not so nice, but works
|
||||
FILTER_FILES_PY=\
|
||||
"import os, sys; "\
|
||||
"[print(l[:-1]) for l in sys.stdin.readlines() "\
|
||||
"if os.path.isfile(l[:-1]) "\
|
||||
"if os.path.basename(l[:-1]) not in {"\
|
||||
"'.gitignore', "\
|
||||
"'.gitmodules', "\
|
||||
"'.arcconfig', "\
|
||||
"}"\
|
||||
"]"
|
||||
|
||||
# Build master list
|
||||
echo -n "Building manifest of files: \"$BASE_DIR/$MANIFEST\" ..."
|
||||
git ls-files | python3 -c "$FILTER_FILES_PY" > $BASE_DIR/$MANIFEST
|
||||
|
||||
# Enumerate submodules
|
||||
for lcv in $(git submodule | awk '{print $2}' | grep -v "$SUBMODULE_EXCLUDE"); do
|
||||
cd "$BASE_DIR"
|
||||
cd "$blender_srcdir/$lcv"
|
||||
git ls-files | python3 -c "$FILTER_FILES_PY" | awk '$0="'"$lcv"/'"$0' >> $BASE_DIR/$MANIFEST
|
||||
cd "$BASE_DIR"
|
||||
done
|
||||
echo "OK"
|
||||
|
||||
|
||||
# Create the tarball
|
||||
cd "$blender_srcdir"
|
||||
echo -n "Creating archive: \"$BASE_DIR/$TARBALL\" ..."
|
||||
GZIP=-9 tar --transform "s,^,blender-$VERSION/,g" -zcf "$BASE_DIR/$TARBALL" -T "$BASE_DIR/$MANIFEST"
|
||||
echo "OK"
|
||||
|
||||
|
||||
# Create checksum file
|
||||
cd "$BASE_DIR"
|
||||
echo -n "Createing checksum: \"$BASE_DIR/$TARBALL.md5sum\" ..."
|
||||
md5sum "$TARBALL" > "$TARBALL.md5sum"
|
||||
echo "OK"
|
||||
|
||||
|
||||
# Cleanup
|
||||
echo -n "Cleaning up ..."
|
||||
rm "$BASE_DIR/$MANIFEST"
|
||||
echo "OK"
|
||||
|
||||
echo "Done!"
|
@@ -112,7 +112,7 @@ class DNACatalogHTML:
|
||||
# ${version} and ${revision}
|
||||
if bpy:
|
||||
version = '.'.join(map(str, bpy.app.version))
|
||||
revision = bpy.app.build_hash
|
||||
revision = bpy.app.build_revision[:-1]
|
||||
else:
|
||||
version = str(header.Version)
|
||||
revision = 'Unknown'
|
||||
@@ -404,7 +404,7 @@ def main():
|
||||
# Files
|
||||
if '--dna-versioned' in sys.argv:
|
||||
blender_version = '_'.join(map(str, bpy.app.version))
|
||||
filename = 'dna-{0}-{1}_endian-{2}-{3}'.format(sys.arch, sys.byteorder, blender_version, bpy.app.build_hash)
|
||||
filename = 'dna-{0}-{1}_endian-{2}-r{3}'.format(sys.arch, sys.byteorder, blender_version, bpy.app.build_revision[2:-1])
|
||||
else:
|
||||
filename = 'dna'
|
||||
dir = os.path.dirname(__file__)
|
||||
@@ -451,7 +451,7 @@ def main():
|
||||
os.remove(Path_Blend)
|
||||
|
||||
# export dna to xhtml
|
||||
log.info("6: export sdna to xhtml file: %r" % Path_HTML)
|
||||
log.info("6: export sdna to xhtml file")
|
||||
handleHTML = open(Path_HTML, "w")
|
||||
catalog.WriteToHTML(handleHTML)
|
||||
handleHTML.close()
|
||||
|
@@ -35,14 +35,13 @@
|
||||
defaults.
|
||||
|
||||
Much of the actual functionality can be found in the python scripts
|
||||
in the directory $BLENDERHOME/build_files/scons/tools, with
|
||||
Blender.py defining the bulk of the functionality. btools.py has some
|
||||
helper functions, and bcolors.py is for the terminal
|
||||
colors. mstoolkit.py and crossmingw.py are modules which set up SCons
|
||||
for the MS VC++ 2003 toolkit and the cross-compile toolset for
|
||||
compiling Windows binaries on Linux respectively. Note: the
|
||||
cross-compile doesn't work yet for Blender, but is added in
|
||||
preparation for having it work in the distant future.
|
||||
in the directory $BLENDERHOME/tools, with Blender.py defining the
|
||||
bulk of the functionality. btools.py has some helper functions, and
|
||||
bcolors.py is for the terminal colors. mstoolkit.py and crossmingw.py
|
||||
are modules which set up SCons for the MS VC++ 2003 toolkit and
|
||||
the cross-compile toolset for compiling Windows binaries on Linux
|
||||
respectively. Note: the cross-compile doesn't work yet for Blender,
|
||||
but is added in preparation for having it work in the distant future.
|
||||
|
||||
BlenderEnvironment
|
||||
------------------
|
||||
|
@@ -29,9 +29,9 @@
|
||||
a scons-local installation, which can be found in the scons/ subdirectory.
|
||||
This document uses the scons-local installation for its examples.
|
||||
|
||||
For build instructions, including dependencies, consult the appropriate
|
||||
section for your platform at
|
||||
http://wiki.blender.org/index.php/Dev:Doc/Building_Blender. Note that for
|
||||
Check from the page
|
||||
http://www.blender.org/development/building-blender/getting-dependencies/
|
||||
that you have all dependencies needed for building Blender. Note that for
|
||||
windows many of these dependencies already come in the lib/windows module
|
||||
from CVS.
|
||||
|
||||
@@ -53,13 +53,12 @@
|
||||
from the command-line is given, then all libraries and binaries to
|
||||
build are configured.
|
||||
|
||||
The build uses BF_BUILDDIR to build into and BF_INSTALLDIR to finally copy
|
||||
all needed files to get a proper setup. The BF_DOCDIR is used to generate
|
||||
Blender Python documentation files to. These variables have default values
|
||||
for every platform in
|
||||
$BLENDERHOME/build_files/scons/config/(platform)-config.py. See the next
|
||||
section of this document for how to customize these paths. After the build
|
||||
successfully completes, you can find everything you need in BF_INSTALLDIR.
|
||||
The build uses BF_BUILDDIR to build into and BF_INSTALLDIR to
|
||||
finally copy all needed files to get a proper setup. The BF_DOCDIR is
|
||||
used to generate Blender Python documentation files to. These
|
||||
variables have default values for every platform in
|
||||
$BLENDERHOME/config/(platform)-config.py. After the build successfully
|
||||
completes, you can find everything you need in BF_INSTALLDIR.
|
||||
|
||||
If you want to create the installer package of Blender on Windows you'll
|
||||
need to install nullsoft scriptable install system from http://nsis.sf.net.
|
||||
@@ -73,8 +72,8 @@
|
||||
---------------------
|
||||
|
||||
The default values for your platform can be found in the directory
|
||||
$BLENDERHOME/build_files/scons/config. Your platform specific defaults are
|
||||
in (platform)-config.py, where platform is one of:
|
||||
$BLENDERHOME/config. Your platform specific defaults are in
|
||||
(platform)-config.py, where platform is one of:
|
||||
|
||||
- linux, for machines running Linux
|
||||
- win32-vc, for Windows machines, compiling with a Microsoft compiler
|
||||
@@ -82,13 +81,12 @@
|
||||
- darwin, for OS X machines
|
||||
(TBD: add cygwin, solaris and freebsd support)
|
||||
|
||||
These files you will normally not change. If you need to override a
|
||||
default value, make a file called $BLENDERHOME/user-config.py, and copy
|
||||
settings from the build_files/scons/config/(platform)-config.py that you
|
||||
want to change. Don't copy the entire file (unless explicitly stated in
|
||||
the configuration file), because you may not get updated options you don't
|
||||
change yourself, which may result in build errors. You should NEVER have
|
||||
to modify $BLENDERHOME/build_files/scons/config/(platform)-config.py.
|
||||
These files you will normally not change. If you need to override
|
||||
a default value, make a file called $BLENDERHOME/user-config.py, and copy
|
||||
settings from the config/(platform)-config.py that you want to change. Don't
|
||||
copy the entire file (unless explicitely stated in the configuration file),
|
||||
because you may not get updated options you don't change yourself, which may
|
||||
result in build errors.
|
||||
|
||||
You can use BF_CONFIG argument to override the default user-config.py
|
||||
check. This is just like the user-config.py, but just with another name:
|
||||
@@ -115,6 +113,11 @@
|
||||
(unless you have overridden any of them in your
|
||||
$BLENDERHOME/user-config.py).
|
||||
|
||||
NOTE: The best way to avoid confusion is the
|
||||
copy $BLENDERHOME/config/(platform)-config.py to
|
||||
$BLENDERHOME/user-config.py. You should NEVER have to modify
|
||||
$BLENDERHOME/config/(platform)-config.py
|
||||
|
||||
Configuring the output
|
||||
----------------------
|
||||
|
||||
|
@@ -34,7 +34,7 @@ PROJECT_NAME = Blender
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = "V2.7x"
|
||||
PROJECT_NUMBER = "V2.6x"
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* These pages document the source code of blender.
|
||||
*
|
||||
* \subsection implinks Important Links
|
||||
* - <a href="http://developer.blender.org">developer.blender.org</a> with bug tracker
|
||||
* - <a href="http://projects.blender.org">projects.blender.org</a> with <a href="http://projects.blender.org/tracker/index.php?group_id=9&atid=498">bug tracker</a>
|
||||
* - <a href="http://wiki.blender.org/index.php/Dev:Contents">Development documents</a> on our wiki.
|
||||
*
|
||||
* \subsection blother Other
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/python
|
||||
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
|
@@ -75,7 +75,7 @@ print(scene.test_float)
|
||||
scene.test_array = (True, False)
|
||||
print([x for x in scene.test_array])
|
||||
|
||||
# scene.test_date = "blah" # this would fail, property is read-only
|
||||
#scene.test_date = "blah" # this would fail, property is read-only
|
||||
print(scene.test_date)
|
||||
|
||||
scene.test_enum = 'BLUE'
|
||||
|
@@ -39,7 +39,7 @@ class ModalOperator(bpy.types.Operator):
|
||||
self.execute(context)
|
||||
elif event.type == 'LEFTMOUSE': # Confirm
|
||||
return {'FINISHED'}
|
||||
elif event.type in {'RIGHTMOUSE', 'ESC'}: # Cancel
|
||||
elif event.type in ('RIGHTMOUSE', 'ESC'): # Cancel
|
||||
context.object.location.x = self.init_loc_x
|
||||
return {'CANCELLED'}
|
||||
|
||||
|
@@ -7,7 +7,7 @@ A mix-in parent class can be used to share common properties and
|
||||
import bpy
|
||||
|
||||
|
||||
class View3DPanel:
|
||||
class View3DPanel():
|
||||
bl_space_type = 'VIEW_3D'
|
||||
bl_region_type = 'TOOLS'
|
||||
|
||||
|
@@ -8,3 +8,4 @@ collection.foreach_get(attr, some_seq)
|
||||
# Python equivalent
|
||||
for i in range(len(seq)):
|
||||
some_seq[i] = getattr(collection[i], attr)
|
||||
|
||||
|
@@ -21,12 +21,3 @@ print(quat_out)
|
||||
print("%.2f, %.2f, %.2f" % tuple(math.degrees(a) for a in quat_out.to_euler()))
|
||||
print("(%.2f, %.2f, %.2f), %.2f" % (quat_out.axis[:] +
|
||||
(math.degrees(quat_out.angle), )))
|
||||
|
||||
# multiple rotations can be interpolated using the exponential map
|
||||
quat_c = mathutils.Quaternion((1.0, 0.0, 0.0), math.radians(15.0))
|
||||
exp_avg = (quat_a.to_exponential_map() +
|
||||
quat_b.to_exponential_map() +
|
||||
quat_c.to_exponential_map()) / 3.0
|
||||
quat_avg = mathutils.Quaternion(exp_avg)
|
||||
print("Average rotation:")
|
||||
print(quat_avg)
|
||||
|
@@ -18,16 +18,16 @@ matrix = mathutils.Matrix()
|
||||
|
||||
# Comparison operators can be done on Vector classes:
|
||||
|
||||
# (In)equality operators == and != test component values, e.g. 1,2,3 != 3,2,1
|
||||
vec_a == vec_b
|
||||
vec_a != vec_b
|
||||
|
||||
# Ordering operators >, >=, > and <= test vector length.
|
||||
# greater and less then test vector length.
|
||||
vec_a > vec_b
|
||||
vec_a >= vec_b
|
||||
vec_a < vec_b
|
||||
vec_a <= vec_b
|
||||
|
||||
# ==, != test vector values e.g. 1,2,3 != 3,2,1 even if they are the same length
|
||||
vec_a == vec_b
|
||||
vec_a != vec_b
|
||||
|
||||
|
||||
# Math can be performed on Vector classes
|
||||
vec_a + vec_b
|
||||
|
@@ -8,13 +8,9 @@ Intro
|
||||
|
||||
.. module:: bge.render
|
||||
|
||||
Example of using a :class:`bge.types.SCA_MouseSensor`, and two :class:`bge.types.KX_ObjectActuator` to implement MouseLook:
|
||||
|
||||
.. note::
|
||||
This can also be achieved with the :class:`bge.types.KX_MouseActuator`.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# Example Uses an L{SCA_MouseSensor}, and two L{KX_ObjectActuator}s to implement MouseLook::
|
||||
# To use a mouse movement sensor "Mouse" and a
|
||||
# motion actuator to mouse look:
|
||||
import bge
|
||||
@@ -66,7 +62,7 @@ Constants
|
||||
.. data:: KX_BLENDER_GLSL_MATERIAL
|
||||
|
||||
Materials approximating blender materials with GLSL.
|
||||
|
||||
|
||||
.. DATA:: VSYNC_OFF
|
||||
|
||||
Disables vsync
|
||||
@@ -79,15 +75,6 @@ Constants
|
||||
|
||||
Enables adaptive vsync if supported. Adaptive vsync enables vsync if the framerate is above the monitors refresh rate. Otherwise, vsync is diabled if the framerate is too low.
|
||||
|
||||
.. data:: LEFT_EYE
|
||||
|
||||
Left eye being used during stereoscopic rendering.
|
||||
|
||||
.. data:: RIGHT_EYE
|
||||
|
||||
Right eye being used during stereoscopic rendering.
|
||||
|
||||
|
||||
*********
|
||||
Functions
|
||||
*********
|
||||
@@ -95,49 +82,47 @@ Functions
|
||||
.. function:: getWindowWidth()
|
||||
|
||||
Gets the width of the window (in pixels)
|
||||
|
||||
|
||||
:rtype: integer
|
||||
|
||||
.. function:: getWindowHeight()
|
||||
|
||||
Gets the height of the window (in pixels)
|
||||
|
||||
|
||||
:rtype: integer
|
||||
|
||||
.. function:: setWindowSize(width, height)
|
||||
|
||||
Set the width and height of the window (in pixels). This also works for fullscreen applications.
|
||||
|
||||
|
||||
:type width: integer
|
||||
:type height: integer
|
||||
|
||||
.. function:: setFullScreen(enable)
|
||||
|
||||
Set whether or not the window should be fullscreen.
|
||||
|
||||
|
||||
:type enable: bool
|
||||
|
||||
.. function:: getFullScreen()
|
||||
|
||||
Returns whether or not the window is fullscreen.
|
||||
|
||||
|
||||
:rtype: bool
|
||||
|
||||
.. function:: makeScreenshot(filename)
|
||||
|
||||
Writes an image file with the current displayed frame.
|
||||
|
||||
The image is written to *'filename'*. The path may be absolute (eg. "/home/foo/image") or relative when started with
|
||||
"//" (eg. "//image"). Note that absolute paths are not portable between platforms.
|
||||
If the filename contains a "#", it will be replaced by an incremental index so that screenshots can be taken multiple
|
||||
times without overwriting the previous ones (eg. "image-#").
|
||||
|
||||
Settings for the image are taken from the render settings (file format and respective settings, gamma and colospace
|
||||
conversion, etc). The image resolution matches the framebuffer, meaning, the window size and aspect ratio.
|
||||
When running from the standalone player, instead of the embedded player, only PNG files are supported. Additional
|
||||
color conversions are also not supported.
|
||||
|
||||
:arg filename: path and name of the file to write
|
||||
Writes a screenshot to the given filename.
|
||||
|
||||
If filename starts with // the image will be saved relative to the current directory.
|
||||
If the filename contains # it will be replaced with the frame number.
|
||||
|
||||
The standalone player saves .png files. It does not support color space conversion
|
||||
or gamma correction.
|
||||
|
||||
When run from Blender, makeScreenshot supports all Blender image file formats like PNG, TGA, Jpeg and OpenEXR.
|
||||
Gamma, Colorspace conversion and Jpeg compression are taken from the Render settings panels.
|
||||
|
||||
:type filename: string
|
||||
|
||||
|
||||
@@ -149,29 +134,65 @@ Functions
|
||||
.. function:: showMouse(visible)
|
||||
|
||||
Enables or disables the operating system mouse cursor.
|
||||
|
||||
|
||||
:type visible: boolean
|
||||
|
||||
|
||||
.. function:: setMousePosition(x, y)
|
||||
|
||||
Sets the mouse cursor position.
|
||||
|
||||
|
||||
:type x: integer
|
||||
:type y: integer
|
||||
|
||||
|
||||
.. function:: setBackgroundColor(rgba)
|
||||
|
||||
Sets the window background color. (Deprecated: use KX_WorldInfo.background_color)
|
||||
|
||||
Sets the window background color.
|
||||
|
||||
:type rgba: list [r, g, b, a]
|
||||
|
||||
|
||||
.. function:: setMistColor(rgb)
|
||||
|
||||
Sets the mist color.
|
||||
|
||||
:type rgb: list [r, g, b]
|
||||
|
||||
|
||||
.. function:: setAmbientColor(rgb)
|
||||
|
||||
Sets the color of ambient light.
|
||||
|
||||
:type rgb: list [r, g, b]
|
||||
|
||||
|
||||
.. function:: setMistStart(start)
|
||||
|
||||
Sets the mist start value. Objects further away than start will have mist applied to them.
|
||||
|
||||
:type start: float
|
||||
|
||||
|
||||
.. function:: setMistEnd(end)
|
||||
|
||||
Sets the mist end value. Objects further away from this will be colored solid with
|
||||
the color set by setMistColor().
|
||||
|
||||
:type end: float
|
||||
|
||||
|
||||
.. function:: disableMist()
|
||||
|
||||
Disables mist.
|
||||
|
||||
.. note:: Set any of the mist properties to enable mist.
|
||||
|
||||
|
||||
.. function:: setEyeSeparation(eyesep)
|
||||
|
||||
Sets the eye separation for stereo mode. Usually Focal Length/30 provides a confortable value.
|
||||
|
||||
|
||||
:arg eyesep: The distance between the left and right eye.
|
||||
:type eyesep: float
|
||||
|
||||
@@ -179,36 +200,27 @@ Functions
|
||||
.. function:: getEyeSeparation()
|
||||
|
||||
Gets the current eye separation for stereo mode.
|
||||
|
||||
|
||||
:rtype: float
|
||||
|
||||
|
||||
|
||||
.. function:: setFocalLength(focallength)
|
||||
|
||||
Sets the focal length for stereo mode. It uses the current camera focal length as initial value.
|
||||
|
||||
:arg focallength: The focal length.
|
||||
|
||||
:arg focallength: The focal length.
|
||||
:type focallength: float
|
||||
|
||||
.. function:: getFocalLength()
|
||||
|
||||
Gets the current focal length for stereo mode.
|
||||
|
||||
|
||||
:rtype: float
|
||||
|
||||
.. function:: getStereoEye()
|
||||
|
||||
Gets the current stereoscopy eye being rendered.
|
||||
This function is mainly used in a :class:`bge.types.KX_Scene.pre_draw` callback
|
||||
function to customize the camera projection matrices for each
|
||||
stereoscopic eye.
|
||||
|
||||
:rtype: LEFT_EYE, RIGHT_EYE
|
||||
|
||||
.. function:: setMaterialMode(mode)
|
||||
|
||||
Set the material mode to use for OpenGL rendering.
|
||||
|
||||
|
||||
:type mode: KX_TEXFACE_MATERIAL, KX_BLENDER_MULTITEX_MATERIAL, KX_BLENDER_GLSL_MATERIAL
|
||||
|
||||
.. note:: Changes will only affect newly created scenes.
|
||||
@@ -217,14 +229,14 @@ Functions
|
||||
.. function:: getMaterialMode(mode)
|
||||
|
||||
Get the material mode to use for OpenGL rendering.
|
||||
|
||||
|
||||
:rtype: KX_TEXFACE_MATERIAL, KX_BLENDER_MULTITEX_MATERIAL, KX_BLENDER_GLSL_MATERIAL
|
||||
|
||||
|
||||
.. function:: setGLSLMaterialSetting(setting, enable)
|
||||
|
||||
Enables or disables a GLSL material setting.
|
||||
|
||||
|
||||
:type setting: string (lights, shaders, shadows, ramps, nodes, extra_textures)
|
||||
:type enable: boolean
|
||||
|
||||
@@ -232,43 +244,43 @@ Functions
|
||||
.. function:: getGLSLMaterialSetting(setting, enable)
|
||||
|
||||
Get the state of a GLSL material setting.
|
||||
|
||||
|
||||
:type setting: string (lights, shaders, shadows, ramps, nodes, extra_textures)
|
||||
:rtype: boolean
|
||||
|
||||
.. function:: setAnisotropicFiltering(level)
|
||||
|
||||
Set the anisotropic filtering level for textures.
|
||||
|
||||
|
||||
:arg level: The new anisotropic filtering level to use
|
||||
:type level: integer (must be one of 1, 2, 4, 8, 16)
|
||||
|
||||
|
||||
.. note:: Changing this value can cause all textures to be recreated, which can be slow.
|
||||
|
||||
|
||||
.. function:: getAnisotropicFiltering()
|
||||
|
||||
Get the anisotropic filtering level used for textures.
|
||||
|
||||
|
||||
:rtype: integer (one of 1, 2, 4, 8, 16)
|
||||
|
||||
.. function:: setMipmapping(value)
|
||||
|
||||
Change how to use mipmapping.
|
||||
|
||||
|
||||
:type value: RAS_MIPMAP_NONE, RAS_MIPMAP_NEAREST, RAS_MIPMAP_LINEAR
|
||||
|
||||
|
||||
.. note:: Changing this value can cause all textures to be recreated, which can be slow.
|
||||
|
||||
.. function:: getMipmapping()
|
||||
|
||||
Get the current mipmapping setting.
|
||||
|
||||
|
||||
:rtype: RAS_MIPMAP_NONE, RAS_MIPMAP_NEAREST, RAS_MIPMAP_LINEAR
|
||||
|
||||
|
||||
.. function:: drawLine(fromVec,toVec,color)
|
||||
|
||||
Draw a line in the 3D scene.
|
||||
|
||||
|
||||
:arg fromVec: the origin of the line
|
||||
:type fromVec: list [x, y, z]
|
||||
:arg toVec: the end of the line
|
||||
@@ -280,7 +292,7 @@ Functions
|
||||
.. function:: enableMotionBlur(factor)
|
||||
|
||||
Enable the motion blur effect.
|
||||
|
||||
|
||||
:arg factor: the ammount of motion blur to display.
|
||||
:type factor: float [0.0 - 1.0]
|
||||
|
||||
|
@@ -37,7 +37,7 @@ base class --- :class:`PyObjectPlus`
|
||||
|
||||
The speed and direction the character is traveling in using world coordinates. This should be used instead of applyMovement() to properly move the character.
|
||||
|
||||
:type: Vector((x, y, z))
|
||||
:type: list [x, y, z]
|
||||
|
||||
.. method:: jump()
|
||||
|
||||
|
@@ -78,33 +78,6 @@ base class --- :class:`SCA_IObject`
|
||||
|
||||
The object must have a physics controller for the mass to be applied, otherwise the mass value will be returned as 0.0.
|
||||
|
||||
.. attribute:: isSuspendDynamics
|
||||
|
||||
The object's dynamic state (read-only).
|
||||
|
||||
:type: boolean
|
||||
|
||||
.. attribute:: linearDamping
|
||||
|
||||
The object's linear damping, also known as translational damping. Can be set simultaneously with angular damping using the :py:meth:`setDamping` method.
|
||||
|
||||
:type: float between 0 and 1 inclusive.
|
||||
|
||||
.. note::
|
||||
|
||||
The object must have a physics controller for the linear damping to be applied, otherwise the value will be returned as 0.0.
|
||||
|
||||
.. attribute:: angularDamping
|
||||
|
||||
The object's angular damping, also known as rotationation damping. Can be set simultaneously with linear damping using the :py:meth:`setDamping` method.
|
||||
|
||||
:type: float between 0 and 1 inclusive.
|
||||
|
||||
.. note::
|
||||
|
||||
The object must have a physics controller for the angular damping to be applied, otherwise the value will be returned as 0.0.
|
||||
|
||||
|
||||
.. attribute:: linVelocityMin
|
||||
|
||||
Enforces the object keeps moving at a minimum velocity.
|
||||
@@ -141,7 +114,7 @@ base class --- :class:`SCA_IObject`
|
||||
|
||||
the object's inertia vector in local coordinates. Read only.
|
||||
|
||||
:type: Vector((ix, iy, iz))
|
||||
:type: list [ix, iy, iz]
|
||||
|
||||
.. attribute:: parent
|
||||
|
||||
@@ -151,58 +124,21 @@ base class --- :class:`SCA_IObject`
|
||||
|
||||
.. attribute:: groupMembers
|
||||
|
||||
Returns the list of group members if the object is a group object (dupli group instance), otherwise None is returned.
|
||||
Returns the list of group members if the object is a group object, otherwise None is returned.
|
||||
|
||||
:type: :class:`CListValue` of :class:`KX_GameObject` or None
|
||||
|
||||
.. attribute:: groupObject
|
||||
|
||||
Returns the group object (dupli group instance) that the object belongs to or None if the object is not part of a group.
|
||||
Returns the group object that the object belongs to or None if the object is not part of a group.
|
||||
|
||||
:type: :class:`KX_GameObject` or None
|
||||
|
||||
.. attribute:: collisionCallbacks
|
||||
|
||||
A list of functions to be called when a collision occurs.
|
||||
A list of callables to be run when a collision occurs.
|
||||
|
||||
:type: list of functions and/or methods
|
||||
|
||||
Callbacks should either accept one argument `(object)`, or three
|
||||
arguments `(object, point, normal)`. For simplicity, per
|
||||
colliding object only the first collision point is reported.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# Function form
|
||||
def callback_three(object, point, normal):
|
||||
print('Hit by %r at %s with normal %s' % (object.name, point, normal))
|
||||
|
||||
def callback_one(object):
|
||||
print('Hit by %r' % object.name)
|
||||
|
||||
def register_callback(controller):
|
||||
controller.owner.collisionCallbacks.append(callback_three)
|
||||
controller.owner.collisionCallbacks.append(callback_one)
|
||||
|
||||
|
||||
# Method form
|
||||
class YourGameEntity(bge.types.KX_GameObject):
|
||||
def __init__(self, old_owner):
|
||||
self.collisionCallbacks.append(self.on_collision_three)
|
||||
self.collisionCallbacks.append(self.on_collision_one)
|
||||
|
||||
def on_collision_three(self, object, point, normal):
|
||||
print('Hit by %r at %s with normal %s' % (object.name, point, normal))
|
||||
|
||||
def on_collision_one(self, object):
|
||||
print('Hit by %r' % object.name)
|
||||
|
||||
.. note::
|
||||
For backward compatibility, a callback with variable number of
|
||||
arguments (using `*args`) will be passed only the `object`
|
||||
argument. Only when there is more than one fixed argument (not
|
||||
counting `self` for methods) will the three-argument form be
|
||||
used.
|
||||
:type: list
|
||||
|
||||
.. attribute:: scene
|
||||
|
||||
@@ -438,12 +374,6 @@ base class --- :class:`SCA_IObject`
|
||||
If true, the object's and children's debug properties will be displayed on screen.
|
||||
|
||||
:type: boolean
|
||||
|
||||
.. attribute:: currentLodLevel
|
||||
|
||||
The index of the level of detail (LOD) currently used by this object (read-only).
|
||||
|
||||
:type: int
|
||||
|
||||
.. method:: endObject()
|
||||
|
||||
@@ -566,7 +496,7 @@ base class --- :class:`SCA_IObject`
|
||||
* True: you get the "local" velocity ie: relative to object orientation.
|
||||
:type local: boolean
|
||||
:return: the object's linear velocity.
|
||||
:rtype: Vector((vx, vy, vz))
|
||||
:rtype: list [vx, vy, vz]
|
||||
|
||||
.. method:: setLinearVelocity(velocity, local=False)
|
||||
|
||||
@@ -593,7 +523,7 @@ base class --- :class:`SCA_IObject`
|
||||
* True: you get the "local" velocity ie: relative to object orientation.
|
||||
:type local: boolean
|
||||
:return: the object's angular velocity.
|
||||
:rtype: Vector((vx, vy, vz))
|
||||
:rtype: list [vx, vy, vz]
|
||||
|
||||
.. method:: setAngularVelocity(velocity, local=False)
|
||||
|
||||
@@ -617,7 +547,7 @@ base class --- :class:`SCA_IObject`
|
||||
:arg point: optional point to return the velocity for, in local coordinates.
|
||||
:type point: 3D Vector
|
||||
:return: the velocity at the specified point.
|
||||
:rtype: Vector((vx, vy, vz))
|
||||
:rtype: list [vx, vy, vz]
|
||||
|
||||
.. method:: getReactionForce()
|
||||
|
||||
@@ -627,7 +557,7 @@ base class --- :class:`SCA_IObject`
|
||||
This also includes impulses, eg from collisions.
|
||||
|
||||
:return: the reaction force of this object.
|
||||
:rtype: Vector((fx, fy, fz))
|
||||
:rtype: list [fx, fy, fz]
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -650,15 +580,6 @@ base class --- :class:`SCA_IObject`
|
||||
* True: you get the "local" impulse ie: relative to local coordinates with object orientation.
|
||||
:type local: boolean
|
||||
|
||||
.. method:: setDamping(linear_damping, angular_damping)
|
||||
|
||||
Sets both the :py:attr:`linearDamping` and :py:attr:`angularDamping` simultaneously. This is more efficient than setting both properties individually.
|
||||
|
||||
:arg linear_damping: Linear ("translational") damping factor.
|
||||
:type linear_damping: float ∈ [0, 1]
|
||||
:arg angular_damping: Angular ("rotational") damping factor.
|
||||
:type angular_damping: float ∈ [0, 1]
|
||||
|
||||
.. method:: suspendDynamics()
|
||||
|
||||
Suspends physics for this object.
|
||||
@@ -955,4 +876,4 @@ base class --- :class:`SCA_IObject`
|
||||
:arg name: name of the property that added to the debug list.
|
||||
:type name: string
|
||||
:arg debug: the debug state.
|
||||
:type debug: boolean
|
||||
:type debug: boolean
|
@@ -15,7 +15,7 @@ base class --- :class:`SCA_IActuator`
|
||||
|
||||
The force applied by the actuator.
|
||||
|
||||
:type: Vector((x, y, z))
|
||||
:type: list [x, y, z]
|
||||
|
||||
.. attribute:: useLocalForce
|
||||
|
||||
@@ -27,7 +27,7 @@ base class --- :class:`SCA_IActuator`
|
||||
|
||||
The torque applied by the actuator.
|
||||
|
||||
:type: Vector((x, y, z))
|
||||
:type: list [x, y, z]
|
||||
|
||||
.. attribute:: useLocalTorque
|
||||
|
||||
@@ -39,7 +39,7 @@ base class --- :class:`SCA_IActuator`
|
||||
|
||||
The displacement vector applied by the actuator.
|
||||
|
||||
:type: Vector((x, y, z))
|
||||
:type: list [x, y, z]
|
||||
|
||||
.. attribute:: useLocalDLoc
|
||||
|
||||
@@ -51,7 +51,7 @@ base class --- :class:`SCA_IActuator`
|
||||
|
||||
The angular displacement vector applied by the actuator
|
||||
|
||||
:type: Vector((x, y, z))
|
||||
:type: list [x, y, z]
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -67,7 +67,7 @@ base class --- :class:`SCA_IActuator`
|
||||
|
||||
The linear velocity applied by the actuator.
|
||||
|
||||
:type: Vector((x, y, z))
|
||||
:type: list [x, y, z]
|
||||
|
||||
.. attribute:: useLocalLinV
|
||||
|
||||
@@ -83,7 +83,7 @@ base class --- :class:`SCA_IActuator`
|
||||
|
||||
The angular velocity applied by the actuator.
|
||||
|
||||
:type: Vector((x, y, z))
|
||||
:type: list [x, y, z]
|
||||
|
||||
.. attribute:: useLocalAngV
|
||||
|
||||
|
@@ -83,12 +83,6 @@ base class --- :class:`PyObjectPlus`
|
||||
|
||||
This can be set directly from python to avoid using the :class:`KX_SceneActuator`.
|
||||
|
||||
.. attribute:: world
|
||||
|
||||
The current active world, (read-only).
|
||||
|
||||
:type: :class:`KX_WorldInfo`
|
||||
|
||||
.. attribute:: suspended
|
||||
|
||||
True if the scene is suspended, (read-only).
|
||||
@@ -129,7 +123,7 @@ base class --- :class:`PyObjectPlus`
|
||||
|
||||
The scene gravity using the world x, y and z axis.
|
||||
|
||||
:type: Vector((gx, gy, gz))
|
||||
:type: list [fx, fy, fz]
|
||||
|
||||
.. method:: addObject(object, other, time=0)
|
||||
|
||||
@@ -158,8 +152,6 @@ base class --- :class:`PyObjectPlus`
|
||||
|
||||
:arg scene: The name of the scene to replace this scene with.
|
||||
:type scene: string
|
||||
:return: True if the scene exists and was scheduled for addition, False otherwise.
|
||||
:rtype: boolean
|
||||
|
||||
.. method:: suspend()
|
||||
|
||||
|
@@ -11,25 +11,22 @@ base class --- :class:`PyObjectPlus`
|
||||
|
||||
TODO - description
|
||||
|
||||
.. method:: addWheel(wheel, attachPos, downDir, axleDir, suspensionRestLength, wheelRadius, hasSteering)
|
||||
.. method:: addWheel(wheel, attachPos, attachDir, axleDir, suspensionRestLength, wheelRadius, hasSteering)
|
||||
|
||||
Add a wheel to the vehicle
|
||||
|
||||
:arg wheel: The object to use as a wheel.
|
||||
:type wheel: :class:`KX_GameObject` or a :class:`KX_GameObject` name
|
||||
:arg attachPos: The position to attach the wheel, relative to the chassis object center.
|
||||
:type wheel: :class:`KX_GameObject` or a KX_GameObject name
|
||||
:arg attachPos: The position that this wheel will attach to.
|
||||
:type attachPos: vector of 3 floats
|
||||
:arg downDir: The direction vector pointing down to where the vehicle should collide with the floor.
|
||||
:type downDir: vector of 3 floats
|
||||
:arg axleDir: The axis the wheel rotates around, relative to the chassis.
|
||||
:arg attachDir: The direction this wheel points.
|
||||
:type attachDir: vector of 3 floats
|
||||
:arg axleDir: The direction of this wheels axle.
|
||||
:type axleDir: vector of 3 floats
|
||||
:arg suspensionRestLength: The length of the suspension when no forces are being applied.
|
||||
:arg suspensionRestLength: TODO - Description
|
||||
:type suspensionRestLength: float
|
||||
:arg wheelRadius: The radius of the wheel (half the diameter).
|
||||
:arg wheelRadius: The size of the wheel.
|
||||
:type wheelRadius: float
|
||||
:arg hasSteering: True if the wheel should turn with steering, typically used in front wheels.
|
||||
:type hasSteering: boolean
|
||||
|
||||
|
||||
.. method:: applyBraking(force, wheelIndex)
|
||||
|
||||
@@ -41,7 +38,6 @@ base class --- :class:`PyObjectPlus`
|
||||
:arg wheelIndex: index of the wheel where the force needs to be applied
|
||||
:type wheelIndex: integer
|
||||
|
||||
|
||||
.. method:: applyEngineForce(force, wheelIndex)
|
||||
|
||||
Apply an engine force to the specified wheel
|
||||
@@ -52,7 +48,6 @@ base class --- :class:`PyObjectPlus`
|
||||
:arg wheelIndex: index of the wheel where the force needs to be applied
|
||||
:type wheelIndex: integer
|
||||
|
||||
|
||||
.. method:: getConstraintId()
|
||||
|
||||
Get the constraint ID
|
||||
|
@@ -17,25 +17,25 @@ base class --- :class:`SCA_IObject`
|
||||
|
||||
The position of the vertex.
|
||||
|
||||
:type: Vector((x, y, z))
|
||||
:type: list [x, y, z]
|
||||
|
||||
.. attribute:: UV
|
||||
|
||||
The texture coordinates of the vertex.
|
||||
|
||||
:type: Vector((u, v))
|
||||
:type: list [u, v]
|
||||
|
||||
.. attribute:: normal
|
||||
|
||||
The normal of the vertex.
|
||||
|
||||
:type: Vector((nx, ny, nz))
|
||||
:type: list [nx, ny, nz]
|
||||
|
||||
.. attribute:: color
|
||||
|
||||
The color of the vertex.
|
||||
|
||||
:type: Vector((r, g, b, a))
|
||||
:type: list [r, g, b, a]
|
||||
|
||||
Black = [0.0, 0.0, 0.0, 1.0], White = [1.0, 1.0, 1.0, 1.0]
|
||||
|
||||
@@ -110,13 +110,13 @@ base class --- :class:`SCA_IObject`
|
||||
Gets the position of this vertex.
|
||||
|
||||
:return: this vertexes position in local coordinates.
|
||||
:rtype: Vector((x, y, z))
|
||||
:rtype: list [x, y, z]
|
||||
|
||||
.. method:: setXYZ(pos)
|
||||
|
||||
Sets the position of this vertex.
|
||||
|
||||
:type: Vector((x, y, z))
|
||||
:type: list [x, y, z]
|
||||
|
||||
:arg pos: the new position for this vertex in local coordinates.
|
||||
|
||||
@@ -125,26 +125,26 @@ base class --- :class:`SCA_IObject`
|
||||
Gets the UV (texture) coordinates of this vertex.
|
||||
|
||||
:return: this vertexes UV (texture) coordinates.
|
||||
:rtype: Vector((u, v))
|
||||
:rtype: list [u, v]
|
||||
|
||||
.. method:: setUV(uv)
|
||||
|
||||
Sets the UV (texture) coordinates of this vertex.
|
||||
|
||||
:type: Vector((u, v))
|
||||
:type: list [u, v]
|
||||
|
||||
.. method:: getUV2()
|
||||
|
||||
Gets the 2nd UV (texture) coordinates of this vertex.
|
||||
|
||||
:return: this vertexes UV (texture) coordinates.
|
||||
:rtype: Vector((u, v))
|
||||
:rtype: list [u, v]
|
||||
|
||||
.. method:: setUV2(uv, unit)
|
||||
|
||||
Sets the 2nd UV (texture) coordinates of this vertex.
|
||||
|
||||
:type: Vector((u, v))
|
||||
:type: list [u, v]
|
||||
|
||||
:arg unit: optional argument, FLAT==1, SECOND_UV==2, defaults to SECOND_UV
|
||||
:arg unit: integer
|
||||
@@ -197,7 +197,7 @@ base class --- :class:`SCA_IObject`
|
||||
Gets the normal vector of this vertex.
|
||||
|
||||
:return: normalized normal vector.
|
||||
:rtype: Vector((nx, ny, nz))
|
||||
:rtype: list [nx, ny, nz]
|
||||
|
||||
.. method:: setNormal(normal)
|
||||
|
||||
|
@@ -1,87 +0,0 @@
|
||||
KX_WordlInfo(PyObjectPlus)
|
||||
=============================
|
||||
|
||||
.. module:: bge.types
|
||||
|
||||
base class --- :class:`PyObjectPlus`
|
||||
|
||||
.. class:: KX_WorldInfo(PyObjectPlus)
|
||||
|
||||
A wolrd object.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# Set the mist color to red.
|
||||
import bge
|
||||
|
||||
sce = bge.logic.getCurrentScene()
|
||||
|
||||
sce.world.mist_color = [1.0, 0.0, 0.0]
|
||||
|
||||
*********
|
||||
Constants
|
||||
*********
|
||||
|
||||
.. data:: KX_MIST_QUADRATIC
|
||||
|
||||
Type of quadratic attenuation used to fade mist.
|
||||
|
||||
.. data:: KX_MIST_LINEAR
|
||||
|
||||
Type of linear attenuation used to fade mist.
|
||||
|
||||
.. data:: KX_MIST_INV_QUADRATIC
|
||||
|
||||
Type of inverse quadratic attenuation used to fade mist.
|
||||
|
||||
**********
|
||||
Attributes
|
||||
**********
|
||||
|
||||
.. attribute:: mist_enable
|
||||
|
||||
Return the state of the mist.
|
||||
|
||||
:type: bool
|
||||
|
||||
.. attribute:: mist_start
|
||||
|
||||
The mist start point.
|
||||
|
||||
:type: float
|
||||
|
||||
.. attribute:: mist_distance
|
||||
|
||||
The mist distance fom the start point to reach 100% mist.
|
||||
|
||||
:type: float
|
||||
|
||||
.. attribute:: mist_intensity
|
||||
|
||||
The mist intensity.
|
||||
|
||||
:type: float
|
||||
|
||||
.. attribute:: mist_type
|
||||
|
||||
The type of mist - must be KX_MIST_QUADRATIC, KX_MIST_LINEAR or KX_MIST_INV_QUADRATIC
|
||||
|
||||
.. attribute:: mist_color
|
||||
|
||||
The color of the mist. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
|
||||
Mist and background color sould always set to the same color.
|
||||
|
||||
:type: :class:`mathutils.Vector`
|
||||
|
||||
.. attribute:: background_color
|
||||
|
||||
The color of the background. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
|
||||
Mist and background color sould always set to the same color.
|
||||
|
||||
:type: :class:`mathutils.Vector`
|
||||
|
||||
.. attribute:: ambient_color
|
||||
|
||||
The color of the ambient light. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
|
||||
|
||||
:type: :class:`mathutils.Vector`
|
@@ -25,7 +25,7 @@ base class --- :class:`PyObjectPlus`
|
||||
|
||||
The normalized x and y position of the mouse cursor.
|
||||
|
||||
:type: tuple (x, y)
|
||||
:type: list [x, y]
|
||||
|
||||
.. attribute:: visible
|
||||
|
||||
|
@@ -8,17 +8,19 @@ This module wraps OpenGL constants and functions, making them available from
|
||||
within Blender Python.
|
||||
|
||||
The complete list can be retrieved from the module itself, by listing its
|
||||
contents: dir(bgl). A simple search on the web can point to more
|
||||
contents: dir(bgl). A simple search on the net can point to more
|
||||
than enough material to teach OpenGL programming, from books to many
|
||||
collections of tutorials.
|
||||
|
||||
Here is a comprehensive `list of books <http://www.opengl.org/documentation/books/>`_ (non free). The `arcsynthesis tutorials <http://www.arcsynthesis.org/gltut/>`_ is one of the best resources to learn modern OpenGL and `g-truc <http://www.g-truc.net/post-tech-content-sample.html>`_ offers a set of extensive examples, including advanced features.
|
||||
|
||||
The "red book": "I{OpenGL Programming Guide: The Official Guide to Learning
|
||||
OpenGL}" and the online NeHe tutorials are two of the best resources.
|
||||
|
||||
.. note::
|
||||
You can use the :class:`Image` type to load and set textures.
|
||||
See :class:`Image.gl_load` and :class:`Image.gl_load`,
|
||||
for example.
|
||||
`OpenGL.org <http://www.opengl.org>`_
|
||||
`NeHe GameDev <http://nehe.gamedev.net>`_
|
||||
|
||||
|
||||
.. function:: glAccum(op, value):
|
||||
|
@@ -11,22 +11,32 @@ This API is generally stable but some areas are still being added and improved.
|
||||
|
||||
The Blender/Python API can do the following:
|
||||
|
||||
- Edit any data the user interface can (Scenes, Meshes, Particles etc.)
|
||||
- Modify user preferences, keymaps and themes
|
||||
- Run tools with own settings
|
||||
- Create user interface elements such as menus, headers and panels
|
||||
- Create new tools
|
||||
- Create interactive tools
|
||||
- Create new rendering engines that integrate with Blender
|
||||
- Define new settings in existing Blender data
|
||||
- Draw in the 3D view using OpenGL commands from Python
|
||||
* Edit any data the user interface can (Scenes, Meshes, Particles etc.)
|
||||
|
||||
* Modify user preferences, keymaps and themes
|
||||
|
||||
* Run tools with own settings
|
||||
|
||||
* Create user interface elements such as menus, headers and panels
|
||||
|
||||
* Create new tools
|
||||
|
||||
* Create interactive tools
|
||||
|
||||
* Create new rendering engines that integrate with Blender
|
||||
|
||||
* Define new settings in existing Blender data
|
||||
|
||||
* Draw in the 3D view using OpenGL commands from Python
|
||||
|
||||
|
||||
The Blender/Python API **can't** (yet)...
|
||||
|
||||
- Create new space types.
|
||||
- Assign custom properties to every type.
|
||||
- Define callbacks or listeners to be notified when data is changed.
|
||||
* Create new space types.
|
||||
|
||||
* Assign custom properties to every type.
|
||||
|
||||
* Define callbacks or listeners to be notified when data is changed.
|
||||
|
||||
|
||||
Before Starting
|
||||
@@ -37,21 +47,23 @@ This document isn't intended to fully cover each topic. Rather, its purpose is t
|
||||
|
||||
A quick list of helpful things to know before starting:
|
||||
|
||||
- Blender uses Python 3.x; some online documentation still assumes 2.x.
|
||||
- The interactive console is great for testing one-liners, It also has autocompletion so you can inspect the API quickly.
|
||||
- Button tool tips show Python attributes and operator names.
|
||||
- Right clicking on buttons and menu items directly links to API documentation.
|
||||
- For more examples, the text menu has a templates section where some example operators can be found.
|
||||
- To examine further scripts distributed with Blender, see:
|
||||
* Blender uses Python 3.x; some 3rd party extensions are not available yet.
|
||||
|
||||
| ``~/.blender/scripts/startup/bl_ui`` for the user interface,
|
||||
| ``~/.blender/scripts/startup/bl_op`` for operators.
|
||||
* The interactive console is great for testing one-liners, It also has autocompleation so you can inspect the api quickly.
|
||||
|
||||
* Button tool tips show Python attributes and operator names.
|
||||
|
||||
* Right clicking on buttons and menu items directly links to API documentation.
|
||||
|
||||
* For more examples, the text menu has a templates section where some example operators can be found.
|
||||
|
||||
* To examine further scripts distributed with Blender, see ``~/.blender/scripts/startup/bl_ui`` for the user interface and ``~/.blender/scripts/startup/bl_op`` for operators.
|
||||
|
||||
|
||||
Running Scripts
|
||||
---------------
|
||||
|
||||
The two most common ways to execute Python scripts are using the built-in text editor or entering commands in the Python console.
|
||||
The two most common ways to execute python scripts are using the built-in text editor or entering commands in the python console.
|
||||
|
||||
Both the **Text Editor** and **Python Console** are space types you can select from the view header.
|
||||
|
||||
@@ -70,7 +82,7 @@ Key Concepts
|
||||
Data Access
|
||||
-----------
|
||||
|
||||
Accessing DataBlocks
|
||||
Accessing datablocks
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Python accesses Blender's data in the same way as the animation system and user interface; this implies that any setting that can be changed via a button can also be changed from Python.
|
||||
@@ -104,7 +116,7 @@ Unlike Python's dictionaries, both methods are acceptable; however, the index of
|
||||
bpy.data.objects["Cube"]
|
||||
|
||||
|
||||
Accessing Attributes
|
||||
Accessing attributes
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Once you have a data block, such as a material, object, groups etc., its attributes can be accessed much like you would change a setting using the graphical interface. In fact, the tooltip for each button also displays the Python attribute which can help in finding what settings to change in a script.
|
||||
@@ -132,7 +144,7 @@ Example of a data path that can be quickly found via the console:
|
||||
Data Creation/Removal
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Those of you familiar with other Python API's may be surprised that new datablocks in the bpy API can't be created by calling the class:
|
||||
Those of you familiar with other python api's may be surprised that new datablocks in the bpy api can't be created by calling the class:
|
||||
|
||||
>>> bpy.types.Mesh()
|
||||
Traceback (most recent call last):
|
||||
@@ -141,9 +153,9 @@ Those of you familiar with other Python API's may be surprised that new databloc
|
||||
|
||||
|
||||
This is an intentional part of the API design.
|
||||
The Blender/Python API can't create Blender data that exists outside the main Blender database (accessed through :mod:`bpy.data`), because this data is managed by Blender (save/load/undo/append... etc).
|
||||
The blender/python api can't create blender data that exists outside the main blender database (accessed through bpy.data), because this data is managed by blender (save/load/undo/append... etc).
|
||||
|
||||
Data is added and removed via methods on the collections in :mod:`bpy.data`, eg:
|
||||
Data is added and removed via methods on the collections in bpy.data, eg:
|
||||
|
||||
>>> mesh = bpy.data.meshes.new(name="MyMesh")
|
||||
>>> print(mesh)
|
||||
@@ -155,8 +167,7 @@ Data is added and removed via methods on the collections in :mod:`bpy.data`, eg:
|
||||
Custom Properties
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
Python can access properties on any datablock that has an ID (data that can be linked in and accessed from :mod:`bpy.data`.
|
||||
When assigning a property, you can make up your own names, these will be created when needed or overwritten if they exist.
|
||||
Python can access properties on any datablock that has an ID (data that can be linked in and accessed from :mod:`bpy.data`. When assigning a property, you can make up your own names, these will be created when needed or overwritten if they exist.
|
||||
|
||||
This data is saved with the blend file and copied with objects.
|
||||
|
||||
@@ -169,7 +180,7 @@ Example:
|
||||
if "SomeProp" in bpy.context.object:
|
||||
print("Property found")
|
||||
|
||||
# Use the get function like a Python dictionary
|
||||
# Use the get function like a python dictionary
|
||||
# which can have a fallback value.
|
||||
value = bpy.data.scenes["Scene"].get("test_prop", "fallback value")
|
||||
|
||||
@@ -182,9 +193,11 @@ Example:
|
||||
|
||||
Note that these properties can only be assigned basic Python types.
|
||||
|
||||
- int, float, string
|
||||
- array of ints/floats
|
||||
- dictionary (only string keys are supported, values must be basic types too)
|
||||
* int, float, string
|
||||
|
||||
* array of ints/floats
|
||||
|
||||
* dictionary (only string keys are supported, values must be basic types too)
|
||||
|
||||
These properties are valid outside of Python. They can be animated by curves or used in driver paths.
|
||||
|
||||
@@ -192,8 +205,7 @@ These properties are valid outside of Python. They can be animated by curves or
|
||||
Context
|
||||
-------
|
||||
|
||||
While it's useful to be able to access data directly by name or as a list, it's more common to operate on the user's selection.
|
||||
The context is always available from ``bpy.context`` and can be used to get the active object, scene, tool settings along with many other attributes.
|
||||
While it's useful to be able to access data directly by name or as a list, it's more common to operate on the user's selection. The context is always available from '''bpy.context''' and can be used to get the active object, scene, tool settings along with many other attributes.
|
||||
|
||||
Common-use cases:
|
||||
|
||||
@@ -208,10 +220,9 @@ So ``bpy.context.object = obj`` will raise an error.
|
||||
But ``bpy.context.scene.objects.active = obj`` will work as expected.
|
||||
|
||||
|
||||
The context attributes change depending on where they are accessed.
|
||||
The 3D view has different context members than the console, so take care when accessing context attributes that the user state is known.
|
||||
The context attributes change depending on where they are accessed. The 3D view has different context members than the console, so take care when accessing context attributes that the user state is known.
|
||||
|
||||
See :mod:`bpy.context` API reference.
|
||||
See :mod:`bpy.context` API reference
|
||||
|
||||
|
||||
Operators (Tools)
|
||||
@@ -230,17 +241,15 @@ Examples:
|
||||
|
||||
.. note::
|
||||
|
||||
The menu item: :menuselection:`Help --> Operator Cheat Sheet` gives a list of all operators and their default values in Python syntax, along with the generated docs.
|
||||
This is a good way to get an overview of all Blender's operators.
|
||||
The menu item: Help -> Operator Cheat Sheet" gives a list of all operators and their default values in Python syntax, along with the generated docs. This is a good way to get an overview of all blender's operators.
|
||||
|
||||
|
||||
Operator Poll()
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
Many operators have a "poll" function which may check that the mouse is in a valid area or that the object is in the correct mode (Edit Mode, Weight Paint etc).
|
||||
When an operator's poll function fails within Python, an exception is raised.
|
||||
Many operators have a "poll" function which may check that the mouse is a valid area or that the object is in the correct mode (Edit Mode, Weight Paint etc). When an operator's poll function fails within python, an exception is raised.
|
||||
|
||||
For example, calling ``bpy.ops.view3d.render_border()`` from the console raises the following error:
|
||||
For example, calling bpy.ops.view3d.render_border() from the console raises the following error:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@@ -261,10 +270,13 @@ Integration
|
||||
|
||||
Python scripts can integrate with Blender in the following ways:
|
||||
|
||||
- By defining a rendering engine.
|
||||
- By defining operators.
|
||||
- By defining menus, headers and panels.
|
||||
- By inserting new buttons into existing menus, headers and panels
|
||||
* By defining a rendering engine.
|
||||
|
||||
* By defining operators.
|
||||
|
||||
* By defining menus, headers and panels.
|
||||
|
||||
* By inserting new buttons into existing menus, headers and panels
|
||||
|
||||
|
||||
In Python, this is done by defining a class, which is a subclass of an existing type.
|
||||
@@ -279,17 +291,24 @@ Once this script runs, ``SimpleOperator`` is registered with Blender and can be
|
||||
|
||||
To run the script:
|
||||
|
||||
#. Highlight the above code then press :kbd:`Ctrl-C` to copy it.
|
||||
#. Highlight the above code then press Ctrl+C to copy it.
|
||||
|
||||
#. Start Blender
|
||||
#. Press :kbd:`Ctrl-Right` twice to change to the Scripting layout.
|
||||
|
||||
#. Press Ctrl+Right twice to change to the Scripting layout.
|
||||
|
||||
#. Click the button labeled ``New`` and the confirmation pop up in order to create a new text block.
|
||||
#. Press :kbd:`Ctrl-V` to paste the code into the text panel (the upper left frame).
|
||||
|
||||
#. Press Ctrl+V to paste the code into the text panel (the upper left frame).
|
||||
|
||||
#. Click on the button **Run Script**.
|
||||
|
||||
#. Move your mouse into the 3D view, press spacebar for the operator search menu, and type "Simple".
|
||||
|
||||
#. Click on the "Simple Operator" item found in search.
|
||||
|
||||
|
||||
.. seealso:: The class members with the ``bl_`` prefix are documented in the API
|
||||
.. seealso:: The class members with the **bl_** prefix are documented in the API
|
||||
reference :class:`bpy.types.Operator`
|
||||
|
||||
.. note:: The output from the ``main`` function is sent to the terminal; in order to see this, be sure to :ref:`use the terminal <use_the_terminal>`.
|
||||
@@ -297,25 +316,33 @@ To run the script:
|
||||
Example Panel
|
||||
-------------
|
||||
|
||||
Panels register themselves as a class, like an operator. Notice the extra ``bl_`` variables used to set the context they display in.
|
||||
Panels register themselves as a class, like an operator. Notice the extra **bl_** variables used to set the context they display in.
|
||||
|
||||
.. literalinclude:: ../../../release/scripts/templates_py/ui_panel_simple.py
|
||||
|
||||
To run the script:
|
||||
|
||||
#. Highlight the above code then press :kbd:`Ctrl-C` to copy it
|
||||
#. Highlight the above code then press Ctrl+C to copy it
|
||||
|
||||
#. Start Blender
|
||||
#. Press :kbd:`Ctrl-Right` twice to change to the Scripting layout
|
||||
|
||||
#. Press Ctrl+Right twice to change to the Scripting layout
|
||||
|
||||
#. Click the button labeled ``New`` and the confirmation pop up in order to create a new text block.
|
||||
#. Press :kbd:`Ctrl-V` to paste the code into the text panel (the upper left frame)
|
||||
|
||||
#. Press Ctrl+V to paste the code into the text panel (the upper left frame)
|
||||
|
||||
#. Click on the button **Run Script**.
|
||||
|
||||
|
||||
To view the results:
|
||||
|
||||
#. Select the the default cube.
|
||||
|
||||
#. Click on the Object properties icon in the buttons panel (far right; appears as a tiny cube).
|
||||
|
||||
#. Scroll down to see a panel named **Hello World Panel**.
|
||||
|
||||
#. Changing the object name also updates **Hello World Panel's** Name: field.
|
||||
|
||||
Note the row distribution and the label and properties that are available through the code.
|
||||
@@ -334,14 +361,16 @@ Blender's Python API can be split up into 3 categories.
|
||||
Native Types
|
||||
------------
|
||||
|
||||
In simple cases returning a number or a string as a custom type would be cumbersome, so these are accessed as normal Python types.
|
||||
In simple cases returning a number or a string as a custom type would be cumbersome, so these are accessed as normal python types.
|
||||
|
||||
- Blender float/int/boolean -> float/int/boolean
|
||||
- Blender enumerator -> string
|
||||
* blender float/int/boolean -> float/int/boolean
|
||||
|
||||
* blender enumerator -> string
|
||||
|
||||
>>> C.object.rotation_mode = 'AXIS_ANGLE'
|
||||
|
||||
- Blender enumerator (multiple) -> set of strings
|
||||
|
||||
* blender enumerator (multiple) -> set of strings
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@@ -359,7 +388,7 @@ Used for Blender datablocks and collections: :class:`bpy.types.bpy_struct`
|
||||
|
||||
For data that contains its own attributes groups/meshes/bones/scenes... etc.
|
||||
|
||||
There are 2 main types that wrap Blenders data, one for datablocks (known internally as ``bpy_struct``), another for properties.
|
||||
There are 2 main types that wrap Blenders data, one for datablocks (known internally as bpy_struct), another for properties.
|
||||
|
||||
>>> bpy.context.object
|
||||
bpy.data.objects['Cube']
|
||||
|
@@ -19,17 +19,21 @@ Prerequisites
|
||||
|
||||
Before going through the tutorial you should...
|
||||
|
||||
- Familiarity with the basics of working in Blender.
|
||||
- Know how to run a script in Blender's text editor (as documented in the quick-start)
|
||||
- Have an understanding of Python primitive types (int, boolean, string, list, tuple, dictionary, and set).
|
||||
- Be familiar with the concept of Python modules.
|
||||
- Basic understanding of classes (object orientation) in Python.
|
||||
* Familiarity with the basics of working in Blender.
|
||||
|
||||
* Know how to run a script in Blender's text editor (as documented in the quick-start)
|
||||
|
||||
* Have an understanding of Python primitive types (int, boolean, string, list, tuple, dictionary, and set).
|
||||
|
||||
* Be familiar with the concept of Python modules.
|
||||
|
||||
* Basic understanding of classes (object orientation) in Python.
|
||||
|
||||
|
||||
Suggested reading before starting this tutorial.
|
||||
|
||||
- `Dive Into Python <http://getpython3.com/diveintopython3/index.html>`_ sections (1, 2, 3, 4, and 7).
|
||||
- :ref:`Blender API Quickstart <info_quickstart>`
|
||||
* `Dive Into Python <http://getpython3.com/diveintopython3/index.html>`_ sections (1, 2, 3, 4, and 7).
|
||||
* :ref:`Blender API Quickstart <info_quickstart>`
|
||||
to help become familiar with Blender/Python basics.
|
||||
|
||||
|
||||
@@ -41,11 +45,13 @@ Documentation Links
|
||||
|
||||
While going through the tutorial you may want to look into our reference documentation.
|
||||
|
||||
- :ref:`Blender API Overview <info_overview>`. -
|
||||
* :ref:`Blender API Overview <info_overview>`. -
|
||||
*This document is rather detailed but helpful if you want to know more on a topic.*
|
||||
- :mod:`bpy.context` api reference. -
|
||||
|
||||
* :mod:`bpy.context` api reference. -
|
||||
*Handy to have a list of available items your script may operate on.*
|
||||
- :class:`bpy.types.Operator`. -
|
||||
|
||||
* :class:`bpy.types.Operator`. -
|
||||
*The following addons define operators, these docs give details and more examples of operators.*
|
||||
|
||||
|
||||
@@ -72,11 +78,11 @@ To give an example, here is the simplest possible addon.
|
||||
print("Goodbye World")
|
||||
|
||||
|
||||
- ``bl_info`` is a dictionary containing addon meta-data such as the title, version and author to be displayed in the
|
||||
* ``bl_info`` is a dictionary containing addon meta-data such as the title, version and author to be displayed in the
|
||||
user preferences addon list.
|
||||
- ``register`` is a function which only runs when enabling the addon, this means the module can be loaded without
|
||||
* ``register`` is a function which only runs when enabling the addon, this means the module can be loaded without
|
||||
activating the addon.
|
||||
- ``unregister`` is a function to unload anything setup by ``register``, this is called when the addon is disabled.
|
||||
* ``unregister`` is a function to unload anything setup by ``register``, this is called when the addon is disabled.
|
||||
|
||||
|
||||
|
||||
@@ -178,15 +184,12 @@ This addon takes the body of the script above, and adds them to an operator's ``
|
||||
register()
|
||||
|
||||
|
||||
.. note::
|
||||
.. note:: ``bl_info`` is split across multiple lines, this is just a style convention used to more easily add items.
|
||||
|
||||
``bl_info`` is split across multiple lines, this is just a style convention used to more easily add items.
|
||||
|
||||
.. note::
|
||||
|
||||
Rather than using ``bpy.context.scene``, we use the ``context.scene`` argument passed to ``execute()``.
|
||||
In most cases these will be the same however in some cases operators will be passed a custom context
|
||||
so script authors should prefer the ``context`` argument passed to operators.
|
||||
.. note:: Rather than using ``bpy.context.scene``, we use the ``context.scene`` argument passed to ``execute()``.
|
||||
In most cases these will be the same however in some cases operators will be passed a custom context
|
||||
so script authors should prefer the ``context`` argument passed to operators.
|
||||
|
||||
|
||||
To test the script you can copy and paste this into Blender text editor and run it, this will execute the script
|
||||
directly and call register immediately.
|
||||
@@ -199,8 +202,8 @@ However running the script wont move any objects, for this you need to execute t
|
||||
:height: 574px
|
||||
:alt: Spacebar
|
||||
|
||||
Do this by pressing :kbd:`Spacebar` to bring up the operator search dialog and type in
|
||||
"Move X by One" (the ``bl_label``), then :kbd:`Enter`.
|
||||
Do this by pressing ``SpaceBar`` to bring up the operator search dialog and type in "Move X by One" (the ``bl_label``),
|
||||
then press ``Enter``.
|
||||
|
||||
|
||||
|
||||
@@ -211,8 +214,8 @@ The objects should move as before.
|
||||
Install The Addon
|
||||
-----------------
|
||||
|
||||
Once you have your addon within in Blender's text editor,
|
||||
you will want to be able to install it so it can be enabled in the user preferences to load on startup.
|
||||
Once you have your addon within in Blender's text editor, you will want to be able to install it so it can be enabled in
|
||||
the user preferences to load on startup.
|
||||
|
||||
Even though the addon above is a test, lets go through the steps anyway so you know how to do it for later.
|
||||
|
||||
@@ -560,26 +563,20 @@ Bringing it all together
|
||||
|
||||
# handle the keymap
|
||||
wm = bpy.context.window_manager
|
||||
# Note that in background mode (no GUI available), keyconfigs are not available either, so we have to check this
|
||||
# to avoid nasty errors in background case.
|
||||
kc = wm.keyconfigs.addon
|
||||
if kc:
|
||||
km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')
|
||||
kmi = km.keymap_items.new(ObjectCursorArray.bl_idname, 'SPACE', 'PRESS', ctrl=True, shift=True)
|
||||
kmi.properties.total = 4
|
||||
addon_keymaps.append((km, kmi))
|
||||
km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')
|
||||
kmi = km.keymap_items.new(ObjectCursorArray.bl_idname, 'SPACE', 'PRESS', ctrl=True, shift=True)
|
||||
kmi.properties.total = 4
|
||||
addon_keymaps.append((km, kmi))
|
||||
|
||||
def unregister():
|
||||
# Note: when unregistering, it's usually good practice to do it in reverse order you registered.
|
||||
# Can avoid strange issues like keymap still referring to operators already unregistered...
|
||||
bpy.utils.unregister_class(ObjectCursorArray)
|
||||
bpy.types.VIEW3D_MT_object.remove(menu_func)
|
||||
|
||||
# handle the keymap
|
||||
for km, kmi in addon_keymaps:
|
||||
km.keymap_items.remove(kmi)
|
||||
addon_keymaps.clear()
|
||||
|
||||
bpy.utils.unregister_class(ObjectCursorArray)
|
||||
bpy.types.VIEW3D_MT_object.remove(menu_func)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
@@ -630,12 +627,15 @@ you want to see example code for, this is a good place to start.
|
||||
|
||||
Here are some sites you might like to check on after completing this tutorial.
|
||||
|
||||
- :ref:`Blender/Python API Overview <info_overview>` -
|
||||
* :ref:`Blender/Python API Overview <info_overview>` -
|
||||
*For more background details on Blender/Python integration.*
|
||||
- `How to Think Like a Computer Scientist <http://interactivepython.org/courselib/static/thinkcspy/index.html>`_ -
|
||||
|
||||
* `How to Think Like a Computer Scientist <http://interactivepython.org/courselib/static/thinkcspy/index.html>`_ -
|
||||
*Great info for those who are still learning Python.*
|
||||
- `Blender Development (Wiki) <http://wiki.blender.org/index.php/Dev:Contents>`_ -
|
||||
|
||||
* `Blender Development (Wiki) <http://wiki.blender.org/index.php/Dev:Contents>`_ -
|
||||
*Blender Development, general information and helpful links.*
|
||||
- `Blender Artists (Coding Section) <http://blenderartists.org/forum/forumdisplay.php?47-Coding>`_ -
|
||||
|
||||
* `Blender Artists (Coding Section) <http://blenderartists.org/forum/forumdisplay.php?47-Coding>`_ -
|
||||
*forum where people ask Python development questions*
|
||||
|
||||
|
@@ -145,7 +145,6 @@ def main():
|
||||
"BMO_OPTYPE_FLAG_NORMALS_CALC",
|
||||
"BMO_OPTYPE_FLAG_UNTAN_MULTIRES",
|
||||
"BMO_OPTYPE_FLAG_SELECT_FLUSH",
|
||||
"BMO_OPTYPE_FLAG_SELECT_VALIDATE",
|
||||
"BMO_OPTYPE_FLAG_NOP",
|
||||
)
|
||||
vars_dict = {}
|
||||
|
@@ -316,7 +316,7 @@ def main():
|
||||
|
||||
try:
|
||||
import argparse
|
||||
except ImportError:
|
||||
except:
|
||||
print("Old Blender, just dumping")
|
||||
api_dump()
|
||||
return
|
||||
|
@@ -1,22 +1,22 @@
|
||||
# ##### 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.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
# ***** 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.
|
||||
#
|
||||
# Contributor(s): Campbell Barton, Luca Bonavita
|
||||
#
|
||||
# #**** END GPL LICENSE BLOCK #****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
@@ -274,12 +274,6 @@ else:
|
||||
"mathutils.kdtree",
|
||||
"mathutils.noise",
|
||||
"freestyle",
|
||||
"freestyle.chainingiterators",
|
||||
"freestyle.functions",
|
||||
"freestyle.predicates",
|
||||
"freestyle.shaders",
|
||||
"freestyle.types",
|
||||
"freestyle.utils",
|
||||
]
|
||||
|
||||
# ------
|
||||
@@ -322,13 +316,7 @@ try:
|
||||
__import__("freestyle")
|
||||
except ImportError:
|
||||
BPY_LOGGER.debug("Warning: Built without 'freestyle' module, docs incomplete...")
|
||||
EXCLUDE_MODULES = list(EXCLUDE_MODULES) + ["freestyle",
|
||||
"freestyle.chainingiterators",
|
||||
"freestyle.functions",
|
||||
"freestyle.predicates",
|
||||
"freestyle.shaders",
|
||||
"freestyle.types",
|
||||
"freestyle.utils"]
|
||||
EXCLUDE_MODULES = list(EXCLUDE_MODULES) + ["freestyle"]
|
||||
|
||||
# examples
|
||||
EXAMPLES_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "examples"))
|
||||
@@ -695,7 +683,7 @@ def py_descr2sphinx(ident, fw, descr, module_name, type_name, identifier):
|
||||
fw(ident + ".. data:: %s\n\n" % identifier)
|
||||
write_indented_lines(ident + " ", fw, doc, False)
|
||||
fw("\n")
|
||||
elif type(descr) in {MethodDescriptorType, ClassMethodDescriptorType}:
|
||||
elif type(descr) in (MethodDescriptorType, ClassMethodDescriptorType):
|
||||
write_indented_lines(ident, fw, doc, False)
|
||||
fw("\n")
|
||||
else:
|
||||
@@ -889,7 +877,7 @@ def pymodule2sphinx(basepath, module_name, module, title):
|
||||
for attribute, value, value_type in module_dir_value_type:
|
||||
if value_type == types.FunctionType:
|
||||
pyfunc2sphinx("", fw, module_name, None, attribute, value, is_class=False)
|
||||
elif value_type in {types.BuiltinMethodType, types.BuiltinFunctionType}: # both the same at the moment but to be future proof
|
||||
elif value_type in (types.BuiltinMethodType, types.BuiltinFunctionType): # both the same at the moment but to be future proof
|
||||
# note: can't get args from these, so dump the string as is
|
||||
# this means any module used like this must have fully formatted docstrings.
|
||||
py_c_func2sphinx("", fw, module_name, None, attribute, value, is_class=False)
|
||||
@@ -937,16 +925,10 @@ def pymodule2sphinx(basepath, module_name, module, title):
|
||||
fw(title_string(heading, heading_char))
|
||||
|
||||
# May need to be its own function
|
||||
fw(".. class:: %s\n\n" % type_name)
|
||||
if value.__doc__:
|
||||
if value.__doc__.startswith(".. class::"):
|
||||
fw(value.__doc__)
|
||||
else:
|
||||
fw(".. class:: %s\n\n" % type_name)
|
||||
write_indented_lines(" ", fw, value.__doc__, False)
|
||||
else:
|
||||
fw(".. class:: %s\n\n" % type_name)
|
||||
fw("\n")
|
||||
|
||||
write_indented_lines(" ", fw, value.__doc__, False)
|
||||
fw("\n")
|
||||
write_example_ref(" ", fw, module_name + "." + type_name)
|
||||
|
||||
descr_items = [(key, descr) for key, descr in sorted(value.__dict__.items()) if not key.startswith("__")]
|
||||
@@ -977,12 +959,10 @@ def pymodule2sphinx(basepath, module_name, module, title):
|
||||
context_type_map = {
|
||||
"active_base": ("ObjectBase", False),
|
||||
"active_bone": ("EditBone", False),
|
||||
"active_gpencil_frame": ("GreasePencilLayer", True),
|
||||
"active_gpencil_layer": ("GPencilLayer", True),
|
||||
"active_node": ("Node", False),
|
||||
"active_object": ("Object", False),
|
||||
"active_operator": ("Operator", False),
|
||||
"active_pose_bone": ("PoseBone", False),
|
||||
"active_node": ("Node", False),
|
||||
"armature": ("Armature", False),
|
||||
"bone": ("Bone", False),
|
||||
"brush": ("Brush", False),
|
||||
@@ -998,11 +978,7 @@ context_type_map = {
|
||||
"edit_object": ("Object", False),
|
||||
"edit_text": ("Text", False),
|
||||
"editable_bones": ("EditBone", True),
|
||||
"editable_gpencil_layers": ("GPencilLayer", True),
|
||||
"editable_gpencil_strokes": ("GPencilStroke", True),
|
||||
"fluid": ("FluidSimulationModifier", False),
|
||||
"gpencil_data": ("GreasePencel", False),
|
||||
"gpencil_data_owner": ("ID", False),
|
||||
"image_paint_object": ("Object", False),
|
||||
"lamp": ("Lamp", False),
|
||||
"lattice": ("Lattice", False),
|
||||
@@ -1042,7 +1018,6 @@ context_type_map = {
|
||||
"vertex_paint_object": ("Object", False),
|
||||
"visible_bases": ("ObjectBase", True),
|
||||
"visible_bones": ("EditBone", True),
|
||||
"visible_gpencil_layers": ("GPencilLayer", True),
|
||||
"visible_objects": ("Object", True),
|
||||
"visible_pose_bones": ("PoseBone", True),
|
||||
"weight_paint_object": ("Object", False),
|
||||
@@ -1805,14 +1780,8 @@ def write_rst_importable_modules(basepath):
|
||||
"mathutils.geometry" : "Geometry Utilities",
|
||||
"mathutils.kdtree" : "KDTree Utilities",
|
||||
"mathutils.noise" : "Noise Utilities",
|
||||
"freestyle" : "Freestyle Module",
|
||||
"freestyle.types" : "Freestyle Types",
|
||||
"freestyle.predicates" : "Freestyle Predicates",
|
||||
"freestyle.functions" : "Freestyle Functions",
|
||||
"freestyle.chainingiterators" : "Freestyle Chaining Iterators",
|
||||
"freestyle.shaders" : "Freestyle Shaders",
|
||||
"freestyle.utils" : "Freestyle Utilities",
|
||||
}
|
||||
"freestyle" : "Freestyle Data Types & Operators",
|
||||
}
|
||||
for mod_name, mod_descr in importable_modules.items():
|
||||
if mod_name not in EXCLUDE_MODULES:
|
||||
module = __import__(mod_name,
|
||||
@@ -1883,8 +1852,8 @@ def rna2sphinx(basepath):
|
||||
# context
|
||||
if "bpy.context" not in EXCLUDE_MODULES:
|
||||
# one of a kind, context doc (uses ctypes to extract info!)
|
||||
# doesn't work on mac and windows
|
||||
if PLATFORM not in {"darwin", "windows"}:
|
||||
# doesn't work on mac
|
||||
if PLATFORM != "darwin":
|
||||
pycontext2sphinx(basepath)
|
||||
|
||||
# internal modules
|
||||
|
@@ -3,10 +3,6 @@
|
||||
# bash doc/python_api/sphinx_doc_gen.sh
|
||||
# ssh upload means you need an account on the server
|
||||
|
||||
if [ "$1" == "" ] ; then
|
||||
echo "Expected a single argument for the username on blender.org, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Upload vars
|
||||
@@ -20,9 +16,9 @@ DO_OUT_PDF=false
|
||||
|
||||
|
||||
BLENDER="./blender.bin"
|
||||
SSH_USER=$1
|
||||
SSH_USER="ideasman42"
|
||||
SSH_HOST=$SSH_USER"@blender.org"
|
||||
SSH_UPLOAD="/data/www/vhosts/www.blender.org/api" # blender_python_api_VERSION, added after
|
||||
SSH_UPLOAD="/data/www/vhosts/www.blender.org/documentation" # blender_python_api_VERSION, added after
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Blender Version & Info
|
||||
@@ -30,11 +26,11 @@ SSH_UPLOAD="/data/www/vhosts/www.blender.org/api" # blender_python_api_VERSION,
|
||||
# 'Blender 2.53 (sub 1) Build' --> '2_53_1' as a shell script.
|
||||
# "_".join(str(v) for v in bpy.app.version)
|
||||
# custom blender vars
|
||||
blender_srcdir=$(dirname -- $0)/../..
|
||||
blender_version=$(grep "BLENDER_VERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
blender_srcdir=$(dirname $0)/../../
|
||||
blender_version=$(grep "BLENDER_VERSION\s" $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
|
||||
blender_version_char=$(grep BLENDER_VERSION_CHAR $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
|
||||
blender_version_cycle=$(grep BLENDER_VERSION_CYCLE $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
|
||||
blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
|
||||
|
||||
if [ "$blender_version_cycle" = "release" ] ; then
|
||||
BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)$blender_version_char"_release"
|
||||
@@ -104,7 +100,7 @@ if $DO_UPLOAD ; then
|
||||
|
||||
cp $SPHINXBASE/sphinx-out/contents.html $SPHINXBASE/sphinx-out/index.html
|
||||
ssh $SSH_USER@blender.org 'rm -rf '$SSH_UPLOAD_FULL'/*'
|
||||
rsync --progress -ave "ssh -p 22" $SPHINXBASE/sphinx-out/* $SSH_HOST:$SSH_UPLOAD_FULL/
|
||||
rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/* $SSH_HOST:$SSH_UPLOAD_FULL/
|
||||
|
||||
## symlink the dir to a static URL
|
||||
#ssh $SSH_USER@blender.org 'rm '$SSH_UPLOAD'/250PythonDoc && ln -s '$SSH_UPLOAD_FULL' '$SSH_UPLOAD'/250PythonDoc'
|
||||
@@ -119,11 +115,11 @@ if $DO_UPLOAD ; then
|
||||
|
||||
if $DO_OUT_PDF ; then
|
||||
# rename so local PDF has matching name.
|
||||
rsync --progress -ave "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
|
||||
rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
|
||||
fi
|
||||
|
||||
if $DO_OUT_HTML_ZIP ; then
|
||||
rsync --progress -ave "ssh -p 22" $SPHINXBASE/blender_python_reference_$BLENDER_VERSION.zip $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.zip
|
||||
rsync --progress -avze "ssh -p 22" $SPHINXBASE/blender_python_reference_$BLENDER_VERSION.zip $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.zip
|
||||
fi
|
||||
|
||||
fi
|
||||
|
@@ -1,22 +1,22 @@
|
||||
# ##### 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.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
# ***** 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.
|
||||
#
|
||||
# Contributor(s): Campbell Barton
|
||||
#
|
||||
# #**** END GPL LICENSE BLOCK #****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
|
23
extern/CMakeLists.txt
vendored
23
extern/CMakeLists.txt
vendored
@@ -26,14 +26,11 @@
|
||||
# Otherwise we get warnings here that we cant fix in external projects
|
||||
remove_strict_flags()
|
||||
|
||||
add_subdirectory(colamd)
|
||||
add_subdirectory(rangetree)
|
||||
add_subdirectory(wcwidth)
|
||||
add_subdirectory(libmv)
|
||||
|
||||
if(WITH_OPENNL)
|
||||
add_subdirectory(colamd)
|
||||
endif()
|
||||
|
||||
if(WITH_BULLET)
|
||||
if(NOT WITH_SYSTEM_BULLET)
|
||||
add_subdirectory(bullet2)
|
||||
@@ -50,11 +47,7 @@ if(WITH_BINRELOC)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_SYSTEM_GLEW)
|
||||
if(WITH_GLEW_ES)
|
||||
add_subdirectory(glew-es)
|
||||
else()
|
||||
add_subdirectory(glew)
|
||||
endif()
|
||||
add_subdirectory(glew)
|
||||
endif()
|
||||
|
||||
if(WITH_GAMEENGINE)
|
||||
@@ -69,7 +62,7 @@ if(WITH_IMAGE_REDCODE)
|
||||
add_subdirectory(libredcode)
|
||||
endif()
|
||||
|
||||
if(WITH_LZO AND NOT WITH_SYSTEM_LZO)
|
||||
if(WITH_LZO)
|
||||
add_subdirectory(lzo)
|
||||
endif()
|
||||
|
||||
@@ -86,14 +79,12 @@ if(WITH_MOD_BOOLEAN)
|
||||
add_subdirectory(carve)
|
||||
endif()
|
||||
|
||||
if(WITH_X11 AND WITH_GHOST_XDND)
|
||||
add_subdirectory(xdnd)
|
||||
if(WITH_GHOST_XDND)
|
||||
if(UNIX AND NOT APPLE)
|
||||
add_subdirectory(xdnd)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_GTESTS)
|
||||
add_subdirectory(gtest)
|
||||
endif()
|
||||
|
||||
if(WITH_SDL AND WITH_SDL_DYNLOAD)
|
||||
add_subdirectory(sdlew)
|
||||
endif()
|
||||
|
9
extern/SConscript
vendored
9
extern/SConscript
vendored
@@ -2,11 +2,7 @@
|
||||
|
||||
Import('env')
|
||||
|
||||
if env['WITH_BF_GLEW_ES']:
|
||||
SConscript(['glew-es/SConscript'])
|
||||
else:
|
||||
SConscript(['glew/SConscript'])
|
||||
|
||||
SConscript(['glew/SConscript'])
|
||||
SConscript(['colamd/SConscript'])
|
||||
SConscript(['rangetree/SConscript'])
|
||||
SConscript(['wcwidth/SConscript'])
|
||||
@@ -50,6 +46,3 @@ if env['WITH_GHOST_XDND']:
|
||||
# FreeBSD doesn't seems to support XDND protocol
|
||||
if env['OURPLATFORM'] in ('linux', 'openbsd3', 'sunos5', 'aix4', 'aix5'):
|
||||
SConscript(['xdnd/SConscript'])
|
||||
|
||||
if env['WITH_BF_SDL'] and env['WITH_BF_SDL_DYNLOAD']:
|
||||
SConscript(['sdlew/SConscript'])
|
||||
|
5
extern/bullet2/readme.txt
vendored
5
extern/bullet2/readme.txt
vendored
@@ -6,8 +6,3 @@ Erwin
|
||||
|
||||
Apply patches/convex_hull.patch to add access to the convex hull
|
||||
operation, used in the BMesh convex hull operator.
|
||||
|
||||
Documentation is available at:
|
||||
http://code.google.com/p/bullet/source/browse/trunk/Bullet_User_Manual.pdf
|
||||
and:
|
||||
https://github.com/bulletphysics/bullet3/tree/master/docs
|
||||
|
@@ -29,13 +29,10 @@ subject to the following restrictions:
|
||||
static btVector3
|
||||
getNormalizedVector(const btVector3& v)
|
||||
{
|
||||
btScalar l = v.length();
|
||||
btVector3 n = v;
|
||||
if (l < SIMD_EPSILON) {
|
||||
n.setValue(0,0,0);
|
||||
} else {
|
||||
n /= l;
|
||||
}
|
||||
btVector3 n = v.normalized();
|
||||
if (n.length() < SIMD_EPSILON) {
|
||||
n.setValue(0, 0, 0);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
|
0
extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp
vendored
Normal file → Executable file
0
extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp
vendored
Normal file → Executable file
0
extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h
vendored
Normal file → Executable file
0
extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h
vendored
Normal file → Executable file
1
extern/carve/CMakeLists.txt
vendored
1
extern/carve/CMakeLists.txt
vendored
@@ -161,7 +161,6 @@ if(WITH_BOOST)
|
||||
|
||||
add_definitions(
|
||||
-DCARVE_SYSTEM_BOOST
|
||||
-DHAVE_BOOST_LIBRARY
|
||||
)
|
||||
|
||||
list(APPEND INC_SYS
|
||||
|
1
extern/carve/SConscript
vendored
1
extern/carve/SConscript
vendored
@@ -19,7 +19,6 @@ if env['WITH_BF_BOOST']:
|
||||
defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS')
|
||||
|
||||
defs.append('CARVE_SYSTEM_BOOST')
|
||||
defs.append('HAVE_BOOST_LIBRARY')
|
||||
incs.append(env['BF_BOOST_INC'])
|
||||
|
||||
env.BlenderLib ('extern_carve', Split(sources), incs, defs, libtype=['extern'], priority=[40] )
|
||||
|
6
extern/carve/bundle.sh
vendored
6
extern/carve/bundle.sh
vendored
@@ -31,8 +31,6 @@ headers=`find ./lib -type f -iname '*.h' -or -iname '*.hpp' | sed -r 's/^\.\//\t
|
||||
includes=`find ./include -type f -iname '*.h' -or -iname '*.hpp' | sed -r 's/^\.\//\t/' | sort -d`
|
||||
|
||||
cp patches/files/config.h include/carve/config.h
|
||||
mkdir -p include/carve/random
|
||||
cp patches/files/random.h include/carve/random/random.h
|
||||
|
||||
cat > CMakeLists.txt << EOF
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
@@ -93,7 +91,6 @@ if(WITH_BOOST)
|
||||
|
||||
add_definitions(
|
||||
-DCARVE_SYSTEM_BOOST
|
||||
-DHAVE_BOOST_LIBRARY
|
||||
)
|
||||
|
||||
list(APPEND INC_SYS
|
||||
@@ -105,6 +102,8 @@ blender_add_lib(extern_carve "\${SRC}" "\${INC}" "\${INC_SYS}")
|
||||
EOF
|
||||
|
||||
cat > SConscript << EOF
|
||||
#!/usr/bin/python
|
||||
|
||||
# NOTE: This file is automatically generated by bundle.sh script
|
||||
# If you're doing changes in this file, please update template
|
||||
# in that script too
|
||||
@@ -124,7 +123,6 @@ if env['WITH_BF_BOOST']:
|
||||
defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS')
|
||||
|
||||
defs.append('CARVE_SYSTEM_BOOST')
|
||||
defs.append('HAVE_BOOST_LIBRARY')
|
||||
incs.append(env['BF_BOOST_INC'])
|
||||
|
||||
env.BlenderLib ('extern_carve', Split(sources), incs, defs, libtype=['extern'], priority=[40] )
|
||||
|
24
extern/carve/carve-capi.cc
vendored
24
extern/carve/carve-capi.cc
vendored
@@ -555,19 +555,6 @@ void cleanupFaceEdgeAttrs(const MeshSet<3> *left,
|
||||
interpolator->swapAttributes(&new_interpolator);
|
||||
}
|
||||
|
||||
void cleanupFaceEdgeAttrsCallback(const MeshSet<3> *left,
|
||||
const MeshSet<3> *right,
|
||||
void *descr_v)
|
||||
{
|
||||
CarveMeshDescr *descr = (CarveMeshDescr *) descr_v;
|
||||
cleanupFaceEdgeAttrs(left,
|
||||
right,
|
||||
&descr->face_edge_triangulated_flag);
|
||||
cleanupFaceEdgeAttrs(left,
|
||||
right,
|
||||
&descr->orig_face_edge_mapping);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
CarveMeshDescr *carve_addMesh(struct ImportMeshData *import_data,
|
||||
@@ -750,9 +737,14 @@ bool carve_performBooleanOperation(CarveMeshDescr *left_mesh,
|
||||
// intersecting that meshes tessellation of operation result can't be
|
||||
// done properly. The only way to make such situations working is to
|
||||
// union intersecting meshes of the same operand.
|
||||
carve_unionIntersections(&csg, &left, &right,
|
||||
cleanupFaceEdgeAttrsCallback,
|
||||
(void *) output_descr);
|
||||
if (carve_unionIntersections(&csg, &left, &right)) {
|
||||
cleanupFaceEdgeAttrs(left,
|
||||
right,
|
||||
&output_descr->face_edge_triangulated_flag);
|
||||
cleanupFaceEdgeAttrs(left,
|
||||
right,
|
||||
&output_descr->orig_face_edge_mapping);
|
||||
}
|
||||
|
||||
left_mesh->poly = left;
|
||||
right_mesh->poly = right;
|
||||
|
27
extern/carve/carve-util.cc
vendored
27
extern/carve/carve-util.cc
vendored
@@ -365,10 +365,7 @@ MeshSet<3> *getIntersectedOperand(std::vector<MeshSet<3>::mesh_t*> *meshes,
|
||||
|
||||
MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
|
||||
MeshSet<3> *poly,
|
||||
const MeshSet<3> *other_poly,
|
||||
const MeshSet<3>::aabb_t &otherAABB,
|
||||
UnionIntersectionsCallback callback,
|
||||
void *user_data)
|
||||
const MeshSet<3>::aabb_t &otherAABB)
|
||||
{
|
||||
if (poly->meshes.size() <= 1) {
|
||||
return poly;
|
||||
@@ -412,7 +409,6 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
|
||||
carve::csg::CSG::UNION,
|
||||
NULL, carve::csg::CSG::CLASSIFY_EDGE);
|
||||
|
||||
callback(result, other_poly, user_data);
|
||||
delete left;
|
||||
delete right;
|
||||
|
||||
@@ -424,8 +420,6 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
|
||||
|
||||
MeshSet<3> *result = meshSetFromTwoMeshes(left->meshes, right->meshes);
|
||||
|
||||
callback(result, other_poly, user_data);
|
||||
|
||||
delete left;
|
||||
delete right;
|
||||
|
||||
@@ -461,36 +455,37 @@ MeshSet<3> *unionIntersectingMeshes(carve::csg::CSG *csg,
|
||||
|
||||
// TODO(sergey): This function is to be totally re-implemented to make it
|
||||
// more clear what's going on and hopefully optimize it as well.
|
||||
void carve_unionIntersections(carve::csg::CSG *csg,
|
||||
bool carve_unionIntersections(carve::csg::CSG *csg,
|
||||
MeshSet<3> **left_r,
|
||||
MeshSet<3> **right_r,
|
||||
UnionIntersectionsCallback callback,
|
||||
void *user_data)
|
||||
MeshSet<3> **right_r)
|
||||
{
|
||||
MeshSet<3> *left = *left_r, *right = *right_r;
|
||||
bool changed = false;
|
||||
|
||||
if (left->meshes.size() == 1 && right->meshes.size() == 0) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
MeshSet<3>::aabb_t leftAABB = left->getAABB();
|
||||
MeshSet<3>::aabb_t rightAABB = right->getAABB();;
|
||||
|
||||
left = unionIntersectingMeshes(csg, left, right, rightAABB,
|
||||
callback, user_data);
|
||||
right = unionIntersectingMeshes(csg, right, left, leftAABB,
|
||||
callback, user_data);
|
||||
left = unionIntersectingMeshes(csg, left, rightAABB);
|
||||
right = unionIntersectingMeshes(csg, right, leftAABB);
|
||||
|
||||
if (left != *left_r) {
|
||||
changed = true;
|
||||
delete *left_r;
|
||||
}
|
||||
|
||||
if (right != *right_r) {
|
||||
changed = true;
|
||||
delete *right_r;
|
||||
}
|
||||
|
||||
*left_r = left;
|
||||
*right_r = right;
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
static inline void add_newell_cross_v3_v3v3(const Vector &v_prev,
|
||||
|
10
extern/carve/carve-util.h
vendored
10
extern/carve/carve-util.h
vendored
@@ -70,15 +70,9 @@ void carve_getRescaleMinMax(const carve::mesh::MeshSet<3> *left,
|
||||
carve::geom3d::Vector *min,
|
||||
carve::geom3d::Vector *max);
|
||||
|
||||
typedef void (*UnionIntersectionsCallback) (const carve::mesh::MeshSet<3> *left,
|
||||
const carve::mesh::MeshSet<3> *right,
|
||||
void *userdata);
|
||||
|
||||
void carve_unionIntersections(carve::csg::CSG *csg,
|
||||
bool carve_unionIntersections(carve::csg::CSG *csg,
|
||||
carve::mesh::MeshSet<3> **left_r,
|
||||
carve::mesh::MeshSet<3> **right_r,
|
||||
UnionIntersectionsCallback callback,
|
||||
void *user_data);
|
||||
carve::mesh::MeshSet<3> **right_r);
|
||||
|
||||
bool carve_checkPolyPlanarAndGetNormal(const std::vector<carve::mesh::MeshSet<3>::vertex_t> &vertex_storage,
|
||||
const int verts_per_poly,
|
||||
|
61
extern/carve/include/carve/random/random.h
vendored
61
extern/carve/include/carve/random/random.h
vendored
@@ -1,61 +0,0 @@
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
namespace boost {
|
||||
#if __cplusplus > 199711L
|
||||
# include <random>
|
||||
typedef std::mt19937 mt19937;
|
||||
#else
|
||||
# include <stdlib.h>
|
||||
struct mt19937 {
|
||||
int operator()() {
|
||||
return rand();
|
||||
}
|
||||
|
||||
int max() {
|
||||
return RAND_MAX;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
struct uniform_on_sphere {
|
||||
typedef std::vector<T> result_type;
|
||||
|
||||
uniform_on_sphere(int dimension) {
|
||||
assert(dimension == 3);
|
||||
}
|
||||
|
||||
std::vector<T>
|
||||
operator()(float u1, float u2) {
|
||||
T z = 1.0 - 2.0*u1;
|
||||
T r = std::sqrt(std::max(0.0, 1.0 - z*z));
|
||||
T phi = 2.0*M_PI*u2;
|
||||
T x = r*std::cos(phi);
|
||||
T y = r*std::sin(phi);
|
||||
std::vector<T> result;
|
||||
result.push_back(x);
|
||||
result.push_back(y);
|
||||
result.push_back(z);
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename RNG, typename DISTR>
|
||||
struct variate_generator {
|
||||
|
||||
variate_generator(RNG rng, DISTR distr)
|
||||
: rng_(rng), distr_(distr) {}
|
||||
|
||||
typename DISTR::result_type
|
||||
operator()() {
|
||||
float rng_max_inv = 1.0 / rng_.max();
|
||||
return distr_(rng_() * rng_max_inv, rng_() * rng_max_inv);
|
||||
}
|
||||
|
||||
RNG rng_;
|
||||
DISTR distr_;
|
||||
};
|
||||
|
||||
}
|
6
extern/carve/lib/polyhedron.cpp
vendored
6
extern/carve/lib/polyhedron.cpp
vendored
@@ -36,11 +36,7 @@
|
||||
|
||||
#include <carve/mesh.hpp>
|
||||
|
||||
#ifdef HAVE_BOOST_LIBRARY
|
||||
# include BOOST_INCLUDE(random.hpp)
|
||||
#else
|
||||
# include <carve/random/random.h>
|
||||
#endif
|
||||
#include BOOST_INCLUDE(random.hpp)
|
||||
|
||||
namespace {
|
||||
bool emb_test(carve::poly::Polyhedron *poly,
|
||||
|
61
extern/carve/patches/files/random.h
vendored
61
extern/carve/patches/files/random.h
vendored
@@ -1,61 +0,0 @@
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
namespace boost {
|
||||
#if __cplusplus > 199711L
|
||||
# include <random>
|
||||
typedef std::mt19937 mt19937;
|
||||
#else
|
||||
# include <stdlib.h>
|
||||
struct mt19937 {
|
||||
int operator()() {
|
||||
return rand();
|
||||
}
|
||||
|
||||
int max() {
|
||||
return RAND_MAX;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
struct uniform_on_sphere {
|
||||
typedef std::vector<T> result_type;
|
||||
|
||||
uniform_on_sphere(int dimension) {
|
||||
assert(dimension == 3);
|
||||
}
|
||||
|
||||
std::vector<T>
|
||||
operator()(float u1, float u2) {
|
||||
T z = 1.0 - 2.0*u1;
|
||||
T r = std::sqrt(std::max(0.0, 1.0 - z*z));
|
||||
T phi = 2.0*M_PI*u2;
|
||||
T x = r*std::cos(phi);
|
||||
T y = r*std::sin(phi);
|
||||
std::vector<T> result;
|
||||
result.push_back(x);
|
||||
result.push_back(y);
|
||||
result.push_back(z);
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename RNG, typename DISTR>
|
||||
struct variate_generator {
|
||||
|
||||
variate_generator(RNG rng, DISTR distr)
|
||||
: rng_(rng), distr_(distr) {}
|
||||
|
||||
typename DISTR::result_type
|
||||
operator()() {
|
||||
float rng_max_inv = 1.0 / rng_.max();
|
||||
return distr_(rng_() * rng_max_inv, rng_() * rng_max_inv);
|
||||
}
|
||||
|
||||
RNG rng_;
|
||||
DISTR distr_;
|
||||
};
|
||||
|
||||
}
|
16
extern/carve/patches/random.patch
vendored
16
extern/carve/patches/random.patch
vendored
@@ -1,16 +0,0 @@
|
||||
diff -r 9a85d733a43d lib/polyhedron.cpp
|
||||
--- a/lib/polyhedron.cpp Tue Jun 24 11:15:23 2014 +1000
|
||||
+++ b/lib/polyhedron.cpp Thu Nov 13 17:36:06 2014 +0500
|
||||
@@ -36,7 +36,11 @@
|
||||
|
||||
#include <carve/mesh.hpp>
|
||||
|
||||
-#include BOOST_INCLUDE(random.hpp)
|
||||
+#ifdef HAVE_BOOST_LIBRARY
|
||||
+# include BOOST_INCLUDE(random.hpp)
|
||||
+#else
|
||||
+# include <carve/random/random.h>
|
||||
+#endif
|
||||
|
||||
namespace {
|
||||
bool emb_test(carve::poly::Polyhedron *poly,
|
1
extern/carve/patches/series
vendored
1
extern/carve/patches/series
vendored
@@ -11,4 +11,3 @@ mesh_simplify_uninitialized_var.patch
|
||||
memory_leak_fix.patch
|
||||
msvc_fix.patch
|
||||
face_hole_merge_workaround.patch
|
||||
random.patch
|
||||
|
11
extern/clew/include/clew.h
vendored
11
extern/clew/include/clew.h
vendored
@@ -350,7 +350,7 @@ typedef unsigned int cl_GLenum;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_M_IX86)
|
||||
#if _M_IX86_FP >= 0 && !defined(__SSE__)
|
||||
#if _M_IX86_FP >= 0
|
||||
#define __SSE__
|
||||
#endif
|
||||
#if _M_IX86_FP >= 1
|
||||
@@ -1815,11 +1815,6 @@ typedef struct _cl_buffer_region {
|
||||
|
||||
/* Function signature typedef's */
|
||||
|
||||
#ifdef __APPLE__
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wignored-attributes"
|
||||
#endif
|
||||
|
||||
/* Platform API */
|
||||
typedef CL_API_ENTRY cl_int (CL_API_CALL *
|
||||
PFNCLGETPLATFORMIDS)(cl_uint /* num_entries */,
|
||||
@@ -2481,10 +2476,6 @@ PFNCLCREATEFROMGLTEXTURE3D)(cl_context /* context */,
|
||||
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
# pragma GCC diagnostic pop // ignored "-Wignored-attributes"
|
||||
#endif
|
||||
|
||||
/* cl_khr_gl_sharing extension */
|
||||
|
||||
#define cl_khr_gl_sharing 1
|
||||
|
57
extern/glew-es/CMakeLists.txt
vendored
57
extern/glew-es/CMakeLists.txt
vendored
@@ -1,57 +0,0 @@
|
||||
# ***** 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) 2013, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): Jason Wilkins
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
set(INC
|
||||
include
|
||||
)
|
||||
|
||||
set(INC_SYS
|
||||
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
list(APPEND INC_SYS
|
||||
${X11_X11_INCLUDE_PATH}
|
||||
)
|
||||
endif()
|
||||
|
||||
set(SRC
|
||||
src/glew.c
|
||||
|
||||
include/GL/eglew.h
|
||||
include/GL/glesew.h
|
||||
include/GL/glew.h
|
||||
include/GL/glxew.h
|
||||
include/GL/wglew.h
|
||||
)
|
||||
|
||||
add_definitions(${GL_DEFINITIONS})
|
||||
|
||||
if(WITH_GLEW_MX)
|
||||
add_definitions(-DGLEW_MX)
|
||||
endif()
|
||||
|
||||
|
||||
blender_add_lib(extern_glew_es "${SRC}" "${INC}" "${INC_SYS}")
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user