Commit Graph

1289 Commits

Author SHA1 Message Date
Brecht Van Lommel 06df05a35b Merge branch 'master' into blender2.8 2018-11-30 12:16:19 +01:00
Brecht Van Lommel 84285c1e34 Fix T58275: WITH_OPENSUBDIV not enabled by default with some CMake versions.
Solution provided by Ulysse Martin.
2018-11-30 11:52:39 +01:00
Gaia Clary 23284e4dde add: visual studio Compiler warning (order of attribute init in c++ constructors) 2018-11-29 18:33:46 +01:00
Gaia Clary 3c767cecce add: visual studio Compiler warning (order of attribute init in c++ constructors) 2018-11-29 17:04:12 +01:00
Brecht Van Lommel b71006ceed Fix T58088: OpenSubdiv not enabled by default in macOS builds. 2018-11-27 14:40:25 +01:00
Sergey Sharybin 9abcf56fa8 Enable OpenSubdiv modifier by default
This commit makes it so that subsurf/multires modifiers will respect
the WITH_OPENSUBDIV option. The WITH_OPENSUBDIV_MODIFIER option is
now gone.

For artists it mean that subsurf modifier will behave same as it is
planned for 2.80. Multires will now support sculpting, but it has some
known limitations. Those will be worked on before the final release.

If OpenSubdiv is disabled, no subsurf/multires functionality will
present.

For the details see:

  https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Modeling#Subsurf.2FMultires
2018-11-26 15:41:37 +01:00
Sergey Sharybin 0970ed0550 Merge branch 'master' into blender2.8 2018-11-26 12:00:36 +01:00
Sergey Sharybin acd1d1a31d CMake: Remove Cycles specific OpenSubdiv options
Just use one flag which enables OpenSubdiv globally for all the
areas of Blender.
2018-11-26 11:41:38 +01:00
Stefan Werner 9d0eac6ba5 Merge branch 'master' into blender2.8 2018-11-07 14:30:09 +01:00
Stefan Werner 2c5531c0a5 Cycles: Added Embree as BVH option for CPU renders.
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
2018-11-07 12:58:12 +01:00
Ray Molenkamp 4bf4da12de Merge remote-tracking branch 'origin/master' into blender2.8 2018-10-22 10:19:06 -06:00
Ray Molenkamp 86dbbd156f Windows: Enable python debugging in Visual Studio.
see D3817 for technical details, and https://wiki.blender.org/wiki/Tools/Debugging/Python_Visual_Studio for a end user quick-start guide.

Differential Revision: https://developer.blender.org/D3817
2018-10-22 10:17:08 -06:00
Sergey Sharybin ee1b2cce5f CMake: Default to C11 for Clang and GCC
The option WITH_C11 is gone, and C++ is defaulting to C++11 now,
so guess it's fine to assume we need C11 now.

This is technically what we use anyway, with all the re-definitions
of structs (like when we typedef anonymous struct in a header file
first, and them define it to a proper structure in implementation
file).
2018-09-28 10:09:46 +02:00
Campbell Barton c72380a427 Merge branch 'master' into blender2.8 2018-09-26 10:28:23 +10:00
Ray Molenkamp fcf3aa90da CMake: Repress deprecation warnings with MSVC. 2018-09-25 11:05:35 -06:00
Brecht Van Lommel 34ee9ab97c CMake: remove PYTHON_NUMPY_INCLUDE_DIRS as a cache variable on macOS/Windows.
It's in a fixed location on those platforms, and having it as a cache variable
just means things break when we upgrade to a new Python version.
2018-09-18 12:11:06 +02:00
Campbell Barton 2597cd3998 Merge branch 'master' into blender2.8 2018-09-12 15:54:07 +10:00
Brecht Van Lommel a1651ddc98 Build: require OpenJPEG 2.x minimum, remove bundled version.
* WITH_SYSTEM_OPENJPEG is removed and is now always on, this was already
  the case for macOS and Windows.
* This should not break existing Linx builds. If there is no new enough
  OpenJPEG installed, CMake will no find libopenjp2 and WITH_IMAGE_OPENJPEG
  will be disabled.
* install_deps.sh was updated with new package names, since distributions
  put this version in a new package.

Differential Revision: https://developer.blender.org/D3663
2018-09-11 12:45:05 +02:00
Bastien Montagne a43ebc63fa Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/collision.c
2018-09-03 17:44:36 +02:00
Brecht Van Lommel 4da2acae3a Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3668
2018-09-03 16:55:01 +02:00
mano-wii 6fa7fa6671 MSVC: Set the warning C4189 from level 4 to level 3
This is a useful warning and there is an equivalent used in `GNUC` and `clang` compilers.

