Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-04Cleanup: cmake indentationCampbell Barton
2020-03-02Fix: Excessive (re)builds of subprojectsRay Molenkamp
Recent refactor external dependencies handling (D6642) improperly linked all library dependencies with public linkage rather than interface linkage. Causing excessive (re)builds of subprojects when not needed. This patch restores the interface linkage. Reviewed By: brecht sergey Differential Revision: https://developer.blender.org/D6983
2020-03-01Build: show draco library under extern folder in Visual StudioPhillip Thomas
And other code tweaks to make this library more consistent with others. Differential Revision: https://developer.blender.org/D6864
2020-02-26Build: ignore system paths when using precompiled libraries on LinuxNathan Craddock
Based on work by Nathan Craddock, with further changes to apply it to all precompiled libraries. Differential Revision: https://developer.blender.org/D6929
2020-02-15Cleanup: CMake formattingCampbell Barton
2020-02-07BuildSystem/Cleanup: Fix warning behaviour regarding library dependenciesRay Molenkamp
Adding USD to a lite build fails to build due to boost errors, when you turn boost on and rebuild still boost errors, boost was silently turned off since it was not deemed needed. Once boost was forced on, it still fails due to TBB being off. This patch fixes: - The Silent disabling of boost - Add a check that USD is is not on before doing that - move the TBB checks to a central location rather than the individual platform files - Add USD to the TBB checks. Differential Revision: https://developer.blender.org/D6479 Reviewers: brecht, sybren
2020-01-23CMake: Refactor external dependencies handlingSergey Sharybin
This is a more correct fix to the issue Brecht was fixing in D6600. While the fix in that patch worked fine for linking it broke ASAN runtime under some circumstances. For example, `make full debug developer` would compile, but trying to start blender will cause assert failure in ASAN (related on check that ASAN is not running already). Top-level idea: leave it to CMake to keep track of dependency graph. The root of the issue comes to the fact that target like "blender" is configured to use a lot of static libraries coming from Blender sources and to use external static libraries. There is nothing which ensures order between blender's and external libraries. Only order of blender libraries is guaranteed. It was possible that due to a cycle or other circumstances some of blender libraries would have been passed to linker after libraries it uses, causing linker errors. For example, this order will likely fail: libbf_blenfont.a libfreetype6.a libbf_blenfont.a This change makes it so blender libraries are explicitly provided their dependencies to an external libraries, which allows CMake to ensure they are always linked against them. General rule here: if bf_foo depends on an external library it is to be provided to LIBS for bf_foo. For example, if bf_blenkernel depends on opensubdiv then LIBS in blenkernel's CMakeLists.txt is to include OPENSUBDIB_LIBRARIES. The change is made based on searching for used include folders such as OPENSUBDIV_INCLUDE_DIRS and adding corresponding libraries to LIBS ion that CMakeLists.txt. Transitive dependencies are not simplified by this approach, but I am not aware of any downside of this: CMake should be smart enough to simplify them on its side. And even if not, this shouldn't affect linking time. Benefit of not relying on transitive dependencies is that build system is more robust towards future changes. For example, if bf_intern_opensubiv is no longer depends on OPENSUBDIV_LIBRARIES and all such code is moved to bf_blenkernel this will not break linking. The not-so-trivial part is change to blender_add_lib (and its version in Cycles). The complexity is caused by libraries being provided as a single list argument which doesn't allow to use different release and debug libraries on Windows. The idea is: - Have every library prefixed as "optimized" or "debug" if separation is needed (non-prefixed libraries will be considered "generic"). - Loop through libraries passed to function and do simple parsing which will look for "optimized" and "debug" words and specify following library to corresponding category. This isn't something particularly great. Alternative would be to use target_link_libraries() directly, which sounds like more code but which is more explicit and allows to have more flexibility and control comparing to wrapper approach. Tested the following configurations on Linux, macOS and Windows: - make full debug developer - make full release developer - make lite debug developer - make lite release developer NOTE: Linux libraries needs to be compiled with D6641 applied, otherwise, depending on configuration, it's possible to run into duplicated zlib symbols error. Differential Revision: https://developer.blender.org/D6642
2020-01-21Fix: Building with clang on windows.Ray Molenkamp
The USD landing broke building with clang on windows due to a couple of reasons: 1) Some incompatibilities in their headers [1] only one of them was important for us and is included in our patchset now. 2) clangs lld wanted the full path to the libusd_b library when using the whole archive link option, while msvc can figure it out from just the library name. Tested with clang/msvc and msbuild and ninja generators [1] https://github.com/PixarAnimationStudios/USD/issues/1030
2020-01-17Build: fix Linux linking errors with some combinations of build optionsBrecht Van Lommel
Differential Revision: https://developer.blender.org/D6600
2019-12-13USD: Introducing a simple USD ExporterSybren A. Stüvel
This commit introduces the first version of an exporter to Pixar's Universal Scene Description (USD) format. Reviewed By: sergey, LazyDodo Differential Revision: https://developer.blender.org/D6287 - The USD libraries are built by `make deps`, but not yet built by install_deps.sh. - Only experimental support for instancing; by default all duplicated objects are made real in the USD file. This is fine for exporting a linked-in posed character, not so much for thousands of pebbles etc. - The way materials and UV coordinates and Normals are exported is going to change soon. - This patch contains LazyDodo's fixes for building on Windows in D5359. == Meshes == USD seems to support neither per-material nor per-face-group double-sidedness, so we just use the flag from the first non-empty material slot. If there is no material we default to double-sidedness. Each UV map is stored on the mesh in a separate primvar. Materials can refer to these UV maps, but this is not yet exported by Blender. The primvar name is the same as the UV Map name. This is to allow the standard name "st" for texture coordinates by naming the UV Map as such, without having to guess which UV Map is the "standard" one. Face-varying mesh normals are written to USD. When the mesh has custom loop normals those are written. Otherwise the poly flag `ME_SMOOTH` is inspected to determine the normals. The UV maps and mesh normals take up a significant amount of space, so exporting them is optional. They're still enabled by default, though. For comparison: a shot of Spring (03_035_A) is 1.2 GiB when exported with UVs and normals, and 262 MiB without. We probably have room for optimisation of written UVs and normals. The mesh subdivision scheme isn't using the default value 'Catmull Clark', but uses 'None', indicating we're exporting a polygonal mesh. This is necessary for USD to understand our normals; otherwise the mesh is always rendered smooth. In the future we may want to expose this choice of subdivision scheme to the user, or auto-detect it when we actually support exporting pre-subdivision meshes. A possible optimisation could be to inspect whether all polygons are smooth or flat, and mark the USD mesh as such. This can be added when needed. == Animation == Mesh and transform animation are now written when passing `animation=True` to the export operator. There is no inspection of whether an object is actually animated or not; USD can handle deduplication of static values for us. The administration of which timecode to use for the export is left to the file-format-specific concrete subclasses of `AbstractHierarchyIterator`; the abstract iterator itself doesn't know anything about the passage of time. This will allow subclasses for the frame-based USD format and time-based Alembic format. == Support for simple preview materials == Very simple versions of the materials are now exported, using only the viewport diffuse RGB, metallic, and roughness. When there are multiple materials, the mesh faces are stored as geometry subset and each material is assigned to the appropriate subset. If there is only one material this is skipped. The first material if any) is always applied to the mesh itself (regardless of the existence of geometry subsets), because the Hydra viewport doesn't support materials on subsets. See https://github.com/PixarAnimationStudios/USD/issues/542 for more info. Note that the geometry subsets are not yet time-sampled, so it may break when an animated mesh changes topology. Materials are exported as a flat list under a top-level '/_materials' namespace. This inhibits instancing of the objects using those materials, so this is subject to change. == Hair == Only the parent strands are exported, and only with a constant colour. No UV coordinates, no information about the normals. == Camera == Only perspective cameras are supported for now. == Particles == Particles are only written when they are alive, which means that they are always visible (there is currently no code that deals with marking them as invisible outside their lifespan). Particle-system-instanced objects are exported by suffixing the object name with the particle's persistent ID, giving each particle XForm a unique name. == Instancing/referencing == This exporter has experimental support for instancing/referencing. Dupli-object meshes are now written to USD as references to the original mesh. This is still very limited in correctness, as there are issues referencing to materials from a referenced mesh. I am still committing this, as it gives us a place to start when continuing the quest for proper instancing in USD. == Lights == USD does not directly support spot lights, so those aren't exported yet. It's possible to add this in the future via the UsdLuxShapingAPI. The units used for the light intensity are also still a bit of a mystery. == Fluid vertex velocities == Currently only fluid simulations (not meshes in general) have explicit vertex velocities. This is the most important case for exporting velocities, though, as the baked mesh changes topology all the time, and thus computing the velocities at import time in a post-processing step is hard. == The Building Process == - USD is built as monolithic library, instead of 25 smaller libraries. We were linking all of them as 'whole archive' anyway, so this doesn't affect the final file size. It does, however, make life easier with respect to linking order, and handling upstream changes. - The JSON files required by USD are installed into datafiles/usd; they are required on every platform. Set the `PXR_PATH_DEBUG` to any value to have the USD library print the paths it uses to find those files. - USD is patched so that it finds the aforementioned JSON files in a path that we pass to it from Blender. - USD is patched to have a `PXR_BUILD_USD_TOOLS` CMake option to disable building the tools in its `bin` directory. This is sent as a pull request at https://github.com/PixarAnimationStudios/USD/pull/1048
2019-11-27Cleanup/CMake: Remove dormant windows codesign codeRay Molenkamp
This was added years ago to prepare for code-signing the executable but was never used, buildbots use a different mechanism now to sign so no need to keep this around.
2019-11-25Cleanup: remove unused CMake WITH_MOD_CLOTH_ELTOPO optionCampbell Barton
2019-11-08Windows: Switch to the dynamic C runtimeRay Molenkamp
This change switches windows to the dynamic C runtime avoiding issues coming from mixing the static and dynamic runtime like the ones outlined in [1] [1] https://developer.blender.org/D5387#122165 Differential Revision: https://developer.blender.org/D6175 Reviewed by: @Sergey
2019-10-28CMake: add missing headers, use space before commentsCampbell Barton
2019-10-10Build: add WITH_TBB option, in preparation of sculpt using itBrecht Van Lommel
It should no longer be tied to OpenVDB and OpenImageDenoise then. Differential Revision: https://developer.blender.org/D6029
2019-10-07CMake: Add support for building with OpenMP support for clang on windows.Ray Molenkamp
mostly minor c/cxx/linker flags, only tested with clang 9.0.0 Differential Revision: https://developer.blender.org/D5976 Reviewers: brecht, jesterking
2019-09-09Cleanup: trailing space, remove tabs, pep8Campbell Barton
2019-08-14Compositor: Added denoising nodeBrecht Van Lommel
This node is built on Intel's OpenImageDenoise library. Other denoisers could be integrated, for example Lukas' Cycles denoiser. Compositor: Made OpenImageDenoise optional, added CMake and build_env files to find OIDN Compositor: Fixed some warnings in the denoising operator build_environment: Updated OpenImageDenoise to 0.8.1 build_environment: Updated OpenImageDenoise in `make deps` for macOS Reviewers: sergey, jbakker, brecht Reviewed By: brecht Subscribers: YAFU, LazyDodo, Zen_YS, slumber, samgreen, tjvoll, yeus, ponomarovmax, getrad, coder.kalyan, vitos1k, Yegor, DeepBlender, kumaran7, Darkfie9825, aliasguru, aafra, ace_dragon, juang3d, pandrodor, cdog, lordodin, jtheninja, mavek, marcog, 5k1n2, Atair, rawalanche, 0o00o0oo, filibis, poor, lukasstockner97 Tags: #compositing Differential Revision: https://developer.blender.org/D4304
2019-06-29Cleanup: Fix build warnings with MSVCRay Molenkamp
gflags emits a few unused variable warnings since the main CMakeLists.txt raised the warning from w4 down to w3. This restores it back to w4 in the remove_strict_flags macro.
2019-06-26MSVC: Don't share pch between debug and release builds.Ray Molenkamp
Precompiled headers were sharing the PCH file between debug and release builds which is 'bad'. Adding the configuration to the path fixes the issue. Reported on chat by @mano-wii
2019-06-19Cleanup: style, indentationCampbell Barton
2019-06-19CMake: cleanup, unset temporary var after useCampbell Barton
2019-06-18Fix T65852: Cmake fails with paths containing special characters.mano-wii
MATHES performs a regular expression which in this case is unnecessary.
2019-06-16Fix Cmake Error.mano-wii
`LAST_EXT` only works in versions 3.14 or greater.
2019-06-15Cmake: Add `WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS` optionmano-wii
This allows grouping files in a filter corresponding to the source files name. Differential Revision: https://developer.blender.org/D5077
2019-06-15Cmake: rename `WINDOWS_USE_VISUAL_STUDIO_FOLDERS` option to ↵mano-wii
`WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS`. Suggested by @LazyDodo
2019-06-15QtCreator/Visual Studio: Group glsl files in Shaders group.mano-wii
2019-06-06cmake/msvc: Add ninja support for precompiled headersRay Molenkamp
Ninja was unable to see the dependency between the cpp that generated the pch and the compile units that used it. Explicitly managing this now makes precompiled headers work with both msvc and clang, with both msbuild and ninja based generators.
2019-06-06Fix: Build error with ninja on windowsRay Molenkamp
Ninja has issues detecting the implicit dependency on the precompiled header output for freestyle. Disabled ninja support for now until a proper solution can be found.
2019-06-06Cleanup: indentationCampbell Barton
Also add comment to `FRS_precomp.h`.
2019-06-06Freestyle: Use precompiled headers with MSVC.Ray Molenkamp
This brings down the build time for freestyle with MSVC from a minute to 10-20 seconds. vs2019 bf_freestyle debug before: 60464 ms after: 11028 ms vs2019 bf_freestyle release before: 56984 ms after: 20526 ms Differential Revision: https://developer.blender.org/D2606 Reviewed By: brecht , sergey
2019-06-06CMake: pass link deps to library targets with INTERFACECampbell Barton
Introduced since removing BLENDER_SORTED_LIBS. This caused building a library to build all it's dependencies.
2019-05-08CMake: Add support of Ninja's pools to ease building on limited amount of RAM.Bastien Montagne
Many modern computers support a lot of threads (parrallel building jobs), but are somewhat restricted in memory, when some building jobs can require several GB each. Ninja builder has pools, which extend the usual `-j X` make parallelizing option, by allowing to specify different numbers of parallel jobs for different targets. This commit defines three pools, one for linking, one for usual compile, and one for compiling some 'heavy' cpp libs, when a single file can require GB of RAM in full debug builds. Simply enabling WITH_NINJA_POOL_JOBS will try to set default sensible values for those three pools based on your machine specifications, you can then tweak further the values of NINJA_MAX_NUM_PARALLEL_ settings, if you like. On my system (8 cores, 16GB RAM), it allows to build a full debug with all ASAN options build with roughly 7GB of RAM used at most, pretty much as quickly as without that option (which would require up to 11GB of available RAM at some points). Review task: D4780.
2019-04-17cmake: Fix python linker issues on windows.Ray Molenkamp
Recent cmake work made the debug build link both python37.dll and python37_d.dll
2019-04-17Cleanup: use 2 space indentation for CMakeCampbell Barton
2019-04-16CMake: remove BLENDER_SORTED_LIBSCampbell Barton
Use CMake's target_link_libraries instead of manually maintaining library dependencies in a single list. In practice adding new libraries often ended up being guess-work, now each library lists the libraries it uses. This was used for the game player executable so libraries could optionally link to stubs. If we need this functionality it can be done using target-properties as described in T46725.
2019-04-16CMake: cleanup, arg rename, add definitions lastCampbell Barton
2019-04-16CMake: re-order openvdb/osl linkingBrecht Van Lommel
Needed for building without sorted libs.
2019-04-15CMake: resolve issue building without sorted libsCampbell Barton
Linking empty libs gave an error.
2019-04-14CMake: prepare for BLENDER_SORTED_LIBS removalCampbell Barton
No functional change, this adds LIB definition and args to cmake files. Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS' since there are many platforms/configurations that could break when changing linking order. Manually add and enable WITHOUT_SORTED_LIBS to try building without sorted libs (currently fails since all variables are empty). This check will eventually be removed. See T46725.
2019-02-14Cleanup: indentationCampbell Barton
2019-02-05Cleanup: remove contributors for CMake filesCampbell Barton
Following removal from C source code. See: 8c68ed6df16d8893
2018-11-28Merge branch 'master' into blender2.8Sergey Sharybin
2018-11-28Add cross-platform NUMA librarySergey Sharybin
Makes it simple to use NUMA libraries on various platforms.
2018-11-26Merge branch 'master' into blender2.8Sergey Sharybin
2018-11-26CMake: Remove Cycles specific OpenSubdiv optionsSergey Sharybin
Just use one flag which enables OpenSubdiv globally for all the areas of Blender.
2018-11-23Merge branch 'master' into blender2.8Brecht Van Lommel
2018-11-23Fix T57998: crash at start with jemalloc package on some Linux distributions.Brecht Van Lommel
The jemalloc library must be ahead of pthread in linking order, so jemalloc can find the pthread symbols for its background thread.
2018-11-07Merge branch 'master' into blender2.8Stefan Werner
2018-11-07Cycles: Added Embree as BVH option for CPU renders.Stefan Werner
Note that this is turned off by default and must be enabled at build time with the CMake WITH_CYCLES_EMBREE flag. Embree must be built as a static library with ray masking turned on, the `make deps` scripts have been updated accordingly. There, Embree is off by default too and must be enabled with the WITH_EMBREE flag. Using Embree allows for much faster rendering of deformation motion blur while reducing the memory footprint. TODO: GPU implementation, deduplication of data, leveraging more of Embrees features (e.g. tessellation cache). Differential Revision: https://developer.blender.org/D3682