Commit Graph

1018 Commits

Author SHA1 Message Date
lazydodo
8fb9f2dbe9 [Windows] Add support for code signing the final binaries.
The option is controlled with the WITH_WINDOWS_CODESIGN option and needs:

- Signtool must be found on the system, the standard windows sdk folders will be searched for it.
- The path to the pfx file (WINDOWS_CODESIGN_PFX)
- The password for the pfx , this can either be set by the WINDOWS_CODESIGN_PFX_PASSWORD variable but given that ends up in CMakeCache.txt (which might be undesirable) there is a backup option of setting the PFXPASSWORD environment variable on the system.

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

Tags: #bf_blender, #platform:_windows

Differential Revision: https://developer.blender.org/D2182
2016-08-31 06:26:23 -06:00
lazydodo
7dc328e8a1 D2078 Windows : add option to prevent find_package from picking up the wrong libraries and use hardcoded paths instead. 2016-08-23 08:48:27 -06:00
Sergey Sharybin
294eac2991 CMake: Move main platform checks to separate files
Basically title says it all.

The goal is to make platform maintenance easier, so you don't have
to constantly scroll back and forth looking for if() branches to
check which exact platform you're currently working on.

Ideally we also would move option defaults to a platform files,
but that i'm not sure how to implement in a nice way yet.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2148
2016-08-17 14:00:29 +02:00
Sergey Sharybin
f990518041 CMake: Once again, don't use find_package to get hardcoded libraries 2016-08-09 12:38:09 +02:00
Sergey Sharybin
62b670633c CMake: Remove hardcoded DIR_ROOT for alembic and MinGW
Do it for until precompiled libraries are there so we can allow
MinGW users to compile their own library and pass it via ROOT_DIR.
2016-08-09 12:38:09 +02:00
Sergey Sharybin
f0bf33fd1b CMake: Use proper way to define debug/release libraries for alembic
Please do not spread platform+library specific code all over the CMake file,
we already have sections dedicated to that.
2016-08-09 12:38:09 +02:00
Sergey Sharybin
bccaa994f1 CMake: Do not force set root folder for Alembic
it is incorrect to set ROOT_DIR and then call find_package.

If something is expected to be in a given location use hardcoded
locations (for the precompiled libraries). Otherwise just use
find_package() and let users to set ROOT_DIT when it is required.
2016-08-09 12:38:09 +02:00
lazydodo
903e9ce0c9 Make previous alembic fix only apply to MSVC 2016-08-08 14:17:43 -06:00
lazydodo
8534071521 Alembic/ msvc : Link alembic_d.lib instead of alembic.lib when doing debug builds. 2016-08-08 11:19:41 -06:00
lazydodo
dd1929754f Set WIN32_WINNT for all windows platforms, not just x64 2016-08-07 11:00:35 -06:00
Mai Lavelle
0b68c68006 Cycles microdisplacement: Support for Catmull-Clark subdivision via OpenSubdiv
Enables Catmull-Clark subdivision meshes with support for creases and attribute
subdivision. Still waiting on OpenSubdiv to fully support face varying
interpolation for subdividing uv coordinates tho. Also there may be some
inconsistencies with Blender's subdivision which will be resolved at a
later time.

Code for reading patch tables and creating patch maps is borrowed
from OpenSubdiv.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2111
2016-08-07 11:13:11 -04:00
Kévin Dietrich
61050f75b1 Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.

A more in-depth documentation is to be found on the wiki, as well as a
 guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.

Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.

Reviewers: sergey, campbellbarton, mont29

Reviewed By: sergey, campbellbarton, mont29

Differential Revision: https://developer.blender.org/D2060
2016-08-06 10:58:13 +02:00
Ray Molenkamp
3e882c91e0 [MSVC2015/Cycles] MSVC2015 before update 3 produce invalid builds
I'm not quite sure where the codegen bug gets triggered but it's easily
noticeable in the barcelona scene. (extra saturated leafs and illumination
on the right ledge of the pool)

2013 buildbot reference image:
{F320792}

2015 With no updates (compiler version 19.00.23026)
{F320793}

2015 With Update 2 (Compiler version 19.00.23918)
{F320794}

2015 With Update 3 (Compiler version 19.00.24210)
{F320795}