Reviewed on IRC by @brecht and @LazyDodo
2018-08-29 13:59:04 -03:00
Brecht Van Lommel 871b7ba892 Merge branch 'master' into blender2.8 2018-08-28 19:15:08 +02:00
Ray Molenkamp 5e8a030a08 cmake: adjustments required for lib-upgrade on windows. 2018-08-27 19:38:31 -06:00
Bastien Montagne 09895cae48 Merge branch 'master' into blender2.8 2018-08-23 14:56:42 +02:00
Lukas Stockner b3ac3d13a2 Cycles: Add option for building CUDA kernels sequentially
Building the CUDA kernels takes quite a bit of memory, and when building all of
them the combined usage can be too much on some systems (especially VMs).

Therefore, this patch adds an option to force the build system to build them
sequentially by making each build step depend on the previous kernel.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D3623
2018-08-22 19:54:59 -07:00
Campbell Barton 9f25b2f278 Merge branch 'master' into blender2.8 2018-08-18 19:18:55 +10:00
Ray Molenkamp db8ca0f17a cmake: fix typo in else() 2018-08-17 14:14:26 -06:00
Ray Molenkamp 0a5f706136 cmake/ctest: output test binaries to debug/release folders on windows.
debug/release builds were writing the binaries to the same folder
2018-08-17 10:04:55 -06:00
Sergey Sharybin 5c61be777f Subsurf: Introduce quality option
For users it defines how accurate vertex positions are in terms
of limit surface (as in, how close the vertices locations to the
condition when they are calculated for an infinitely subdivided
mesh).

This affects things like:

- Irregular vertices (joint of 3 or more edges)
- Crease

Keep quality value low for performance.

NOTE: Going higher does not necessarily mean real improvement
in quality, ideal case might be reached well before maximum
quality of 10. Quality of 3 is a good starting point.

Internally quality is translated directly to adaptive subdivision
level.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3599
2018-08-13 16:04:06 +02:00
Brecht Van Lommel 06e9d1683b Fix build error in new build after recent merge. 2018-07-30 23:01:20 +02:00
Brecht Van Lommel 2e2e7aff7c Merge branch 'master' into blender2.8 2018-07-30 18:44:18 +02:00
Brecht Van Lommel 885cc4cf9a Build: require C11/C++11 for all operating systems in master.
This is in preparation of upgrading our library dependencies, some of which
need C++11. We already use C++11 in blender2.8 and for Windows and macOS, so
this just affects Linux.

On many distributions this will not require any changes, on some
install_deps.sh will need to be run again to rebuild libraries.

Differential Revision: https://developer.blender.org/D3568
2018-07-30 17:12:24 +02:00
Campbell Barton 5f693d7442 Merge branch 'master' into blender2.8 2018-07-30 15:39:12 +10:00
Campbell Barton 6f1514d22d CMake: omit superfluous Up-to-date messages
Causes a lot of noise when building the install target.
2018-07-30 15:22:09 +10:00
Brecht Van Lommel 1333ceca04 Merge branch 'master' into blender2.8 2018-07-23 14:23:21 +02:00
Milan Jaros 01f5601fe5 Fix build for Intel compiler with C++11. 2018-07-23 14:21:43 +02:00
Sergey Sharybin 427e5ef342 Merge branch 'master' into blender2.8 2018-07-10 11:27:48 +02:00
Sergey Sharybin 80373bc4d2 CMake: Disable OpenAL and JACK when AUDASPACE is disabled
Previously CMake was raising a fatal error, which wasn't too helpful.

There is still some fatal messages about Audaspace and Game Engine,
but the latter one is on it's EOL and is removed in Blender 2.8.
2018-07-10 11:25:47 +02:00
Campbell Barton f3065ed365 Merge branch 'master' into blender2.8 2018-06-28 10:50:04 +02:00
Campbell Barton 274bde23fb CMake: enable WITH_ASSERT_ABORT by default
Assert from BLI_assert by default in debug builds
(instead of just printing a warning).

Some developers ignored this, causing errors for others.
Better debug builds cause hard error so code isn't ignored.

Disabling is still useful when bisecting or testing outdated code.
2018-06-28 10:48:06 +02:00
Sergey Sharybin f4d6e66b25 Merge branch 'master' into blender2.8 2018-06-22 14:42:25 +02:00
Sergey Sharybin 38247fc80b CMake: Cleanup, rename CC_REMOVE_STRICT_FLAGS to C_REMOVE_STRICT_FLAGS 2018-06-22 14:25:42 +02:00
Sergey Sharybin 0d7e758c91 CMake: Tweaks to removal of strict flags
Silences the following strict flags from external libraries:

- -Wclass-memaccess
- -Wswitch
- -Wtype-limits
- -Wint-in-bool-context

Needed to tweak macro a bit, since the old logic was wrong:
we can not use CXX flags for C compiler, need way more strict
separation between what goes where.
2018-06-22 14:25:42 +02:00
Campbell Barton 05dc109553 Merge branch 'master' into blender2.8 2018-06-17 20:37:10 +02:00
Campbell Barton e7a68ef843 Cleanup: trailing space in CMake files 2018-06-17 20:15:24 +02:00
Ray Molenkamp 9d876960e8 This option limits visibility of the glew.h header to just bf_gpu and intern_gawain
this is to highlight areas in the code that still directly do opengl calls or use
opengl types.

