2023-08-16 00:20:26 +10:00
|
|
|
# SPDX-FileCopyrightText: 2006 Blender Authors
|
2023-06-14 22:49:59 +10:00
|
|
|
#
|
2022-02-11 09:07:11 +11:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2006-11-17 02:27:12 +00:00
|
|
|
|
2016-04-15 18:02:17 +10:00
|
|
|
# Libs that adhere to strict flags
|
|
|
|
|
add_subdirectory(curve_fit_nd)
|
2023-05-30 11:17:23 +03:00
|
|
|
add_subdirectory(fmtlib)
|
IO: New FBX importer (C++, via ufbx)
Adds a C++ based FBX importer, using 3rd party ufbx library (design task:
#131304). The old Python based importer is still there; the new one is marked
as "(experimental)" in the menu item. Drag-and-drop uses the old Python
importer; the new one is only in the menu item.
The new importer is generally 2x-5x faster than the old one, and often uses
less memory too. There's potential to make it several times faster still.
- ASCII FBX files are supported now
- Binary FBX files older than 7.1 (SDK 2012) version are supported now
- Better handling of "geometric transform" (common in 3dsmax), manifesting
as wrong rotation for some objects when in a hierarchy (e.g. #131172)
- Some FBX files that the old importer was failing to read are supported now
(e.g. cases 47344, 134983)
- Materials import more shader parameters (IOR, diffuse roughness,
anisotropy, subsurface, transmission, coat, sheen, thin film) and shader
models (e.g. OpenPBR or glTF2 materials from 3dsmax imports much better)
- Importer now creates layered/slotted animation actions. Each "take" inside
FBX file creates one action, and animated object within it gets a slot.
- Materials that use the same texture several times no longer create
duplicate images; the same image is used
- Material diffuse color animations were imported, but they only animated
the viewport color. Now they also animate the nodetree base color too.
- "Ignore Leaf Bones" option no longer ignores leaf bones that are actually
skinned to some parts of the mesh.
- Previous importer was creating orphan invisible Camera data objects for
some files (mostly from MotionBuilder?), new one properly creates these
cameras.
Import settings that existed in Python importer, but are NOT DONE in the new
one (mostly because not sure if they are useful, and no one asked for them
from feedback yet):
- Manual Orientation & Forward/Up Axis: not sure if actually useful. FBX
file itself specifies the axes fairly clearly. USD/glTF/Alembic also do
not have settings to override them.
- Use Pre/Post Rotation (defaults on): feels like it should just always be
on. ufbx handles that internally.
- Apply Transform (defaults off, warning icon): not sure if needed at all.
- Decal Offset: Cycles specific. None of other importers have it.
- Automatic Bone Orientation (defaults off): feels like current behavior
(either on or off) often produces "nonsensical bones" where bone direction
does not go towards the children with either setting. There are discussions
within I/O and Animation modules about different ways of bone
visualizations and/or different bone length axes, that would solve this
in general.
- Force Connect Children (defaults off): not sure when that would be useful.
On several animated armatures I tried, it turns armature animation
into garbage.
- Primary/Secondary Bone Axis: again not sure when would be useful.
Importer UI screenshots, performance benchmark details and TODOs for later
work are in the PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/132406
2025-04-16 09:55:00 +02:00
|
|
|
if(WITH_IO_FBX)
|
|
|
|
|
add_subdirectory(ufbx)
|
2025-04-24 12:44:27 +10:00
|
|
|
endif()
|
2016-04-15 18:02:17 +10:00
|
|
|
|
2010-10-15 02:24:48 +00:00
|
|
|
# Otherwise we get warnings here that we cant fix in external projects
|
2010-10-24 03:57:07 +00:00
|
|
|
remove_strict_flags()
|
2006-11-17 02:27:12 +00:00
|
|
|
|
2016-07-11 15:27:48 +10:00
|
|
|
# Not a strict flag, but noisy for code we don't maintain
|
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
|
remove_cc_flag(
|
|
|
|
|
"-Wmisleading-indentation"
|
|
|
|
|
)
|
2024-03-07 19:56:58 +11:00
|
|
|
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
2023-07-05 13:20:53 +10:00
|
|
|
remove_cc_flag(
|
|
|
|
|
"-Weverything"
|
2025-04-01 00:49:35 +00:00
|
|
|
"-Wextra"
|
2025-04-03 10:55:04 +00:00
|
|
|
"-Wnull-pointer-subtraction"
|
|
|
|
|
"-Wcast-function-type-mismatch"
|
|
|
|
|
"-Wignored-qualifiers"
|
2023-07-05 13:20:53 +10:00
|
|
|
)
|
2016-07-11 15:27:48 +10:00
|
|
|
endif()
|
|
|
|
|
|
2023-10-19 11:07:06 +02:00
|
|
|
if(WITH_COMPILER_ASAN AND NOT WITH_COMPILER_ASAN_EXTERN)
|
2025-02-27 16:56:18 -07:00
|
|
|
# Not only does MSVC not have an -fno-sanitize=all option, if you remove the /fsanitize=address
|
|
|
|
|
# flag at this point, it will give a linker error as it generates an ODR violation for some
|
|
|
|
|
# vector classes, for details see :
|
|
|
|
|
# https://learn.microsoft.com/en-us/cpp/sanitizers/error-container-overflow?view=msvc-170
|
|
|
|
|
if(NOT MSVC)
|
|
|
|
|
# Disable ASAN for extern dependencies, as it can lead to linking issues due to too large binaries.
|
|
|
|
|
string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -fno-sanitize=all")
|
|
|
|
|
string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO " -fno-sanitize=all")
|
|
|
|
|
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -fno-sanitize=all")
|
|
|
|
|
string(APPEND CMAKE_C_FLAGS_DEBUG " -fno-sanitize=all")
|
|
|
|
|
endif()
|
2023-10-19 11:07:06 +02:00
|
|
|
endif()
|
|
|
|
|
|
2016-07-11 15:27:48 +10:00
|
|
|
|
2012-12-30 18:20:52 +00:00
|
|
|
add_subdirectory(rangetree)
|
2023-07-12 22:39:23 +02:00
|
|
|
add_subdirectory(nanosvg)
|
2013-03-12 07:25:53 +00:00
|
|
|
add_subdirectory(wcwidth)
|
2024-04-03 10:22:53 +02:00
|
|
|
add_subdirectory(xxhash)
|
2011-10-23 17:52:20 +00:00
|
|
|
|
2008-01-29 23:13:31 +00:00
|
|
|
if(WITH_BULLET)
|
2013-01-03 00:23:52 +00:00
|
|
|
if(NOT WITH_SYSTEM_BULLET)
|
|
|
|
|
add_subdirectory(bullet2)
|
|
|
|
|
endif()
|
2008-01-29 23:13:31 +00:00
|
|
|
endif()
|
Merge of apricot branch game engine changes into trunk, excluding GLSL.
GLEW
====
Added the GLEW opengl extension library into extern/, always compiled
into Blender now. This is much nicer than doing this kind of extension
management manually, and will be used in the game engine, for GLSL, and
other opengl extensions.
* According to the GLEW website it works on Windows, Linux, Mac OS X,
FreeBSD, Irix, and Solaris. There might still be platform specific
issues due to this commit, so let me know and I'll look into it.
* This means also that all extensions will now always be compiled in,
regardless of the glext.h on the platform where compilation happens.
Game Engine
===========
Refactoring of the use of opengl extensions and other drawing code
in the game engine, and cleaning up some hacks related to GLSL
integration. These changes will be merged into trunk too after this.
The game engine graphics demos & apricot level survived my tests,
but this could use some good testing of course.
For users: please test with the options "Generate Display Lists" and
"Vertex Arrays" enabled, these should be the fastest and are supposed
to be "unreliable", but if that's the case that's probably due to bugs
that can be fixed.
* The game engine now also uses GLEW for extensions, replacing the
custom opengl extensions code that was there. Removes a lot of
#ifdef's, but the runtime checks stay of course.
* Removed the WITHOUT_GLEXT environment variable. This was added to
work around a specific bug and only disabled multitexturing anyway.
It might also have caused a slowdown since it was retrieving the
environment variable for every vertex in immediate mode (bug #13680).
* Refactored the code to allow drawing skinned meshes with vertex
arrays too, removing some specific immediate mode drawing functions
for this that only did extra normal calculation. Now it always splits
vertices of flat faces instead.
* Refactored normal recalculation with some minor optimizations,
required for the above change.
* Removed some outdated code behind the __NLA_OLDDEFORM #ifdef.
* Fixed various bugs in setting of multitexture coordinates and vertex
attributes for vertex arrays. These were not being enabled/disabled
correct according to the opengl spec, leading to crashes. Also tangent
attributes used an immediate mode call for vertex arrays, which can't
work.
* Fixed use of uninitialized variable in RAS_TexVert.
* Exporting skinned meshes was doing O(n^2) lookups for vertices and
deform weights, now uses same trick as regular meshes.
2008-06-17 10:27:34 +00:00
|
|
|
|
2019-04-11 11:26:23 +02:00
|
|
|
if(WITH_DRACO)
|
|
|
|
|
add_subdirectory(draco)
|
|
|
|
|
endif()
|
|
|
|
|
|
2011-02-21 13:13:08 +00:00
|
|
|
if(WITH_BINRELOC)
|
2009-06-08 20:08:19 +00:00
|
|
|
add_subdirectory(binreloc)
|
2008-01-22 05:34:53 +00:00
|
|
|
endif()
|
Merge of apricot branch game engine changes into trunk, excluding GLSL.
GLEW
====
Added the GLEW opengl extension library into extern/, always compiled
into Blender now. This is much nicer than doing this kind of extension
management manually, and will be used in the game engine, for GLSL, and
other opengl extensions.
* According to the GLEW website it works on Windows, Linux, Mac OS X,
FreeBSD, Irix, and Solaris. There might still be platform specific
issues due to this commit, so let me know and I'll look into it.
* This means also that all extensions will now always be compiled in,
regardless of the glext.h on the platform where compilation happens.
Game Engine
===========
Refactoring of the use of opengl extensions and other drawing code
in the game engine, and cleaning up some hacks related to GLSL
integration. These changes will be merged into trunk too after this.
The game engine graphics demos & apricot level survived my tests,
but this could use some good testing of course.
For users: please test with the options "Generate Display Lists" and
"Vertex Arrays" enabled, these should be the fastest and are supposed
to be "unreliable", but if that's the case that's probably due to bugs
that can be fixed.
* The game engine now also uses GLEW for extensions, replacing the
custom opengl extensions code that was there. Removes a lot of
#ifdef's, but the runtime checks stay of course.
* Removed the WITHOUT_GLEXT environment variable. This was added to
work around a specific bug and only disabled multitexturing anyway.
It might also have caused a slowdown since it was retrieving the
environment variable for every vertex in immediate mode (bug #13680).
* Refactored the code to allow drawing skinned meshes with vertex
arrays too, removing some specific immediate mode drawing functions
for this that only did extra normal calculation. Now it always splits
vertices of flat faces instead.
* Refactored normal recalculation with some minor optimizations,
required for the above change.
* Removed some outdated code behind the __NLA_OLDDEFORM #ifdef.
* Fixed various bugs in setting of multitexture coordinates and vertex
attributes for vertex arrays. These were not being enabled/disabled
correct according to the opengl spec, leading to crashes. Also tangent
attributes used an immediate mode call for vertex arrays, which can't
work.
* Fixed use of uninitialized variable in RAS_TexVert.
* Exporting skinned meshes was doing O(n^2) lookups for vertices and
deform weights, now uses same trick as regular meshes.
2008-06-17 10:27:34 +00:00
|
|
|
|
2024-02-28 16:59:16 +01:00
|
|
|
if(WITH_CYCLES OR WITH_OPENSUBDIV)
|
2021-09-28 19:55:25 +02:00
|
|
|
if((WITH_CYCLES_DEVICE_CUDA OR WITH_CYCLES_DEVICE_OPTIX) AND WITH_CUDA_DYNLOAD)
|
2016-01-14 12:24:09 +05:00
|
|
|
add_subdirectory(cuew)
|
|
|
|
|
endif()
|
2021-09-28 19:55:25 +02:00
|
|
|
if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD)
|
2021-09-28 16:51:14 +02:00
|
|
|
add_subdirectory(hipew)
|
|
|
|
|
endif()
|
2014-08-05 13:57:50 +06:00
|
|
|
endif()
|
|
|
|
|
|
2020-05-01 19:14:50 +10:00
|
|
|
if(WITH_GHOST_X11 AND WITH_GHOST_XDND)
|
2014-10-07 15:46:19 -05:00
|
|
|
add_subdirectory(xdnd)
|
2012-02-17 16:58:09 +00:00
|
|
|
endif()
|
2014-06-18 22:49:17 +10:00
|
|
|
|
2016-01-04 18:11:12 +05:00
|
|
|
if(WITH_LIBMV)
|
|
|
|
|
add_subdirectory(ceres)
|
|
|
|
|
endif()
|
|
|
|
|
|
2025-06-12 02:19:57 +02:00
|
|
|
if(WITH_LIBMV OR WITH_GTESTS)
|
2017-10-30 12:58:44 +11:00
|
|
|
if(NOT WITH_SYSTEM_GFLAGS)
|
2017-04-21 10:58:01 +02:00
|
|
|
add_subdirectory(gflags)
|
|
|
|
|
endif()
|
2016-01-04 16:47:36 +05:00
|
|
|
add_subdirectory(glog)
|
|
|
|
|
endif()
|
|
|
|
|
|
2014-06-18 22:28:27 +06:00
|
|
|
if(WITH_GTESTS)
|
2014-06-18 22:49:17 +10:00
|
|
|
add_subdirectory(gtest)
|
2016-07-29 18:34:33 +02:00
|
|
|
add_subdirectory(gmock)
|
2014-06-18 22:49:17 +10:00
|
|
|
endif()
|
2014-11-17 16:35:36 +05:00
|
|
|
|
2017-08-18 08:24:12 +02:00
|
|
|
if(WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)
|
|
|
|
|
set(AUDASPACE_CMAKE_CFG ${CMAKE_CURRENT_SOURCE_DIR}/audaspace/blender_config.cmake)
|
2023-08-17 11:53:56 +10:00
|
|
|
set(LIB_SUFFIX "") # Quiet uninitialized warning.
|
2017-08-18 08:24:12 +02:00
|
|
|
add_subdirectory(audaspace)
|
2023-08-17 11:53:56 +10:00
|
|
|
unset(LIB_SUFFIX)
|
2017-08-18 08:24:12 +02:00
|
|
|
endif()
|
2019-08-26 18:34:11 +02:00
|
|
|
|
|
|
|
|
if(WITH_QUADRIFLOW)
|
|
|
|
|
set(QUADRIFLOW_CMAKE_CFG ${CMAKE_CURRENT_SOURCE_DIR}/quadriflow/blender_config.cmake)
|
|
|
|
|
add_subdirectory(quadriflow)
|
|
|
|
|
endif()
|
2019-12-16 15:50:14 +01:00
|
|
|
|
|
|
|
|
if(WITH_MOD_FLUID)
|
|
|
|
|
add_subdirectory(mantaflow)
|
|
|
|
|
endif()
|
2021-03-29 07:44:27 +02:00
|
|
|
|
2022-11-23 14:42:11 +01:00
|
|
|
if(WITH_VULKAN_BACKEND)
|
|
|
|
|
add_subdirectory(vulkan_memory_allocator)
|
|
|
|
|
endif()
|