This patch blocks all compiler builds before update 3 in a similar way we
did for msvc 2013 update 4

Reviewers: campbellbarton, brecht, juicyfruit

Reviewed By: juicyfruit

Tags: #bf_blender

Differential Revision: https://developer.blender.org/D2100
2016-07-18 15:26:52 +02:00
Ray Molenkamp
6239afd36f [MSVC/LNK4199/Cleanup] Delay loading is causing linker warnings.
We recently added delay-loading of the openmp dll's so we no longer had to use
the stub loader, we however put these linker flags on the global linker flags
causing any sub projects not using openmp to spit linker warning 4199 while building,

```
Warning	LNK4199	/DELAYLOAD:vcomp140.dll ignored; no imports found from vcomp140.dll	datatoc	k:\BlenderGit\build_windows_2015a\source\blender\datatoc\LINK	1
```

This patch makes the delay-load only apply to the blender project.

Reviewers: sergey

Subscribers: sergey

Tags: #bf_blender

Differential Revision: https://developer.blender.org/D2092
2016-07-18 15:20:29 +02:00
b8112a8960 Fix OS X build after Decklink changes, it is not supported yet so don't enable it. 2016-06-11 23:50:06 +02:00
Benoit Bolsee
eea89417f4 BGE: DeckLink card support for video capture and streaming.
You can capture and stream video in the BGE using the DeckLink video
   cards from Black Magic Design. You need a card and Desktop Video software
   version 10.4 or above to use these features in the BGE.
   Many thanks to Nuno Estanquiero who tested the patch extensively
   on a variety of Decklink products, it wouldn't have been possible without
   his help.
   You can find a brief summary of the decklink features here: https://wiki.blender.org/index.php/Dev:Source/GameEngine/Decklink
   The full API details and samples are in the Python API documentation.

bge.texture.VideoDeckLink(format, capture=0):

   Use this object to capture a video stream. the format argument describes
   the video and pixel formats and the capture argument the card number.
   This object can be used as a source for bge.texture.Texture so that the frame
   is sent to the GPU, or by itself using the new refresh method to get the video
   frame in a buffer.
   The frames are usually not in RGB but in YUV format (8bit or 10bit); they
   require a shader to extract the RGB components in the GPU. Details and sample
   shaders in the documentation.
   3D video capture is supported: the frames are double height with left and right
   eyes in top-bottom order. The 'eye' uniform (see setUniformEyef) can be used to
   sample the 3D frame when the BGE is also in stereo mode. This allows to composite
   a 3D video stream with a 3D scene and render it in stereo.
   In Windows, and if you have a nVidia Quadro GPU, you can benefit of an additional
   performance boost by using 'GPUDirect': a method to send a video frame to the GPU
   without going through the OGL driver. The 'pinned memory' OGL extension is also
   supported (only on high-end AMD GPU) with the same effect.

bge.texture.DeckLink(cardIdx=0, format=""):

   Use this object to send video frame to a DeckLink card. Only the immediate mode
   is supported, the scheduled mode is not implemented.
   This object is similar to bge.texture.Texture: you need to attach a image source
   and call refresh() to compute and send the frame to the card.
   This object is best suited for video keying: a video stream (not captured) flows
   through the card and the frame you send to the card are displayed above it (the
   card does the compositing automatically based on the alpha channel).
   At the time of this commit, 3D video keying is supported in the BGE but not in the
   DeckLink card due to a color space issue.
2016-06-11 22:26:05 +02:00
Benoit Bolsee
8529b2f925 BGE: alpha on frame buffer and precedence of MSAA over swap.
A new option '-a' can be passed to the blenderplayer. It forces the
framebuffer to have an alpha channel.
This can be used in VideoTexture to return a image with alpha channel
with ImageViewport (provided alpha is set to True on the ImageViewport
object and that the background color alpha channel is 0, which is the
default).
Without the -a option, the frame buffer has no alpha channel and
ImageViewport always returns an opaque image, no matter what.
In Linux, the player window will be rendered transparently over
the desktop.
In Windows, the player window is still rendered opaque because
transparency of the window is only possible using the 'compositing'
functions of Windows. The code is there but not enabled  (look for
WIN32_COMPOSITING) because 1) it doesn't work so well 2) it requires
a DLL that is only available on Vista and up.