This is in preparation for supporting alternative rendering back-ends.

Reviewers: brecht, fclem

Differential Revision: https://developer.blender.org/D3304
2018-06-15 20:17:16 -06:00
Jeroen Bakker b6b1e0f56c T55454: removal of clay engine
The ClayEngine was introduced to test the blender2.8 architecture during
development. As currently we have the wanted features implemented with
matcaps we are going to remove the clay engine as it was never intended
to be an official releasable engine

Note: The test cases are never run. But when enabled will be skipped as
they were implemented over the Clay Engine
2018-06-12 15:32:31 +02:00
Campbell Barton a52152c59f Merge branch 'master' into blender2.8 2018-06-10 08:21:50 +02:00
Campbell Barton ae01df5779 Cleanup: trailing space in CMake files 2018-06-10 08:19:03 +02:00
Bastien Montagne 94aa4d1657 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_sequencer.h
	source/blender/blenkernel/intern/sequencer.c
	source/blender/editors/curve/editcurve_paint.c
	source/blender/editors/gpencil/gpencil_edit.c
	source/blender/editors/gpencil/gpencil_paint.c
	source/blender/editors/gpencil/gpencil_utils.c
	source/blender/editors/include/ED_object.h
	source/blender/editors/include/ED_view3d.h
	source/blender/editors/interface/interface_eyedropper_depth.c
	source/blender/editors/render/render_opengl.c
	source/blender/editors/sculpt_paint/paint_image_proj.c
	source/blender/editors/sculpt_paint/sculpt.c
	source/blender/editors/space_view3d/drawobject.c
	source/blender/editors/space_view3d/view3d_draw.c
	source/blender/editors/space_view3d/view3d_edit.c
	source/blender/editors/space_view3d/view3d_intern.h
	source/blender/editors/space_view3d/view3d_select.c
	source/blender/editors/space_view3d/view3d_utils.c
	source/blender/editors/transform/transform_conversions.c
	source/blender/editors/transform/transform_snap.c
	source/blender/python/intern/gpu_offscreen.c
	source/blender/windowmanager/intern/wm_files.c
2018-06-08 14:38:57 +02:00
Jeroen Bakker 55606dbdbc CMake: disable WITH_COMPILER_ASAN for CMAKE_BUILD_TYPE Release 2018-06-08 11:45:53 +02:00
Bastien Montagne e44743736f Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/io/io_collada.c
	source/blender/editors/object/object_bake.c
	source/blender/editors/object/object_edit.c
	source/blender/editors/render/render_internal.c
	source/blender/makesrna/intern/rna_object_api.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-01 17:26:36 +02:00
Ray Molenkamp 7c75c2db4f Add Asan support for clang on windows.
This will currently only work for the RelWithDebInfo configuration since asan
does not support the debug crt. for source line information in the reports,
you need a copy of llvm-symbolizer in the blender folder or set the
ASAN_SYMBOLIZER_PATH environment variable to point to it. Currently (as of
6.0.0) llvm-symbolizer does not ship with the binary clang/llvm distribution.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3446
2018-05-31 11:50:30 -06:00
Ray Molenkamp 5d1a172783 Merge remote-tracking branch 'origin/master' into blender2.8 2018-05-28 14:35:59 -06:00
Ray Molenkamp 81060ff6b2 Windows: Add support for building with clang.
This commit contains the minimum to make clang build/work with blender, asan and ninja build support is forthcoming

Things to note:

1) Builds and runs, and is able to pass all tests (except for the freestyle_stroke_material.blend test which was broken at that time for all platforms by the looks of it)

2) It's slightly faster than msvc when using cycles. (time in seconds, on an i7-3370)

victor_cpu
	msvc:3099.51
	clang:2796.43

pavillon_barcelona_cpu
	msvc:1872.05
	clang:1827.72

koro_cpu
	msvc:1097.58
	clang:1006.51

fishy_cat_cpu
	msvc:815.37
	clang:722.2

classroom_cpu
	msvc:1705.39
	clang:1575.43

bmw27_cpu
	msvc:552.38
	clang:561.53

barbershop_interior_cpu
	msvc:2134.93
	clang:1922.33

3) clang on windows uses a drop in replacement for the Microsoft cl.exe (takes some of the Microsoft parameters, but not all, and takes some of the clang parameters but not all) and uses ms headers + libraries + linker, so you still need visual studio installed and will use our existing vc14 svn libs.

4) X64 only currently, X86 builds but crashes on startup.

5) Tested with llvm/clang 6.0.0

6) Requires visual studio integration, available at https://github.com/LazyDodo/llvm-vs2017-integration

