Compare commits
1 Commits
tmp-batch-
...
blender2.7
Author | SHA1 | Date | |
---|---|---|---|
e045fe53f1 |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"project_id" : "Blender",
|
||||
"conduit_uri" : "https://developer.blender.org/",
|
||||
"git.default-relative-commit" : "origin/master",
|
||||
"git.default-relative-commit" : "origin/blender2.7",
|
||||
"arc.land.update.default" : "rebase",
|
||||
"arc.land.onto.default" : "master"
|
||||
"arc.land.onto.default" : "blender2.7"
|
||||
}
|
||||
|
248
.clang-format
248
.clang-format
@@ -1,248 +0,0 @@
|
||||
|
||||
# Configuration of clang-format
|
||||
# =============================
|
||||
#
|
||||
# Tested to work with versions: 6 to 8.
|
||||
|
||||
# This causes parameters on continuations to align to the opening brace.
|
||||
#
|
||||
# like_this_long_name(parameter_one,
|
||||
# parameter_two,
|
||||
# parameter_three);
|
||||
#
|
||||
AlignAfterOpenBracket: 'Align'
|
||||
|
||||
# Disallow short functions on one line; break them up.
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
|
||||
# These two settings trigger stacking of parameters in most cases; this is
|
||||
# easier to read and also makes diffs easier to read (since an added or removed
|
||||
# parameter is obvious). For example, function calls will look like this:
|
||||
#
|
||||
# like_this_long_name(parameter_one,
|
||||
# parameter_two,
|
||||
# parameter_three,
|
||||
# parameter_four,
|
||||
# parameter_five,
|
||||
# parameter_six);
|
||||
#
|
||||
# Instead of:
|
||||
#
|
||||
# like_this_long_name(parameter_one, parameter_two, parameter_three, parameter_four,
|
||||
# parameter_five, parameter_six);
|
||||
#
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
|
||||
# Line width (don't exceed 100).
|
||||
ColumnLimit: 99
|
||||
|
||||
# Cause initializer lists to have one member initialized per line, in the case
|
||||
# that all initializers can't fit on a single line.
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
|
||||
# Indent the : after a constructor. For example:
|
||||
#
|
||||
# explicit foo_class ()
|
||||
# : member1_(5)
|
||||
# {
|
||||
# }
|
||||
#
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
|
||||
# Make access modifier slightly more visible.
|
||||
AccessModifierOffset: -1
|
||||
|
||||
# This will unfortunately use spaces in some cases where it's not desired (like
|
||||
# function calls) but the overall result is better since it will allow
|
||||
# alignment to work properly with different tab width settings.
|
||||
ContinuationIndentWidth: 4
|
||||
|
||||
# This tries to match Blender's style as much as possible. One
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping: {
|
||||
AfterClass: 'false'
|
||||
AfterControlStatement: 'false'
|
||||
AfterEnum : 'false'
|
||||
AfterFunction : 'true'
|
||||
AfterNamespace : 'false'
|
||||
AfterStruct : 'false'
|
||||
AfterUnion : 'false'
|
||||
BeforeCatch : 'true'
|
||||
BeforeElse : 'true'
|
||||
IndentBraces : 'false'
|
||||
AfterObjCDeclaration: 'true'
|
||||
}
|
||||
|
||||
# For switch statements, indent the cases.
|
||||
IndentCaseLabels: true
|
||||
|
||||
# Indent after the hash inside preprocessor directives
|
||||
IndentPPDirectives: AfterHash
|
||||
|
||||
BreakBeforeTernaryOperators: false
|
||||
|
||||
SpaceAfterTemplateKeyword: false
|
||||
|
||||
# Handy comment at the end of each C++ name space.
|
||||
FixNamespaceComments: true
|
||||
|
||||
# Use "if (...)" instead of "if(...)", but have function calls like foo().
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
|
||||
# Use two spaces before trailing comments, for example
|
||||
#
|
||||
# foo = bar; // comment
|
||||
#
|
||||
# Note that this doesn't work for C-style comments.
|
||||
SpacesBeforeTrailingComments: 2
|
||||
|
||||
# Reflow comments, developers must disable formatting as with code to override this.
|
||||
ReflowComments: true
|
||||
|
||||
# Never use tabs for indentation.
|
||||
# Note: TabWidth and IndentWidth must be the same, or strange things happen.
|
||||
UseTab: Never
|
||||
TabWidth: 2
|
||||
IndentWidth: 2
|
||||
|
||||
# Add a big penalty on breaking after the return type of functions. For example,
|
||||
#
|
||||
# static void foo(...)
|
||||
#
|
||||
# Instead of:
|
||||
#
|
||||
# static void
|
||||
# foo(very long content here that maybe could be stacked)
|
||||
#
|
||||
PenaltyReturnTypeOnItsOwnLine: 10000
|
||||
|
||||
# Avoid having function calls broken onto a new line:
|
||||
#
|
||||
# int a = foo(
|
||||
# long, list, of, many, params);
|
||||
#
|
||||
# Instead of:
|
||||
#
|
||||
# int a =
|
||||
# foo(long, list, of, many, params);
|
||||
#
|
||||
PenaltyBreakAssignment: 100
|
||||
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
|
||||
# Disable for now since it complicates initial migration tests,
|
||||
# TODO: look into enabling this in the future.
|
||||
SortIncludes: false
|
||||
|
||||
# Don't right align escaped newlines to the right because we have a wide default
|
||||
AlignEscapedNewlines: DontAlign
|
||||
|
||||
# Always break:
|
||||
#
|
||||
# const char *foo =
|
||||
# "multi"
|
||||
# "line";
|
||||
#
|
||||
# Instead of:
|
||||
#
|
||||
# const char *foo = "multi"
|
||||
# "line";
|
||||
#
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
|
||||
# We don't want literal strings to break,
|
||||
# however clang-format seems to ignore this (sigh).
|
||||
PenaltyBreakString: 1000000
|
||||
|
||||
# There are macros in Blender for custom for loops; tell Clang to treat them
|
||||
# like loops rather than an expression, and so put the { on the same line.
|
||||
#
|
||||
# To find these use multi-line regex search:
|
||||
# "^\s+[A-Z][A-Z0-9_]+\s*\([^\n]*\)\n\s*\{"
|
||||
ForEachMacros:
|
||||
- BEGIN_ANIMFILTER_SUBCHANNELS
|
||||
- BLI_FOREACH_SPARSE_RANGE
|
||||
- BLI_SMALLSTACK_ITER_BEGIN
|
||||
- BMO_ITER
|
||||
- BMO_ITER_INDEX
|
||||
- BMW_ITER
|
||||
- BM_FACES_OF_VERT_ITER_BEGIN
|
||||
- BM_ITER_BPY_BM_SEQ
|
||||
- BM_ITER_ELEM
|
||||
- BM_ITER_ELEM_INDEX
|
||||
- BM_ITER_MESH
|
||||
- BM_ITER_MESH_INDEX
|
||||
- BM_ITER_MESH_MUTABLE
|
||||
- BM_LOOPS_OF_VERT_ITER_BEGIN
|
||||
- BOOST_FOREACH
|
||||
- CTX_DATA_BEGIN
|
||||
- CTX_DATA_BEGIN_WITH_ID
|
||||
- DEG_OBJECT_ITER_BEGIN
|
||||
- DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN
|
||||
- DRIVER_TARGETS_LOOPER_BEGIN
|
||||
- DRIVER_TARGETS_USED_LOOPER_BEGIN
|
||||
- FOREACH_BASE_IN_EDIT_MODE_BEGIN
|
||||
- FOREACH_BASE_IN_MODE_BEGIN
|
||||
- FOREACH_BEGIN
|
||||
- FOREACH_COLLECTION_BEGIN
|
||||
- FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN
|
||||
- FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN
|
||||
- FOREACH_EDIT_OBJECT_BEGIN
|
||||
- FOREACH_MAIN_ID_BEGIN
|
||||
- FOREACH_MAIN_LISTBASE_BEGIN
|
||||
- FOREACH_MAIN_LISTBASE_ID_BEGIN
|
||||
- FOREACH_NODETREE_BEGIN
|
||||
- FOREACH_OBJECT_BEGIN
|
||||
- FOREACH_OBJECT_FLAG_BEGIN
|
||||
- FOREACH_OBJECT_IN_EDIT_MODE_BEGIN
|
||||
- FOREACH_OBJECT_IN_MODE_BEGIN
|
||||
- FOREACH_OBJECT_RENDERABLE_BEGIN
|
||||
- FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN
|
||||
- FOREACH_PCHAN_VISIBLE_IN_OBJECT_BEGIN
|
||||
- FOREACH_SCENE_COLLECTION_BEGIN
|
||||
- FOREACH_SCENE_OBJECT_BEGIN
|
||||
- FOREACH_SELECTED_BASE_BEGIN
|
||||
- FOREACH_SELECTED_EDITABLE_OBJECT_BEGIN
|
||||
- FOREACH_SELECTED_OBJECT_BEGIN
|
||||
- FOREACH_TRANS_DATA_CONTAINER
|
||||
- FOREACH_VIEW_LAYER_TO_RENDER_BEGIN
|
||||
- FOREACH_VISIBLE_BASE_BEGIN
|
||||
- FOREACH_VISIBLE_OBJECT_BEGIN
|
||||
- GHASH_FOREACH_BEGIN
|
||||
- GHASH_ITER
|
||||
- GHASH_ITER_INDEX
|
||||
- GPU_SELECT_LOAD_IF_PICKSEL_LIST
|
||||
- GP_EDITABLE_STROKES_BEGIN
|
||||
- GSET_FOREACH_BEGIN
|
||||
- GSET_ITER
|
||||
- GSET_ITER_INDEX
|
||||
- ITER_BEGIN
|
||||
- ITER_PIXELS
|
||||
- ITER_SLOTS
|
||||
- LISTBASE_CIRCULAR_BACKWARD_BEGIN
|
||||
- LISTBASE_CIRCULAR_FORWARD_BEGIN
|
||||
- LISTBASE_FOREACH
|
||||
- LISTBASE_FOREACH_MUTABLE
|
||||
- MAN2D_ITER_AXES_BEGIN
|
||||
- MAN_ITER_AXES_BEGIN
|
||||
- NODE_INSTANCE_HASH_ITER
|
||||
- NODE_SOCKET_TYPES_BEGIN
|
||||
- NODE_TREE_TYPES_BEGIN
|
||||
- NODE_TYPES_BEGIN
|
||||
- PIXEL_LOOPER_BEGIN
|
||||
- PIXEL_LOOPER_BEGIN_CHANNELS
|
||||
- RNA_BEGIN
|
||||
- RNA_PROP_BEGIN
|
||||
- RNA_STRUCT_BEGIN
|
||||
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
|
||||
- SEQP_BEGIN
|
||||
- SEQ_BEGIN
|
||||
- foreach
|
||||
|
||||
# Use once we bump the minimum verison to version 8.
|
||||
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).
|
||||
# StatementMacros:
|
||||
# - PyObject_VAR_HEAD
|
||||
# - STRINGIFY
|
@@ -3,18 +3,18 @@
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
max_line_length = 99
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
max_line_length = 120
|
||||
|
||||
# CMake & Text
|
||||
[*.{cmake,txt}]
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
max_line_length = 99
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
max_line_length = 120
|
||||
|
||||
# Python
|
||||
[*.py]
|
||||
@@ -30,9 +30,9 @@ max_line_length = 120
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
max_line_length = 99
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
max_line_length = 120
|
||||
|
||||
# reStructuredText
|
||||
[*.rst]
|
||||
|
8
.gitmodules
vendored
8
.gitmodules
vendored
@@ -1,20 +1,20 @@
|
||||
[submodule "release/scripts/addons"]
|
||||
path = release/scripts/addons
|
||||
url = ../blender-addons.git
|
||||
branch = master
|
||||
ignore = all
|
||||
branch = blender2.7
|
||||
[submodule "release/scripts/addons_contrib"]
|
||||
path = release/scripts/addons_contrib
|
||||
url = ../blender-addons-contrib.git
|
||||
branch = master
|
||||
ignore = all
|
||||
branch = blender2.7
|
||||
[submodule "release/datafiles/locale"]
|
||||
path = release/datafiles/locale
|
||||
url = ../blender-translations.git
|
||||
branch = master
|
||||
ignore = all
|
||||
branch = master
|
||||
[submodule "source/tools"]
|
||||
path = source/tools
|
||||
url = ../blender-dev-tools.git
|
||||
branch = master
|
||||
ignore = all
|
||||
branch = master
|
||||
|
291
CMakeLists.txt
291
CMakeLists.txt
@@ -16,6 +16,11 @@
|
||||
#
|
||||
# The Original Code is Copyright (C) 2006, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): Jacques Beaurain.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -166,6 +171,7 @@ option_defaults_init(
|
||||
_init_OPENCOLORIO
|
||||
_init_SDL
|
||||
_init_FFTW3
|
||||
_init_GAMEENGINE
|
||||
_init_OPENSUBDIV
|
||||
)
|
||||
|
||||
@@ -186,6 +192,7 @@ elseif(WIN32)
|
||||
set(_init_JACK OFF)
|
||||
elseif(APPLE)
|
||||
set(_init_JACK OFF)
|
||||
set(_init_OPENSUBDIV OFF)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -233,6 +240,13 @@ option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and
|
||||
option(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
|
||||
option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" )
|
||||
mark_as_advanced(WITH_SYSTEM_BULLET)
|
||||
option(WITH_GAMEENGINE "Enable Game Engine" ${_init_GAMEENGINE})
|
||||
if(APPLE)
|
||||
set(WITH_GAMEENGINE_DECKLINK OFF)
|
||||
else()
|
||||
option(WITH_GAMEENGINE_DECKLINK "Support BlackMagicDesign DeckLink cards in the Game Engine" ON)
|
||||
endif()
|
||||
option(WITH_PLAYER "Build Player" OFF)
|
||||
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
|
||||
|
||||
# Compositor
|
||||
@@ -313,6 +327,7 @@ option(WITH_IMAGE_TIFF "Enable LibTIFF Support" ON)
|
||||
option(WITH_IMAGE_DDS "Enable DDS Image Support" ON)
|
||||
option(WITH_IMAGE_CINEON "Enable CINEON and DPX Image Support" ON)
|
||||
option(WITH_IMAGE_HDR "Enable HDR Image Support" ON)
|
||||
option(WITH_IMAGE_FRAMESERVER "Enable image FrameServer Support for rendering" ON)
|
||||
|
||||
# Audio/Video format support
|
||||
option(WITH_CODEC_AVI "Enable Blenders own AVI file support (raw/jpeg)" ON)
|
||||
@@ -344,7 +359,6 @@ option(WITH_LZMA "Enable best LZMA compression, (used for pointcache)"
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_SYSTEM_LZO "Use the system LZO library" OFF)
|
||||
endif()
|
||||
option(WITH_DRACO "Enable Draco mesh compression Python module (used for glTF)" ON)
|
||||
|
||||
# Camera/motion tracking
|
||||
option(WITH_LIBMV "Enable Libmv structure from motion library" ON)
|
||||
@@ -376,16 +390,10 @@ if(UNIX AND NOT APPLE)
|
||||
endif()
|
||||
|
||||
option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON)
|
||||
if(WIN32 OR APPLE)
|
||||
# Windows and macOS have this bundled with Python libraries.
|
||||
elseif(WITH_PYTHON_INSTALL OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
|
||||
set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module")
|
||||
mark_as_advanced(PYTHON_NUMPY_PATH)
|
||||
set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
|
||||
mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
|
||||
endif()
|
||||
if(WITH_PYTHON_INSTALL)
|
||||
option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON)
|
||||
set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module")
|
||||
mark_as_advanced(PYTHON_NUMPY_PATH)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON)
|
||||
@@ -468,18 +476,28 @@ endif()
|
||||
|
||||
# OpenGL
|
||||
|
||||
option(WITH_OPENGL "When off limits visibility of the opengl headers to just bf_gpu and gawain (temporary option for development purposes)" ON)
|
||||
option(WITH_GLEW_MX "Support multiple GLEW contexts (experimental)" OFF )
|
||||
option(WITH_GLEW_ES "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF)
|
||||
option(WITH_GL_EGL "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL, glX, or WGL)" OFF)
|
||||
option(WITH_GL_PROFILE_COMPAT "Support using the OpenGL 'compatibility' profile. (deprecated)" ON )
|
||||
option(WITH_GL_PROFILE_CORE "Support using the OpenGL 3.2+ 'core' profile." OFF)
|
||||
option(WITH_GL_PROFILE_ES20 "Support using OpenGL ES 2.0. (thru either EGL or the AGL/WGL/XGL 'es20' profile)" OFF)
|
||||
|
||||
mark_as_advanced(
|
||||
WITH_OPENGL
|
||||
WITH_GLEW_MX
|
||||
WITH_GLEW_ES
|
||||
WITH_GL_EGL
|
||||
WITH_GL_PROFILE_COMPAT
|
||||
WITH_GL_PROFILE_CORE
|
||||
WITH_GL_PROFILE_ES20
|
||||
)
|
||||
|
||||
if(WITH_GL_PROFILE_COMPAT)
|
||||
set(WITH_GLU ON)
|
||||
else()
|
||||
set(WITH_GLU OFF)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
option(WITH_GL_ANGLE "Link with the ANGLE library, an OpenGL ES 2.0 implementation based on Direct3D, instead of the system OpenGL library." OFF)
|
||||
mark_as_advanced(WITH_GL_ANGLE)
|
||||
@@ -544,6 +562,10 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Dependency graph
|
||||
option(WITH_LEGACY_DEPSGRAPH "Build Blender with legacy dependency graph" ON)
|
||||
mark_as_advanced(WITH_LEGACY_DEPSGRAPH)
|
||||
|
||||
if(WIN32)
|
||||
# Use hardcoded paths or find_package to find externals
|
||||
option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
|
||||
@@ -558,24 +580,13 @@ if(WIN32)
|
||||
set(WINDOWS_CODESIGN_PFX_PASSWORD CACHE STRING "password for pfx file used for codesigning.")
|
||||
mark_as_advanced(WINDOWS_CODESIGN_PFX_PASSWORD)
|
||||
|
||||
option(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS "Organize the visual studio projects according to source folder structure." ON)
|
||||
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
|
||||
|
||||
option(WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS "Organize the source files in filters matching the source folders." ON)
|
||||
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS)
|
||||
option(WINDOWS_USE_VISUAL_STUDIO_FOLDERS "Organize the visual studio project according to source folders." ON)
|
||||
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
|
||||
|
||||
option(WINDOWS_PYTHON_DEBUG "Include the files needed for debugging python scripts with visual studio 2017+." OFF)
|
||||
mark_as_advanced(WINDOWS_PYTHON_DEBUG)
|
||||
endif()
|
||||
|
||||
# The following only works with the Ninja generator in CMake >= 3.0.
|
||||
if("${CMAKE_GENERATOR}" MATCHES "Ninja")
|
||||
option(WITH_NINJA_POOL_JOBS
|
||||
"Enable Ninja pools of jobs, to try to ease building on machines with 16GB of RAM or less (if not yet defined, will try to set best values based on detected machine specifications)."
|
||||
OFF)
|
||||
mark_as_advanced(WITH_NINJA_POOL_JOBS)
|
||||
endif()
|
||||
|
||||
# avoid using again
|
||||
option_defaults_clear()
|
||||
|
||||
@@ -609,13 +620,17 @@ endif()
|
||||
#-----------------------------------------------------------------------------
|
||||
# Check for conflicting/unsupported configurations
|
||||
|
||||
if(NOT WITH_BLENDER AND NOT WITH_CYCLES_STANDALONE)
|
||||
if(NOT WITH_BLENDER AND NOT WITH_PLAYER AND NOT WITH_CYCLES_STANDALONE)
|
||||
message(FATAL_ERROR
|
||||
"At least one of WITH_BLENDER or WITH_CYCLES_STANDALONE "
|
||||
"must be enabled, nothing to do!"
|
||||
"At least one of WITH_BLENDER or WITH_PLAYER or "
|
||||
"WITH_CYCLES_STANDALONE must be enabled, nothing to do!"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
|
||||
message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
|
||||
endif()
|
||||
|
||||
if(NOT WITH_AUDASPACE)
|
||||
if(WITH_OPENAL)
|
||||
message(WARNING "WITH_OPENAL requires WITH_AUDASPACE which is disabled")
|
||||
@@ -625,6 +640,9 @@ if(NOT WITH_AUDASPACE)
|
||||
message(WARNING "WITH_JACK requires WITH_AUDASPACE which is disabled")
|
||||
set(WITH_JACK OFF)
|
||||
endif()
|
||||
if(WITH_GAMEENGINE)
|
||||
message(FATAL_ERROR "WITH_GAMEENGINE requires WITH_AUDASPACE")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT WITH_SDL AND WITH_GHOST_SDL)
|
||||
@@ -632,6 +650,10 @@ if(NOT WITH_SDL AND WITH_GHOST_SDL)
|
||||
endif()
|
||||
|
||||
# python module, needs some different options
|
||||
if(WITH_PYTHON_MODULE AND WITH_PLAYER)
|
||||
message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PLAYER to be OFF")
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON_MODULE AND WITH_PYTHON_INSTALL)
|
||||
message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF")
|
||||
endif()
|
||||
@@ -644,12 +666,6 @@ endif()
|
||||
|
||||
if(NOT WITH_PYTHON)
|
||||
set(WITH_CYCLES OFF)
|
||||
set(WITH_DRACO OFF)
|
||||
endif()
|
||||
|
||||
if(WITH_DRACO AND NOT WITH_PYTHON_INSTALL)
|
||||
message(STATUS "WITH_DRACO requires WITH_PYTHON_INSTALL to be ON, disabling WITH_DRACO for now")
|
||||
set(WITH_DRACO OFF)
|
||||
endif()
|
||||
|
||||
# enable boost for cycles, audaspace or i18n
|
||||
@@ -665,10 +681,15 @@ if(NOT WITH_BOOST)
|
||||
endmacro()
|
||||
|
||||
set_and_warn(WITH_CYCLES OFF)
|
||||
set_and_warn(WITH_AUDASPACE OFF)
|
||||
set_and_warn(WITH_INTERNATIONAL OFF)
|
||||
set_and_warn(WITH_OPENVDB OFF)
|
||||
set_and_warn(WITH_OPENCOLORIO OFF)
|
||||
elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
|
||||
|
||||
set_and_warn(WITH_OPENAL OFF) # depends on AUDASPACE
|
||||
set_and_warn(WITH_GAMEENGINE OFF) # depends on AUDASPACE
|
||||
set_and_warn(WITH_PLAYER OFF) # depends on GAMEENGINE
|
||||
elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_AUDASPACE OR WITH_INTERNATIONAL OR
|
||||
WITH_OPENVDB OR WITH_OPENCOLORIO)
|
||||
# Keep enabled
|
||||
else()
|
||||
@@ -731,16 +752,37 @@ if(WITH_BUILDINFO)
|
||||
endif()
|
||||
|
||||
if(WITH_AUDASPACE)
|
||||
if(NOT WITH_SYSTEM_AUDASPACE)
|
||||
set(AUDASPACE_C_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/audaspace/bindings/C" "${CMAKE_BINARY_DIR}/extern/audaspace")
|
||||
set(AUDASPACE_PY_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/audaspace/bindings")
|
||||
if(WITH_SYSTEM_AUDASPACE)
|
||||
set(AUDASPACE_DEFINITIONS
|
||||
-DWITH_AUDASPACE
|
||||
-DWITH_SYSTEM_AUDASPACE
|
||||
"-DAUD_DEVICE_H=<AUD_Device.h>"
|
||||
"-DAUD_SPECIAL_H=<AUD_Special.h>"
|
||||
"-DAUD_SOUND_H=<AUD_Sound.h>"
|
||||
"-DAUD_HANDLE_H=<AUD_Handle.h>"
|
||||
"-DAUD_SEQUENCE_H=<AUD_Sequence.h>"
|
||||
"-DAUD_TYPES_H=<AUD_Types.h>"
|
||||
"-DAUD_PYTHON_H=<python/PyAPI.h>"
|
||||
)
|
||||
else()
|
||||
set(AUDASPACE_C_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
|
||||
set(AUDASPACE_PY_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/intern/audaspace/intern")
|
||||
set(AUDASPACE_DEFINITIONS
|
||||
-DWITH_AUDASPACE
|
||||
"-DAUD_DEVICE_H=<AUD_C-API.h>"
|
||||
"-DAUD_SPECIAL_H=<AUD_C-API.h>"
|
||||
"-DAUD_SOUND_H=<AUD_C-API.h>"
|
||||
"-DAUD_HANDLE_H=<AUD_C-API.h>"
|
||||
"-DAUD_SEQUENCE_H=<AUD_C-API.h>"
|
||||
"-DAUD_TYPES_H=<AUD_Space.h>"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Auto-enable CUDA dynload if toolkit is not found.
|
||||
if(NOT WITH_CUDA_DYNLOAD)
|
||||
find_package(CUDA)
|
||||
if(NOT CUDA_FOUND)
|
||||
if (NOT CUDA_FOUND)
|
||||
message("CUDA toolkit not found, using dynamic runtime loading of libraries instead")
|
||||
set(WITH_CUDA_DYNLOAD ON)
|
||||
endif()
|
||||
@@ -772,8 +814,8 @@ if(WITH_PYTHON)
|
||||
# Do this before main 'platform_*' checks,
|
||||
# because UNIX will search for the old Python paths which may not exist.
|
||||
# giving errors about missing paths before this case is met.
|
||||
if(DEFINED PYTHON_VERSION AND "${PYTHON_VERSION}" VERSION_LESS "3.7")
|
||||
message(FATAL_ERROR "At least Python 3.7 is required to build")
|
||||
if(DEFINED PYTHON_VERSION AND "${PYTHON_VERSION}" VERSION_LESS "3.6")
|
||||
message(FATAL_ERROR "At least Python 3.6 is required to build")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/scripts/addons/modules")
|
||||
@@ -815,19 +857,13 @@ set(PLATFORM_LINKLIBS "")
|
||||
set(PLATFORM_LINKFLAGS "")
|
||||
set(PLATFORM_LINKFLAGS_DEBUG "")
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
if (NOT CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
if(WITH_COMPILER_ASAN)
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMPILER_ASAN_CFLAGS}")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CFLAGS}")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMPILER_ASAN_CXXFLAGS}")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CXXFLAGS}")
|
||||
if(WITH_CYCLES_OSL)
|
||||
# With OSL, Cycles disables rtti in some modules, wich then breaks at linking
|
||||
# when trying to use vptr sanitizer (included into 'undefined' general option).
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-sanitize=vptr")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-sanitize=vptr")
|
||||
endif()
|
||||
if(MSVC)
|
||||
set(COMPILER_ASAN_LINKER_FLAGS "/FUNCTIONPADMIN:6")
|
||||
endif()
|
||||
@@ -965,9 +1001,9 @@ if(MSVC)
|
||||
# for some reason this fails on msvc
|
||||
add_definitions(-D__LITTLE_ENDIAN__)
|
||||
|
||||
# OSX-Note: as we do cross-compiling with specific set architecture,
|
||||
# endianess-detection and auto-setting is counterproductive
|
||||
# so we just set endianness according CMAKE_OSX_ARCHITECTURES
|
||||
# OSX-Note: as we do cross-compiling with specific set architecture,
|
||||
# endianess-detection and auto-setting is counterproductive
|
||||
# so we just set endianness according CMAKE_OSX_ARCHITECTURES
|
||||
|
||||
elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
|
||||
add_definitions(-D__LITTLE_ENDIAN__)
|
||||
@@ -1003,15 +1039,19 @@ endif()
|
||||
find_package(OpenGL)
|
||||
blender_include_dirs_sys("${OPENGL_INCLUDE_DIR}")
|
||||
|
||||
if(WITH_OPENGL)
|
||||
add_definitions(-DWITH_OPENGL)
|
||||
if(WITH_GLU)
|
||||
list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_glu_LIBRARY}")
|
||||
list(APPEND GL_DEFINITIONS -DWITH_GLU)
|
||||
endif()
|
||||
|
||||
if(WITH_SYSTEM_GLES)
|
||||
find_package_wrapper(OpenGLES)
|
||||
endif()
|
||||
|
||||
if(WITH_GL_PROFILE_ES20)
|
||||
if(WITH_GL_PROFILE_COMPAT OR WITH_GL_PROFILE_CORE)
|
||||
list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_LIBRARIES}")
|
||||
|
||||
elseif(WITH_GL_PROFILE_ES20)
|
||||
if(WITH_SYSTEM_GLES)
|
||||
if(NOT OPENGLES_LIBRARY)
|
||||
message(FATAL_ERROR
|
||||
@@ -1071,12 +1111,6 @@ if(WITH_GL_PROFILE_ES20)
|
||||
|
||||
endif()
|
||||
|
||||
else()
|
||||
if(OpenGL_GL_PREFERENCE STREQUAL "LEGACY" AND OPENGL_gl_LIBRARY)
|
||||
list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_gl_LIBRARY})
|
||||
else()
|
||||
list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_opengl_LIBRARY} ${OPENGL_glx_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_GL_EGL)
|
||||
@@ -1124,10 +1158,16 @@ if(WITH_GL_EGL)
|
||||
|
||||
endif()
|
||||
|
||||
if(WITH_GL_PROFILE_COMPAT)
|
||||
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_COMPAT)
|
||||
endif()
|
||||
|
||||
if(WITH_GL_PROFILE_CORE)
|
||||
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
|
||||
endif()
|
||||
|
||||
if(WITH_GL_PROFILE_ES20)
|
||||
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_ES20)
|
||||
else()
|
||||
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
|
||||
endif()
|
||||
|
||||
if(WITH_GL_EGL)
|
||||
@@ -1167,6 +1207,10 @@ endif()
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure GLEW
|
||||
|
||||
if(WITH_GLEW_MX)
|
||||
list(APPEND GL_DEFINITIONS -DWITH_GLEW_MX)
|
||||
endif()
|
||||
|
||||
if(WITH_SYSTEM_GLEW)
|
||||
find_package(GLEW)
|
||||
|
||||
@@ -1176,7 +1220,11 @@ if(WITH_SYSTEM_GLEW)
|
||||
message(FATAL_ERROR "GLEW is required to build Blender. Install it or disable WITH_SYSTEM_GLEW.")
|
||||
endif()
|
||||
|
||||
if(WITH_GLEW_MX)
|
||||
set(BLENDER_GLEW_LIBRARIES ${GLEW_MX_LIBRARY})
|
||||
else()
|
||||
set(BLENDER_GLEW_LIBRARIES ${GLEW_LIBRARY})
|
||||
endif()
|
||||
else()
|
||||
if(WITH_GLEW_ES)
|
||||
set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew-es/include")
|
||||
@@ -1184,11 +1232,12 @@ else()
|
||||
list(APPEND GL_DEFINITIONS -DGLEW_STATIC -DWITH_GLEW_ES)
|
||||
|
||||
# These definitions remove APIs from glew.h, making GLEW smaller, and catching unguarded API usage
|
||||
if(WITH_GL_PROFILE_ES20)
|
||||
list(APPEND GL_DEFINITIONS -DGLEW_ES_ONLY)
|
||||
else()
|
||||
if(NOT WITH_GL_PROFILE_ES20)
|
||||
# No ES functions are needed
|
||||
list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
|
||||
elseif(NOT (WITH_GL_PROFILE_CORE OR WITH_GL_PROFILE_COMPAT))
|
||||
# ES is enabled, but the other functions are all disabled
|
||||
list(APPEND GL_DEFINITIONS -DGLEW_ES_ONLY)
|
||||
endif()
|
||||
|
||||
if(WITH_GL_PROFILE_ES20)
|
||||
@@ -1225,7 +1274,9 @@ else()
|
||||
|
||||
endif()
|
||||
|
||||
list(APPEND GL_DEFINITIONS -DGLEW_NO_GLU)
|
||||
if(NOT WITH_GLU)
|
||||
list(APPEND GL_DEFINITIONS -DGLEW_NO_GLU)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Configure Bullet
|
||||
@@ -1297,76 +1348,6 @@ if(WITH_LIBMV)
|
||||
set(CERES_DEFINES -DCERES_STD_UNORDERED_MAP)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Extra limits to number of jobs running in parallel for some kind os tasks.
|
||||
# Only supported by Ninja build system currently.
|
||||
if("${CMAKE_GENERATOR}" MATCHES "Ninja" AND WITH_NINJA_POOL_JOBS)
|
||||
if(NOT NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS AND
|
||||
NOT NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS AND
|
||||
NOT NINJA_MAX_NUM_PARALLEL_LINK_JOBS)
|
||||
# Try to define good default values.
|
||||
# Max mem of heavy cpp files compilation: about 2.5GB
|
||||
# Max mem during linking: about 3.3GB
|
||||
cmake_host_system_information(RESULT _NUM_CORES QUERY NUMBER_OF_LOGICAL_CORES)
|
||||
# Note: this gives mem in MB.
|
||||
cmake_host_system_information(RESULT _TOT_MEM QUERY TOTAL_PHYSICAL_MEMORY)
|
||||
|
||||
# Heuristics... the more cores we have, the more free mem we have to keep for the non-heavy tasks too.
|
||||
if(${_TOT_MEM} LESS 8000 AND ${_NUM_CORES} GREATER 2)
|
||||
set(_compile_heavy_jobs "1")
|
||||
elseif(${_TOT_MEM} LESS 16000 AND ${_NUM_CORES} GREATER 4)
|
||||
set(_compile_heavy_jobs "2")
|
||||
elseif(${_TOT_MEM} LESS 24000 AND ${_NUM_CORES} GREATER 8)
|
||||
set(_compile_heavy_jobs "3")
|
||||
elseif(${_TOT_MEM} LESS 32000 AND ${_NUM_CORES} GREATER 16)
|
||||
set(_compile_heavy_jobs "4")
|
||||
elseif(${_TOT_MEM} LESS 64000 AND ${_NUM_CORES} GREATER 32)
|
||||
set(_compile_heavy_jobs "8")
|
||||
else()
|
||||
set(_compile_heavy_jobs "")
|
||||
endif()
|
||||
|
||||
set(NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS "${_compile_heavy_jobs}" CACHE STRING
|
||||
"Define the maximum number of concurrent heavy compilation jobs, for ninja build system (used for some targets which cpp files can take several GB each during compilation)." FORCE)
|
||||
mark_as_advanced(NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS)
|
||||
set(_compile_heavy_jobs)
|
||||
|
||||
# Only set regular compile jobs if we set heavy jobs, otherwise default (using all cores) if fine.
|
||||
if(NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS)
|
||||
math(EXPR _compile_jobs "${_NUM_CORES} - 1")
|
||||
else()
|
||||
set(_compile_jobs "")
|
||||
endif()
|
||||
set(NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS "${_compile_jobs}" CACHE STRING
|
||||
"Define the maximum number of concurrent compilation jobs, for ninja build system." FORCE)
|
||||
mark_as_advanced(NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS)
|
||||
set(_compile_jobs)
|
||||
|
||||
# In practice, even when there is RAM available, this proves to be quicker than running in parallel
|
||||
# (due to slow disks accesses).
|
||||
set(NINJA_MAX_NUM_PARALLEL_LINK_JOBS "1" CACHE STRING
|
||||
"Define the maximum number of concurrent link jobs, for ninja build system." FORCE)
|
||||
mark_as_advanced(NINJA_MAX_NUM_PARALLEL_LINK_JOBS)
|
||||
|
||||
set(_NUM_CORES)
|
||||
set(_TOT_MEM)
|
||||
endif()
|
||||
|
||||
if(NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS)
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS})
|
||||
set(CMAKE_JOB_POOL_COMPILE compile_job_pool)
|
||||
endif()
|
||||
|
||||
if(NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS)
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_heavy_job_pool=${NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS})
|
||||
endif()
|
||||
|
||||
if(NINJA_MAX_NUM_PARALLEL_LINK_JOBS)
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${NINJA_MAX_NUM_PARALLEL_LINK_JOBS})
|
||||
set(CMAKE_JOB_POOL_LINK link_job_pool)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Extra compile flags
|
||||
|
||||
@@ -1464,8 +1445,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_SWITCH -Wno-switch)
|
||||
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CLASS_MEMACCESS -Wno-class-memaccess)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT -Wno-comment)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS -Wno-unused-local-typedefs)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0"))
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_IMPLICIT_FALLTHROUGH -Wno-implicit-fallthrough)
|
||||
@@ -1518,8 +1497,6 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT -Wno-comment)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS -Wno-unused-local-typedefs)
|
||||
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
|
||||
@@ -1555,7 +1532,6 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||
"/wd4800" # forcing value to bool 'true' or 'false'
|
||||
"/wd4828" # The file contains a character that is illegal
|
||||
"/wd4996" # identifier was declared deprecated
|
||||
"/wd4661" # no suitable definition provided for explicit template instantiation request
|
||||
# errors:
|
||||
"/we4013" # 'function' undefined; assuming extern returning int
|
||||
"/we4133" # incompatible pointer types
|
||||
@@ -1587,14 +1563,9 @@ if(WITH_PYTHON)
|
||||
endif()
|
||||
|
||||
if(WIN32 OR APPLE)
|
||||
# Windows and macOS have this bundled with Python libraries.
|
||||
elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE))
|
||||
if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND))
|
||||
# pass, we have this in an archive to extract
|
||||
elseif(WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY)
|
||||
find_python_package(numpy)
|
||||
unset(PYTHON_NUMPY_INCLUDE_DIRS CACHE)
|
||||
set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module")
|
||||
mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32 OR APPLE)
|
||||
@@ -1624,8 +1595,12 @@ if(
|
||||
(CMAKE_C_COMPILER_ID MATCHES "Clang" AND (NOT MSVC)) OR
|
||||
(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
)
|
||||
# Use C11 + GNU extensions, works with GCC, Clang, ICC
|
||||
# Use C99 + GNU extensions, works with GCC, Clang, ICC
|
||||
if(WITH_C11)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Include warnings first, so its possible to disable them with user defined flags
|
||||
@@ -1673,7 +1648,7 @@ if(WITH_GTESTS)
|
||||
include(GTestTesting)
|
||||
endif()
|
||||
|
||||
if(WITH_BLENDER)
|
||||
if(WITH_BLENDER OR WITH_PLAYER)
|
||||
add_subdirectory(intern)
|
||||
add_subdirectory(extern)
|
||||
|
||||
@@ -1699,13 +1674,15 @@ endif()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Testing
|
||||
add_subdirectory(tests)
|
||||
# Blender Player
|
||||
if(WITH_PLAYER)
|
||||
add_subdirectory(source/blenderplayer)
|
||||
endif()
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Define 'heavy' submodules (for Ninja builder when using pools).
|
||||
setup_heavy_lib_pool()
|
||||
# Testing
|
||||
add_subdirectory(tests)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -1717,6 +1694,9 @@ include(build_files/cmake/packaging.cmake)
|
||||
if(WITH_BLENDER)
|
||||
openmp_delayload(blender)
|
||||
endif()
|
||||
if(WITH_PLAYER)
|
||||
openmp_delayload(blenderplayer)
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Print Final Configuration
|
||||
@@ -1750,6 +1730,8 @@ if(FIRST_RUN)
|
||||
message(STATUS "C++ Compiler: \"${CMAKE_CXX_COMPILER_ID}\"")
|
||||
|
||||
info_cfg_text("Build Options:")
|
||||
info_cfg_option(WITH_GAMEENGINE)
|
||||
info_cfg_option(WITH_PLAYER)
|
||||
info_cfg_option(WITH_BULLET)
|
||||
info_cfg_option(WITH_IK_SOLVER)
|
||||
info_cfg_option(WITH_IK_ITASC)
|
||||
@@ -1817,7 +1799,10 @@ if(FIRST_RUN)
|
||||
|
||||
info_cfg_text("OpenGL:")
|
||||
info_cfg_option(WITH_GLEW_ES)
|
||||
info_cfg_option(WITH_GLU)
|
||||
info_cfg_option(WITH_GL_EGL)
|
||||
info_cfg_option(WITH_GL_PROFILE_COMPAT)
|
||||
info_cfg_option(WITH_GL_PROFILE_CORE)
|
||||
info_cfg_option(WITH_GL_PROFILE_ES20)
|
||||
if(WIN32)
|
||||
info_cfg_option(WITH_GL_ANGLE)
|
||||
|
248
GNUmakefile
248
GNUmakefile
@@ -24,138 +24,11 @@
|
||||
# ../build_linux_i386
|
||||
# This is for users who like to configure & build blender with a single command.
|
||||
|
||||
define HELP_TEXT
|
||||
|
||||
Convenience Targets
|
||||
Provided for building Blender, (multiple at once can be used).
|
||||
|
||||
* debug: Build a debug binary.
|
||||
* full: Enable all supported dependencies & options.
|
||||
* lite: Disable non essential features for a smaller binary and faster build.
|
||||
* headless: Build without an interface (renderfarm or server automation).
|
||||
* cycles: Build Cycles standalone only, without Blender.
|
||||
* bpy: Build as a python module which can be loaded from python directly.
|
||||
* deps: Build library dependencies (intended only for platform maintainers).
|
||||
|
||||
* config: Run cmake configuration tool to set build options.
|
||||
|
||||
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir.
|
||||
Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments.
|
||||
|
||||
|
||||
Project Files
|
||||
Generate poject files for development environments.
|
||||
|
||||
* project_qtcreator: QtCreator Project Files.
|
||||
* project_netbeans: NetBeans Project Files.
|
||||
* project_eclipse: Eclipse CDT4 Project Files.
|
||||
|
||||
Package Targets
|
||||
|
||||
* package_debian: Build a debian package.
|
||||
* package_pacman: Build an arch linux pacman package.
|
||||
* package_archive: Build an archive package.
|
||||
|
||||
Testing Targets
|
||||
Not associated with building Blender.
|
||||
|
||||
* test:
|
||||
Run ctest, currently tests import/export,
|
||||
operator execution and that python modules load
|
||||
* test_cmake:
|
||||
Runs our own cmake file checker
|
||||
which detects errors in the cmake file list definitions
|
||||
* test_pep8:
|
||||
Checks all python script are pep8
|
||||
which are tagged to use the stricter formatting
|
||||
* test_deprecated:
|
||||
Checks for deprecation tags in our code which may need to be removed
|
||||
* test_style_c:
|
||||
Checks C/C++ conforms with blenders style guide:
|
||||
https://wiki.blender.org/wiki/Source/Code_Style
|
||||
* test_style_c_qtc:
|
||||
Same as test_style but outputs QtCreator tasks format
|
||||
* test_style_osl:
|
||||
Checks OpenShadingLanguage conforms with blenders style guide:
|
||||
https://wiki.blender.org/wiki/Source/Code_Style
|
||||
* test_style_osl_qtc:
|
||||
Checks OpenShadingLanguage conforms with blenders style guide:
|
||||
https://wiki.blender.org/wiki/Source/Code_Style
|
||||
|
||||
Static Source Code Checking
|
||||
Not associated with building Blender.
|
||||
|
||||
* check_cppcheck: Run blender source through cppcheck (C & C++).
|
||||
* check_clang_array: Run blender source through clang array checking script (C & C++).
|
||||
* check_splint: Run blenders source through splint (C only).
|
||||
* check_sparse: Run blenders source through sparse (C only).
|
||||
* check_smatch: Run blenders source through smatch (C only).
|
||||
* check_spelling_c: Check for spelling errors (C/C++ only).
|
||||
* check_spelling_c_qtc: Same as check_spelling_c but outputs QtCreator tasks format.
|
||||
* check_spelling_osl: Check for spelling errors (OSL only).
|
||||
* check_spelling_py: Check for spelling errors (Python only).
|
||||
* check_descriptions: Check for duplicate/invalid descriptions.
|
||||
|
||||
Utilities
|
||||
Not associated with building Blender.
|
||||
|
||||
* icons:
|
||||
Updates PNG icons from SVG files.
|
||||
|
||||
Optionally pass in variables: 'BLENDER_BIN', 'INKSCAPE_BIN'
|
||||
otherwise default paths are used.
|
||||
|
||||
Example
|
||||
make icons INKSCAPE_BIN=/path/to/inkscape
|
||||
|
||||
* icons_geom:
|
||||
Updates Geometry icons from BLEND file.
|
||||
|
||||
Optionally pass in variable: 'BLENDER_BIN'
|
||||
otherwise default paths are used.
|
||||
|
||||
Example
|
||||
make icons_geom BLENDER_BIN=/path/to/blender
|
||||
|
||||
* tgz:
|
||||
Create a compressed archive of the source code.
|
||||
|
||||
* update:
|
||||
updates git and all submodules
|
||||
|
||||
* format
|
||||
Format source code using clang (uses PATHS if passed in). For example::
|
||||
|
||||
make format PATHS="source/blender/blenlib source/blender/blenkernel"
|
||||
|
||||
Environment Variables
|
||||
|
||||
* BUILD_CMAKE_ARGS: Arguments passed to CMake.
|
||||
* BUILD_DIR: Override default build path.
|
||||
* PYTHON: Use this for the Python command (used for checking tools).
|
||||
* NPROCS: Number of processes to use building (auto-detect when omitted).
|
||||
|
||||
Documentation Targets
|
||||
Not associated with building Blender.
|
||||
|
||||
* doc_py: Generate sphinx python api docs.
|
||||
* doc_doxy: Generate doxygen C/C++ docs.
|
||||
* doc_dna: Generate blender file format reference.
|
||||
* doc_man: Generate manpage.
|
||||
|
||||
Information
|
||||
|
||||
* help: This help message.
|
||||
* help_features: Show a list of optional features when building.
|
||||
|
||||
endef
|
||||
# HELP_TEXT (end)
|
||||
|
||||
|
||||
# System Vars
|
||||
OS:=$(shell uname -s)
|
||||
OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]')
|
||||
CPU:=$(shell uname -m)
|
||||
# CPU:=$(shell uname -m) # UNUSED
|
||||
|
||||
|
||||
# Source and Build DIR's
|
||||
@@ -172,18 +45,12 @@ endif
|
||||
|
||||
# Dependencies DIR's
|
||||
DEPS_SOURCE_DIR:=$(BLENDER_DIR)/build_files/build_environment
|
||||
DEPS_BUILD_DIR:=$(BUILD_DIR)/deps
|
||||
DEPS_INSTALL_DIR:=$(shell dirname "$(BLENDER_DIR)")/lib/$(OS_NCASE)
|
||||
|
||||
ifndef DEPS_BUILD_DIR
|
||||
DEPS_BUILD_DIR:=$(BUILD_DIR)/deps
|
||||
endif
|
||||
|
||||
ifndef DEPS_INSTALL_DIR
|
||||
DEPS_INSTALL_DIR:=$(shell dirname "$(BLENDER_DIR)")/lib/$(OS_NCASE)
|
||||
|
||||
ifneq ($(OS_NCASE),darwin)
|
||||
ifneq ($(OS_NCASE),darwin)
|
||||
# Add processor type to directory name
|
||||
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(CPU)
|
||||
endif
|
||||
DEPS_INSTALL_DIR:=$(DEPS_INSTALL_DIR)_$(shell uname -p)
|
||||
endif
|
||||
|
||||
# Allow to use alternative binary (pypy3, etc)
|
||||
@@ -225,12 +92,10 @@ endif
|
||||
# -----------------------------------------------------------------------------
|
||||
# Blender binary path
|
||||
|
||||
# Allow passing in own BLENDER_BIN so developers who don't
|
||||
# use the default build path can still use utility helpers.
|
||||
ifeq ($(OS), Darwin)
|
||||
BLENDER_BIN?="$(BUILD_DIR)/bin/Blender.app/Contents/MacOS/Blender"
|
||||
BLENDER_BIN="$(BUILD_DIR)/bin/blender.app/Contents/MacOS/blender"
|
||||
else
|
||||
BLENDER_BIN?="$(BUILD_DIR)/bin/blender"
|
||||
BLENDER_BIN="$(BUILD_DIR)/bin/blender"
|
||||
endif
|
||||
|
||||
|
||||
@@ -325,9 +190,84 @@ config: .FORCE
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Help for build targets
|
||||
export HELP_TEXT
|
||||
help: .FORCE
|
||||
@echo "$$HELP_TEXT"
|
||||
@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"
|
||||
@echo " * bpy - build as a python module which can be loaded from python directly"
|
||||
@echo " * deps - build library dependencies (intended only for platform maintainers)"
|
||||
@echo ""
|
||||
@echo " * config - run cmake configuration tool to set build options"
|
||||
@echo ""
|
||||
@echo " Note, passing the argument 'BUILD_DIR=path' when calling make will override the default build dir."
|
||||
@echo " Note, passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments."
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo "Project Files for IDE's"
|
||||
@echo " * project_qtcreator - QtCreator Project Files"
|
||||
@echo " * project_netbeans - NetBeans Project Files"
|
||||
@echo " * project_eclipse - Eclipse CDT4 Project Files"
|
||||
@echo ""
|
||||
@echo "Package Targets"
|
||||
@echo " * package_debian - build a debian package"
|
||||
@echo " * package_pacman - build an arch linux pacman package"
|
||||
@echo " * package_archive - build an archive package"
|
||||
@echo ""
|
||||
@echo "Testing Targets (not associated with building blender)"
|
||||
@echo " * test - run ctest, currently tests import/export,"
|
||||
@echo " operator execution and that python modules load"
|
||||
@echo " * test_cmake - runs our own cmake file checker"
|
||||
@echo " which detects errors in the cmake file list definitions"
|
||||
@echo " * test_pep8 - checks all python script are pep8"
|
||||
@echo " which are tagged to use the stricter formatting"
|
||||
@echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed"
|
||||
@echo " * test_style_c - checks C/C++ conforms with blenders style guide:"
|
||||
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo " * test_style_c_qtc - same as test_style but outputs QtCreator tasks format"
|
||||
@echo " * test_style_osl - checks OpenShadingLanguage conforms with blenders style guide:"
|
||||
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo " * test_style_osl_qtc - checks OpenShadingLanguage conforms with blenders style guide:"
|
||||
@echo " http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo ""
|
||||
@echo "Static Source Code Checking (not associated with building blender)"
|
||||
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
|
||||
@echo " * check_clang_array - run blender source through clang array checking script (C & C++)"
|
||||
@echo " * check_splint - run blenders source through splint (C only)"
|
||||
@echo " * check_sparse - run blenders source through sparse (C only)"
|
||||
@echo " * check_smatch - run blenders source through smatch (C only)"
|
||||
@echo " * check_spelling_c - check for spelling errors (C/C++ only)"
|
||||
@echo " * check_spelling_c_qtc - same as check_spelling_c but outputs QtCreator tasks format"
|
||||
@echo " * check_spelling_osl - check for spelling errors (OSL only)"
|
||||
@echo " * check_spelling_py - check for spelling errors (Python only)"
|
||||
@echo " * check_descriptions - check for duplicate/invalid descriptions"
|
||||
@echo ""
|
||||
@echo "Utilities (not associated with building blender)"
|
||||
@echo " * icons - Updates PNG icons from SVG files."
|
||||
@echo " Set environment variables 'BLENDER_BIN' and 'INKSCAPE_BIN'"
|
||||
@echo " to define your own commands."
|
||||
@echo " * tgz - create a compressed archive of the source code."
|
||||
@echo " * update - updates git and all submodules"
|
||||
@echo ""
|
||||
@echo "Environment Variables"
|
||||
@echo " * BUILD_CMAKE_ARGS - arguments passed to CMake."
|
||||
@echo " * BUILD_DIR - override default build path."
|
||||
@echo " * PYTHON - use this for the Python command (used for checking tools)."
|
||||
@echo " * NPROCS - number of processes to use building (auto-detect when omitted)."
|
||||
@echo ""
|
||||
@echo "Documentation Targets (not associated with building blender)"
|
||||
@echo " * doc_py - generate sphinx python api docs"
|
||||
@echo " * doc_doxy - generate doxygen C/C++ docs"
|
||||
@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"
|
||||
@echo ""
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Packages
|
||||
@@ -408,7 +348,7 @@ test_style_osl_qtc: .FORCE
|
||||
#
|
||||
|
||||
project_qtcreator: .FORCE
|
||||
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py --build-dir "$(BUILD_DIR)"
|
||||
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
|
||||
|
||||
project_netbeans: .FORCE
|
||||
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
|
||||
@@ -491,17 +431,10 @@ check_descriptions: .FORCE
|
||||
tgz: .FORCE
|
||||
./build_files/utils/build_tgz.sh
|
||||
|
||||
INKSCAPE_BIN?="inkscape"
|
||||
icons: .FORCE
|
||||
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
|
||||
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
|
||||
BLENDER_BIN=$(BLENDER_BIN) INKSCAPE_BIN=$(INKSCAPE_BIN) \
|
||||
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
|
||||
|
||||
icons_geom: .FORCE
|
||||
BLENDER_BIN=$(BLENDER_BIN) \
|
||||
"$(BLENDER_DIR)/release/datafiles/blender_icons_geom_update.py"
|
||||
|
||||
update: .FORCE
|
||||
if [ "$(OS_NCASE)" = "darwin" ] && [ ! -d "../lib/$(OS_NCASE)" ]; then \
|
||||
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/$(OS_NCASE) ../lib/$(OS_NCASE) ; \
|
||||
@@ -512,12 +445,9 @@ update: .FORCE
|
||||
fi
|
||||
git pull --rebase
|
||||
git submodule update --init --recursive
|
||||
git submodule foreach git checkout master
|
||||
git submodule foreach git pull --rebase origin master
|
||||
|
||||
format: .FORCE
|
||||
PATH="../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
|
||||
python3 source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
|
||||
# Use blender2.7 branch for submodules that have it.
|
||||
git submodule foreach "git checkout blender2.7 || git checkout master"
|
||||
git submodule foreach git pull --rebase origin
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@@ -530,7 +460,7 @@ doc_py: .FORCE
|
||||
$(BLENDER_BIN) --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/index.html'"
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
|
||||
|
||||
doc_doxy: .FORCE
|
||||
cd doc/doxygen; doxygen Doxyfile
|
||||
|
@@ -91,11 +91,7 @@ include(cmake/openvdb.cmake)
|
||||
include(cmake/python.cmake)
|
||||
include(cmake/python_site_packages.cmake)
|
||||
include(cmake/numpy.cmake)
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Rely on PugiXML compiled with OpenImageIO
|
||||
else()
|
||||
include(cmake/pugixml.cmake)
|
||||
endif()
|
||||
include(cmake/pugixml.cmake)
|
||||
|
||||
if(WITH_WEBP)
|
||||
include(cmake/webp.cmake)
|
||||
|
@@ -58,7 +58,7 @@ if(WIN32)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if (WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_blosc after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc.lib ${HARVEST_TARGET}/blosc/lib/libblosc.lib
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
set(FAAD_EXTRA_ARGS)
|
||||
|
||||
if(WIN32)
|
||||
if (WIN32)
|
||||
set(FAAD_EXTRA_CONFIGURE "utils\\win32\\ac2ver.exe" "faad2" "configure.ac" > libfaad\\win32_ver.h)
|
||||
else()
|
||||
set(FAAD_EXTRA_CONFIGURE echo .)
|
||||
|
@@ -32,7 +32,7 @@ ExternalProject_Add(external_ffi
|
||||
INSTALL_DIR ${LIBDIR}/ffi
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
if (UNIX AND NOT APPLE)
|
||||
ExternalProject_Add_Step(external_ffi after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/ffi/lib/libffi.a ${LIBDIR}/ffi/lib/libffi_pic.a
|
||||
DEPENDEES install
|
||||
|
@@ -129,8 +129,6 @@ harvest(jpg/include jpeg/include "*.h")
|
||||
harvest(jpg/lib jpeg/lib "libjpeg.a")
|
||||
harvest(lame/lib ffmpeg/lib "*.a")
|
||||
harvest(clang/bin llvm/bin "clang-format")
|
||||
harvest(clang/include llvm/include "*")
|
||||
harvest(llvm/include llvm/include "*")
|
||||
harvest(llvm/bin llvm/bin "llvm-config")
|
||||
harvest(llvm/lib llvm/lib "libLLVM*.a")
|
||||
if(APPLE)
|
||||
|
@@ -70,6 +70,7 @@ ExternalProject_Add(external_opensubdiv
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OPENSUBDIV_Hash}
|
||||
PREFIX ${BUILD_DIR}/opensubdiv
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/opensubdiv/src/external_opensubdiv < ${PATCH_DIR}/opensubdiv.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/opensubdiv
|
||||
)
|
||||
|
@@ -126,13 +126,13 @@ else()
|
||||
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
set(OSX_ARCHITECTURES x86_64)
|
||||
set(OSX_DEPLOYMENT_TARGET 10.11)
|
||||
set(OSX_DEPLOYMENT_TARGET 10.9)
|
||||
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
|
||||
|
||||
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
|
||||
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
|
||||
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
|
||||
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin15.0.0) # OS X 10.11
|
||||
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin13.0.0) # OS X 10.9
|
||||
set(PLATFORM_CMAKE_FLAGS
|
||||
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
|
||||
|
@@ -111,16 +111,8 @@ add_dependencies(
|
||||
external_zlib
|
||||
external_flexbison
|
||||
external_openimageio
|
||||
)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Rely on PugiXML compiled with OpenImageIO
|
||||
else()
|
||||
add_dependencies(
|
||||
external_osl
|
||||
external_pugixml
|
||||
)
|
||||
endif()
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
|
@@ -19,7 +19,7 @@
|
||||
set(SSL_CONFIGURE_COMMAND ./Configure)
|
||||
set(SSL_PATCH_CMD echo .)
|
||||
|
||||
if(APPLE)
|
||||
if (APPLE)
|
||||
set(SSL_OS_COMPILER "blender-darwin-x86_64")
|
||||
else()
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
|
@@ -35,7 +35,7 @@ ExternalProject_Add(external_tbb
|
||||
INSTALL_DIR ${LIBDIR}/tbb
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if (WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_tbb after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
|
||||
|
@@ -46,7 +46,7 @@ set(PTHREADS_URI http://sourceforge.mirrorservice.org/p/pt/pthreads4w/pthreads4w
|
||||
set(PTHREADS_HASH f3bf81bb395840b3446197bcf4ecd653)
|
||||
|
||||
set(ILMBASE_VERSION 2.3.0)
|
||||
if(WIN32)
|
||||
if (WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(ILMBASE_VERSION_POSTFIX _s)
|
||||
set(OPENEXR_VERSION_POSTFIX _s)
|
||||
@@ -61,7 +61,7 @@ set(ILMBASE_URI https://github.com/openexr/openexr/releases/download/v${ILMBASE_
|
||||
set(ILMBASE_HASH 354bf86de3b930ab87ac63619d60c860)
|
||||
|
||||
set(OPENEXR_VERSION 2.3.0)
|
||||
if(WIN32) #release 2.3.0 tarball has broken cmake support
|
||||
if (WIN32) #release 2.3.0 tarball has broken cmake support
|
||||
set(OPENEXR_URI https://github.com/openexr/openexr/archive/0ac2ea34c8f3134148a5df4052e40f155b76f6fb.tar.gz)
|
||||
set(OPENEXR_HASH ed159435d508240712fbaaa21d94bafb)
|
||||
else()
|
||||
@@ -71,7 +71,7 @@ else()
|
||||
endif()
|
||||
|
||||
set(FREETYPE_VERSION 2.9.1)
|
||||
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
|
||||
set(FREETYPE_URI http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
|
||||
set(FREETYPE_HASH 3adb0e35d3c100c456357345ccfa8056)
|
||||
|
||||
set(GLEW_VERSION 1.13.0)
|
||||
@@ -105,8 +105,8 @@ set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
|
||||
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
|
||||
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
|
||||
|
||||
set(OPENSUBDIV_VERSION v3_4_0_RC2)
|
||||
set(OPENSUBDIV_Hash f6a10ba9efaa82fde86fe65aad346319)
|
||||
set(OPENSUBDIV_VERSION v3_3_3)
|
||||
set(OPENSUBDIV_Hash 29c79dc01ef616aab02670bed5544ddd)
|
||||
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
|
||||
|
||||
set(SDL_VERSION 2.0.8)
|
||||
|
@@ -25,7 +25,7 @@ ExternalProject_Add(external_zlib
|
||||
INSTALL_DIR ${LIBDIR}/zlib
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if (WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_zlib after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st${LIBEXT}
|
||||
|
@@ -25,7 +25,7 @@
|
||||
ARGS=$( \
|
||||
getopt \
|
||||
-o s:i:t:h \
|
||||
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
|
||||
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,use-cxx11,\
|
||||
with-all,with-opencollada,with-jack,with-embree,\
|
||||
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,\
|
||||
force-all,force-python,force-numpy,force-boost,\
|
||||
@@ -106,6 +106,11 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--no-confirm
|
||||
Disable any interaction with user (suitable for automated run).
|
||||
|
||||
--use-cxx11
|
||||
Build all libraries in cpp11 'mode' (will be mandatory soon in blender2.8 branch).
|
||||
NOTE: If your compiler is gcc-6.0 or above, you probably *want* to enable this option (since it's default
|
||||
standard starting from this version).
|
||||
|
||||
--with-all
|
||||
By default, a number of optional and not-so-often needed libraries are not installed.
|
||||
This option will try to install them, at the cost of potential conflicts (depending on
|
||||
@@ -301,8 +306,6 @@ NO_BUILD=false
|
||||
NO_CONFIRM=false
|
||||
USE_CXX11=true
|
||||
|
||||
CLANG_FORMAT_VERSION_MIN="6.0"
|
||||
|
||||
PYTHON_VERSION="3.7.0"
|
||||
PYTHON_VERSION_MIN="3.7"
|
||||
PYTHON_FORCE_BUILD=false
|
||||
@@ -358,7 +361,7 @@ OSL_FORCE_REBUILD=false
|
||||
OSL_SKIP=false
|
||||
|
||||
# OpenSubdiv needs to be compiled for now
|
||||
OSD_VERSION="3.4.0_RC2"
|
||||
OSD_VERSION="3.3.3"
|
||||
OSD_VERSION_MIN=$OSD_VERSION
|
||||
OSD_FORCE_BUILD=false
|
||||
OSD_FORCE_REBUILD=false
|
||||
@@ -385,6 +388,7 @@ OPENCOLLADA_FORCE_BUILD=false
|
||||
OPENCOLLADA_FORCE_REBUILD=false
|
||||
OPENCOLLADA_SKIP=false
|
||||
|
||||
|
||||
EMBREE_VERSION="3.2.4"
|
||||
EMBREE_FORCE_BUILD=false
|
||||
EMBREE_FORCE_REBUILD=false
|
||||
@@ -2629,7 +2633,7 @@ compile_FFmpeg() {
|
||||
./configure --cc="gcc -Wl,--as-needed" \
|
||||
--extra-ldflags="-pthread -static-libgcc" \
|
||||
--prefix=$_inst --enable-static \
|
||||
--disable-ffplay --disable-doc \
|
||||
--disable-ffplay --disable-ffserver --disable-doc \
|
||||
--enable-gray \
|
||||
--enable-avfilter --disable-vdpau \
|
||||
--disable-bzlib --disable-libgsm --disable-libspeex \
|
||||
@@ -2789,17 +2793,6 @@ install_DEB() {
|
||||
PRINT ""
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
CLANG_FORMAT="clang-format"
|
||||
check_package_version_ge_DEB $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
|
||||
if [ $? -eq 0 ]; then
|
||||
_packages="$_packages $CLANG_FORMAT"
|
||||
else
|
||||
PRINT ""
|
||||
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
|
||||
PRINT ""
|
||||
fi
|
||||
|
||||
if [ "$WITH_JACK" = true ]; then
|
||||
_packages="$_packages libspnav-dev"
|
||||
# Only install jack if jack2 is not already installed!
|
||||
@@ -2817,10 +2810,10 @@ install_DEB() {
|
||||
install_packages_DEB $_packages
|
||||
|
||||
PRINT""
|
||||
LIBSNDFILE_DEV="libsndfile1-dev"
|
||||
check_package_DEB $LIBSNDFILE_DEV
|
||||
SNDFILE_DEV="libsndfile1-dev"
|
||||
check_package_DEB $SNDFILE_DEV
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_DEB $LIBSNDFILE_DEV
|
||||
install_packages_DEB $SNDFILE_DEV
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
@@ -3433,10 +3426,10 @@ install_RPM() {
|
||||
fi
|
||||
|
||||
PRINT""
|
||||
LIBSNDFILE_DEV="libsndfile-devel"
|
||||
check_package_RPM $LIBSNDFILE_DEV
|
||||
SNDFILE_DEV="libsndfile-devel"
|
||||
check_package_RPM $SNDFILE_DEV
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_RPM $LIBSNDFILE_DEV
|
||||
install_packages_RPM $SNDFILE_DEV
|
||||
fi
|
||||
|
||||
if [ "$WITH_ALL" = true ]; then
|
||||
@@ -3451,16 +3444,6 @@ install_RPM() {
|
||||
install_packages_RPM libspnav-devel
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
CLANG_FORMAT="clang" # Yeah, on fedora/suse clang-format is part of main clang package...
|
||||
check_package_version_ge_RPM $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_RPM $CLANG_FORMAT
|
||||
else
|
||||
PRINT ""
|
||||
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
|
||||
PRINT ""
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
_do_compile_python=false
|
||||
@@ -3867,10 +3850,10 @@ install_ARCH() {
|
||||
install_packages_ARCH $_packages
|
||||
|
||||
PRINT""
|
||||
LIBSNDFILE_DEV="libsndfile"
|
||||
check_package_ARCH $LIBSNDFILE_DEV
|
||||
SNDFILE_DEV="libsndfile"
|
||||
check_package_ARCH $SNDFILE_DEV
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_ARCH $LIBSNDFILE_DEV
|
||||
install_packages_ARCH $SNDFILE_DEV
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
@@ -3908,18 +3891,6 @@ install_ARCH() {
|
||||
fi
|
||||
|
||||
|
||||
PRINT ""
|
||||
CLANG_FORMAT="clang" # Yeah, on arch clang-format is part of main clang package...
|
||||
check_package_version_ge_ARCH $CLANG_FORMAT $CLANG_FORMAT_VERSION_MIN
|
||||
if [ $? -eq 0 ]; then
|
||||
install_packages_ARCH $CLANG_FORMAT
|
||||
else
|
||||
PRINT ""
|
||||
WARNING "clang-format $CLANG_FORMAT_VERSION_MIN or higher not found, this is NOT needed to get Blender compiling..."
|
||||
PRINT ""
|
||||
fi
|
||||
|
||||
|
||||
PRINT ""
|
||||
_do_compile_python=false
|
||||
if [ "$PYTHON_SKIP" = true ]; then
|
||||
|
13
build_files/build_environment/patches/opensubdiv.diff
Normal file
13
build_files/build_environment/patches/opensubdiv.diff
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/opensubdiv/far/topologyRefiner.cpp b/opensubdiv/far/topologyRefiner.cpp
|
||||
index 3754b36e..7fe42bcc 100644
|
||||
--- a/opensubdiv/far/topologyRefiner.cpp
|
||||
+++ b/opensubdiv/far/topologyRefiner.cpp
|
||||
@@ -263,7 +263,7 @@ namespace internal {
|
||||
bool IsEmpty() const { return *((int_type*)this) == 0; }
|
||||
|
||||
FeatureMask() { Clear(); }
|
||||
- FeatureMask(Options const & options, Sdc::SchemeType sType) { InitializeFeatures(options, sType); }
|
||||
+ FeatureMask(Options const & options, Sdc::SchemeType sType) { Clear(); InitializeFeatures(options, sType); }
|
||||
|
||||
// These are the two primary methods intended for use -- intialization via a set of Options
|
||||
// and reduction of the subsequent feature set (which presumes prior initialization with the
|
@@ -20,8 +20,9 @@ else()
|
||||
set(LIBDIR_NAME "linux_x86_64")
|
||||
endif()
|
||||
|
||||
# Default to only build Blender
|
||||
# Default to only build Blender, not the player
|
||||
set(WITH_BLENDER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PLAYER OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# ######## Linux-specific build options ########
|
||||
# Options which are specific to Linux-only platforms
|
||||
|
12
build_files/buildbot/config/blender_linux_player.cmake
Normal file
12
build_files/buildbot/config/blender_linux_player.cmake
Normal file
@@ -0,0 +1,12 @@
|
||||
# This is applied as an override on top of blender_linux.config
|
||||
# Disables all the areas which are not needed for the player.
|
||||
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_BLENDER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
|
@@ -58,11 +58,11 @@ if 'cmake' in builder:
|
||||
|
||||
# Config file to be used (relative to blender's sources root)
|
||||
cmake_config_file = "build_files/cmake/config/blender_release.cmake"
|
||||
cmake_player_config_file = None
|
||||
|
||||
# Set build options.
|
||||
cmake_options = []
|
||||
cmake_extra_options = ['-DCMAKE_BUILD_TYPE:STRING=Release',
|
||||
'-DWITH_GTESTS=ON']
|
||||
cmake_extra_options = ['-DCMAKE_BUILD_TYPE:STRING=Release']
|
||||
|
||||
if builder.startswith('mac'):
|
||||
# Set up OSX architecture
|
||||
@@ -79,6 +79,8 @@ if 'cmake' in builder:
|
||||
|
||||
elif builder.startswith('linux'):
|
||||
cmake_config_file = "build_files/buildbot/config/blender_linux.cmake"
|
||||
cmake_player_config_file = "build_files/buildbot/config/blender_linux_player.cmake"
|
||||
targets = ['player', 'blender']
|
||||
tokens = builder.split("_")
|
||||
glibc = tokens[1]
|
||||
if glibc == 'glibc224':
|
||||
@@ -119,6 +121,8 @@ if 'cmake' in builder:
|
||||
target_name = 'install'
|
||||
# Tweaking CMake options to respect the target
|
||||
target_cmake_options = cmake_options[:]
|
||||
if target == 'player':
|
||||
target_cmake_options.append("-C" + os.path.join(blender_dir, cmake_player_config_file))
|
||||
# Do extra git fetch because not all platform/git/buildbot combinations
|
||||
# update the origin remote, causing buildinfo to detect local changes.
|
||||
os.chdir(blender_dir)
|
||||
|
@@ -33,44 +33,27 @@ builder = sys.argv[1]
|
||||
blender_dir = '../blender.git'
|
||||
|
||||
if "cmake" in builder:
|
||||
# cmake
|
||||
|
||||
print("Automated tests are still DISABLED!")
|
||||
sys.exit(0)
|
||||
|
||||
build_dir = os.path.abspath(os.path.join('..', 'build', builder))
|
||||
install_dir = os.path.abspath(os.path.join('..', 'install', builder))
|
||||
# NOTE: For quick test only to see if the approach work.
|
||||
# n the future must be replaced with an actual blender version.
|
||||
blender_version = '2.80'
|
||||
blender_version_dir = os.path.join(install_dir, blender_version)
|
||||
command_prefix = []
|
||||
extra_ctest_args = []
|
||||
chroot_name = None
|
||||
chroot_prefix = []
|
||||
|
||||
if builder.startswith('win'):
|
||||
extra_ctest_args += ['-C', 'Release']
|
||||
elif builder.startswith('linux'):
|
||||
tokens = builder.split("_")
|
||||
glibc = tokens[1]
|
||||
if glibc == 'glibc224':
|
||||
deb_name = "stretch"
|
||||
"""
|
||||
if builder.endswith('x86_64_cmake'):
|
||||
chroot_name = 'buildbot_' + deb_name + '_x86_64'
|
||||
chroot_name = 'buildbot_jessie_x86_64'
|
||||
elif builder.endswith('i686_cmake'):
|
||||
chroot_name = 'buildbot_' + deb_name + '_i686'
|
||||
command_prefix = ['schroot', '--preserve-environment', '-c', chroot_name, '--']
|
||||
elif glibc == 'glibc217':
|
||||
command_prefix = ['scl', 'enable', 'devtoolset-6', '--']
|
||||
|
||||
ctest_env = os.environ.copy()
|
||||
ctest_env['BLENDER_SYSTEM_SCRIPTS'] = os.path.join(blender_version_dir, 'scripts')
|
||||
ctest_env['BLENDER_SYSTEM_DATAFILES'] = os.path.join(blender_version_dir, 'datafiles')
|
||||
chroot_name = 'buildbot_jessie_i686'
|
||||
if chroot_name:
|
||||
chroot_prefix = ['schroot', '-c', chroot_name, '--']
|
||||
"""
|
||||
|
||||
os.chdir(build_dir)
|
||||
retcode = subprocess.call(command_prefix + ['ctest', '--output-on-failure'] + extra_ctest_args,
|
||||
env=ctest_env)
|
||||
|
||||
# Always exit with a success, for until we know all the tests are passing
|
||||
# on all builders.
|
||||
sys.exit(0)
|
||||
retcode = subprocess.call(chroot_prefix + ['ctest', '--output-on-failure'])
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
print("Unknown building system")
|
||||
sys.exit(1)
|
||||
|
@@ -47,10 +47,10 @@ FIND_PATH(EMBREE_INCLUDE_DIR
|
||||
|
||||
|
||||
SET(_embree_FIND_COMPONENTS
|
||||
embree3
|
||||
embree_avx
|
||||
embree_avx2
|
||||
embree_sse42
|
||||
embree3
|
||||
lexers
|
||||
math
|
||||
simd
|
||||
|
@@ -9,6 +9,7 @@
|
||||
#
|
||||
# also defined,
|
||||
# GLEW_LIBRARY, where to find the Glew library.
|
||||
# GLEW_MX_LIBRARY, where to find the GlewMX library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2014 Blender Foundation.
|
||||
@@ -49,6 +50,16 @@ FIND_LIBRARY(GLEW_LIBRARY
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
|
||||
FIND_LIBRARY(GLEW_MX_LIBRARY
|
||||
NAMES
|
||||
GLEWmx
|
||||
HINTS
|
||||
${_glew_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
@@ -62,6 +73,7 @@ ENDIF(GLEW_FOUND)
|
||||
MARK_AS_ADVANCED(
|
||||
GLEW_INCLUDE_DIR
|
||||
GLEW_LIBRARY
|
||||
GLEW_MX_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_glew_SEARCH_DIRS)
|
||||
|
@@ -1,15 +1,15 @@
|
||||
# - Find SndFile library
|
||||
# Find the native SndFile includes and library
|
||||
# This module defines
|
||||
# LIBSNDFILE_INCLUDE_DIRS, where to find sndfile.h, Set when
|
||||
# LIBSNDFILE_INCLUDE_DIR is found.
|
||||
# LIBSNDFILE_LIBRARIES, libraries to link against to use SndFile.
|
||||
# LIBSNDFILE_ROOT_DIR, The base directory to search for SndFile.
|
||||
# SNDFILE_INCLUDE_DIRS, where to find sndfile.h, Set when
|
||||
# SNDFILE_INCLUDE_DIR is found.
|
||||
# SNDFILE_LIBRARIES, libraries to link against to use SndFile.
|
||||
# SNDFILE_ROOT_DIR, The base directory to search for SndFile.
|
||||
# This can also be an environment variable.
|
||||
# SNDFILE_FOUND, If false, do not try to use SndFile.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# LIBSNDFILE_LIBRARY, where to find the SndFile library.
|
||||
# SNDFILE_LIBRARY, where to find the SndFile library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
@@ -22,26 +22,26 @@
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If LIBSNDFILE_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT LIBSNDFILE_ROOT_DIR AND NOT $ENV{LIBSNDFILE_ROOT_DIR} STREQUAL "")
|
||||
SET(LIBSNDFILE_ROOT_DIR $ENV{LIBSNDFILE_ROOT_DIR})
|
||||
# If SNDFILE_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT SNDFILE_ROOT_DIR AND NOT $ENV{SNDFILE_ROOT_DIR} STREQUAL "")
|
||||
SET(SNDFILE_ROOT_DIR $ENV{SNDFILE_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_sndfile_SEARCH_DIRS
|
||||
${LIBSNDFILE_ROOT_DIR}
|
||||
${SNDFILE_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
)
|
||||
|
||||
FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h
|
||||
FIND_PATH(SNDFILE_INCLUDE_DIR sndfile.h
|
||||
HINTS
|
||||
${_sndfile_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LIBSNDFILE_LIBRARY
|
||||
FIND_LIBRARY(SNDFILE_LIBRARY
|
||||
NAMES
|
||||
sndfile
|
||||
HINTS
|
||||
@@ -54,14 +54,14 @@ FIND_LIBRARY(LIBSNDFILE_LIBRARY
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
|
||||
LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
|
||||
SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
|
||||
|
||||
IF(SNDFILE_FOUND)
|
||||
SET(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
|
||||
SET(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
|
||||
SET(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY})
|
||||
SET(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR})
|
||||
ENDIF(SNDFILE_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
LIBSNDFILE_INCLUDE_DIR
|
||||
LIBSNDFILE_LIBRARY
|
||||
SNDFILE_INCLUDE_DIR
|
||||
SNDFILE_LIBRARY
|
||||
)
|
||||
|
@@ -32,7 +32,6 @@ macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
|
||||
${EXTRA_LIBS}
|
||||
${PLATFORM_LINKLIBS}
|
||||
bf_testing_main
|
||||
bf_intern_eigen
|
||||
bf_intern_guardedalloc
|
||||
extern_gtest
|
||||
extern_gmock
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#
|
||||
# VLMC RPM Finder
|
||||
# Authors: Rohit Yadav <rohityadav89@gmail.com>
|
||||
#
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# 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>
|
||||
|
@@ -37,7 +37,6 @@ IGNORE_SOURCE = (
|
||||
)
|
||||
|
||||
IGNORE_CMAKE = (
|
||||
"extern/audaspace/CMakeLists.txt",
|
||||
)
|
||||
|
||||
UTF8_CHECK = True
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# 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, M.G. Kishalmi
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# 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, M.G. Kishalmi
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# 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>
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# 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>
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# 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>
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# 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>
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# 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>
|
||||
|
@@ -12,10 +12,10 @@ 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_CYCLES_OSL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DRACO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS 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)
|
||||
@@ -23,6 +23,7 @@ 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)
|
||||
@@ -41,7 +42,6 @@ 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_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
|
||||
@@ -50,6 +50,7 @@ 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)
|
||||
|
||||
|
||||
@@ -57,10 +58,13 @@ set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif(WIN32)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif(APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# include("${CMAKE_CURRENT_SOURCE_DIR}/../platform/platform_apple_xcode.cmake")
|
||||
endif()
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#
|
||||
|
||||
set(WITH_HEADLESS ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# disable audio, its possible some devs may want this but for now disable
|
||||
# so the python module doesn't hold the audio device and loads quickly.
|
||||
|
@@ -17,10 +17,10 @@ set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_OSL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_DRACO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LLVM OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND OFF CACHE BOOL "" FORCE)
|
||||
@@ -28,6 +28,7 @@ set(WITH_IK_SOLVER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IK_ITASC OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_CINEON OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_DDS OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_FRAMESERVER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_HDR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENEXR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENJPEG OFF CACHE BOOL "" FORCE)
|
||||
|
@@ -13,10 +13,10 @@ 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_CYCLES_OSL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DRACO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS 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)
|
||||
@@ -24,6 +24,7 @@ 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)
|
||||
@@ -42,7 +43,6 @@ 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_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB_BLOSC ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
|
||||
@@ -51,6 +51,7 @@ 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)
|
||||
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_CUBIN_COMPILER OFF CACHE BOOL "" FORCE)
|
||||
@@ -60,10 +61,13 @@ set(CYCLES_CUDA_BINARIES_ARCH sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61;sm_70;sm
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif(WIN32)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif(APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# include("${CMAKE_CURRENT_SOURCE_DIR}/../platform/platform_apple_xcode.cmake")
|
||||
endif()
|
||||
|
@@ -12,6 +12,9 @@ set(WITH_INSTALL_PORTABLE OFF CACHE BOOL "" FORCE)
|
||||
# no point int copying python into python
|
||||
set(WITH_PYTHON_INSTALL OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# dont build the game engine
|
||||
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# disable audio, its possible some devs may want this but for now disable
|
||||
# so the python module doesn't hold the audio device and loads quickly.
|
||||
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
|
||||
@@ -30,8 +33,3 @@ set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_BULLET OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_ALEMBIC OFF CACHE BOOL "" FORCE)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# jemalloc causes linking error on import, disable.
|
||||
set(WITH_MEM_JEMALLOC OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
# disable Blender
|
||||
set(WITH_BLENDER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_PLAYER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_BLENDER OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# build Cycles
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# assumes you have dependencies installed already
|
||||
|
||||
# See this page for more info:
|
||||
# https://wiki.blender.org/wiki/Building_Blender/Linux/Generic_Distro/CMake
|
||||
# http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Generic_Distro/CMake
|
||||
|
||||
# grab blender
|
||||
mkdir ~/blender-git
|
||||
@@ -38,3 +38,4 @@ echo " Update Blender: git pull --rebase; git submodule foreach git pull --reb
|
||||
echo " Reconfigure Blender: cd ~/blender-git/build-cmake ; cmake ."
|
||||
echo " Build Blender: cd ~/blender-git/build-cmake ; make"
|
||||
echo ""
|
||||
|
||||
|
10
build_files/cmake/example_scripts/make_quiet.sh
Executable file
10
build_files/cmake/example_scripts/make_quiet.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
# filters CMake output to be more like nan-makefiles
|
||||
|
||||
FILTER="^\[ *[0-9]*%] \|^Built target \|^Scanning "
|
||||
make $@ | \
|
||||
sed -u -e 's/^Linking .*\//Linking /' | \
|
||||
sed -u -e 's/^.*\// /' | \
|
||||
grep --line-buffered -v "$FILTER"
|
||||
|
||||
echo "Build Done"
|
@@ -16,6 +16,11 @@
|
||||
#
|
||||
# The Original Code is Copyright (C) 2006, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): Jacques Beaurain.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
macro(list_insert_after
|
||||
@@ -173,23 +178,9 @@ function(blender_source_group
|
||||
sources
|
||||
)
|
||||
|
||||
#if enabled, use the sources directories as filters.
|
||||
if(WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS)
|
||||
foreach(_SRC ${sources})
|
||||
# remove ../'s
|
||||
get_filename_component(_SRC_DIR ${_SRC} REALPATH)
|
||||
get_filename_component(_SRC_DIR ${_SRC_DIR} DIRECTORY)
|
||||
string(FIND ${_SRC_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/" _pos)
|
||||
if(NOT _pos EQUAL -1)
|
||||
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" GROUP_ID ${_SRC_DIR})
|
||||
string(REPLACE "/" "\\" GROUP_ID ${GROUP_ID})
|
||||
source_group("${GROUP_ID}" FILES ${_SRC})
|
||||
endif()
|
||||
unset(_pos)
|
||||
endforeach()
|
||||
else()
|
||||
# Group by location on disk
|
||||
source_group("Source Files" FILES CMakeLists.txt)
|
||||
|
||||
foreach(_SRC ${sources})
|
||||
get_filename_component(_SRC_EXT ${_SRC} EXT)
|
||||
if((${_SRC_EXT} MATCHES ".h") OR
|
||||
@@ -197,14 +188,11 @@ function(blender_source_group
|
||||
(${_SRC_EXT} MATCHES ".hh"))
|
||||
|
||||
set(GROUP_ID "Header Files")
|
||||
elseif(${_SRC_EXT} MATCHES ".glsl$")
|
||||
set(GROUP_ID "Shaders")
|
||||
else()
|
||||
set(GROUP_ID "Source Files")
|
||||
endif()
|
||||
source_group("${GROUP_ID}" FILES ${_SRC})
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
@@ -239,7 +227,6 @@ function(blender_add_lib__impl
|
||||
sources
|
||||
includes
|
||||
includes_sys
|
||||
library_deps
|
||||
)
|
||||
|
||||
# message(STATUS "Configuring library ${name}")
|
||||
@@ -251,16 +238,12 @@ function(blender_add_lib__impl
|
||||
|
||||
add_library(${name} ${sources})
|
||||
|
||||
if(NOT "${library_deps}" STREQUAL "")
|
||||
target_link_libraries(${name} INTERFACE "${library_deps}")
|
||||
endif()
|
||||
|
||||
# works fine without having the includes
|
||||
# listed is helpful for IDE's (QtCreator/MSVC)
|
||||
blender_source_group("${sources}")
|
||||
|
||||
#if enabled, set the FOLDER property for visual studio projects
|
||||
if(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
|
||||
if(WINDOWS_USE_VISUAL_STUDIO_FOLDERS)
|
||||
get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir})
|
||||
set_target_properties(${name} PROPERTIES FOLDER ${FolderDir})
|
||||
@@ -279,12 +262,11 @@ function(blender_add_lib_nolist
|
||||
sources
|
||||
includes
|
||||
includes_sys
|
||||
library_deps
|
||||
)
|
||||
|
||||
add_cc_flags_custom_test(${name} PARENT_SCOPE)
|
||||
|
||||
blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}" "${library_deps}")
|
||||
blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}")
|
||||
endfunction()
|
||||
|
||||
function(blender_add_lib
|
||||
@@ -292,36 +274,15 @@ function(blender_add_lib
|
||||
sources
|
||||
includes
|
||||
includes_sys
|
||||
library_deps
|
||||
)
|
||||
|
||||
add_cc_flags_custom_test(${name} PARENT_SCOPE)
|
||||
|
||||
blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}" "${library_deps}")
|
||||
blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}")
|
||||
|
||||
set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name})
|
||||
endfunction()
|
||||
|
||||
# Ninja only: assign 'heavy pool' to some targets that are especially RAM-consuming to build.
|
||||
function(setup_heavy_lib_pool)
|
||||
if(WITH_NINJA_POOL_JOBS AND NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS)
|
||||
if(WITH_CYCLES)
|
||||
list(APPEND _HEAVY_LIBS "cycles_device" "cycles_kernel")
|
||||
endif()
|
||||
if(WITH_LIBMV)
|
||||
list(APPEND _HEAVY_LIBS "bf_intern_libmv")
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND _HEAVY_LIBS "bf_intern_openvdb")
|
||||
endif()
|
||||
|
||||
foreach(TARGET ${_HEAVY_LIBS})
|
||||
if(TARGET ${TARGET})
|
||||
set_property(TARGET ${TARGET} PROPERTY JOB_POOL_COMPILE compile_heavy_job_pool)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(SETUP_LIBDIRS)
|
||||
|
||||
@@ -365,7 +326,7 @@ function(SETUP_LIBDIRS)
|
||||
link_directories(${JACK_LIBPATH})
|
||||
endif()
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
link_directories(${LIBSNDFILE_LIBPATH})
|
||||
link_directories(${SNDFILE_LIBPATH})
|
||||
endif()
|
||||
if(WITH_FFTW3)
|
||||
link_directories(${FFTW3_LIBPATH})
|
||||
@@ -420,11 +381,19 @@ function(setup_liblinks
|
||||
${FREETYPE_LIBRARY}
|
||||
)
|
||||
|
||||
|
||||
if(WITH_PYTHON)
|
||||
# since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
|
||||
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
|
||||
target_link_libraries(${target} ${PYTHON_LINKFLAGS})
|
||||
|
||||
if(WIN32 AND NOT UNIX)
|
||||
file_list_suffix(PYTHON_LIBRARIES_DEBUG "${PYTHON_LIBRARIES}" "_d")
|
||||
target_link_libraries_debug(${target} "${PYTHON_LIBRARIES_DEBUG}")
|
||||
target_link_libraries_optimized(${target} "${PYTHON_LIBRARIES}")
|
||||
unset(PYTHON_LIBRARIES_DEBUG)
|
||||
else()
|
||||
target_link_libraries(${target} ${PYTHON_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_LZO AND WITH_SYSTEM_LZO)
|
||||
target_link_libraries(${target} ${LZO_LIBRARIES})
|
||||
@@ -448,16 +417,13 @@ function(setup_liblinks
|
||||
target_link_libraries(${target} ${JACK_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
target_link_libraries(${target} ${LIBSNDFILE_LIBRARIES})
|
||||
target_link_libraries(${target} ${SNDFILE_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
|
||||
target_link_libraries(${target} ${SDL_LIBRARY})
|
||||
endif()
|
||||
if(WITH_CYCLES_OSL)
|
||||
target_link_libraries(${target} ${OSL_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
target_link_libraries(${target} ${OPENVDB_LIBRARIES} ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
|
||||
if(WITH_IMAGE_TIFF)
|
||||
target_link_libraries(${target} ${TIFF_LIBRARY})
|
||||
endif()
|
||||
if(WITH_OPENIMAGEIO)
|
||||
target_link_libraries(${target} ${OPENIMAGEIO_LIBRARIES})
|
||||
@@ -468,6 +434,12 @@ function(setup_liblinks
|
||||
if(WITH_OPENSUBDIV)
|
||||
target_link_libraries(${target} ${OPENSUBDIV_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_OPENVDB)
|
||||
target_link_libraries(${target} ${OPENVDB_LIBRARIES} ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_CYCLES_OSL)
|
||||
target_link_libraries(${target} ${OSL_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_CYCLES_EMBREE)
|
||||
target_link_libraries(${target} ${EMBREE_LIBRARIES})
|
||||
endif()
|
||||
@@ -481,9 +453,6 @@ function(setup_liblinks
|
||||
if(WITH_ALEMBIC)
|
||||
target_link_libraries(${target} ${ALEMBIC_LIBRARIES} ${HDF5_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_IMAGE_TIFF)
|
||||
target_link_libraries(${target} ${TIFF_LIBRARY})
|
||||
endif()
|
||||
if(WITH_IMAGE_OPENEXR)
|
||||
target_link_libraries(${target} ${OPENEXR_LIBRARIES})
|
||||
endif()
|
||||
@@ -568,6 +537,266 @@ function(setup_liblinks
|
||||
target_link_libraries(${target} ${PLATFORM_LINKLIBS})
|
||||
endfunction()
|
||||
|
||||
|
||||
function(SETUP_BLENDER_SORTED_LIBS)
|
||||
|
||||
get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
|
||||
|
||||
list(APPEND BLENDER_LINK_LIBS
|
||||
bf_windowmanager
|
||||
bf_render
|
||||
)
|
||||
|
||||
if(WITH_MOD_FLUID)
|
||||
list(APPEND BLENDER_LINK_LIBS bf_intern_elbeem)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES)
|
||||
list(APPEND BLENDER_LINK_LIBS
|
||||
cycles_render
|
||||
cycles_graph
|
||||
cycles_bvh
|
||||
cycles_device
|
||||
cycles_kernel
|
||||
cycles_util
|
||||
cycles_subd)
|
||||
if(WITH_CYCLES_OSL)
|
||||
list(APPEND BLENDER_LINK_LIBS cycles_kernel_osl)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Sort libraries
|
||||
set(BLENDER_SORTED_LIBS
|
||||
bf_windowmanager
|
||||
|
||||
bf_editor_undo
|
||||
|
||||
bf_editor_space_api
|
||||
bf_editor_space_action
|
||||
bf_editor_space_buttons
|
||||
bf_editor_space_console
|
||||
bf_editor_space_file
|
||||
bf_editor_space_graph
|
||||
bf_editor_space_image
|
||||
bf_editor_space_info
|
||||
bf_editor_space_logic
|
||||
bf_editor_space_nla
|
||||
bf_editor_space_node
|
||||
bf_editor_space_outliner
|
||||
bf_editor_space_script
|
||||
bf_editor_space_sequencer
|
||||
bf_editor_space_text
|
||||
bf_editor_space_time
|
||||
bf_editor_space_userpref
|
||||
bf_editor_space_view3d
|
||||
bf_editor_space_clip
|
||||
|
||||
bf_editor_transform
|
||||
bf_editor_util
|
||||
bf_editor_uvedit
|
||||
bf_editor_curve
|
||||
bf_editor_gpencil
|
||||
bf_editor_interface
|
||||
bf_editor_mesh
|
||||
bf_editor_metaball
|
||||
bf_editor_object
|
||||
bf_editor_lattice
|
||||
bf_editor_armature
|
||||
bf_editor_physics
|
||||
bf_editor_render
|
||||
bf_editor_screen
|
||||
bf_editor_sculpt_paint
|
||||
bf_editor_sound
|
||||
bf_editor_animation
|
||||
bf_editor_datafiles
|
||||
bf_editor_mask
|
||||
bf_editor_io
|
||||
|
||||
bf_render
|
||||
bf_python
|
||||
bf_python_ext
|
||||
bf_python_mathutils
|
||||
bf_python_bmesh
|
||||
bf_freestyle
|
||||
bf_ikplugin
|
||||
bf_modifiers
|
||||
bf_alembic
|
||||
bf_bmesh
|
||||
bf_gpu
|
||||
bf_blenloader
|
||||
bf_blenkernel
|
||||
bf_physics
|
||||
bf_nodes
|
||||
bf_rna
|
||||
bf_imbuf
|
||||
bf_blenlib
|
||||
bf_depsgraph
|
||||
bf_intern_ghost
|
||||
bf_intern_string
|
||||
bf_avi
|
||||
bf_imbuf_cineon
|
||||
bf_imbuf_openexr
|
||||
bf_imbuf_openimageio
|
||||
bf_imbuf_dds
|
||||
bf_collada
|
||||
bf_intern_elbeem
|
||||
bf_intern_memutil
|
||||
bf_intern_guardedalloc
|
||||
bf_intern_ctr
|
||||
bf_intern_utfconv
|
||||
ge_blen_routines
|
||||
ge_converter
|
||||
ge_phys_dummy
|
||||
ge_phys_bullet
|
||||
bf_intern_smoke
|
||||
extern_lzma
|
||||
extern_curve_fit_nd
|
||||
ge_logic_ketsji
|
||||
extern_recastnavigation
|
||||
ge_logic
|
||||
ge_rasterizer
|
||||
ge_oglrasterizer
|
||||
ge_logic_expressions
|
||||
ge_scenegraph
|
||||
ge_logic_network
|
||||
ge_logic_ngnetwork
|
||||
ge_logic_loopbacknetwork
|
||||
bf_intern_moto
|
||||
extern_openjpeg
|
||||
ge_videotex
|
||||
bf_dna
|
||||
bf_blenfont
|
||||
bf_blentranslation
|
||||
bf_intern_audaspace
|
||||
bf_intern_mikktspace
|
||||
bf_intern_dualcon
|
||||
bf_intern_cycles
|
||||
cycles_device
|
||||
cycles_render
|
||||
cycles_graph
|
||||
cycles_bvh
|
||||
cycles_kernel
|
||||
cycles_util
|
||||
cycles_subd
|
||||
bf_intern_opencolorio
|
||||
bf_intern_eigen
|
||||
extern_rangetree
|
||||
extern_wcwidth
|
||||
bf_intern_libmv
|
||||
extern_sdlew
|
||||
|
||||
bf_intern_glew_mx
|
||||
bf_intern_clog
|
||||
bf_intern_numaapi
|
||||
)
|
||||
|
||||
if(NOT WITH_SYSTEM_GLOG)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_glog)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_SYSTEM_GFLAGS)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_gflags)
|
||||
endif()
|
||||
|
||||
if(WITH_COMPOSITOR)
|
||||
# added for opencl compositor
|
||||
list_insert_before(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_compositor")
|
||||
list_insert_after(BLENDER_SORTED_LIBS "bf_compositor" "bf_intern_opencl")
|
||||
endif()
|
||||
|
||||
if(WITH_LIBMV)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_ceres)
|
||||
endif()
|
||||
|
||||
if(WITH_MOD_CLOTH_ELTOPO)
|
||||
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})
|
||||
endif()
|
||||
|
||||
if(WITH_BINRELOC)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_binreloc)
|
||||
endif()
|
||||
|
||||
if(WITH_CXX_GUARDEDALLOC)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp)
|
||||
endif()
|
||||
|
||||
if(WITH_IK_SOLVER)
|
||||
list_insert_after(BLENDER_SORTED_LIBS "bf_intern_elbeem" "bf_intern_iksolver")
|
||||
endif()
|
||||
|
||||
if(WITH_IK_ITASC)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_itasc)
|
||||
endif()
|
||||
|
||||
if(WITH_GHOST_XDND)
|
||||
list(APPEND BLENDER_SORTED_LIBS extern_xdnd)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_OSL)
|
||||
list_insert_after(BLENDER_SORTED_LIBS "cycles_kernel" "cycles_kernel_osl")
|
||||
endif()
|
||||
|
||||
if(WITH_INTERNATIONAL)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_locale)
|
||||
endif()
|
||||
|
||||
if(WITH_BULLET)
|
||||
list_insert_after(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_intern_rigidbody")
|
||||
endif()
|
||||
|
||||
if(WITH_BULLET AND NOT WITH_SYSTEM_BULLET)
|
||||
list_insert_after(BLENDER_SORTED_LIBS "ge_logic_ngnetwork" "extern_bullet")
|
||||
endif()
|
||||
|
||||
if(WITH_GAMEENGINE_DECKLINK)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_decklink)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_gpudirect)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENSUBDIV)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_opensubdiv)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENVDB)
|
||||
list(APPEND BLENDER_SORTED_LIBS bf_intern_openvdb)
|
||||
endif()
|
||||
|
||||
foreach(SORTLIB ${BLENDER_SORTED_LIBS})
|
||||
set(REMLIB ${SORTLIB})
|
||||
foreach(SEARCHLIB ${BLENDER_LINK_LIBS})
|
||||
if(${SEARCHLIB} STREQUAL ${SORTLIB})
|
||||
set(REMLIB "")
|
||||
endif()
|
||||
endforeach()
|
||||
if(REMLIB)
|
||||
# message(STATUS "Removing library ${REMLIB} from blender linking because: not configured")
|
||||
list(APPEND REM_MSG ${REMLIB})
|
||||
list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
|
||||
endif()
|
||||
endforeach()
|
||||
if(REM_MSG)
|
||||
list(SORT REM_MSG)
|
||||
message(STATUS "Blender Skipping: (${REM_MSG})")
|
||||
endif()
|
||||
|
||||
|
||||
set(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} PARENT_SCOPE)
|
||||
|
||||
# for top-level tests
|
||||
set_property(GLOBAL PROPERTY BLENDER_SORTED_LIBS_PROP ${BLENDER_SORTED_LIBS})
|
||||
endfunction()
|
||||
|
||||
macro(TEST_SSE_SUPPORT
|
||||
_sse_flags
|
||||
_sse2_flags)
|
||||
@@ -713,7 +942,7 @@ macro(remove_strict_flags)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
remove_cc_flag(/w34189) # Restore warn C4189 (unused variable) back to w4
|
||||
# TODO
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
@@ -955,7 +1184,6 @@ function(delayed_install
|
||||
endif()
|
||||
set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_DESTINATIONS ${destination})
|
||||
endforeach()
|
||||
unset(f)
|
||||
endfunction()
|
||||
|
||||
# note this is a function instead of a macro so that ${BUILD_TYPE} in targetdir
|
||||
@@ -1160,7 +1388,6 @@ function(find_python_package
|
||||
NAMES
|
||||
${package}
|
||||
HINTS
|
||||
"${PYTHON_LIBPATH}/"
|
||||
"${PYTHON_LIBPATH}/python${PYTHON_VERSION}/"
|
||||
"${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/"
|
||||
PATH_SUFFIXES
|
||||
@@ -1238,26 +1465,3 @@ macro(WINDOWS_SIGN_TARGET target)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(blender_precompile_headers target cpp header)
|
||||
if(MSVC)
|
||||
# get the name for the pch output file
|
||||
get_filename_component( pchbase ${cpp} NAME_WE )
|
||||
set( pchfinal "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${pchbase}.pch" )
|
||||
|
||||
# mark the cpp as the one outputting the pch
|
||||
set_property(SOURCE ${cpp} APPEND PROPERTY OBJECT_OUTPUTS "${pchfinal}")
|
||||
|
||||
# get all sources for the target
|
||||
get_target_property(sources ${target} SOURCES)
|
||||
|
||||
# make all sources depend on the pch to enforce the build order
|
||||
foreach(src ${sources})
|
||||
set_property(SOURCE ${src} APPEND PROPERTY OBJECT_DEPENDS "${pchfinal}")
|
||||
endforeach()
|
||||
|
||||
target_sources(${target} PRIVATE ${cpp} ${header})
|
||||
set_target_properties(${target} PROPERTIES COMPILE_FLAGS "/Yu${header} /Fp${pchfinal} /FI${header}")
|
||||
set_source_files_properties(${cpp} PROPERTIES COMPILE_FLAGS "/Yc${header} /Fp${pchfinal}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
@@ -86,7 +86,7 @@ if(WIN32)
|
||||
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
|
||||
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
|
||||
|
||||
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL3-license.txt)
|
||||
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt)
|
||||
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
|
||||
set(CPACK_WIX_UPGRADE_GUID "B767E4FD-7DE7-4094-B051-3AE62E13A17A")
|
||||
|
||||
|
@@ -16,12 +16,13 @@
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for Apple.
|
||||
|
||||
set(MACOSX_DEPLOYMENT_TARGET "10.11")
|
||||
|
||||
macro(find_package_wrapper)
|
||||
# do nothing, just satisfy the macro
|
||||
endmacro()
|
||||
@@ -77,10 +78,10 @@ if(WITH_JACK)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
set(LIBSNDFILE ${LIBDIR}/sndfile)
|
||||
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
|
||||
set(LIBSNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
|
||||
set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
|
||||
set(SNDFILE ${LIBDIR}/sndfile)
|
||||
set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
|
||||
set(SNDFILE_LIBRARIES sndfile FLAC ogg vorbis vorbisenc)
|
||||
set(SNDFILE_LIBPATH ${SNDFILE}/lib ${LIBDIR}/ffmpeg/lib) # TODO, deprecate
|
||||
endif()
|
||||
|
||||
if(WITH_PYTHON)
|
||||
@@ -111,7 +112,7 @@ if(WITH_PYTHON)
|
||||
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||
|
||||
# needed for Audaspace, numpy is installed into python site-packages
|
||||
set(PYTHON_NUMPY_INCLUDE_DIRS "${PYTHON_LIBPATH}/site-packages/numpy/core/include")
|
||||
set(NUMPY_INCLUDE_DIRS "${PYTHON_LIBPATH}/site-packages/numpy/core/include")
|
||||
|
||||
if(NOT EXISTS "${PYTHON_EXECUTABLE}")
|
||||
message(FATAL_ERROR "Python executable missing: ${PYTHON_EXECUTABLE}")
|
||||
@@ -181,7 +182,7 @@ endif()
|
||||
|
||||
set(PLATFORM_CFLAGS "-pipe -funsigned-char")
|
||||
set(PLATFORM_LINKFLAGS
|
||||
"-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework Metal -framework QuartzCore"
|
||||
"-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio"
|
||||
)
|
||||
|
||||
list(APPEND PLATFORM_LINKLIBS c++)
|
||||
@@ -393,13 +394,11 @@ if(WITH_OPENMP)
|
||||
set(OpenMP_CXX_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L'${LIBDIR}/openmp/lib' -lomp")
|
||||
|
||||
# Copy libomp.dylib to allow executables like datatoc and tests to work.
|
||||
# Copy libomp.dylib to allow executables like datatoc to work.
|
||||
execute_process(
|
||||
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib
|
||||
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib)
|
||||
execute_process(
|
||||
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/Resources/lib
|
||||
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/Resources/lib/libomp.dylib)
|
||||
COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -16,6 +16,9 @@
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Jacques Beaurain.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Xcode and system configuration for Apple.
|
||||
@@ -93,14 +96,19 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# 10.11 is our min. target, if you use higher sdk, weak linking happens
|
||||
if(OSX_SYSTEM MATCHES 10.9)
|
||||
# make sure syslibs and headers are looked up in sdk ( especially for 10.9 openGL atm. )
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT})
|
||||
endif()
|
||||
|
||||
# 10.9 is our min. target, if you use higher sdk, weak linking happens
|
||||
if(CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.11)
|
||||
message(STATUS "Setting deployment target to 10.11, lower versions are not supported")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "" FORCE)
|
||||
if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.9)
|
||||
message(STATUS "Setting deployment target to 10.9, lower versions are not supported")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "" FORCE)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
|
||||
if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode")
|
||||
|
@@ -16,6 +16,9 @@
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for any *nix system including Linux and Unix.
|
||||
@@ -39,10 +42,6 @@ if(EXISTS ${LIBDIR})
|
||||
set(WITH_OPENMP_STATIC ON)
|
||||
endif()
|
||||
|
||||
if(WITH_STATIC_LIBS)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++")
|
||||
endif()
|
||||
|
||||
# Wrapper to prefer static libraries
|
||||
macro(find_package_wrapper)
|
||||
if(WITH_STATIC_LIBS)
|
||||
@@ -246,17 +245,13 @@ if(WITH_OPENVDB)
|
||||
find_package_wrapper(OpenVDB)
|
||||
find_package_wrapper(TBB)
|
||||
find_package_wrapper(Blosc)
|
||||
if(NOT TBB_FOUND)
|
||||
set(WITH_OPENVDB OFF)
|
||||
set(WITH_OPENVDB_BLOSC OFF)
|
||||
message(STATUS "TBB not found, disabling OpenVDB")
|
||||
elseif(NOT OPENVDB_FOUND)
|
||||
if(NOT OPENVDB_FOUND OR NOT TBB_FOUND)
|
||||
set(WITH_OPENVDB OFF)
|
||||
set(WITH_OPENVDB_BLOSC OFF)
|
||||
message(STATUS "OpenVDB not found, disabling it")
|
||||
elseif(NOT BLOSC_FOUND)
|
||||
set(WITH_OPENVDB_BLOSC OFF)
|
||||
message(STATUS "Blosc not found, disabling it for OpenVBD")
|
||||
message(STATUS "Blosc not found, disabling it")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@@ -16,6 +16,9 @@
|
||||
#
|
||||
# The Original Code is Copyright (C) 2016, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# Contributor(s): Sergey Sharybin.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# Libraries configuration for Windows.
|
||||
@@ -30,14 +33,14 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
set(MSVC_CLANG On)
|
||||
set(VC_TOOLS_DIR $ENV{VCToolsRedistDir} CACHE STRING "Location of the msvc redistributables")
|
||||
set(MSVC_REDIST_DIR ${VC_TOOLS_DIR})
|
||||
if(DEFINED MSVC_REDIST_DIR)
|
||||
if (DEFINED MSVC_REDIST_DIR)
|
||||
file(TO_CMAKE_PATH ${MSVC_REDIST_DIR} MSVC_REDIST_DIR)
|
||||
else()
|
||||
message("Unable to detect the Visual Studio redist directory, copying of the runtime dlls will not work, try running from the visual studio developer prompt.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS})
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ${WINDOWS_USE_VISUAL_STUDIO_FOLDERS})
|
||||
|
||||
if(NOT WITH_PYTHON_MODULE)
|
||||
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT blender)
|
||||
@@ -190,12 +193,6 @@ if(NOT EXISTS "${LIBDIR}/")
|
||||
message(FATAL_ERROR "Windows requires pre-compiled libs at: '${LIBDIR}'")
|
||||
endif()
|
||||
|
||||
# Mark libdir as system headers with a lower warn level, to resolve some warnings
|
||||
# that we have very little control over
|
||||
if(MSVC_VERSION GREATER_EQUAL 1914 AND NOT MSVC_CLANG)
|
||||
add_compile_options(/experimental:external /external:templates- /external:I "${LIBDIR}" /external:W0)
|
||||
endif()
|
||||
|
||||
# Add each of our libraries to our cmake_prefix_path so find_package() could work
|
||||
file(GLOB children RELATIVE ${LIBDIR} ${LIBDIR}/*)
|
||||
foreach(child ${children})
|
||||
@@ -345,8 +342,6 @@ if(WITH_PYTHON)
|
||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
# Use shared libs for vc2008 and vc2010 until we actually have vc2010 libs
|
||||
set(PYTHON_LIBRARY ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.lib)
|
||||
set(PYTHON_LIBRARY_DEBUG ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}_d.lib)
|
||||
|
||||
unset(_PYTHON_VERSION_NO_DOTS)
|
||||
|
||||
# Shared includes for both vc2008 and vc2010
|
||||
@@ -354,7 +349,7 @@ if(WITH_PYTHON)
|
||||
|
||||
# uncached vars
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_LIBRARIES debug "${PYTHON_LIBRARY_DEBUG}" optimized "${PYTHON_LIBRARY}" )
|
||||
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
@@ -576,10 +571,11 @@ if(WITH_OPENAL)
|
||||
endif()
|
||||
|
||||
if(WITH_CODEC_SNDFILE)
|
||||
set(LIBSNDFILE ${LIBDIR}/sndfile)
|
||||
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
|
||||
set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib) # TODO, deprecate
|
||||
set(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBPATH}/libsndfile-1.lib)
|
||||
set(SNDFILE ${LIBDIR}/sndfile)
|
||||
set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
|
||||
set(SNDFILE_LIBPATH ${SNDFILE}/lib) # TODO, deprecate
|
||||
set(SNDFILE_LIBRARIES ${SNDFILE_LIBPATH}/libsndfile-1.lib)
|
||||
|
||||
endif()
|
||||
|
||||
if(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
|
||||
@@ -643,7 +639,7 @@ if(WITH_CYCLES_EMBREE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WINDOWS_PYTHON_DEBUG)
|
||||
if (WINDOWS_PYTHON_DEBUG)
|
||||
# Include the system scripts in the blender_python_system_scripts project.
|
||||
FILE(GLOB_RECURSE inFiles "${CMAKE_SOURCE_DIR}/release/scripts/*.*" )
|
||||
ADD_CUSTOM_TARGET(blender_python_system_scripts SOURCES ${inFiles})
|
||||
|
@@ -16,6 +16,8 @@
|
||||
# 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, M.G. Kishalmi
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# <pep8 compliant>
|
||||
|
@@ -14,6 +14,8 @@
|
||||
# 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>
|
||||
|
@@ -29,7 +29,7 @@ try:
|
||||
os.remove(package_archive)
|
||||
if os.path.exists(package_dir):
|
||||
shutil.rmtree(package_dir)
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to clean up old package files: ' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
@@ -40,7 +40,7 @@ try:
|
||||
for f in os.listdir(package_dir):
|
||||
if f.startswith('makes'):
|
||||
os.remove(os.path.join(package_dir, f))
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to copy install directory: ' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
@@ -58,13 +58,13 @@ try:
|
||||
sys.exit(-1)
|
||||
|
||||
subprocess.call(archive_cmd)
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to create package archive: ' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
# empty temporary package dir
|
||||
try:
|
||||
shutil.rmtree(package_dir)
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to clean up package directory: ' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
@@ -1,25 +0,0 @@
|
||||
if EXIST %BLENDER_DIR%\..\lib\win64_vc14\llvm\bin\clang-format.exe (
|
||||
set CF_PATH=..\lib\win64_vc14\llvm\bin
|
||||
goto detect_done
|
||||
)
|
||||
if EXIST %BLENDER_DIR%\..\lib\windows_vc14\llvm\bin\clang-format.exe (
|
||||
set CF_PATH=..\lib\windows_vc14\llvm\bin
|
||||
goto detect_done
|
||||
)
|
||||
|
||||
echo clang-format not found
|
||||
exit /b 1
|
||||
|
||||
:detect_done
|
||||
echo found clang-format in %CF_PATH%
|
||||
|
||||
REM TODO(sergey): Switch to Python from libraries when available.
|
||||
set PYTHON="python.exe"
|
||||
set FORMAT_PATHS=%BLENDER_DIR%\source\tools\utils_maintenance\clang_format_paths.py
|
||||
|
||||
REM The formatting script expects clang-format to be in the current PATH.
|
||||
set PATH=%CF_PATH%;%PATH%
|
||||
|
||||
%PYTHON% %FORMAT_PATHS% %FORMAT_ARGS%
|
||||
|
||||
:EOF
|
@@ -12,13 +12,14 @@ if NOT "%1" == "" (
|
||||
if "%1" == "debug" (
|
||||
set BUILD_TYPE=Debug
|
||||
REM Build Configurations
|
||||
) else if "%1" == "noge" (
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_GAMEENGINE=OFF -DWITH_PLAYER=OFF
|
||||
set BUILD_NGE=_noge
|
||||
) else if "%1" == "builddir" (
|
||||
set BUILD_DIR_OVERRRIDE="%BLENDER_DIR%..\%2"
|
||||
shift /1
|
||||
) else if "%1" == "with_tests" (
|
||||
set TESTS_CMAKE_ARGS=%TESTS_CMAKE_ARGS% -DWITH_GTESTS=On
|
||||
) else if "%1" == "with_opengl_tests" (
|
||||
set TESTS_CMAKE_ARGS=%TESTS_CMAKE_ARGS% -DWITH_OPENGL_DRAW_TESTS=On -DWITH_OPENGL_RENDER_TESTS=On
|
||||
set TESTS_CMAKE_ARGS=-DWITH_GTESTS=On
|
||||
) else if "%1" == "full" (
|
||||
set TARGET=Full
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% ^
|
||||
@@ -70,8 +71,6 @@ if NOT "%1" == "" (
|
||||
shift /1
|
||||
) else if "%1" == "nobuild" (
|
||||
set NOBUILD=1
|
||||
) else if "%1" == "nobuildinfo" (
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -DWITH_BUILDINFO=Off
|
||||
) else if "%1" == "pydebug" (
|
||||
set WITH_PYDEBUG=1
|
||||
) else if "%1" == "showhash" (
|
||||
@@ -79,22 +78,12 @@ if NOT "%1" == "" (
|
||||
REM Non-Build Commands
|
||||
) else if "%1" == "update" (
|
||||
SET BUILD_UPDATE=1
|
||||
set BUILD_UPDATE_SVN=1
|
||||
set BUILD_UPDATE_GIT=1
|
||||
) else if "%1" == "code_update" (
|
||||
SET BUILD_UPDATE=1
|
||||
set BUILD_UPDATE_SVN=0
|
||||
set BUILD_UPDATE_GIT=1
|
||||
) else if "%1" == "ninja" (
|
||||
SET BUILD_WITH_NINJA=1
|
||||
) else if "%1" == "clean" (
|
||||
set MUST_CLEAN=1
|
||||
) else if "%1" == "verbose" (
|
||||
set VERBOSE=1
|
||||
) else if "%1" == "format" (
|
||||
set FORMAT=1
|
||||
set FORMAT_ARGS=%2 %3 %4 %5 %6 %7 %8 %9
|
||||
goto EOF
|
||||
) else (
|
||||
echo Command "%1" unknown, aborting!
|
||||
exit /b 1
|
||||
|
@@ -18,8 +18,6 @@ set WINDOWS_ARCH=
|
||||
set TESTS_CMAKE_ARGS=
|
||||
set VSWHERE_ARGS=
|
||||
set BUILD_UPDATE=
|
||||
set BUILD_UPDATE_GIT=
|
||||
set BUILD_UPDATE_SVN=
|
||||
set BUILD_SHOW_HASHES=
|
||||
set SHOW_HELP=
|
||||
set BUILD_WITH_NINJA=
|
||||
@@ -29,4 +27,3 @@ set CLANG_CMAKE_ARGS=
|
||||
set ASAN_CMAKE_ARGS=
|
||||
set WITH_PYDEBUG=
|
||||
set PYDEBUG_CMAKE_ARGS=
|
||||
set FORMAT=
|
||||
|
@@ -9,16 +9,14 @@ echo - bpy
|
||||
echo.
|
||||
echo Utilities ^(not associated with building^)
|
||||
echo - clean ^(Target must be set^)
|
||||
echo - update ^(Update both SVN and GIT^)
|
||||
echo - code_update ^(Update only GIT^)
|
||||
echo - update
|
||||
echo - nobuild ^(only generate project files^)
|
||||
echo - showhash ^(Show git hashes of source tree^)
|
||||
echo - format [path] ^(Format the source using clang-format, path is optional, requires python 3.x to be available^)
|
||||
echo.
|
||||
echo Configuration options
|
||||
echo - verbose ^(enable diagnostic output during configuration^)
|
||||
echo - with_tests ^(enable building unit tests^)
|
||||
echo - nobuildinfo ^(disable buildinfo^)
|
||||
echo - noge ^(disable building game engine and player^)
|
||||
echo - debug ^(Build an unoptimized debuggable build^)
|
||||
echo - packagename [newname] ^(override default cpack package name^)
|
||||
echo - buildir [newdir] ^(override default build folder^)
|
||||
@@ -30,7 +28,6 @@ echo - 2017b ^(build with visual studio 2017 Build Tools^)
|
||||
|
||||
echo.
|
||||
echo Experimental options
|
||||
echo - with_opengl_tests ^(enable both the render and draw opengl test suites^)
|
||||
echo - 2015 ^(build with visual studio 2015^)
|
||||
echo - clang ^(enable building with clang^)
|
||||
echo - asan ^(enable asan when building with clang^)
|
||||
|
@@ -1,18 +1,20 @@
|
||||
if "%BUILD_UPDATE_SVN%" == "1" (
|
||||
if "%SVN%" == "" (
|
||||
if "%SVN%" == "" (
|
||||
echo svn not found, cannot update libraries
|
||||
goto UPDATE_GIT
|
||||
)
|
||||
"%SVN%" up "%BLENDER_DIR%/../lib/*"
|
||||
)
|
||||
"%SVN%" up "%BLENDER_DIR%/../lib/*"
|
||||
|
||||
:UPDATE_GIT
|
||||
|
||||
if "%BUILD_UPDATE_GIT%" == "1" (
|
||||
if "%GIT%" == "" (
|
||||
if "%GIT%" == "" (
|
||||
echo Git not found, cannot update code
|
||||
goto EOF
|
||||
)
|
||||
"%GIT%" pull --rebase
|
||||
"%GIT%" submodule foreach git pull --rebase origin master
|
||||
)
|
||||
"%GIT%" pull --rebase
|
||||
"%GIT%" submodule update --init --recursive
|
||||
rem Use blender2.7 branch for submodules that have it.
|
||||
"%GIT%" submodule foreach "git checkout blender2.7 || git checkout master"
|
||||
"%GIT%" submodule foreach git pull --rebase origin
|
||||
|
||||
|
||||
:EOF
|
||||
|
@@ -57,6 +57,7 @@
|
||||
|
||||
import struct
|
||||
import sys
|
||||
import getopt # command line arguments handling
|
||||
from string import Template # strings completion
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# Doxyfile 1.8.15
|
||||
# Doxyfile 1.8.11
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project.
|
||||
@@ -17,11 +17,11 @@
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# This tag specifies the encoding used for all characters in the configuration
|
||||
# file that follow. The default is UTF-8 which is also the encoding used for all
|
||||
# text before the first occurrence of this tag. Doxygen uses libiconv (or the
|
||||
# iconv built into libc) for the transcoding. See
|
||||
# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
|
||||
# This tag specifies the encoding used for all characters in the config file
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all text
|
||||
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
|
||||
# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
|
||||
# for the list of possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
@@ -93,14 +93,6 @@ ALLOW_UNICODE_NAMES = NO
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all generated output in the proper direction.
|
||||
# Possible values are: None, LTR, RTL and Context.
|
||||
# The default value is: None.
|
||||
|
||||
OUTPUT_TEXT_DIRECTION = None
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
|
||||
# descriptions after the members that are listed in the file and class
|
||||
# documentation (similar to Javadoc). Set to NO to disable this.
|
||||
@@ -244,12 +236,7 @@ TAB_SIZE = 4
|
||||
# will allow you to put the command \sideeffect (or @sideeffect) in the
|
||||
# documentation, which will result in a user-defined paragraph with heading
|
||||
# "Side Effects:". You can put \n's in the value part of an alias to insert
|
||||
# newlines (in the resulting output). You can put ^^ in the value part of an
|
||||
# alias to insert a newline as if a physical newline was in the original file.
|
||||
# When you need a literal { or } or , in the value part of an alias you have to
|
||||
# escape them by means of a backslash (\), this can lead to conflicts with the
|
||||
# commands \{ and \} for these it is advised to use the version @{ and @} or use
|
||||
# a double escape (\\{ and \\})
|
||||
# newlines.
|
||||
|
||||
ALIASES =
|
||||
|
||||
@@ -287,26 +274,17 @@ OPTIMIZE_FOR_FORTRAN = NO
|
||||
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
|
||||
# sources only. Doxygen will then generate output that is more tailored for that
|
||||
# language. For instance, namespaces will be presented as modules, types will be
|
||||
# separated into more groups, etc.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_OUTPUT_SLICE = NO
|
||||
|
||||
# Doxygen selects the parser to use depending on the extension of the files it
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
# extension. Doxygen has a built-in mapping, but you can override or extend it
|
||||
# using this tag. The format is ext=language, where ext is a file extension, and
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
|
||||
# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice,
|
||||
# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
|
||||
# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
|
||||
# tries to guess whether the code is fixed or free formatted code, this is the
|
||||
# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat
|
||||
# .inc files as Fortran files (default is PHP), and .f files as C (default is
|
||||
# Fortran), use: inc=Fortran f=C.
|
||||
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
|
||||
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
|
||||
# Fortran. In the later case the parser tries to guess whether the code is fixed
|
||||
# or free formatted code, this is the default for Fortran type files), VHDL. For
|
||||
# instance to make doxygen treat .inc files as Fortran files (default is PHP),
|
||||
# and .f files as C (default is Fortran), use: inc=Fortran f=C.
|
||||
#
|
||||
# Note: For files without extension you can use no_extension as a placeholder.
|
||||
#
|
||||
@@ -317,7 +295,7 @@ EXTENSION_MAPPING =
|
||||
|
||||
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
|
||||
# according to the Markdown format, which allows for more readable
|
||||
# documentation. See https://daringfireball.net/projects/markdown/ for details.
|
||||
# documentation. See http://daringfireball.net/projects/markdown/ for details.
|
||||
# The output of markdown processing is further processed by doxygen, so you can
|
||||
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
|
||||
# case of backward compatibilities issues.
|
||||
@@ -325,15 +303,6 @@ EXTENSION_MAPPING =
|
||||
|
||||
MARKDOWN_SUPPORT = YES
|
||||
|
||||
# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
|
||||
# to that level are automatically included in the table of contents, even if
|
||||
# they do not have an id attribute.
|
||||
# Note: This feature currently applies only to Markdown headings.
|
||||
# Minimum value: 0, maximum value: 99, default value: 0.
|
||||
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
|
||||
|
||||
TOC_INCLUDE_HEADINGS = 0
|
||||
|
||||
# When enabled doxygen tries to link words that correspond to documented
|
||||
# classes, or namespaces to their corresponding documentation. Such a link can
|
||||
# be prevented in individual cases by putting a % sign in front of the word or
|
||||
@@ -359,7 +328,7 @@ BUILTIN_STL_SUPPORT = NO
|
||||
CPP_CLI_SUPPORT = NO
|
||||
|
||||
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
|
||||
# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
|
||||
# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
|
||||
# will parse them like normal C++ but will assume all classes use public instead
|
||||
# of private inheritance when no explicit protection keyword is present.
|
||||
# The default value is: NO.
|
||||
@@ -762,7 +731,7 @@ WARNINGS = YES
|
||||
# will automatically be disabled.
|
||||
# The default value is: YES.
|
||||
|
||||
WARN_IF_UNDOCUMENTED = NO
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
|
||||
# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
|
||||
# potential errors in the documentation, such as not documenting some parameters
|
||||
@@ -775,8 +744,7 @@ WARN_IF_DOC_ERROR = YES
|
||||
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
|
||||
# are documented, but have no documentation for their parameters or return
|
||||
# value. If set to NO, doxygen will only warn about wrong or incomplete
|
||||
# parameter documentation, but not about the absence of documentation. If
|
||||
# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
|
||||
# parameter documentation, but not about the absence of documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_NO_PARAMDOC = NO
|
||||
@@ -824,7 +792,7 @@ INPUT = doxygen.main.h \
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
|
||||
# documentation (see: https://www.gnu.org/software/libiconv/) for the list of
|
||||
# documentation (see: http://www.gnu.org/software/libiconv) for the list of
|
||||
# possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
@@ -841,8 +809,8 @@ INPUT_ENCODING = UTF-8
|
||||
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
|
||||
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
|
||||
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
|
||||
# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl,
|
||||
# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js.
|
||||
|
||||
FILE_PATTERNS =
|
||||
|
||||
@@ -859,7 +827,7 @@ RECURSIVE = YES
|
||||
# Note that relative paths are relative to the directory from which doxygen is
|
||||
# run.
|
||||
|
||||
EXCLUDE = ../../build_files \
|
||||
EXCLUDE = ../../build_files, \
|
||||
../../release
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||
@@ -1000,7 +968,7 @@ INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
|
||||
# entity all documented functions referencing it will be listed.
|
||||
# function all documented functions referencing it will be listed.
|
||||
# The default value is: NO.
|
||||
|
||||
REFERENCED_BY_RELATION = YES
|
||||
@@ -1032,12 +1000,12 @@ SOURCE_TOOLTIPS = YES
|
||||
# If the USE_HTAGS tag is set to YES then the references to source code will
|
||||
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
|
||||
# source browser. The htags tool is part of GNU's global source tagging system
|
||||
# (see https://www.gnu.org/software/global/global.html). You will need version
|
||||
# (see http://www.gnu.org/software/global/global.html). You will need version
|
||||
# 4.8.6 or higher.
|
||||
#
|
||||
# To use it do the following:
|
||||
# - Install the latest version of global
|
||||
# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
|
||||
# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
|
||||
# - Make sure the INPUT points to the root of the source tree
|
||||
# - Run doxygen as normal
|
||||
#
|
||||
@@ -1213,17 +1181,6 @@ HTML_COLORSTYLE_GAMMA = 79
|
||||
|
||||
HTML_TIMESTAMP = YES
|
||||
|
||||
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
|
||||
# documentation will contain a main index with vertical navigation menus that
|
||||
# are dynamically created via Javascript. If disabled, the navigation index will
|
||||
# consists of multiple levels of tabs that are statically embedded in every HTML
|
||||
# page. Disable this option to support browsers that do not have Javascript,
|
||||
# like the Qt help browser.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_DYNAMIC_MENUS = YES
|
||||
|
||||
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
|
||||
# documentation will contain sections that can be hidden and shown after the
|
||||
# page has loaded.
|
||||
@@ -1247,13 +1204,13 @@ HTML_INDEX_NUM_ENTRIES = 100
|
||||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
|
||||
# generated that can be used as input for Apple's Xcode 3 integrated development
|
||||
# environment (see: https://developer.apple.com/xcode/), introduced with OSX
|
||||
# 10.5 (Leopard). To create a documentation set, doxygen will generate a
|
||||
# environment (see: http://developer.apple.com/tools/xcode/), introduced with
|
||||
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
|
||||
# Makefile in the HTML output directory. Running make will produce the docset in
|
||||
# that directory and running make install will install the docset in
|
||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
|
||||
# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
|
||||
# genXcode/_index.html for more information.
|
||||
# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
|
||||
# for more information.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
@@ -1292,7 +1249,7 @@ DOCSET_PUBLISHER_NAME = Publisher
|
||||
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
|
||||
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
|
||||
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
|
||||
# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# Windows.
|
||||
#
|
||||
# The HTML Help Workshop contains a compiler that can convert all HTML output
|
||||
@@ -1368,7 +1325,7 @@ QCH_FILE =
|
||||
|
||||
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
|
||||
# Project output. For more information please see Qt Help Project / Namespace
|
||||
# (see: http://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
|
||||
# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
@@ -1376,7 +1333,7 @@ QHP_NAMESPACE = org.doxygen.Project
|
||||
|
||||
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
|
||||
# Help Project output. For more information please see Qt Help Project / Virtual
|
||||
# Folders (see: http://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-
|
||||
# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
|
||||
# folders).
|
||||
# The default value is: doc.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
@@ -1385,7 +1342,7 @@ QHP_VIRTUAL_FOLDER = doc
|
||||
|
||||
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
|
||||
# filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
|
||||
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
@@ -1393,7 +1350,7 @@ QHP_CUST_FILTER_NAME =
|
||||
|
||||
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
|
||||
# custom filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see: http://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
|
||||
# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
|
||||
# filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
@@ -1401,7 +1358,7 @@ QHP_CUST_FILTER_ATTRS =
|
||||
|
||||
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
|
||||
# project's filter section matches. Qt Help Project / Filter Attributes (see:
|
||||
# http://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
@@ -1494,7 +1451,7 @@ EXT_LINKS_IN_WINDOW = NO
|
||||
|
||||
FORMULA_FONTSIZE = 10
|
||||
|
||||
# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
|
||||
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
|
||||
# generated for formulas are transparent PNGs. Transparent PNGs are not
|
||||
# supported properly for IE 6.0, but are supported on all modern browsers.
|
||||
#
|
||||
@@ -1506,7 +1463,7 @@ FORMULA_FONTSIZE = 10
|
||||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# https://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# http://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
@@ -1533,8 +1490,8 @@ MATHJAX_FORMAT = HTML-CSS
|
||||
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
|
||||
# Content Delivery Network so you can quickly see the result without installing
|
||||
# MathJax. However, it is strongly recommended to install a local copy of
|
||||
# MathJax from https://www.mathjax.org before deployment.
|
||||
# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/.
|
||||
# MathJax from http://www.mathjax.org before deployment.
|
||||
# The default value is: http://cdn.mathjax.org/mathjax/latest.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_RELPATH = http://www.mathjax.org/mathjax
|
||||
@@ -1595,7 +1552,7 @@ SERVER_BASED_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: https://xapian.org/).
|
||||
# Xapian (see: http://xapian.org/).
|
||||
#
|
||||
# See the section "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
@@ -1608,7 +1565,7 @@ EXTERNAL_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see: https://xapian.org/). See the section "External Indexing and
|
||||
# Xapian (see: http://xapian.org/). See the section "External Indexing and
|
||||
# Searching" for details.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
@@ -1660,34 +1617,21 @@ LATEX_OUTPUT = latex
|
||||
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
|
||||
# invoked.
|
||||
#
|
||||
# Note that when not enabling USE_PDFLATEX the default is latex when enabling
|
||||
# USE_PDFLATEX the default is pdflatex and when in the later case latex is
|
||||
# chosen this is overwritten by pdflatex. For specific output languages the
|
||||
# default can have been set differently, this depends on the implementation of
|
||||
# the output language.
|
||||
# Note that when enabling USE_PDFLATEX this option is only used for generating
|
||||
# bitmaps for formulas in the HTML output, but not in the Makefile that is
|
||||
# written to the output directory.
|
||||
# The default file is: latex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_CMD_NAME = latex
|
||||
|
||||
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
|
||||
# index for LaTeX.
|
||||
# Note: This tag is used in the Makefile / make.bat.
|
||||
# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
|
||||
# (.tex).
|
||||
# The default file is: makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
|
||||
# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
|
||||
# generate index for LaTeX.
|
||||
# Note: This tag is used in the generated output file (.tex).
|
||||
# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
|
||||
# The default value is: \makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_MAKEINDEX_CMD = \makeindex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
|
||||
# documents. This may be useful for small projects and may help to save some
|
||||
# trees in general.
|
||||
@@ -1822,14 +1766,6 @@ LATEX_BIB_STYLE = plain
|
||||
|
||||
LATEX_TIMESTAMP = NO
|
||||
|
||||
# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# path from which the emoji images will be read. If a relative path is entered,
|
||||
# it will be relative to the LATEX_OUTPUT directory. If left blank the
|
||||
# LATEX_OUTPUT directory will be used.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_EMOJI_DIRECTORY =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -1869,9 +1805,9 @@ COMPACT_RTF = NO
|
||||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's
|
||||
# configuration file, i.e. a series of assignments. You only have to provide
|
||||
# replacements, missing definitions are set to their default value.
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's config
|
||||
# file, i.e. a series of assignments. You only have to provide replacements,
|
||||
# missing definitions are set to their default value.
|
||||
#
|
||||
# See also section "Doxygen usage" for information on how to generate the
|
||||
# default style sheet that doxygen normally uses.
|
||||
@@ -1880,8 +1816,8 @@ RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
|
||||
# Set optional variables used in the generation of an RTF document. Syntax is
|
||||
# similar to doxygen's configuration file. A template extensions file can be
|
||||
# generated using doxygen -e rtf extensionFile.
|
||||
# similar to doxygen's config file. A template extensions file can be generated
|
||||
# using doxygen -e rtf extensionFile.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
@@ -1967,13 +1903,6 @@ XML_OUTPUT = xml
|
||||
|
||||
XML_PROGRAMLISTING = YES
|
||||
|
||||
# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
|
||||
# namespace members in file scope as well, matching the HTML output.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_XML is set to YES.
|
||||
|
||||
XML_NS_MEMB_FILE_SCOPE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the DOCBOOK output
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -2006,9 +1935,9 @@ DOCBOOK_PROGRAMLISTING = NO
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
|
||||
# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
|
||||
# the structure of the code including all documentation. Note that this feature
|
||||
# is still experimental and incomplete at the moment.
|
||||
# AutoGen Definitions (see http://autogen.sf.net) file that captures the
|
||||
# structure of the code including all documentation. Note that this feature is
|
||||
# still experimental and incomplete at the moment.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
@@ -2431,11 +2360,6 @@ DIAFILE_DIRS =
|
||||
|
||||
PLANTUML_JAR_PATH =
|
||||
|
||||
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
|
||||
# configuration file for plantuml.
|
||||
|
||||
PLANTUML_CFG_FILE =
|
||||
|
||||
# When using plantuml, the specified paths are searched for files specified by
|
||||
# the !include statement in a plantuml block.
|
||||
|
||||
|
@@ -71,7 +71,7 @@
|
||||
* \ingroup audaspace
|
||||
*/
|
||||
/** \defgroup audsrc Audaspace SRC
|
||||
*
|
||||
|
||||
* \ingroup audaspace
|
||||
*/
|
||||
/** \defgroup audffmpeg Audaspace FFMpeg
|
||||
@@ -91,3 +91,4 @@
|
||||
* \ingroup intern GUI
|
||||
* \ref GHOSTPage
|
||||
*/
|
||||
|
||||
|
@@ -7,11 +7,11 @@
|
||||
* These pages document the source code of blender.
|
||||
*
|
||||
* \subsection implinks Important Links
|
||||
* - <a href="https://developer.blender.org">developer.blender.org</a> with bug tracker.
|
||||
* - <a href="https://wiki.blender.org">Development documents</a> on our wiki.
|
||||
* - <a href="http://developer.blender.org">developer.blender.org</a> with bug tracker.
|
||||
* - <a href="http://wiki.blender.org/index.php/Dev:Contents">Development documents</a> on our wiki.
|
||||
*
|
||||
* \subsection blother Other
|
||||
* For more information on using Blender browse to https://www.blender.org
|
||||
* For more information on using Blender browse to http://www.blender.org
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -1,4 +1,10 @@
|
||||
|
||||
/** \defgroup blenderplayer Blender Player */
|
||||
|
||||
/** \defgroup blc bad level calls
|
||||
* \ingroup blenderplayer
|
||||
*/
|
||||
|
||||
/** \defgroup render Rendering
|
||||
* \ingroup blender
|
||||
*/
|
||||
@@ -23,14 +29,71 @@
|
||||
* \ingroup python
|
||||
*/
|
||||
|
||||
/** \defgroup blpluginapi Blender pluginapi
|
||||
* \ingroup blender
|
||||
* \attention not in use currently
|
||||
*/
|
||||
|
||||
/* ================================ */
|
||||
|
||||
/** \defgroup bge Game Engine */
|
||||
/** \defgroup gamelogic Game Logic
|
||||
* \ingroup bge
|
||||
*/
|
||||
/** \defgroup bgeconv Converter
|
||||
* \ingroup bge
|
||||
*/
|
||||
/** \defgroup blroutines Blender Routines
|
||||
* \ingroup bge
|
||||
*/
|
||||
/** \defgroup expressions Expressions
|
||||
* \ingroup bge
|
||||
*/
|
||||
/** \defgroup player Game Player
|
||||
* \ingroup bge
|
||||
*/
|
||||
/** \defgroup ketsji Ketsji
|
||||
* \ingroup bge
|
||||
* \todo check all headers and code files for proper licenses
|
||||
*/
|
||||
/** \defgroup ketsjinet Ketsji Network
|
||||
* \ingroup ketsji
|
||||
*/
|
||||
/** \defgroup bgenet Network
|
||||
* \ingroup bge
|
||||
*/
|
||||
/** \defgroup bgenetlb Loopback Network
|
||||
* \ingroup bgenet
|
||||
*/
|
||||
/** \defgroup phys Physics
|
||||
* \ingroup bge
|
||||
*/
|
||||
/** \defgroup physbullet Bullet Physics
|
||||
* \ingroup phys
|
||||
*/
|
||||
/** \defgroup physdummy Dummy Physics (none)
|
||||
* \ingroup phys
|
||||
*/
|
||||
/** \defgroup bgerast Rasterizer
|
||||
* \ingroup bge
|
||||
*/
|
||||
/** \defgroup bgerastoglfilters OpenGL Filters
|
||||
* \ingroup bgerast
|
||||
*/
|
||||
/** \defgroup bgerastogl OpenGL Rasterizer
|
||||
* \ingroup bgerast
|
||||
*/
|
||||
/** \defgroup bgesg BGE SceneGraph
|
||||
* \ingroup bge
|
||||
*/
|
||||
/** \defgroup bgevideotex BGE Video Texture
|
||||
* \ingroup bge
|
||||
*/
|
||||
|
||||
/* ================================ */
|
||||
|
||||
/** \defgroup blender Blender */
|
||||
|
||||
/** \defgroup balembic BlenderAlembic
|
||||
* \ingroup blender
|
||||
*/
|
||||
|
||||
/** \defgroup blt BlenTranslation
|
||||
* \ingroup blender
|
||||
*/
|
||||
@@ -74,10 +137,6 @@
|
||||
* \ingroup blender
|
||||
*/
|
||||
|
||||
/** \defgroup shader_fx Shader Effects
|
||||
* \ingroup blender
|
||||
*/
|
||||
|
||||
/** \defgroup data DNA, RNA and .blend access*/
|
||||
|
||||
/** \defgroup gpu GPU
|
||||
@@ -129,10 +188,6 @@
|
||||
* \ingroup editors
|
||||
*/
|
||||
|
||||
/** \defgroup edgizmolib gizmo library
|
||||
* \ingroup editors
|
||||
*/
|
||||
|
||||
/** \defgroup edgpencil gpencil
|
||||
* \ingroup editors
|
||||
*/
|
||||
@@ -169,10 +224,6 @@
|
||||
* \ingroup editors
|
||||
*/
|
||||
|
||||
/** \defgroup edscene scene
|
||||
* \ingroup editors
|
||||
*/
|
||||
|
||||
/** \defgroup edsculpt sculpt and paint
|
||||
* \ingroup editors
|
||||
*/
|
||||
@@ -213,6 +264,10 @@
|
||||
* \ingroup editors
|
||||
*/
|
||||
|
||||
/** \defgroup splogic game logic editor
|
||||
* \ingroup editors
|
||||
*/
|
||||
|
||||
/** \defgroup spnla NLA editor
|
||||
* \ingroup editors
|
||||
*/
|
||||
|
@@ -65,7 +65,7 @@ fw('.TH "BLENDER" "1" "%s" "Blender %s"\n' % (date_string, blender_version.repla
|
||||
|
||||
fw('''
|
||||
.SH NAME
|
||||
blender \- a full-featured 3D application''')
|
||||
blender \- a 3D modelling and rendering package''')
|
||||
|
||||
fw('''
|
||||
.SH SYNOPSIS
|
||||
@@ -76,9 +76,9 @@ fw('''
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
.B blender
|
||||
is a full-featured 3D application. It supports the entirety of the 3D pipeline - modeling, rigging, animation, simulation, rendering, compositing, motion tracking, and video editing.
|
||||
is a 3D modelling and rendering package. Originating as the in-house software of a high quality animation studio, Blender has proven to be an extremely fast and versatile design instrument. The software has a personal touch, offering a unique approach to the world of Three Dimensions.
|
||||
|
||||
Use Blender to create 3D images and animations, films and commercials, content for games, architectural and industrial visualizatons, and scientific visualizations.
|
||||
Use Blender to create TV commercials, to make technical visualizations, business graphics, to create content for games, or design user interfaces. You can easy build and manage complex environments. The renderer is versatile and extremely fast. All basic animation principles (curves & keys) are well implemented.
|
||||
|
||||
http://www.blender.org''')
|
||||
|
||||
|
201
doc/python_api/blender-org/layout.html
Normal file
201
doc/python_api/blender-org/layout.html
Normal file
@@ -0,0 +1,201 @@
|
||||
{%- block doctype -%}
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
{%- endblock %}
|
||||
{%- set script_files = script_files + [pathto("_static/jquery.sidebar.js", 1)] %}
|
||||
{%- set reldelim1 = reldelim1 is not defined and ' »' or reldelim1 %}
|
||||
{%- set reldelim2 = reldelim2 is not defined and ' •' or reldelim2 %}
|
||||
|
||||
{%- macro relbar() %}
|
||||
<div class="subnav boxheader">
|
||||
<ul class="noprint"><li><a href="http://wiki.blender.org/index.php/Dev:Contents">Documentation</a></li><li>•</li><li><a href="http://www.blender.org/development/report-a-bug/">Report a Bug</a></li><li>•</li><li><a href="http://wiki.blender.org/index.php/Dev:Doc/Process/Patches">Submit a Patch</a></li><li>•</li><li><a href="http://www.blender.org/development/release-logs/">Release Logs</a></li><li>•</li><li><a href="http://www.blender.org/development/building-blender/">Building Blender</a></li><li>•</li><li><a href="http://wiki.blender.org/index.php/Dev:Doc/Projects">Current Projects</a></li><li>•</li><li><a href="http://wiki.blender.org/index.php/Dev:Source/Architecture">Architecture</a></li><li>•</li><li><a href="http://www.blender.org/documentation/250PythonDoc/contents.html">Python API</a></li><li>•</li><li><a href="http://wiki.blender.org">Wiki</a></li></ul>
|
||||
</div>
|
||||
<div class="related subnav">
|
||||
<h3>{{ _('Navigation') }}</h3>
|
||||
<ul>
|
||||
{%- for rellink in rellinks %}
|
||||
<li class="right">
|
||||
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
|
||||
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
|
||||
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
|
||||
{%- endfor %}
|
||||
{%- block rootrellink %}
|
||||
<li><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
|
||||
{%- endblock %}
|
||||
{%- for parent in parents %}
|
||||
<li><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
|
||||
{%- endfor %}
|
||||
{%- block relbaritems %} {% endblock %}
|
||||
</ul>
|
||||
</div>
|
||||
{%- endmacro %}
|
||||
|
||||
{%- macro sidebar() %}
|
||||
{%- if not embedded %}{% if not theme_nosidebar|tobool %}
|
||||
<div class="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
{%- block sidebarlogo %}
|
||||
{%- if logo %}
|
||||
<p class="logo"><a href="{{ pathto(master_doc) }}">
|
||||
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
|
||||
</a></p>
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
{%- block sidebartoc %}
|
||||
{%- if display_toc %}
|
||||
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
|
||||
{{ toc }}
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
{%- block sidebarrel %}
|
||||
{%- if prev %}
|
||||
<h4>{{ _('Previous topic') }}</h4>
|
||||
<p class="topless"><a href="{{ prev.link|e }}"
|
||||
title="{{ _('previous chapter') }}">{{ prev.title }}</a></p>
|
||||
{%- endif %}
|
||||
{%- if next %}
|
||||
<h4>{{ _('Next topic') }}</h4>
|
||||
<p class="topless"><a href="{{ next.link|e }}"
|
||||
title="{{ _('next chapter') }}">{{ next.title }}</a></p>
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
{%- block sidebarsourcelink %}
|
||||
{%- if show_source and has_source and sourcename %}
|
||||
<h3>{{ _('This Page') }}</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
|
||||
rel="nofollow">{{ _('Show Source') }}</a></li>
|
||||
</ul>
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
{%- if customsidebar %}
|
||||
{% include customsidebar %}
|
||||
{%- endif %}
|
||||
{%- block sidebarsearch %}
|
||||
{%- if pagename != "search" %}
|
||||
<div id="searchbox" style="display: none">
|
||||
<h3>{{ _('Quick search') }}</h3>
|
||||
<form class="search" action="{{ pathto('search') }}" method="get">
|
||||
<input type="text" name="q" size="18" />
|
||||
<input type="submit" value="{{ _('Go') }}" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip">
|
||||
{{ _('Enter search terms or a module, class or function name.') }}
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{%- endif %}{% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
{{ metatags }}
|
||||
{%- if not embedded and docstitle %}
|
||||
{%- set titlesuffix = " — "|safe + docstitle|e %}
|
||||
{%- else %}
|
||||
{%- set titlesuffix = "" %}
|
||||
{%- endif %}
|
||||
<title>{{ title|striptags }}{{ titlesuffix }}</title>
|
||||
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
|
||||
{%- if not embedded %}
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '{{ pathto("", 1) }}',
|
||||
VERSION: '{{ release|e }}',
|
||||
COLLAPSE_MODINDEX: false,
|
||||
FILE_SUFFIX: '{{ file_suffix }}',
|
||||
HAS_SOURCE: {{ has_source|lower }}
|
||||
};
|
||||
</script>
|
||||
{%- for scriptfile in script_files %}
|
||||
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
||||
{%- endfor %}
|
||||
{%- if use_opensearch %}
|
||||
<link rel="search" type="application/opensearchdescription+xml"
|
||||
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
|
||||
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
|
||||
{%- endif %}
|
||||
{%- if favicon %}
|
||||
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- block linktags %}
|
||||
{%- if hasdoc('about') %}
|
||||
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
|
||||
{%- endif %}
|
||||
{%- if hasdoc('genindex') %}
|
||||
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
|
||||
{%- endif %}
|
||||
{%- if hasdoc('search') %}
|
||||
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
|
||||
{%- endif %}
|
||||
{%- if hasdoc('copyright') %}
|
||||
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
|
||||
{%- endif %}
|
||||
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
|
||||
{%- if parents %}
|
||||
<link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" />
|
||||
{%- endif %}
|
||||
{%- if next %}
|
||||
<link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" />
|
||||
{%- endif %}
|
||||
{%- if prev %}
|
||||
<link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" />
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
{%- block extrahead %} {% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{%- block header %}
|
||||
<div class="noprint" id="navcontainer"><a href="http://www.blender.org/"><img width="140" height="50" title="blender.org home page" alt="blender.org home page" src="http://www.blender.org/fileadmin/site/_gfx/nav-home.png"></a><a href="http://www.blender.org/features-gallery/"><img width="140" height="50" title="Features & Gallery" alt="Features & Gallery" src="http://www.blender.org/fileadmin/site/_gfx/nav-features.png"></a><a href="http://www.blender.org/download/get-blender/"><img width="140" height="50" title="Download" alt="Download" src="http://www.blender.org/fileadmin/site/_gfx/nav-download.png"></a><a href="http://www.blender.org/education-help/"><img width="140" height="50" title="Tutorials & Help" alt="Tutorials & Help" src="http://www.blender.org/fileadmin/site/_gfx/nav-help.png"></a><a href="http://www.blender.org/community/user-community/"><img width="140" height="50" title="Community" alt="Community" src="http://www.blender.org/fileadmin/site/_gfx/nav-community.png"></a><a href="http://www.blender.org/development/"><img width="140" height="50" title="Development" alt="Development" src="http://www.blender.org/fileadmin/site/_gfx/nav-development-on.png"></a><a href="http://www.blender.org/e-shop/"><img width="140" height="50" title="e-Shop" alt="e-Shop" src="http://www.blender.org/fileadmin/site/_gfx/nav-eshop.png"></a></div>
|
||||
{% endblock %}
|
||||
|
||||
<div class="document">
|
||||
<div id="pageheader"></div>
|
||||
{%- block relbar1 %}{{ relbar() }}{% endblock %}
|
||||
|
||||
{%- block sidebar1 %} {# possible location for sidebar #} {% endblock %}
|
||||
|
||||
{%- block document %}
|
||||
<div class="documentwrapper">
|
||||
{%- if not embedded %}{% if not theme_nosidebar|tobool %}
|
||||
<div class="bodywrapper">
|
||||
{%- endif %}{% endif %}
|
||||
<div class="body">
|
||||
{% block body %} {% endblock %}
|
||||
</div>
|
||||
{%- if not embedded %}{% if not theme_nosidebar|tobool %}
|
||||
</div>
|
||||
{%- endif %}{% endif %}
|
||||
</div>
|
||||
{%- endblock %}
|
||||
|
||||
{%- block sidebar2 %}{{ sidebar() }}{% endblock %}
|
||||
<div class="clearer"></div>
|
||||
|
||||
{%- block footer %}
|
||||
<div class="footer">
|
||||
{%- if hasdoc('copyright') %}
|
||||
{% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
|
||||
{%- else %}
|
||||
{% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %}
|
||||
{%- endif %}
|
||||
{%- if last_updated %}
|
||||
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
|
||||
{%- endif %}
|
||||
{%- if show_sphinx %}
|
||||
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
|
||||
{%- endif %}
|
||||
</div><b class="round"><b id="r1"></b><b id="r2"></b><b id="r3"></b><b id="r4"></b></b>
|
||||
{%- endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
4
doc/python_api/blender-org/page.html
Normal file
4
doc/python_api/blender-org/page.html
Normal file
@@ -0,0 +1,4 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
{{ body }}
|
||||
{% endblock %}
|
BIN
doc/python_api/blender-org/static/bg.png
Normal file
BIN
doc/python_api/blender-org/static/bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
654
doc/python_api/blender-org/static/default.css_t
Normal file
654
doc/python_api/blender-org/static/default.css_t
Normal file
@@ -0,0 +1,654 @@
|
||||
/**
|
||||
* Sphinx stylesheet -- default theme
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
@import url("basic.css");
|
||||
|
||||
/* -- page layout ----------------------------------------------------------- */
|
||||
|
||||
#navcontainer {
|
||||
height: 50px;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
width: 980px;
|
||||
}
|
||||
|
||||
#navcontainer img {
|
||||
width: 140px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
#pageheader {
|
||||
background-image:url("bg.png");
|
||||
height:80px;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: {{ theme_bodyfont }};
|
||||
font-size: 12px;
|
||||
line-height: 145%;
|
||||
background-color: {{ theme_footerbgcolor }};
|
||||
color: {{ theme_textcolor }};
|
||||
min-width: 980px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.document {
|
||||
margin:20px auto 0;
|
||||
position:relative;
|
||||
text-align:left;
|
||||
width:980px;
|
||||
/* background-color: {{ theme_sidebarbgcolor }};*/
|
||||
}
|
||||
|
||||
div.documentwrapper {
|
||||
float: left;
|
||||
width: 100%;
|
||||
background-color: {{ theme_bgcolor }};
|
||||
border-color: {{ theme_bordercolor }};
|
||||
border-style:solid;
|
||||
border-width:0 1px;
|
||||
margin:0 auto;
|
||||
min-height:30em;
|
||||
padding:35px;
|
||||
/* position:relative;*/
|
||||
text-align:left;
|
||||
width:908px;
|
||||
|
||||
}
|
||||
|
||||
div.bodywrapper {
|
||||
margin: 0 0 0 230px;
|
||||
}
|
||||
|
||||
div.body {
|
||||
background-color: {{ theme_bgcolor }};
|
||||
color: {{ theme_textcolor }};
|
||||
padding: 0;
|
||||
width: 640px;
|
||||
}
|
||||
|
||||
{%- if theme_rightsidebar|tobool %}
|
||||
div.bodywrapper {
|
||||
margin: 0 230px 0 0;
|
||||
}
|
||||
{%- endif %}
|
||||
|
||||
div.footer {
|
||||
background: #292929;
|
||||
border-left: 1px solid #363636;
|
||||
border-right: 1px solid #363636;
|
||||
color: #ffffff;
|
||||
/* width: 100%;*/
|
||||
margin: 0 auto;
|
||||
padding: 20px 20px 15px 35px;
|
||||
text-align: center;
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
div.footer+.round b {
|
||||
display: block;
|
||||
background: #292929;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
div.footer+.round #r1 {
|
||||
border-left: 1px solid #363636;
|
||||
border-right: 1px solid #363636;
|
||||
height: 2px;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
div.footer+.round #r2 {
|
||||
border-left: 1px solid #363636;
|
||||
border-right: 1px solid #363636;
|
||||
height: 1px;
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
||||
div.footer+.round #r3 {
|
||||
border-left: 1px solid #363636;
|
||||
border-right: 1px solid #363636;
|
||||
height: 1px;
|
||||
margin: 0 3px;
|
||||
}
|
||||
|
||||
div.footer+.round #r4 {
|
||||
border-bottom: 1px solid #363636;
|
||||
height: 0px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
div.footer a {
|
||||
color: {{ theme_footertextcolor }};
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.boxheader {
|
||||
background-color:#3E4D5E;
|
||||
}
|
||||
|
||||
.subnav {
|
||||
height:auto !important;
|
||||
min-height:15px;
|
||||
padding:9px 0px 9px 37px;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
div.related {
|
||||
width:auto;
|
||||
font-size:100%;
|
||||
font-weight:400;
|
||||
background-color: {{ theme_relbarbgcolor }};
|
||||
line-height: 145%;
|
||||
color: {{ theme_relbartextcolor }};
|
||||
}
|
||||
|
||||
div.related li {
|
||||
font-size:0.9em;
|
||||
}
|
||||
|
||||
div.related li.right {
|
||||
margin: 0;
|
||||
word-spacing: 3px;
|
||||
}
|
||||
|
||||
div.subnav li {
|
||||
display:inline;
|
||||
list-style-type:none;
|
||||
margin:0;
|
||||
padding:0 7px 0 0;
|
||||
}
|
||||
|
||||
div.subnav ul {
|
||||
display:inline;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.subnav a {
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.subnav li.subnav-active a {
|
||||
color:#F39410;
|
||||
}
|
||||
|
||||
div.related a {
|
||||
color: {{ theme_relbarlinkcolor }};
|
||||
}
|
||||
|
||||
div.related a:active {
|
||||
color: {{ theme_relbaractlinkcolor }};
|
||||
}
|
||||
|
||||
div.sphinxsidebar {
|
||||
width: 280px;
|
||||
font-size: 100%;
|
||||
{%- if theme_stickysidebar|tobool %}
|
||||
/* top: 30px;*/
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
overflow: auto;
|
||||
height: 100%;
|
||||
{%- endif %}
|
||||
{%- if theme_rightsidebar|tobool %}
|
||||
float: right;
|
||||
{%- if theme_stickysidebar|tobool %}
|
||||
right: 0;
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
}
|
||||
|
||||
div.sphinxsidebarwrapper {
|
||||
width: inherit;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
margin-top: 35px;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
div.sphinxsidebarwrapper.fixed {
|
||||
position:fixed;
|
||||
top:10px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
{%- if theme_stickysidebar|tobool %}
|
||||
/* this is nice, but it leads to hidden headings when jumping
|
||||
to an anchor */
|
||||
/*
|
||||
div.related {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
div.documentwrapper {
|
||||
margin-top: 30px;
|
||||
}
|
||||
*/
|
||||
{%- endif %}
|
||||
|
||||
div.sphinxsidebar h3 {
|
||||
font-family: {{ theme_headfont }};
|
||||
color: {{ theme_sidebartextcolor }};
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
background: #3E4D5E url("rnd.png") no-repeat top left;
|
||||
height: 16px;
|
||||
margin: 0;
|
||||
padding: 10px 5px 10px 18px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar h3 a {
|
||||
color: {{ theme_sidebartextcolor }};
|
||||
}
|
||||
|
||||
div.sphinxsidebar h4 {
|
||||
font-family: {{ theme_headfont }};
|
||||
color: {{ theme_sidebartextcolor }};
|
||||
background: #3E4D5E url("rnd.png") no-repeat top left;
|
||||
height: 16px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
padding: 10px 5px 10px 18px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar form {
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
background-color: #292929;
|
||||
{%- if theme_rightsidebar|tobool %}
|
||||
border-right: 1px solid {{ theme_bordercolor }};
|
||||
{%- endif %}
|
||||
}
|
||||
|
||||
div.sphinxsidebar p {
|
||||
background-color: #292929;
|
||||
padding: 5px 10px 10px 10px;
|
||||
color: {{ theme_sidebartextcolor }};
|
||||
{%- if theme_rightsidebar|tobool %}
|
||||
border-right: 1px solid {{ theme_bordercolor }};
|
||||
{%- endif %}
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.sphinxsidebar p.topless {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul {
|
||||
background-color: #292929;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: {{ theme_sidebartextcolor }};
|
||||
}
|
||||
|
||||
div.sphinxsidebar > div > ul {
|
||||
margin-bottom: 25px;
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar a {
|
||||
color: {{ theme_sidebarlinkcolor }};
|
||||
}
|
||||
|
||||
div.sphinxsidebar input {
|
||||
border: 1px solid {{ theme_sidebarlinkcolor }};
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/* -- body styles ----------------------------------------------------------- */
|
||||
|
||||
a {
|
||||
color: {{ theme_linkcolor }};
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/*div.body h1,*/
|
||||
div.body h2,
|
||||
div.body h3,
|
||||
div.body h4,
|
||||
div.body h5,
|
||||
div.body h6 {
|
||||
font-family: {{ theme_headfont }};
|
||||
background-color: {{ theme_headbgcolor }};
|
||||
font-weight: bold;
|
||||
color: {{ theme_headtextcolor }};
|
||||
/* border-bottom: 1px solid #ccc;*/
|
||||
margin: 20px -20px 10px -20px;
|
||||
padding: 3px 0 3px 10px;
|
||||
}
|
||||
|
||||
div.body h1 { margin-top: 0; font-size: 200%;
|
||||
color:#FFFAE0;
|
||||
font-family:"Helvetica","Arial",sans-serif;
|
||||
font-size:34px;
|
||||
font-weight:normal;
|
||||
left:32px;
|
||||
line-height:26px;
|
||||
margin-top:0;
|
||||
position:absolute;
|
||||
top:36px;
|
||||
}
|
||||
div.body h2 { font-size: 160%; }
|
||||
div.body h3 { font-size: 140%; }
|
||||
div.body h4 { font-size: 120%; }
|
||||
div.body h5 { font-size: 110%; }
|
||||
div.body h6 { font-size: 100%; }
|
||||
|
||||
a.headerlink {
|
||||
color: {{ theme_headlinkcolor }};
|
||||
font-size: 0.8em;
|
||||
padding: 0 4px 0 4px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1:hover > a.headerlink {
|
||||
display:none;
|
||||
}
|
||||
|
||||
a.headerlink:hover {
|
||||
background-color: {{ theme_headlinkcolor }};
|
||||
color: white;
|
||||
}
|
||||
|
||||
div.body p, div.body dd, div.body li {
|
||||
text-align: justify;
|
||||
line-height: 130%;
|
||||
}
|
||||
|
||||
div.note, div.seealso, div.topic, div.warning {
|
||||
color:white;
|
||||
}
|
||||
|
||||
div.admonition p.admonition-title + p {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
div.note {
|
||||
background-color: #555;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
div.seealso {
|
||||
background-color: #525241;
|
||||
border: 1px solid #ff6;
|
||||
}
|
||||
|
||||
div.topic {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
div.warning {
|
||||
background-color: #B64444;
|
||||
border: 1px solid #990606;
|
||||
}
|
||||
|
||||
p.admonition-title {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
p.admonition-title:after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
dl div.admonition {
|
||||
border:medium none;
|
||||
margin:0;
|
||||
padding:2px 5px 2px 0;
|
||||
}
|
||||
|
||||
dl.class > dd > div.warning p.admonition-title,
|
||||
dl.class > dd > div.note p.admonition-title {
|
||||
display:none;
|
||||
}
|
||||
|
||||
dl.class > dd > div.admonition.warning p,
|
||||
dl.class > dd > div.admonition.note p {
|
||||
margin:0;
|
||||
}
|
||||
|
||||
dl.class > dd > div.admonition.warning,
|
||||
dl.class > dd > div.admonition.note {
|
||||
margin-bottom:12px;
|
||||
}
|
||||
|
||||
dl div.admonition.note p.admonition-title, dl div.admonition.warning p.admonition-title {
|
||||
color:inherit;
|
||||
}
|
||||
|
||||
dl div.admonition.warning p {
|
||||
font-weight:bold;
|
||||
line-height:150%;
|
||||
}
|
||||
|
||||
dl div.admonition.warning p * {
|
||||
font-weight:normal;
|
||||
}
|
||||
|
||||
dl div.admonition p.admonition-title {
|
||||
color:#555555;
|
||||
display:block;
|
||||
float:left;
|
||||
margin:0;
|
||||
padding-right:12px;
|
||||
text-align:right;
|
||||
width:90px;
|
||||
}
|
||||
|
||||
dl div.admonition p.admonition-title+p, dl div.admonition p {
|
||||
display:block;
|
||||
margin:0 0 0 102px;
|
||||
}
|
||||
|
||||
dl div.note {
|
||||
background:none;
|
||||
color:#E8E481;
|
||||
}
|
||||
|
||||
dl div.warning {
|
||||
background:none;
|
||||
color:#FC3030;
|
||||
}
|
||||
|
||||
dl div.seealso {
|
||||
background:none;
|
||||
}
|
||||
|
||||
dl div.admonition.seealso p+p {
|
||||
color:#222;
|
||||
}
|
||||
|
||||
dl div.seealso a {
|
||||
margin-left:-1.3ex;
|
||||
}
|
||||
|
||||
div.admonition.warning pre {
|
||||
background: #0F0704;
|
||||
color: #fc3030;
|
||||
}
|
||||
|
||||
div.admonition pre {
|
||||
margin: 6px 0;
|
||||
overflow: visible;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 10px;
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
line-height: normal;
|
||||
border: 0 solid white;
|
||||
}
|
||||
|
||||
dl.function>dt, dl.method>dt {
|
||||
text-indent:-118px;
|
||||
padding-left: 118px;
|
||||
}
|
||||
|
||||
dl.function>dt em, dl.method>dt em {
|
||||
color: #97b9cf;
|
||||
}
|
||||
|
||||
dl.function>dd em, dl.method>dd em {
|
||||
color: #97b9cf;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
dl.function table.field-list tr:first-child td.field-body, dl.method table.field-list tr:first-child td.field-body {
|
||||
color: #728c96;
|
||||
}
|
||||
|
||||
dl.function>dt em:before, dl.method>dt em:before {
|
||||
content: " ";
|
||||
display: block;
|
||||
}
|
||||
|
||||
dl.function>dd>p,dl.method>dd>p,dl.attribute>dd>p,
|
||||
dl[class]>dd>ol,dl[class]>dd>ul {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
dl.data>dt {
|
||||
color:#08C659;
|
||||
}
|
||||
|
||||
dl.data>dd>p {
|
||||
color:#069643;
|
||||
}
|
||||
|
||||
dl.class>dt {
|
||||
color: #82a3c7;
|
||||
}
|
||||
|
||||
dl.class>dd>p,dl.class>dd>ol,dl.class>dd>ul {
|
||||
color: #637b96;
|
||||
}
|
||||
|
||||
dl.function>dt,dl.method>dt,dl.attribute>dt {
|
||||
color: #fcb100;
|
||||
}
|
||||
|
||||
dl.function>dd>p,dl.method>dd>p,dl.attribute>dd>p,
|
||||
dl.function>dd>p+ol,dl.method>dd>p+ol,dl.attribute>dd>p+ol,
|
||||
dl.function>dd>p+ul,dl.method>dd>p+ul,dl.attribute>dd>p+ul {
|
||||
color: #cb8f00;
|
||||
}
|
||||
|
||||
dl.function>dd>p, dl.method>dd>p, dl.attribute>dd>p {
|
||||
margin: 0 0 3px 102px;
|
||||
}
|
||||
|
||||
dl.function>dd>p:first-child:before, dl.method>dd>p:first-child:before, dl.attribute>dd>p:first-child:before {
|
||||
content:"Description:";
|
||||
color:#555;
|
||||
font-weight:bold;
|
||||
font-style:normal;
|
||||
width:90px;
|
||||
display:inline-block;
|
||||
margin-left:-102px;
|
||||
text-align:right;
|
||||
padding-right:12px;
|
||||
}
|
||||
|
||||
dt:target, .highlight {
|
||||
color: #444;
|
||||
background: #333;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
background: #E2C788;
|
||||
}
|
||||
|
||||
h1 .highlight {
|
||||
color:inherit;
|
||||
background:inherit;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin: 3px 0 10px 15px;
|
||||
}
|
||||
|
||||
.field-body tt.literal {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
tt {
|
||||
background-color: #444;
|
||||
padding: 0 1px 0 1px;
|
||||
font-size: 0.95em;
|
||||
}
|
||||
|
||||
.warning tt {
|
||||
background: #cc6262;
|
||||
}
|
||||
|
||||
.note tt {
|
||||
background: #444;
|
||||
}
|
||||
|
||||
dl .warning tt {
|
||||
background:#0F0704;
|
||||
display:block;
|
||||
}
|
||||
|
||||
dl .note tt {
|
||||
background:#2C2A1B;
|
||||
}
|
||||
|
||||
table.indextable tr.cap {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
col.field-name {
|
||||
width:90px;
|
||||
}
|
||||
|
||||
dd table {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
table.field-list th {
|
||||
color:#555;
|
||||
padding:0;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
table.field-list td.field-body {
|
||||
color:#999999;
|
||||
padding-left:12px;
|
||||
}
|
||||
|
||||
table.field-list td.field-body ul.first {
|
||||
padding-left:0;
|
||||
list-style:none;
|
||||
margin-left:0;
|
||||
}
|
||||
|
||||
dl.function>dd>ol, dl.method>dd>ol, dl.attribute>dd>ol,
|
||||
dl.function>dd>ul, dl.method>dd>ul, dl.attribute>dd>ul,
|
||||
dl.function>dd>div[class|="highlight"], dl.method>dd>div[class|="highlight"],
|
||||
dl.attribute>dd>div[class|="highlight"] {
|
||||
margin-left:102px;
|
||||
}
|
||||
|
||||
dl.function>dd>ol, dl.method>dd>ol, dl.attribute>dd>ol,
|
||||
dl.function>dd>ul, dl.method>dd>ul, dl.attribute>dd>ul,
|
||||
dl.class>dd>ol, dl.class>dd>ul {
|
||||
padding-left:20px;
|
||||
}
|
26
doc/python_api/blender-org/static/jquery.sidebar.js
Normal file
26
doc/python_api/blender-org/static/jquery.sidebar.js
Normal file
@@ -0,0 +1,26 @@
|
||||
$(document).ready(function () {
|
||||
var top = $('.sphinxsidebarwrapper').offset().top - parseFloat($('.sphinxsidebarwrapper').css ('marginTop').replace(/auto/, 0));
|
||||
var colheight = parseFloat($('.sphinxsidebarwrapper').css('height').replace(/auto/, 0));
|
||||
|
||||
|
||||
$(window).scroll(function (event) {
|
||||
// what the y position of the scroll is
|
||||
var y = $(this).scrollTop();
|
||||
|
||||
// whether that's below the form
|
||||
if (y >= top) {
|
||||
//colheight is checked and according to its vaule the scrolling
|
||||
//is triggered or not
|
||||
if (colheight <= window.innerHeight) {
|
||||
// if so, ad the fixed class
|
||||
$('.sphinxsidebarwrapper').addClass('fixed');
|
||||
} else {
|
||||
// otherwise remove it
|
||||
$('.sphinxsidebarwrapper').removeClass('fixed');
|
||||
}
|
||||
} else {
|
||||
// otherwise remove it
|
||||
$('.sphinxsidebarwrapper').removeClass('fixed');
|
||||
}
|
||||
});
|
||||
});
|
61
doc/python_api/blender-org/static/pygments.css
Normal file
61
doc/python_api/blender-org/static/pygments.css
Normal file
@@ -0,0 +1,61 @@
|
||||
.hll { background-color: #ffffcc }
|
||||
.c { color: #7f7f7f; font-style: italic } /* Comment */
|
||||
.err { border: 1px solid #FF0000 } /* Error */
|
||||
.k { color: #0088ff; font-weight: bold } /* Keyword */
|
||||
.o { color: #993399 } /* Operator */
|
||||
.cm { color: #7f7f7f; font-style: italic } /* Comment.Multiline */
|
||||
.cp { color: #007020 } /* Comment.Preproc */
|
||||
.c1 { color: #408090; font-style: italic } /* Comment.Single */
|
||||
.cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
|
||||
.gd { color: #A00000 } /* Generic.Deleted */
|
||||
.ge { font-style: italic } /* Generic.Emph */
|
||||
.gr { color: #FF0000 } /* Generic.Error */
|
||||
.gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||
.gi { color: #00A000 } /* Generic.Inserted */
|
||||
.go { color: #303030 } /* Generic.Output */
|
||||
.gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
|
||||
.gs { font-weight: bold } /* Generic.Strong */
|
||||
.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||
.gt { color: #0040D0 } /* Generic.Traceback */
|
||||
.kc { color: #007020; font-weight: bold } /* Keyword.Constant */
|
||||
.kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
|
||||
.kn { color: #FFFF32; font-weight: bold } /* Keyword.Namespace */
|
||||
.kp { color: #007020 } /* Keyword.Pseudo */
|
||||
.kr { color: #FFFF32; font-weight: bold } /* Keyword.Reserved */
|
||||
.kt { color: #902000 } /* Keyword.Type */
|
||||
.m { color: #00BAFF } /* Literal.Number */
|
||||
.s { color: #B7C274 } /* Literal.String */
|
||||
.na { color: #4070a0 } /* Name.Attribute */
|
||||
.nb { color: #007020 } /* Name.Builtin */
|
||||
.nc { color: #0e84b5; font-weight: bold } /* Name.Class */
|
||||
.no { color: #60add5 } /* Name.Constant */
|
||||
.nd { color: #555555; font-weight: bold } /* Name.Decorator */
|
||||
.ni { color: #d55537; font-weight: bold } /* Name.Entity */
|
||||
.ne { color: #007020 } /* Name.Exception */
|
||||
.nf { color: #06287e } /* Name.Function */
|
||||
.nl { color: #002070; font-weight: bold } /* Name.Label */
|
||||
.nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
|
||||
.nt { color: #062873; font-weight: bold } /* Name.Tag */
|
||||
.nv { color: #bb60d5 } /* Name.Variable */
|
||||
.ow { color: #007020; font-weight: bold } /* Operator.Word */
|
||||
.w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.mf { color: #00BAFF } /* Literal.Number.Float */
|
||||
.mh { color: #00BAFF } /* Literal.Number.Hex */
|
||||
.mi { color: #00BAFF } /* Literal.Number.Integer */
|
||||
.mo { color: #00BAFF } /* Literal.Number.Oct */
|
||||
.sb { color: #B7C274 } /* Literal.String.Backtick */
|
||||
.sc { color: #B7C274 } /* Literal.String.Char */
|
||||
.sd { color: #B7C274; font-style: italic } /* Literal.String.Doc */
|
||||
.s2 { color: #B7C274 } /* Literal.String.Double */
|
||||
.se { color: #B7C274; font-weight: bold } /* Literal.String.Escape */
|
||||
.sh { color: #B7C274 } /* Literal.String.Heredoc */
|
||||
.si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
|
||||
.sx { color: #c65d09 } /* Literal.String.Other */
|
||||
.sr { color: #235388 } /* Literal.String.Regex */
|
||||
.s1 { color: #4070a0 } /* Literal.String.Single */
|
||||
.ss { color: #517918 } /* Literal.String.Symbol */
|
||||
.bp { color: #007020 } /* Name.Builtin.Pseudo */
|
||||
.vc { color: #bb60d5 } /* Name.Variable.Class */
|
||||
.vg { color: #bb60d5 } /* Name.Variable.Global */
|
||||
.vi { color: #bb60d5 } /* Name.Variable.Instance */
|
||||
.il { color: #00BAFF } /* Literal.Number.Integer.Long */
|
BIN
doc/python_api/blender-org/static/rnd.png
Normal file
BIN
doc/python_api/blender-org/static/rnd.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 173 B |
BIN
doc/python_api/blender-org/static/rndbl.png
Normal file
BIN
doc/python_api/blender-org/static/rndbl.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 190 B |
BIN
doc/python_api/blender-org/static/rndbr.png
Normal file
BIN
doc/python_api/blender-org/static/rndbr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 188 B |
30
doc/python_api/blender-org/theme.conf
Normal file
30
doc/python_api/blender-org/theme.conf
Normal file
@@ -0,0 +1,30 @@
|
||||
[theme]
|
||||
inherit = basic
|
||||
stylesheet = default.css
|
||||
pygments_style = sphinx
|
||||
|
||||
[options]
|
||||
rightsidebar = true
|
||||
stickysidebar = true
|
||||
|
||||
footerbgcolor = #000000
|
||||
footertextcolor = #ffffff
|
||||
sidebarbgcolor = #1c4e63
|
||||
sidebartextcolor = #ffffff
|
||||
sidebarlinkcolor = #97b9cf
|
||||
relbarbgcolor = #2C3845
|
||||
relbartextcolor = #D3E0E9
|
||||
relbarlinkcolor = #D3E0E9
|
||||
relbaractlinkcolor = #f39410
|
||||
bgcolor = #232323
|
||||
bordercolor = #363636
|
||||
textcolor = #ffffff
|
||||
headbgcolor = #232323
|
||||
headtextcolor = #ffffff
|
||||
headlinkcolor = #97b9cf
|
||||
linkcolor = #97b9cf
|
||||
codebgcolor = #eeffcc
|
||||
codetextcolor = #333333
|
||||
|
||||
bodyfont = "Lucida Grande","Lucida Sans Unicode","Lucida Sans","Lucida",Verdana,sans-serif
|
||||
headfont = "Lucida Grande","Lucida Sans Unicode","Lucida Sans","Lucida",Verdana,sans-serif
|
37
doc/python_api/examples/bge.constraints.py
Normal file
37
doc/python_api/examples/bge.constraints.py
Normal file
@@ -0,0 +1,37 @@
|
||||
"""
|
||||
Basic Physics Constraint
|
||||
++++++++++++++++++++++++
|
||||
Example of how to create a hinge Physics Constraint between two objects.
|
||||
"""
|
||||
from bge import logic
|
||||
from bge import constraints
|
||||
|
||||
# get object list
|
||||
objects = logic.getCurrentScene().objects
|
||||
|
||||
# get object named Object1 and Object 2
|
||||
object_1 = objects["Object1"]
|
||||
object_2 = objects["Object2"]
|
||||
|
||||
# want to use Edge constraint type
|
||||
constraint_type = 2
|
||||
|
||||
# get Object1 and Object2 physics IDs
|
||||
physics_id_1 = object_1.getPhysicsId()
|
||||
physics_id_2 = object_2.getPhysicsId()
|
||||
|
||||
# use bottom right edge of Object1 for hinge position
|
||||
edge_position_x = 1.0
|
||||
edge_position_y = 0.0
|
||||
edge_position_z = -1.0
|
||||
|
||||
# rotate the pivot z axis about 90 degrees
|
||||
edge_angle_x = 0.0
|
||||
edge_angle_y = 0.0
|
||||
edge_angle_z = 90.0
|
||||
|
||||
# create an edge constraint
|
||||
constraints.createConstraint(physics_id_1, physics_id_2,
|
||||
constraint_type,
|
||||
edge_position_x, edge_position_y, edge_position_z,
|
||||
edge_angle_x, edge_angle_y, edge_angle_z)
|
40
doc/python_api/examples/bge.texture.1.py
Normal file
40
doc/python_api/examples/bge.texture.1.py
Normal file
@@ -0,0 +1,40 @@
|
||||
"""
|
||||
Texture Replacement
|
||||
+++++++++++++++++++
|
||||
|
||||
Example of how to replace a texture in game with an external image.
|
||||
``createTexture()`` and ``removeTexture()`` are to be called from a
|
||||
module Python Controller.
|
||||
"""
|
||||
from bge import logic
|
||||
from bge import texture
|
||||
|
||||
|
||||
def createTexture(cont):
|
||||
"""Create a new Dynamic Texture"""
|
||||
obj = cont.owner
|
||||
|
||||
# get the reference pointer (ID) of the internal texture
|
||||
ID = texture.materialID(obj, 'IMoriginal.png')
|
||||
|
||||
# create a texture object
|
||||
object_texture = texture.Texture(obj, ID)
|
||||
|
||||
# create a new source with an external image
|
||||
url = logic.expandPath("//newtexture.jpg")
|
||||
new_source = texture.ImageFFmpeg(url)
|
||||
|
||||
# the texture has to be stored in a permanent Python object
|
||||
logic.texture = object_texture
|
||||
|
||||
# update/replace the texture
|
||||
logic.texture.source = new_source
|
||||
logic.texture.refresh(False)
|
||||
|
||||
|
||||
def removeTexture(cont):
|
||||
"""Delete the Dynamic Texture, reversing back the final to its original state."""
|
||||
try:
|
||||
del logic.texture
|
||||
except:
|
||||
pass
|
239
doc/python_api/examples/bge.texture.2.py
Normal file
239
doc/python_api/examples/bge.texture.2.py
Normal file
@@ -0,0 +1,239 @@
|
||||
"""
|
||||
Video Capture with DeckLink
|
||||
+++++++++++++++++++++++++++
|
||||
Video frames captured with DeckLink cards have pixel formats that are generally not directly
|
||||
usable by OpenGL, they must be processed by a shader. The three shaders presented here should
|
||||
cover all common video capture cases.
|
||||
|
||||
This file reflects the current video transfer method implemented in the Decklink module:
|
||||
whenever possible the video images are transferred as float texture because this is more
|
||||
compatible with GPUs. Of course, only the pixel formats that have a correspondant GL format
|
||||
can be transferred as float. Look for fg_shaders in this file for an exhaustive list.
|
||||
|
||||
Other pixel formats will be transferred as 32 bits integer red-channel texture but this
|
||||
won't work with certain GPU (Intel GMA); the corresponding shaders are not shown here.
|
||||
However, it should not be necessary to use any of them as the list below covers all practical
|
||||
cases of video capture with all types of Decklink product.
|
||||
|
||||
In other words, only use one of the pixel format below and you will be fine. Note that depending
|
||||
on the video stream, only certain pixel formats will be allowed (others will throw an exception).
|
||||
For example, to capture a PAL video stream, you must use one of the YUV formats.
|
||||
|
||||
To find which pixel format is suitable for a particular video stream, use the 'Media Express'
|
||||
utility that comes with the Decklink software : if you see the video in the 'Log and Capture'
|
||||
Window, you have selected the right pixel format and you can use the same in Blender.
|
||||
|
||||
Notes: * these shaders only decode the RGB channel and set the alpha channel to a fixed
|
||||
value (look for color.a = ). It's up to you to add postprocessing to the color.
|
||||
* these shaders are compatible with 2D and 3D video stream
|
||||
"""
|
||||
import bge
|
||||
from bge import logic
|
||||
from bge import texture as vt
|
||||
|
||||
# The default vertex shader, because we need one
|
||||
#
|
||||
VertexShader = """
|
||||
#version 130
|
||||
void main()
|
||||
{
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
}
|
||||
|
||||
"""
|
||||
|
||||
# For use with RGB video stream: the pixel is directly usable
|
||||
#
|
||||
FragmentShader_R10l = """
|
||||
#version 130
|
||||
uniform sampler2D tex;
|
||||
// stereo = 1.0 if 2D image, =0.5 if 3D (left eye below, right eye above)
|
||||
uniform float stereo;
|
||||
// eye = 0.0 for the left eye, 0.5 for the right eye
|
||||
uniform float eye;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 color;
|
||||
float tx, ty;
|
||||
tx = gl_TexCoord[0].x;
|
||||
ty = eye+gl_TexCoord[0].y*stereo;
|
||||
color = texture(tex, vec2(tx,ty));
|
||||
color.a = 0.7;
|
||||
gl_FragColor = color;
|
||||
}
|
||||
"""
|
||||
|
||||
# For use with YUV video stream
|
||||
#
|
||||
FragmentShader_2vuy = """
|
||||
#version 130
|
||||
uniform sampler2D tex;
|
||||
// stereo = 1.0 if 2D image, =0.5 if 3D (left eye below, right eye above)
|
||||
uniform float stereo;
|
||||
// eye = 0.0 for the left eye, 0.5 for the right eye
|
||||
uniform float eye;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 color;
|
||||
float tx, ty, width, Y, Cb, Cr;
|
||||
int px;
|
||||
tx = gl_TexCoord[0].x;
|
||||
ty = eye+gl_TexCoord[0].y*stereo;
|
||||
width = float(textureSize(tex, 0).x);
|
||||
color = texture(tex, vec2(tx, ty));
|
||||
px = int(floor(fract(tx*width)*2.0));
|
||||
switch (px) {
|
||||
case 0:
|
||||
Y = color.g;
|
||||
break;
|
||||
case 1:
|
||||
Y = color.a;
|
||||
break;
|
||||
}
|
||||
Y = (Y - 0.0625) * 1.168949772;
|
||||
Cb = (color.b - 0.0625) * 1.142857143 - 0.5;
|
||||
Cr = (color.r - 0.0625) * 1.142857143 - 0.5;
|
||||
color.r = Y + 1.5748 * Cr;
|
||||
color.g = Y - 0.1873 * Cb - 0.4681 * Cr;
|
||||
color.b = Y + 1.8556 * Cb;
|
||||
color.a = 0.7;
|
||||
gl_FragColor = color;
|
||||
}
|
||||
"""
|
||||
|
||||
# For use with high resolution YUV
|
||||
#
|
||||
FragmentShader_v210 = """
|
||||
#version 130
|
||||
uniform sampler2D tex;
|
||||
// stereo = 1.0 if 2D image, =0.5 if 3D (left eye below, right eye above)
|
||||
uniform float stereo;
|
||||
// eye = 0.0 for the left eye, 0.5 for the right eye
|
||||
uniform float eye;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 color, color1, color2, color3;
|
||||
int px;
|
||||
float tx, ty, width, sx, dx, bx, Y, Cb, Cr;
|
||||
tx = gl_TexCoord[0].x;
|
||||
ty = eye+gl_TexCoord[0].y*stereo;
|
||||
width = float(textureSize(tex, 0).x);
|
||||
// to sample macro pixels (6 pixels in 4 words)
|
||||
sx = tx*width*0.25+0.01;
|
||||
// index of display pixel in the macro pixel 0..5
|
||||
px = int(floor(fract(sx)*6.0));
|
||||
// increment as we sample the macro pixel
|
||||
dx = 1.0/width;
|
||||
// base x coord of macro pixel
|
||||
bx = (floor(sx)+0.01)*dx*4.0;
|
||||
color = texture(tex, vec2(bx, ty));
|
||||
color1 = texture(tex, vec2(bx+dx, ty));
|
||||
color2 = texture(tex, vec2(bx+dx*2.0, ty));
|
||||
color3 = texture(tex, vec2(bx+dx*3.0, ty));
|
||||
switch (px) {
|
||||
case 0:
|
||||
case 1:
|
||||
Cb = color.b;
|
||||
Cr = color.r;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
Cb = color1.g;
|
||||
Cr = color2.b;
|
||||
break;
|
||||
default:
|
||||
Cb = color2.r;
|
||||
Cr = color3.g;
|
||||
break;
|
||||
}
|
||||
switch (px) {
|
||||
case 0:
|
||||
Y = color.g;
|
||||
break;
|
||||
case 1:
|
||||
Y = color1.b;
|
||||
break;
|
||||
case 2:
|
||||
Y = color1.r;
|
||||
break;
|
||||
case 3:
|
||||
Y = color2.g;
|
||||
break;
|
||||
case 4:
|
||||
Y = color3.b;
|
||||
break;
|
||||
default:
|
||||
Y = color3.r;
|
||||
break;
|
||||
}
|
||||
Y = (Y - 0.0625) * 1.168949772;
|
||||
Cb = (Cb - 0.0625) * 1.142857143 - 0.5;
|
||||
Cr = (Cr - 0.0625) * 1.142857143 - 0.5;
|
||||
color.r = Y + 1.5748 * Cr;
|
||||
color.g = Y - 0.1873 * Cb - 0.4681 * Cr;
|
||||
color.b = Y + 1.8556 * Cb;
|
||||
color.a = 0.7;
|
||||
gl_FragColor = color;
|
||||
}
|
||||
"""
|
||||
|
||||
# The exhausitve list of pixel formats that are transferred as float texture
|
||||
# Only use those for greater efficiency and compatiblity.
|
||||
#
|
||||
fg_shaders = {
|
||||
'2vuy': FragmentShader_2vuy,
|
||||
'8BitYUV': FragmentShader_2vuy,
|
||||
'v210': FragmentShader_v210,
|
||||
'10BitYUV': FragmentShader_v210,
|
||||
'8BitBGRA': FragmentShader_R10l,
|
||||
'BGRA': FragmentShader_R10l,
|
||||
'8BitARGB': FragmentShader_R10l,
|
||||
'10BitRGBXLE': FragmentShader_R10l,
|
||||
'R10l': FragmentShader_R10l
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Helper function to attach a pixel shader to the material that receives the video frame.
|
||||
#
|
||||
|
||||
def config_video(obj, format, pixel, is3D=False, mat=0, card=0):
|
||||
if pixel not in fg_shaders:
|
||||
raise('Unsuported shader')
|
||||
shader = obj.meshes[0].materials[mat].getShader()
|
||||
if shader is not None and not shader.isValid():
|
||||
shader.setSource(VertexShader, fg_shaders[pixel], True)
|
||||
shader.setSampler('tex', 0)
|
||||
shader.setUniformEyef("eye")
|
||||
shader.setUniform1f("stereo", 0.5 if is3D else 1.0)
|
||||
tex = vt.Texture(obj, mat)
|
||||
tex.source = vt.VideoDeckLink(format + "/" + pixel + ("/3D" if is3D else ""), card)
|
||||
print("frame rate: ", tex.source.framerate)
|
||||
tex.source.play()
|
||||
obj["video"] = tex
|
||||
|
||||
#
|
||||
# Attach this function to an object that has a material with texture
|
||||
# and call it once to initialize the object
|
||||
#
|
||||
|
||||
|
||||
def init(cont):
|
||||
# config_video(cont.owner, 'HD720p5994', '8BitBGRA')
|
||||
# config_video(cont.owner, 'HD720p5994', '8BitYUV')
|
||||
# config_video(cont.owner, 'pal ', '10BitYUV')
|
||||
config_video(cont.owner, 'pal ', '8BitYUV')
|
||||
|
||||
|
||||
#
|
||||
# To be called on every frame
|
||||
#
|
||||
def play(cont):
|
||||
obj = cont.owner
|
||||
video = obj.get("video")
|
||||
if video is not None:
|
||||
video.refresh(True)
|
46
doc/python_api/examples/bge.texture.py
Normal file
46
doc/python_api/examples/bge.texture.py
Normal file
@@ -0,0 +1,46 @@
|
||||
"""
|
||||
Basic Video Playback
|
||||
++++++++++++++++++++
|
||||
Example of how to replace a texture in game with a video.
|
||||
It needs to run everyframe.
|
||||
To avoid any confusion with the location of the file,
|
||||
we will use ``GameLogic.expandPath()`` to build an absolute file name,
|
||||
assuming the video file is in the same directory as the blend-file.
|
||||
"""
|
||||
import bge
|
||||
from bge import texture
|
||||
from bge import logic
|
||||
|
||||
cont = logic.getCurrentController()
|
||||
obj = cont.owner
|
||||
|
||||
# the creation of the texture must be done once: save the
|
||||
# texture object in an attribute of bge.logic module makes it persistent
|
||||
if not hasattr(logic, 'video'):
|
||||
|
||||
# identify a static texture by name
|
||||
matID = texture.materialID(obj, 'IMvideo.png')
|
||||
|
||||
# create a dynamic texture that will replace the static texture
|
||||
logic.video = texture.Texture(obj, matID)
|
||||
|
||||
# define a source of image for the texture, here a movie
|
||||
movie = logic.expandPath('//trailer_400p.ogg')
|
||||
logic.video.source = texture.VideoFFmpeg(movie)
|
||||
logic.video.source.scale = True
|
||||
|
||||
# Note that we can change the ``Texture`` source at any time.
|
||||
# Suppose we want to switch between two movies during the game:
|
||||
logic.mySources[0] = texture.VideoFFmpeg('movie1.avi')
|
||||
logic.mySources[1] = texture.VideoFFmpeg('movie2.avi')
|
||||
|
||||
# And then assign (and reassign) the source during the game
|
||||
logic.video.source = logic.mySources[movieSel]
|
||||
|
||||
# quick off the movie, but it wont play in the background
|
||||
logic.video.source.play()
|
||||
|
||||
|
||||
# Video playback is not a background process: it happens only when we refresh the texture.
|
||||
# So you need to call this function every frame to ensure update of the texture.
|
||||
logic.video.refresh(True)
|
@@ -6,6 +6,7 @@ Example of using the blf module. For this module to work we
|
||||
need to use the OpenGL wrapper :class:`~bgl` as well.
|
||||
"""
|
||||
# import stand alone modules
|
||||
import bgl
|
||||
import blf
|
||||
import bpy
|
||||
|
||||
|
@@ -99,9 +99,10 @@ bm.free()
|
||||
|
||||
|
||||
# Add the mesh to the scene
|
||||
scene = bpy.context.scene
|
||||
obj = bpy.data.objects.new("Object", me)
|
||||
bpy.context.collection.objects.link(obj)
|
||||
scene.objects.link(obj)
|
||||
|
||||
# Select and make active
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
scene.objects.active = obj
|
||||
obj.select = True
|
||||
|
@@ -1,10 +0,0 @@
|
||||
"""
|
||||
Run a Function in x Seconds
|
||||
---------------------------
|
||||
"""
|
||||
import bpy
|
||||
|
||||
def in_5_seconds():
|
||||
print("Hello World")
|
||||
|
||||
bpy.app.timers.register(in_5_seconds, first_interval=5)
|
@@ -1,11 +0,0 @@
|
||||
"""
|
||||
Run a Function every x Seconds
|
||||
------------------------------
|
||||
"""
|
||||
import bpy
|
||||
|
||||
def every_2_seconds():
|
||||
print("Hello World")
|
||||
return 2.0
|
||||
|
||||
bpy.app.timers.register(every_2_seconds)
|
@@ -1,17 +0,0 @@
|
||||
"""
|
||||
Run a Function n times every x seconds
|
||||
--------------------------------------
|
||||
"""
|
||||
import bpy
|
||||
|
||||
counter = 0
|
||||
|
||||
def run_10_times():
|
||||
global counter
|
||||
counter += 1
|
||||
print(counter)
|
||||
if counter == 10:
|
||||
return None
|
||||
return 0.1
|
||||
|
||||
bpy.app.timers.register(run_10_times)
|
@@ -1,12 +0,0 @@
|
||||
"""
|
||||
Assign parameters to functions
|
||||
------------------------------
|
||||
"""
|
||||
import bpy
|
||||
import functools
|
||||
|
||||
def print_message(message):
|
||||
print("Message:", message)
|
||||
|
||||
bpy.app.timers.register(functools.partial(print_message, "Hello"), first_interval=2.0)
|
||||
bpy.app.timers.register(functools.partial(print_message, "World"), first_interval=3.0)
|
@@ -1,25 +0,0 @@
|
||||
"""
|
||||
Use a Timer to react to events in another thread
|
||||
------------------------------------------------
|
||||
|
||||
You should never modify Blender data at arbitrary points in time in separate threads.
|
||||
However you can use a queue to collect all the actions that should be executed when Blender is in the right state again.
|
||||
Pythons `queue.Queue` can be used here, because it implements the required locking semantics.
|
||||
"""
|
||||
import bpy
|
||||
import queue
|
||||
|
||||
execution_queue = queue.Queue()
|
||||
|
||||
# This function can savely be called in another thread.
|
||||
# The function will be executed when the timer runs the next time.
|
||||
def run_in_main_thread(function):
|
||||
execution_queue.put(function)
|
||||
|
||||
def execute_queued_functions():
|
||||
while not execution_queue.empty():
|
||||
function = execution_queue.get()
|
||||
function()
|
||||
return 1.0
|
||||
|
||||
bpy.app.timers.register(execute_queued_functions)
|
@@ -24,8 +24,8 @@ Then, call ``bpy.app.translations.register(__name__, your_dict)`` in your ``regi
|
||||
The ``Manage UI translations`` add-on has several functions to help you collect strings to translate, and
|
||||
generate the needed python code (the translation dictionary), as well as optional intermediary po files
|
||||
if you want some... See
|
||||
`How to Translate Blender <https://wiki.blender.org/wiki/Process/Translate_Blender>`_ and
|
||||
`Using i18n in Blender Code <https://wiki.blender.org/wiki/Source/Interface/Internationalization>`_
|
||||
`How to Translate Blender <https://wiki.blender.org/index.php/Dev:Doc/Process/Translate_Blender>`_ and
|
||||
`Using i18n in Blender Code <https://wiki.blender.org/index.php/Dev:Source/Interface/Internationalization>`_
|
||||
for more info.
|
||||
|
||||
Module References
|
||||
@@ -36,7 +36,7 @@ Module References
|
||||
import bpy
|
||||
|
||||
# This block can be automatically generated by UI translations addon, which also handles conversion with PO format.
|
||||
# See also https://wiki.blender.org/wiki/Process/Translate_Blender#Translating_non-official_addons
|
||||
# See also https://wiki.blender.org/index.php/Dev:Doc/Process/Translate_Blender#Translating_non-official_addons
|
||||
# It can (should) also be put in a different, specific py file.
|
||||
|
||||
# ##### BEGIN AUTOGENERATED I18N SECTION #####
|
||||
|
@@ -19,6 +19,9 @@ if "Cube" in bpy.data.meshes:
|
||||
|
||||
# write images into a file next to the blend
|
||||
import os
|
||||
with open(os.path.splitext(bpy.data.filepath)[0] + ".txt", 'w') as fs:
|
||||
for image in bpy.data.images:
|
||||
fs.write("%s %d x %d\n" % (image.filepath, image.size[0], image.size[1]))
|
||||
file = open(os.path.splitext(bpy.data.filepath)[0] + ".txt", 'w')
|
||||
|
||||
for image in bpy.data.images:
|
||||
file.write("%s %d x %d\n" % (image.filepath, image.size[0], image.size[1]))
|
||||
|
||||
file.close()
|
||||
|
@@ -20,5 +20,5 @@ you would pass ``{'active_object': object}``.
|
||||
# remove all objects in scene rather than the selected ones
|
||||
import bpy
|
||||
override = bpy.context.copy()
|
||||
override['selected_objects'] = list(bpy.context.scene.objects)
|
||||
override['selected_bases'] = list(bpy.context.scene.object_bases)
|
||||
bpy.ops.object.delete(override)
|
||||
|
@@ -20,6 +20,6 @@ The execution context is one of:
|
||||
'EXEC_SCREEN')
|
||||
"""
|
||||
|
||||
# collection add popup
|
||||
# group add popup
|
||||
import bpy
|
||||
bpy.ops.object.collection_instance_add('INVOKE_DEFAULT')
|
||||
bpy.ops.object.group_instance_add('INVOKE_DEFAULT')
|
||||
|
@@ -15,15 +15,13 @@ class OBJECT_OT_property_example(bpy.types.Operator):
|
||||
bl_label = "Property Example"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
my_float: bpy.props.FloatProperty(name="Some Floating Point")
|
||||
my_bool: bpy.props.BoolProperty(name="Toggle Option")
|
||||
my_string: bpy.props.StringProperty(name="String Value")
|
||||
my_float = bpy.props.FloatProperty(name="Some Floating Point")
|
||||
my_bool = bpy.props.BoolProperty(name="Toggle Option")
|
||||
my_string = bpy.props.StringProperty(name="String Value")
|
||||
|
||||
def execute(self, context):
|
||||
self.report(
|
||||
{'INFO'}, 'F: %.2f B: %s S: %r' %
|
||||
(self.my_float, self.my_bool, self.my_string)
|
||||
)
|
||||
self.report({'INFO'}, 'F: %.2f B: %s S: %r' %
|
||||
(self.my_float, self.my_bool, self.my_string))
|
||||
print('My float:', self.my_float)
|
||||
print('My bool:', self.my_bool)
|
||||
print('My string:', self.my_string)
|
||||
@@ -34,8 +32,8 @@ class OBJECT_PT_property_example(bpy.types.Panel):
|
||||
bl_idname = "object_PT_property_example"
|
||||
bl_label = "Property Example"
|
||||
bl_space_type = 'VIEW_3D'
|
||||
bl_region_type = 'UI'
|
||||
bl_category = "Tool"
|
||||
bl_region_type = 'TOOLS'
|
||||
bl_category = "Tools"
|
||||
|
||||
def draw(self, context):
|
||||
# You can set the property values that should be used when the user
|
||||
@@ -55,8 +53,5 @@ bpy.utils.register_class(OBJECT_OT_property_example)
|
||||
bpy.utils.register_class(OBJECT_PT_property_example)
|
||||
|
||||
# Demo call. Be sure to also test in the 3D Viewport.
|
||||
bpy.ops.object.property_example(
|
||||
my_float=47,
|
||||
my_bool=True,
|
||||
my_string="Shouldn't that be 327?",
|
||||
)
|
||||
bpy.ops.object.property_example(my_float=47, my_bool=True,
|
||||
my_string="Shouldn't that be 327?")
|
||||
|
@@ -10,14 +10,15 @@ import bpy
|
||||
|
||||
|
||||
class MaterialSettings(bpy.types.PropertyGroup):
|
||||
my_int: bpy.props.IntProperty()
|
||||
my_float: bpy.props.FloatProperty()
|
||||
my_string: bpy.props.StringProperty()
|
||||
my_int = bpy.props.IntProperty()
|
||||
my_float = bpy.props.FloatProperty()
|
||||
my_string = bpy.props.StringProperty()
|
||||
|
||||
|
||||
bpy.utils.register_class(MaterialSettings)
|
||||
|
||||
bpy.types.Material.my_settings = bpy.props.PointerProperty(type=MaterialSettings)
|
||||
bpy.types.Material.my_settings = \
|
||||
bpy.props.PointerProperty(type=MaterialSettings)
|
||||
|
||||
# test the new settings work
|
||||
material = bpy.data.materials[0]
|
||||
|
@@ -9,17 +9,18 @@ Custom properties can be added to any subclass of an :class:`ID`,
|
||||
import bpy
|
||||
|
||||
|
||||
# Assign a collection.
|
||||
# Assign a collection
|
||||
class SceneSettingItem(bpy.types.PropertyGroup):
|
||||
name: bpy.props.StringProperty(name="Test Property", default="Unknown")
|
||||
value: bpy.props.IntProperty(name="Test Property", default=22)
|
||||
name = bpy.props.StringProperty(name="Test Prop", default="Unknown")
|
||||
value = bpy.props.IntProperty(name="Test Prop", default=22)
|
||||
|
||||
|
||||
bpy.utils.register_class(SceneSettingItem)
|
||||
|
||||
bpy.types.Scene.my_settings = bpy.props.CollectionProperty(type=SceneSettingItem)
|
||||
bpy.types.Scene.my_settings = \
|
||||
bpy.props.CollectionProperty(type=SceneSettingItem)
|
||||
|
||||
# Assume an armature object selected.
|
||||
# Assume an armature object selected
|
||||
print("Adding 2 values!")
|
||||
|
||||
my_item = bpy.context.scene.my_settings.add()
|
||||
|
@@ -12,7 +12,7 @@ like Blender's existing properties.
|
||||
import bpy
|
||||
|
||||
# Assign a custom property to an existing type.
|
||||
bpy.types.Material.custom_float = bpy.props.FloatProperty(name="Test Property")
|
||||
bpy.types.Material.custom_float = bpy.props.FloatProperty(name="Test Prob")
|
||||
|
||||
# Test the property is there.
|
||||
bpy.data.materials[0].custom_float = 5.0
|
||||
|
@@ -22,15 +22,15 @@ class ExampleAddonPreferences(AddonPreferences):
|
||||
# when defining this in a submodule of a python package.
|
||||
bl_idname = __name__
|
||||
|
||||
filepath: StringProperty(
|
||||
filepath = StringProperty(
|
||||
name="Example File Path",
|
||||
subtype='FILE_PATH',
|
||||
)
|
||||
number: IntProperty(
|
||||
number = IntProperty(
|
||||
name="Example Number",
|
||||
default=4,
|
||||
)
|
||||
boolean: BoolProperty(
|
||||
boolean = BoolProperty(
|
||||
name="Example Boolean",
|
||||
default=False,
|
||||
)
|
||||
@@ -50,8 +50,8 @@ class OBJECT_OT_addon_prefs_example(Operator):
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
def execute(self, context):
|
||||
preferences = context.preferences
|
||||
addon_prefs = preferences.addons[__name__].preferences
|
||||
user_preferences = context.user_preferences
|
||||
addon_prefs = user_preferences.addons[__name__].preferences
|
||||
|
||||
info = ("Path: %s, Number: %d, Boolean %r" %
|
||||
(addon_prefs.filepath, addon_prefs.number, addon_prefs.boolean))
|
||||
|
@@ -1,60 +0,0 @@
|
||||
"""
|
||||
Dependency graph: Evaluated ID example
|
||||
++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
This example demonstrates access to the evaluated ID (such as object, material, etc.) state from
|
||||
an original ID.
|
||||
This is needed every time one needs to access state with animation, constraints, and modifiers
|
||||
taken into account.
|
||||
"""
|
||||
import bpy
|
||||
|
||||
|
||||
class OBJECT_OT_evaluated_example(bpy.types.Operator):
|
||||
"""Access evaluated object state and do something with it"""
|
||||
bl_label = "DEG Access Evaluated Object"
|
||||
bl_idname = "object.evaluated_example"
|
||||
|
||||
def execute(self, context):
|
||||
# This is an original object. Its data does not have any modifiers applied.
|
||||
obj = context.object
|
||||
if obj is None or obj.type != 'MESH':
|
||||
self.report({'INFO'}, "No active mesh object to get info from")
|
||||
return {'CANCELLED'}
|
||||
# Evaluated object exists within a specific dependency graph.
|
||||
# We will request evaluated object from the dependency graph which corresponds to the
|
||||
# current scene and view layer.
|
||||
#
|
||||
# NOTE: This call ensure the dependency graph is fully evaluated. This might be expensive
|
||||
# if changes were made made to the scene, but is needed to ensure no dangling or incorrect
|
||||
# pointers are exposed.
|
||||
depsgraph = context.evaluated_depsgraph_get()
|
||||
# Actually request evaluated object.
|
||||
#
|
||||
# This object has animation and drivers applied on it, together with constraints and
|
||||
# modifiers.
|
||||
#
|
||||
# For mesh objects the object.data will be a mesh with all modifiers applied.
|
||||
# This means that in access to vertices or faces after modifier stack happens via fields of
|
||||
# object_eval.object.
|
||||
#
|
||||
# For other types of objects the object_eval.data does not have modifiers applied on it,
|
||||
# but has animation applied.
|
||||
#
|
||||
# NOTE: All ID types have `evaluated_get()`, including materials, node trees, worlds.
|
||||
object_eval = obj.evaluated_get(depsgraph)
|
||||
mesh_eval = object_eval.data
|
||||
self.report({'INFO'}, f"Number of evaluated vertices: {len(mesh_eval.vertices)}")
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def register():
|
||||
bpy.utils.register_class(OBJECT_OT_evaluated_example)
|
||||
|
||||
|
||||
def unregister():
|
||||
bpy.utils.unregister_class(OBJECT_OT_evaluated_example)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
@@ -1,45 +0,0 @@
|
||||
"""
|
||||
Dependency graph: Original object example
|
||||
+++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
This example demonstrates access to the original ID.
|
||||
Such access is needed to check whether object is selected, or to compare pointers.
|
||||
"""
|
||||
import bpy
|
||||
|
||||
|
||||
class OBJECT_OT_original_example(bpy.types.Operator):
|
||||
"""Access original object and do something with it"""
|
||||
bl_label = "DEG Access Original Object"
|
||||
bl_idname = "object.original_example"
|
||||
|
||||
def check_object_selected(self, object_eval):
|
||||
# Selection depends on a context and is only valid for original objects. This means we need
|
||||
# to request the original object from the known evaluated one.
|
||||
#
|
||||
# NOTE: All ID types have an `original` field.
|
||||
obj = object_eval.original
|
||||
return obj.select_get()
|
||||
|
||||
def execute(self, context):
|
||||
# NOTE: It seems redundant to iterate over original objects to request evaluated ones
|
||||
# just to get original back. But we want to keep example as short as possible, but in real
|
||||
# world there are cases when evaluated object is coming from a more meaningful source.
|
||||
depsgraph = context.evaluated_depsgraph_get()
|
||||
for obj in context.editable_objects:
|
||||
object_eval = obj.evaluated_get(depsgraph)
|
||||
if self.check_object_selected(object_eval):
|
||||
self.report({'INFO'}, f"Object is selected: {object_eval.name}")
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def register():
|
||||
bpy.utils.register_class(OBJECT_OT_original_example)
|
||||
|
||||
|
||||
def unregister():
|
||||
bpy.utils.unregister_class(OBJECT_OT_original_example)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
@@ -1,42 +0,0 @@
|
||||
"""
|
||||
Dependency graph: Iterate over all object instances
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Sometimes it is needed to know all the instances with their matrices (for example, when writing an
|
||||
exporter or a custom render engine).
|
||||
This example shows how to access all objects and instances in the scene.
|
||||
"""
|
||||
import bpy
|
||||
|
||||
|
||||
class OBJECT_OT_object_instances(bpy.types.Operator):
|
||||
"""Access original object and do something with it"""
|
||||
bl_label = "DEG Iterate Object Instances"
|
||||
bl_idname = "object.object_instances"
|
||||
|
||||
def execute(self, context):
|
||||
depsgraph = context.evaluated_depsgraph_get()
|
||||
for object_instance in depsgraph.object_instances:
|
||||
# This is an object which is being instanced.
|
||||
obj = object_instance.object
|
||||
# `is_instance` denotes whether the object is coming from instances (as an opposite of
|
||||
# being an emitting object. )
|
||||
if not object_instance.is_instance:
|
||||
print(f"Object {obj.name} at {object_instance.matrix_world}")
|
||||
else:
|
||||
# Instanced will additionally have fields like uv, random_id and others which are
|
||||
# specific for instances. See Python API for DepsgraphObjectInstance for details,
|
||||
print(f"Instance of {obj.name} at {object_instance.matrix_world}")
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def register():
|
||||
bpy.utils.register_class(OBJECT_OT_object_instances)
|
||||
|
||||
|
||||
def unregister():
|
||||
bpy.utils.unregister_class(OBJECT_OT_object_instances)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
@@ -1,69 +0,0 @@
|
||||
"""
|
||||
Dependency graph: Object.to_mesh()
|
||||
+++++++++++++++++++++++++++++++++++
|
||||
|
||||
Function to get a mesh from any object with geometry. It is typically used by exporters, render
|
||||
engines and tools that need to access the evaluated mesh as displayed in the viewport.
|
||||
|
||||
Object.to_mesh() is closely interacting with dependency graph: its behavior depends on whether it
|
||||
is used on original or evaluated object.
|
||||
|
||||
When is used on original object, the result mesh is calculated from the object without taking
|
||||
animation or modifiers into account:
|
||||
|
||||
- For meshes this is similar to duplicating the source mesh.
|
||||
- For curves this disables own modifiers, and modifiers of objects used as bevel and taper.
|
||||
- For metaballs this produces an empty mesh since polygonization is done as a modifier evaluation.
|
||||
|
||||
When is used on evaluated object all modifiers are taken into account.
|
||||
|
||||
.. note:: The result mesh is owned by the object. It can be freed by calling `object.to_mesh_clear()`.
|
||||
.. note::
|
||||
The result mesh must be treated as temporary, and can not be referenced from objects in the main
|
||||
database. If the mesh intended to be used in a persistent manner use bpy.data.meshes.new_from_object()
|
||||
instead.
|
||||
.. note:: If object does not have geometry (i.e. camera) the functions returns None.
|
||||
"""
|
||||
import bpy
|
||||
|
||||
|
||||
class OBJECT_OT_object_to_mesh(bpy.types.Operator):
|
||||
"""Convert selected object to mesh and show number of vertices"""
|
||||
bl_label = "DEG Object to Mesh"
|
||||
bl_idname = "object.object_to_mesh"
|
||||
|
||||
def execute(self, context):
|
||||
# Access input original object.
|
||||
obj = context.object
|
||||
if obj is None:
|
||||
self.report({'INFO'}, "No active mesh object to convert to mesh")
|
||||
return {'CANCELLED'}
|
||||
# Avoid annoying None checks later on.
|
||||
if obj.type not in {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META'}:
|
||||
self.report({'INFO'}, "Object can not be converted to mesh")
|
||||
return {'CANCELLED'}
|
||||
depsgraph = context.evaluated_depsgraph_get()
|
||||
# Invoke to_mesh() for original object.
|
||||
mesh_from_orig = obj.to_mesh()
|
||||
self.report({'INFO'}, f"{len(mesh_from_orig.vertices)} in new mesh without modifiers.")
|
||||
# Remove temporary mesh.
|
||||
obj.to_mesh_clear()
|
||||
# Invoke to_mesh() for evaluated object.
|
||||
object_eval = obj.evaluated_get(depsgraph)
|
||||
mesh_from_eval = object_eval.to_mesh()
|
||||
self.report({'INFO'}, f"{len(mesh_from_eval.vertices)} in new mesh with modifiers.")
|
||||
# Remove temporary mesh.
|
||||
object_eval.to_mesh_clear()
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def register():
|
||||
bpy.utils.register_class(OBJECT_OT_object_to_mesh)
|
||||
|
||||
|
||||
def unregister():
|
||||
bpy.utils.unregister_class(OBJECT_OT_object_to_mesh)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user