give precedence to AA over Swap copy:

Certain GPU (intel) will not allow MSAA together with swap copy.
Previously, swap copy had priority over MSAA: fewer AA samples would be
chosen if it was the condition to get swap copy. This patch reverse the
logic: swap copy will be abandonned if another swap method (undefined or
exchange) will provide the number of AA samples requested. If no AA
samples is requested, swap copy still has the priority of course.
2016-06-09 22:15:13 +02:00
Martijn Berger
19cfc84328 CMake/ Visual Studio 14 2015, Use one library name for openal for both 2013 and 2015 2016-05-31 14:16:29 +02:00
Mike Erwin
84e0839537 ndof: enable Linux support by default, unless libs missing 2016-05-24 00:35:17 -04:00
Sergey Sharybin
6115267a84 CMake: Solve compilation error with pre-compiled libraries and new GCC-6
Since version 6 G++ switched to C++11 by default, which breaks some logic
around WITH_CXX11 checks in out CMake files, leading to compilation errors.
This is easy to solve by explicitly enabling older C++ standard when C++11
was not explicitly enabled by CMake options.

However, G++-6 will also use new ABI by default even if older standard was
specified in the compiler options. This is being addressed by a special
define flag.

This tricks made it possible to use new G++-6 without need to recompile
any of pre-compiled libraries.

However, this might break compilation with existing system libraries, which
might already be using new ABI. We can't address this automatically, so
now we simply default WITH_C11 and WITH_CXX11 options to whatever defaults
of the current compiler are. This means, for G++-6 we'll set WITH_CXX11 to
truth. This should make linking with system libraries working just fine,
but to make pre-compiled libraries we still might need to disable CXX11.

This should work fine work for a new environments with G++-6 and install_deps
script run from scratch there, because C++ standard will be the same for
both Blender dependencies and Blender itself.
2016-05-22 13:48:52 +02:00
Mike Erwin
9bf09200d2 ndof: simplify Mac build
We don’t require the 3Dconnexion driver framework at build time.

No special link flags or include paths needed.
2016-05-21 18:29:55 -04:00
Campbell Barton
20678138f7 Cleanup: CMake indentation
Also remove outdated comment
2016-05-19 07:12:14 +10:00
Campbell Barton
cade8e25c6 Revert string splitting
Caused error on OSX
2016-05-18 22:05:53 +10:00
Joshua Leung
1283c66146 Revert part of 4adffde02c98f3bb058ffba5ea010a6b1045a7b1 to get Windows (MSVC2013) compiling again 2016-05-18 23:42:53 +12:00
Campbell Barton
4adffde02c Cleanup: cmake, indentation, line length 2016-05-18 11:58:08 +10:00
2b73402547 Fix C++11 build issues on OS X, remove references to outdated libs. 2016-05-17 21:39:16 +02:00
Campbell Barton
a18f4d2bc6 CMake: optional date/time overrides for reproducible builds 2016-05-11 02:47:38 +10:00
Sergey Sharybin
88b72925d0 Optimize linear<->sRGB conversion for SSE2 processors
Using SSE2 intrinsics when available for this kind of conversions.

It's not totally accurate, but accurate enough for the purposes where
we're using direct colorspace conversion by-passing OCIO.

Partially based on code from Cycles, partially based on other online
articles:

  https://stackoverflow.com/questions/6475373/optimizations-for-pow-with-const-non-integer-exponent

Makes projection painting on hi-res float textures smoother.