7) The Microsoft compiler spawns a few copies of cl in parallel to get faster build times, clang doesn't, so the build time is 3-4x slower than with msvc.

8) No openmp support yet. Have not looked at this much, the binary distribution of clang doesn't seem to include it on windows.

9) No ASAN support yet, some of the sanitizers can be made to work, but it was decided to leave support out of this commit.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3304
2018-05-28 14:34:47 -06:00
Campbell Barton 6a64556ba1 Merge branch 'master' into blender2.8 2018-05-18 15:31:53 +02:00
Campbell Barton e077285745 CMake: Add WITH_COMPILER_ASAN option
This supports easy toggling of Address Sanitizer.
2018-05-18 15:22:16 +02:00
Campbell Barton 4d19f24ba7 Cleanup: remove deprecated definitions 2018-05-18 15:22:16 +02:00
Campbell Barton aab5ac25f2 Remove Frame Server
This feature is limited (only byte PPM output, no multi-view),
only works with specific configurations.

This also causes some maintenance overhead
when testing changes to the render pipeline.
2018-05-09 12:50:26 +02:00
Dalai Felinto 159806140f Removing Blender Game Engine from Blender 2.8
Folders removed entirely:
* //extern/recastnavigation
* //intern/decklink
* //intern/moto
* //source/blender/editors/space_logic
* //source/blenderplayer
* //source/gameengine

This includes DNA data and any reference to the BGE code in Blender itself.
We are bumping the subversion.

Pending tasks:
* Tile/clamp code in image editor draw code.
* Viewport drawing code (so much of this will go away because of BI removal
  that we can wait until then to remove this.
2018-04-17 17:51:28 +02:00
Dalai Felinto 28b996a9d2 Disable GAME ENGINE from the build options 2018-04-17 17:38:18 +02:00
Campbell Barton a2c0a382cd Merge branch 'master' into blender2.8 2018-04-03 14:19:51 +02:00
Brecht Van Lommel 71d7d6cd8c Build: add WITH_OPENVDB_3_ABI_COMPATIBLE option.
Better fix for T54457. It seems Debian compiles OpenVDB without ABI 3
compatibility, while Arch does enable it as is the default in the OpeVDB
CMake build system.

So now there's an option that the distribution can set depending on how
they compile their OpenVDB package.
2018-04-02 19:13:04 +02:00
Milan Jaros 888a04c7e4 Build: fixes for the Intel compiler versions 2016, 2017, 2018.
Differential Revision: https://developer.blender.org/D3109
2018-04-02 16:39:04 +02:00
Sergey Sharybin 21f16bb93e Merge branch 'master' into blender2.8 2018-03-23 15:25:27 +01:00
Sergey Sharybin ab48e6355d Glog/gflags: Reduce amount of local modifications
With better directory layout and more proper include
statements we can avoid several local modifications,
such as changing config.h for Windows Glog and the
ones related on pass-through statements in logging
headers in Glog.

This commit also makes unused functions not-a-warning
for external code.
2018-03-23 14:38:02 +01:00
Bastien Montagne e95282e783 Merge branch 'master' into blender2.8 2018-03-18 16:05:02 +01:00
Ray Molenkamp 7427e3e501 MSVC: ignore warning c4828 The file contains a character that is illegal.
The only place this warning is coming from is from comments in headers of 3rd party libs. we can safely repress this warning for now.
2018-03-17 12:45:27 -06:00
Campbell Barton 2bc952fdb6 Merge branch 'master' into blender2.8 2018-02-18 22:33:05 +11:00
Thomas Dinges 2eaf90b305 Cycles: Remove Fermi support from CMake and update runtime checks in device_cuda.cpp.
Fermi code in Cycles kernel and texture system are coming next.
2018-02-17 16:15:07 +01:00
Brecht Van Lommel f2453ecdcd Merge branch 'master' into blender2.8 2018-02-17 01:39:29 +01:00
Brecht Van Lommel 3d2d58391a Tests: add OpenGL UI drawing tests.
This reuses the Cycles regression test code to also work for OpenGL UI drawing.
We launch Blender with a bunch of .blend files, take a screenshot and compare
it with a reference screenshot, and generate a HMTL report showing the failed
tests and their differences.

For Cycles we keep small reference renders to compare to in svn, but for OpenGL
developers currently have to generate the references manually. How to use:

* WITH_OPENGL_DRAW_TESTS=ON in CMake
* BLENDER_TEST_UPDATE=1 ctest -R opengl_draw
* .. make code changes ..
* ctest -R opengl_draw
* open build_dir/tests/opengl_draw/report.html

Differential Revision: https://developer.blender.org/D3064
2018-02-16 12:51:49 +01:00
Brecht Van Lommel 3102bf2889 Merge branch 'master' into blender2.8 2018-02-14 15:16:50 +01:00
Sergey Sharybin a966852362 CMake: Expose Cycles devices support as CMake option
Handy to disable GPU based devices when it's needed to run Valgrind.
2018-02-14 10:32:32 +01:00
Sergey Sharybin c341dd0585 CMake: Fix cimpilation error when CUDA dynload is disabled but toolkit is not installed 2018-02-14 10:20:26 +01:00
Sergey Sharybin 9278614115 Merge branch 'master' into blender2.8 2018-02-08 16:27:28 +01:00
Sergey Sharybin e0597baed5 Remove Carve boolean
We've got quite comprehensive BMesh based implementation, which is way easier
for maintenance than abandoned Carve library.

After all the time BMesh implementation was working on the same level of
limitations about manifold meshes and touching edges than Carve. Is better
to focus on maintaining one boolean implementation now.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3050
2018-02-08 15:37:44 +01:00
Campbell Barton eeb621566a Merge branch 'master' into blender2.8 2018-02-04 10:46:34 +11:00
Ray Molenkamp 36c1122b96 msvc: Use source folder structure for project file.
This patch changes the huge list of projects in visual studio into a nice tree matching the source folder structure. see D2823 for details.

Differential Revision: http://developer.blender.org/D2823
2018-02-03 16:38:27 -07:00
Ray Molenkamp a5052770b8 cycles: Add an nvrtc based cubin cli compiler.
nvcc is very picky regarding compiler versions, severely limiting the compiler we can use, this commit adds a nvrtc based compiler that'll allow us to build the cubins even if the host compiler is unsupported. for details see D2913.

Differential Revision: http://developer.blender.org/D2913
2018-02-03 10:59:09 -07:00
Campbell Barton 342a322a93 CMake: bump minimum version to 3.5 2017-12-17 01:04:05 +11:00
Campbell Barton 1b2f8b2754 Merge branch 'master' into blender2.8 2017-12-04 16:51:07 +11:00
Campbell Barton d47d263b4b Cleanup: style 2017-12-04 16:37:31 +11:00
Campbell Barton 03a5eccc94 Merge branch 'master' into blender2.8 2017-11-30 18:30:41 +11:00
Campbell Barton 28d2148b09 Haiku OS Support
D2860 by @miqlas

Even though Haiku is a niche OS, only minor changes are needed.
2017-11-30 18:05:21 +11:00
Brecht Van Lommel 2440415bd3 Merge branch 'master' into blender2.8 2017-11-07 03:08:24 +01:00
Arto Kitula 956ee5e265 macOS: remove old OpenMP lib stuff from cmake 2017-11-06 23:54:35 +02:00
Campbell Barton 619600a53f CMake: cleanup 2017-10-30 18:48:27 +11:00
Campbell Barton e8daf2e3ea CMake: cleanup 2017-10-30 12:59:36 +11:00
Sergey Sharybin 7771e0b474 Merge branch 'master' into blender2.8 2017-10-25 11:26:53 +02:00
Campbell Barton 2103194f79 Fix T53004: XWayland ignores cursor-warp calls
There is currently a limitation in XWayland,
the cursor needs to be hidden during warp calls.
2017-10-25 20:12:12 +11:00
Sergey Sharybin 3e8abc0535 Depsgraph: Make Copy-on-Write a command line option
Before it was a compile time option which was not very easy to use or test. Now
the project is getting more mature, so very soon we will be able to call for a
public tests of limited features.

The copy-on-write (which includes animation, modifiers) is enabled using
--enable-copy-on-write command line argument.
2017-10-18 14:35:34 +02:00
Campbell Barton 6ec43a765b Merge branch 'master' into blender2.8 2017-10-10 01:36:36 +11:00
Campbell Barton c3d3483223 CMake: Re-order PYTHON_VERSION check
Missing paths would error first.
2017-10-08 14:05:22 +11:00
Ray Molenkamp c921c3bcd0 [cmake] Add minimum python version check to cmake to prevent later build errors. 2017-10-07 07:58:54 -06:00
Campbell Barton ea606a7847 Merge branch 'master' into blender28 2017-10-06 21:25:33 +11:00
Campbell Barton 57a93b4678 CMake: use restrict w/ gcc, not clang 2017-10-05 12:10:34 +11:00
Campbell Barton 7cc952ac5d CMake: add -Wrestrict for GCC 2017-10-05 10:50:51 +11:00
Campbell Barton e3fe8128e4 Merge branch 'master' into blender2.8 2017-09-29 19:55:00 +10:00
Brecht Van Lommel c10ac1bb5c macOS: officially upgrade to 10.9 libraries from lib/darwin.
This removes a bunch of code that is no longer needed, and running
"make update" will now automatically download the new libraries.

Differential Revision: https://developer.blender.org/D2861
2017-09-28 20:53:06 +02:00
Sergey Sharybin 7fdb9e168d Merge branch 'master' into blender2.8 2017-09-28 16:13:09 +05:00
Campbell Barton 0ae1a1ed48 CMake: move MSVC warnings to central location 2017-09-28 13:41:54 +10:00
Sergey Sharybin 98ba302f70 Merge branch 'master' into blender2.8 2017-09-25 18:57:43 +05:00
Aaron Carlisle efd5e3c254 Remove quicktime support
It has been deprecated since at least macOS 10.9 and fully removed in 10.12.

I am unsure if we should remove it only in 2.8. But you cannot build blender with it supported when using a modern xcode version anyway so I would tend towards just removing it also for 2.79 if that ever happens.

Reviewers: mont29, dfelinto, juicyfruit, brecht

Reviewed By: mont29, brecht

Subscribers: Blendify, brecht

Maniphest Tasks: T52807

Differential Revision: https://developer.blender.org/D2333
2017-09-22 16:40:05 -04:00
Campbell Barton 572b1a644f Merge branch 'master' into blender2.8 2017-09-05 22:56:03 +10:00
Campbell Barton 9c1cc35be2 CMake: use Blender's glew by default
Use since it's always bundled to avoid any issues caused
by version mis-match.
2017-09-03 16:36:17 +10:00
Jörg Müller 4f881e0d97 CMake version bump: 3.5 2017-08-20 17:01:27 +02:00
Jörg Müller 08094e8f23 Audaspace: cmake fixes, lowering to 3.0 minimum required. 2017-08-19 11:46:21 +02:00
Jörg Müller a702ff4c03 CMake: Boost no longer needed for Audaspace references either 2017-08-18 19:07:39 +02:00
Campbell Barton aae0737f57 CMake: Boost no longer needed for Audaspace 2017-08-18 18:17:29 +10:00
Jörg Müller 986267300b Audaspace: Moving audaspace 1.3 into extern.
Deleting the old internal audaspace.

Major changes from there are:
- The whole library was refactored to use C++11.
- Many stability and performance improvements.
- Major Python API refactor:
 - Most requested: Play self generated sounds using numpy arrays.
 - For games: Sound list, random sounds and dynamic music.
 - Writing sounds to files.
 - Sequencing API.
 - Opening sound devices, eg. Jack.
- Ability to choose different OpenAL devices in the user settings.
2017-08-18 08:24:12 +02:00
Campbell Barton e6be5b8a2c Merge branch 'master' into blender2.8 2017-06-27 09:59:36 +10:00
Campbell Barton b796ce0f26 CMake: Only set CMAKE_BUILD_TYPE_INIT when not set
Convenience makefile now uses CMAKE_BUILD_TYPE_INIT,
this means you can change the build type of an existing build
and it won't be overwritten when running `make`.

Useful if you want to add debug info to a release build for profiling.
2017-06-27 09:50:35 +10:00
Sergey Sharybin 802027f3f8 Depsgraph: Initial groundwork for copy-on-write support
< Dependency graph Copy-on-Write >
 --------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

This is an initial commit of Copy-on-write support added to dependency graph.
Main priority for now: get playback (Alt-A) and all operators (selection,
transform etc) to work with the new concept of clear separation between
evaluated data coming from dependency graph and original data coming from
.blend file (and stored in bmain).

= How does this work? =

The idea is to support Copy-on-Write on the ID level. This means, we duplicate
the whole ID before we cann it's evaluaiton function. This is currently done
in the following way:

- At the depsgraph construction time we create "shallow" copy of the ID
  datablock, just so we know it's pointer in memory and can use for function
  bindings.

- At the evaluaiton time, the copy of ID get's "expanded" (needs a better
  name internally, so it does not conflict with expanding datablocks during
  library linking), which means the content of the datablock is being
  copied over and all IDs are getting remapped to the copied ones.

  Currently we do the whole copy, in the future we will support some tricks
  here to prevent duplicating geometry arrays (verts, edges, loops, faces
  and polys) when we don't need that.