This commit also enables global SSE2 in Blender. It shouldn't
bring any regressions in supported hardware (we require SSE2 since
2.64 now), but should keep an eye on because compilers might have
some bugs with that (unlikely, but possible).
2016-05-05 19:46:06 +02:00
Campbell Barton
35be6d87e8 Cleanup: cmake 2016-04-24 00:16:44 +10:00
Tianwei Shen
39873891bf Fix T48250: suppress CMake ranlib warnings to avoid issue with Qt Creator
Reviewed By: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D1942
2016-04-23 15:52:38 +02:00
Martijn Berger
c0cb9d75d6 CMAKE disable building the windows launcher, fix type in delayloading of debug dll 2016-03-31 14:05:46 +02:00
Martijn Berger
4ec95d621a CMAKE / msvc openmp, delay loading of openmp dll so we can set environment
variable before it is loaded
2016-03-31 13:46:14 +02:00
Martijn Berger
bd68a25505 cmake fix full debug builds on msvc 2016-03-31 08:12:53 +02:00
Martijn Berger
74d3f3746c CMake cleanup target_link_libraries_decoupled 2016-03-30 15:15:17 +02:00
Campbell Barton
119ce13a41 Fix T46623: OSX bpy.app.binary_path_python incorrect
CMake's PYTHON_EXECUTABLE wasn't set.
2016-03-30 22:50:29 +11:00
Sergey Sharybin
e4a265f058 Cycles: Add an option to build single kernel only which fits current CPU
This seems quite useful for the development, so you don't need to wait
all the kernels to be re-compiled when working on a new feature, which
speeds up re-iteration.

Marked as an advanced option, so if it doesn't work so well in practice
it's safe to revert anyway.
2016-03-25 16:09:05 +01:00
Campbell Barton
2f4ea47566 CMake: only show py module install options when used 2016-03-15 23:52:34 +11:00
Campbell Barton
d5253aaf9d CMake: use CXX for C++ in var name
Follow convention cmake uses.
2016-03-13 15:03:04 +11:00
Sergey Sharybin
086de5b5e3 CMake: Warn when buildinfo is disabled due to missing Git 2016-03-11 14:49:23 +05:00
Sergey Sharybin
cc2138888a CMake: Avoid call of find_package(Git) for every compile with buildinfo enabled
This is a bit tricky, find_package(Git) was only used to check if git is installed
and actual git command was assumed to be in the PATH (while ideally it should have
been GIT_COMMAND variable).

This commit makes re-compile output cleaner, especially when using Ninja.

Adding proper GIT_COMMAND to buildinfo.cmake is also possible via argument.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1847
2016-03-11 14:46:18 +05:00
Campbell Barton
751874d6bf CMake: remove OSX version lookup table
This assumed the OSX SDK version matched the OSX version, which isn't always true.

Also problematic for maintenance and would make building older Blender versions on OSX fail.

Passing in pre-defined OSX_SYSTEM is also supported,
if you have multiple and want to select one.
2016-03-10 17:59:54 +11:00
Sergey Sharybin
a47bfe7d40 Experimental option to build Blender with C11 support
It'll be nice to eventually go C11/C++11 by default, but for until
then it's kinda handy to be able to build locally with C11 support,

Reviewers: mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Differential Revision: https://developer.blender.org/D1752
2016-03-03 11:34:18 +05:00
Campbell Barton
0b13989307 CMake: show error on missing LIBDIR early on
Previously CMake would show many messages about missing libs before checking for a missing LIBDIR.
Now show the error immediately and exit.

Also allow for custom LIBDIR on OSX.
2016-02-26 13:45:24 +11:00
Campbell Barton
1a7b9ce006 CMake: check for minimum MSVC version
Needed since older versions are unsupported (giving cryptic errors).
2016-02-25 07:31:44 +11:00
Sergey Sharybin
6472b98a9c Link windows builds against Blosc when OpenVDB is enabled
OpenVDB is compiled with Blosc support, meaning we should pass Blosc to
a linker now.

Unfortunately, the Blosc has compiled-in crt and pthread library, which
still screws up linking.
2016-02-24 15:51:26 +01:00
Sergey Sharybin
f1088bd9e1 CMake: Ignore paranoid MSVC linker warnings 2016-02-20 14:06:09 +05:00
Martijn Berger
4e35131609 Mac OS X Openvdb, add blosc support.
even if WITH_OPENVDB_BLOSC is off openvdb still contains 1 reference to snappy so we link with it always
2016-02-19 02:24:16 -08:00
Sergey Sharybin
9e81222525 CMake: New dependency graph requires either Boost or C++11 2016-02-19 10:18:59 +01:00
Martijn Berger
4a7b09c4ea Windows MSVC allow building with openvdb / tbb 2016-02-10 13:59:04 +01:00
Martijn Berger
715410c2fd CMake OpenVDB support on OS X
Reviewers: kevindietrich, sergey

Differential Revision: https://developer.blender.org/D1773
2016-02-06 04:26:57 -08:00