- Evaluation functions are operating on copied datablocks and never touching
  original datablock.

- There are some cases when we need to know non-ID pointers for function
  bindings. This mainly applies to scene collections and armatures. The
  idea of dealing with this is to "expand" copy-on-write datablock at
  the dependency graph build time. This might introduce some slowdown to the
  dependency graph construction time, but allows us to have minimal changes
  in the code and avoid any hash look-up from evaluation function (one of
  the ideas to avoid using pointers as function bindings is to pass name
  of layer or a bone to the evaluation function and look up actual data based
  on that name).

  Currently there is a special function in depsgraph which does such a
  synchronization, in the future we might want to make it more generic.

At some point we need to synchronize copy-on-write version of datablock with
the original version. This happens, i.e., when we change active object or
change selection. We don't want any actual evaluation of update flush happening
for such thins, so now we have a special update tag:

  DEG_id_tag_update((id, DEG_TAG_COPY_ON_WRITE)

- For the render engines we now have special call for the dependency graph to
  give evaluated datablock for the given original one. This isn't fully ideal
  but allows to have Cycles viewport render.

  This is definitely a subject for further investigation / improvement.

This call will tag copy-on-write component tagged for update without causing
updates to be flushed to any other objects, causing chain reaction of updates.
This tag is handy when selection in the scene changes.

This basically summarizes ideas underneath this commit. The code should be
reasonably documented.

Here is a demo of dependency graph with all copy-on-write stuff in it:

  https://developer.blender.org/F635468

= What to expect to (not) work? =

- Only meshes are properly-ish aware of copy-on-write currently, Non-mesh
  geometry will probably crash or will not work at all.

- Armatures will need similar depsgraph built-time expansion of the copied
  datablock.

- There are some extra tags / relations added, to keep things demo-able but
  which are slowing things down for evaluation.

- Edit mode works for until click selection is used (due to the selection
  code using EditDerivedMesh created ad-hoc).

- Lots of tools will lack tagging synchronization of copied datablock for
  sync with original ID.

= How to move forward? =

There is some tedious work related on going over all the tools, checking
whether they need to work with original or final evaluated object and make
the required changes.

Additionally, there need synchronization tag done in fair amount of tools
and operators as well. For example, currently it's not possible to change
render engine without re-opening the file or forcing dependency graph for
re-build via python console.

There is also now some thoughts required about copying evaluated properties
between objects or from collection to a new object. Perhaps easiest way
would be to move base flag flush to Object ID node and tag new objects for
update instead of doing manual copy.

here is some WIP patch which moves such evaluaiton / flush:

  https://developer.blender.org/F635479

Lots of TODOs in the code, with possible optimization.

= How to test? =

This is a feature under heavy development, so obviously it is disabled by
default. The only reason it goes to 2.8 branch is to avoid possible merge
hell.

In order to enable this feature use WITH_DEPSGRAPH_COPY_ON_WRITE CMake
configuration option.
2017-06-19 13:21:44 +02:00
Sergey Sharybin 33e5163550 CMake: Remove unused legacy depsgraph option
We don't have legacy depsgraph anymore, no reason to keep the option.
2017-06-19 11:14:40 +02:00
Sergey Sharybin 24ec761bb4 Merge branch 'master' into blender2.8 2017-06-16 10:26:37 +02:00
Campbell Barton 6b502731a5 CMake: print absolute CMakeCache.txt
Message didn't show the path of the file to remove
which could be confusing.
2017-06-16 07:38:20 +10:00
Dalai Felinto 6d2aabc1d0 CMake: Update clay engine message 2017-06-06 18:57:47 +02:00
Campbell Barton a6c60affff Merge branch 'master' into blender2.8 2017-05-24 21:17:05 +10:00
Sybren A. Stüvel d5d9d1fe7d CMake: document that WITH_FFTW3 is also used for the ocean sim. 2017-05-24 11:36:41 +02:00
Bastien Montagne 44f91a9a18 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenloader/intern/versioning_270.c
2017-05-22 22:49:02 +02:00
Sergey Sharybin bd09b51379 Fix/workaround GCC bug about -Wno-implicit-fallthrough
For some reason GCC-6 successfully compiles test program with
-Wno-implicit-fallthrough passed via command line. It just
silently ignores the unknown arguments which are starting with
-Wno-.

The issue is, if some other waning happens in the code, then
GCC will complain about unknown -Wno- argument which is not
supported by current GCC version.

This makes some misleading warning prints about unknown
command line argument when any other warning happens in code
from extern/.
2017-05-22 11:08:10 +02:00
Campbell Barton 65aab6cdae Merge branch 'master' into blender2.8 2017-05-20 14:19:05 +10:00
Campbell Barton 81e584ed17 CMake: Use GCC7's -Wimplicit-fallthrough=5
Use to avoid accidental missing break statements,
use ATTR_FALLTHROUGH to suppress.
2017-05-20 14:01:03 +10:00
Dalai Felinto c8ab7d4656 Force core profile as main profile
This removes a few options from CMake:
* WITH_LEGACY_OPENGL
* WITH_GL_PROFILE_COMPAT
* WITH_GL_PROFILE_CORE

We still have WITH_GL_PROFILE_ES20. So you can still alternate between
ES20 and CORE profile (when es20 is disabled).

If you want to explicitly see the stubs errors just define
WITH_LEGACY_OPENGL.
2017-05-11 16:47:46 +02:00
Dalai Felinto bde45b5ae7 Allow building the game engine with core profile
Note: This is not about functionality, but about using the same stub file
we are using in Blender for the game engine.
2017-05-11 16:10:53 +02:00
Sergey Sharybin 2a2b23c142 Fix typo in the CMakeFile message 2017-05-11 10:06:12 +02:00
Sergey Sharybin 7f833c0da8 Merge branch 'master' into blender2.8 2017-05-02 15:29:00 +02:00
lazydodo fc8f428224 fix typo in WITH_SYSTEM_GFLOG in CMakeLists.txt 2017-04-30 10:52:38 -06:00
Mike Erwin 9a193a28c4 fix Clay compatibility comment
When building WITH_LEGACY_OPENGL, Mac uses GL 2.1, Mesa uses GL 3.0. Has nothing to do with Intel!

Clay assumes GL 3.3 is available.
2017-04-27 09:30:49 -04:00
Campbell Barton 98b6c6f2c0 Merge branch 'master' into blender2.8 2017-04-27 21:42:08 +10:00
Campbell Barton bdf8ad6c4e Cleanup: spelling 2017-04-27 21:41:03 +10:00
Mike Erwin 9c87bb124a group WITH_LEGACY_OPENGL with the other GL options
Blender subsystems that care about OpenGL use GL_DEFINITIONS, which now includes the newest (temporary) WITH_LEGACY_OPENGL.

Also updated Gawain's CMake to use this instead of its own logic.
2017-04-24 17:41:26 -04:00
Campbell Barton 2010dbe8a5 Merge branch 'master' into blender2.8 2017-04-24 22:11:05 +10:00
Thomas Beck da82f65424 CMake: Fix CMake for non Apple systems
Follow up to https://developer.blender.org/rB14a4ce6d7fb4dcf3d1aa5b58f9a543549df6d5dc
apple_check_quicktime() macro is only defined for apple, so ignore it otherwise.
2017-04-23 19:10:04 +02:00
Brecht Van Lommel 14a4ce6d7f CMake: move some Apple specific code into platform_apple_xcode.cmake. 2017-04-23 18:24:47 +02:00
Mike Erwin ef640ecf10 OpenGL: remove use of GLEW MX
MX (Multiple conteXt) support was dropped from the GLEW 2.0 library to make core profile support cleaner.

Our WITH_GLEW_MX build option was OFF by default already; this commit removes the inactive code paths.

I'm working on a plan for multiple GPUs, contexts, resource sharing, etc. This commit gives us a cleaner starting point for that upcoming work.

Tested on Mac, will test on Linux & Windows immediately after pushing.
2017-04-22 00:35:04 -04:00
Sybren A. Stüvel cc2d501642 Merge branch 'master' into blender2.8 2017-04-21 16:30:24 +02:00
Sergey Sharybin e4ab70da86 CMake: Add option to build against system-wide Glog
Similar to previous commit for Gflags.
2017-04-21 14:36:34 +02:00
Sybren A. Stüvel 81011679dd Merge branch 'master' into blender2.8 2017-04-21 14:19:05 +02:00
Sergey Sharybin c7a5c48cba CMake: Add option to link against system-wide Gflags library
It is disabled by default, so should not affect existing configurations.

Main benefits of this goes as:

- Linux distros can use that to avoid libraries duplication and link
  blender package against gflags package from the system.

- It it easier to test whether Blender works with updated version of
  Gflags prior to re-bundling the library.
2017-04-21 12:01:27 +02:00
Bastien Montagne e7c4eddace Add fatal error in CMake when trying to build WITH_GAMEENGINE but without WITH_LEGACY_OPENGL
This won't work currently.
2017-04-14 17:16:15 +02:00
Dalai Felinto fe559d0659 OpenGL: do not support legacy matrix when using core profile 2017-04-13 18:45:17 +02:00
Dalai Felinto 934dfc4200 New build option WITH_LEGACY_OPENGL
This introduces a new CMake option - WITH_LEGACY_OPENGL. Without this option
things may not draw perfectly, however, we should soon be able to build with
OpenGL core profile.

The matrix-related api calls are (still) not handled here (glTranslate, ...).

There seems to be no consensus on whether to make this build option the
default. We can talk about this later. For now two things are the
priority:

(1) To get rid of deprecated calls when WITH_LEGACY_OPENGL is ON
(2) To make core profile work for Mesa/Mac when WITH_LEGACY_OPENGL is OFF

Reviewers: merwin, sergey, campbellbarton

Differential Revision: https://developer.blender.org/D2603

Many thanks for Sergey Sharybin for the help.
2017-04-06 18:46:33 +02:00
Mike Erwin b69f0479a4 OpenGL: remove GLU option from build system
Also remove linking in glu libs.

T49042 is now done!
2017-03-22 21:33:53 -04:00
Campbell Barton fbb1b311ea Merge branch 'master' into blender2.8 2017-03-12 03:00:06 +11:00
Campbell Barton bcc8c04db4 Cleanup: code style & cmake 2017-03-12 02:47:53 +11:00
Julian Eisel a5cba9aab9 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/space_nla/nla_draw.c
	source/blender/editors/space_view3d/view3d_draw.c
2017-03-06 13:00:46 +01:00
Campbell Barton e72af060ab CMake: confine WIN32 options 2017-03-06 04:05:00 +11:00
Bastien Montagne 322b1d3187 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/animation/anim_draw.c
2017-02-17 20:03:55 +01:00