blender.git
3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Wed, 26 Apr 2017 08:11:03 +0000 (10:11 +0200)]
Merge branch 'master' into blender2.8

3 years agoRemove show_backface_culling check in select engine
Campbell Barton [Wed, 26 Apr 2017 08:08:49 +0000 (18:08 +1000)]
Remove show_backface_culling check in select engine

May add back so selection engine can read backface cull state
from from different engines.

3 years agoCycles: Fix access undefined macro on non-MSVC compiler
Sergey Sharybin [Wed, 26 Apr 2017 08:00:31 +0000 (10:00 +0200)]
Cycles: Fix access undefined macro on non-MSVC compiler

Also rremove trailing whitespace.

3 years agoCleanup: draw engine
Campbell Barton [Wed, 26 Apr 2017 07:42:39 +0000 (17:42 +1000)]
Cleanup: draw engine

- use DRW_engine prefix for engine types.
- use engine suffix for files that define a draw engine.
- remove engines from include path (they're only referenced once)

3 years agoDraw Manager: add select engine
Campbell Barton [Wed, 26 Apr 2017 07:20:11 +0000 (17:20 +1000)]
Draw Manager: add select engine

This does very little currently, but allows changing behavior for
selection drawing in the future.

3 years agoAllow new selection in eevee & blender draw modes
Campbell Barton [Wed, 26 Apr 2017 06:52:02 +0000 (16:52 +1000)]
Allow new selection in eevee & blender draw modes

3 years agoDraw Manager: armature editmode selection
Campbell Barton [Wed, 26 Apr 2017 06:11:37 +0000 (16:11 +1000)]
Draw Manager: armature editmode selection

3 years agoEevee: World default shader.
Clément Foucault [Tue, 25 Apr 2017 21:48:26 +0000 (23:48 +0200)]
Eevee: World default shader.

- Use uniform color world for the world probe.
- Refactored the Fresnel expression to be better with Area Lights.
- Squared the roughness for default materials.

3 years agoEevee: Disable shadow rendering until we get proper update scheduling.
Clément Foucault [Tue, 25 Apr 2017 21:33:52 +0000 (23:33 +0200)]
Eevee: Disable shadow rendering until we get proper update scheduling.

Performance is quickly getting poor when you have lights otherwise.

3 years agoEevee: Fix Square light with non uniform scale.
Clément Foucault [Tue, 25 Apr 2017 21:27:14 +0000 (23:27 +0200)]
Eevee: Fix Square light with non uniform scale.

3 years agoworkaround for T50176
lazydodo [Tue, 25 Apr 2017 20:17:41 +0000 (14:17 -0600)]
workaround for T50176

This works around a long outstanding issue T50176 with cycles on msvc2015/x86 . root cause is still unknown though,feels like a game of whack'a'mole

Reviewers: sergey, dingto

Subscribers: Blendify

Tags: #cycles

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

3 years agoDraw Manager: support for selection using engines
Campbell Barton [Tue, 25 Apr 2017 18:39:25 +0000 (04:39 +1000)]
Draw Manager: support for selection using engines

Needed to remove old draw code entirely.

Object mode selection support, pose and armature still need to be added.
Enabled when 'use_modern_viewport' is set.

3 years agoCycles: use safe compiler flags for OpenCL.
Hristo Gueorguiev [Tue, 25 Apr 2017 18:10:51 +0000 (20:10 +0200)]
Cycles: use safe compiler flags for OpenCL.

Using -cl-fast-relaxed-math assumes no NaN/Inf values in any expression.
This causes problems on overflow, division by zero, square root of negative number.
Comparisons with NaN or infinite value are affected as well.

This patch causes <2% slowdown on benchmark scenes.

Fix T50985: Rendering volume scatter with GPU OpenCL comes to an halt after a few seconds

3 years agoWorkaround for AMD GPU OpenCL compiler.
Hristo Gueorguiev [Tue, 25 Apr 2017 18:08:14 +0000 (20:08 +0200)]
Workaround for AMD GPU OpenCL compiler.

3 years agoEevee: Make default shaders works.
Clément Foucault [Tue, 25 Apr 2017 16:46:59 +0000 (18:46 +0200)]
Eevee: Make default shaders works.

- Added New Batch cache routine to get the split mesh for each material. (optimization needed)
- Did some shader modifications to create default_frag and support a somwhat correct fresnel for lamps (to finish)

3 years agoOutliner: Re-build depsgraph when reordering collections
Dalai Felinto [Tue, 25 Apr 2017 16:43:53 +0000 (18:43 +0200)]
Outliner: Re-build depsgraph when reordering collections

Otherwise if we create a new collection, and drag a collection into it we either
get a crash, or at the very least we dont get the visibility flags correct.

3 years agoRender API: Rename render > render_to_image; view_draw > render_to_view
Dalai Felinto [Tue, 25 Apr 2017 16:02:18 +0000 (18:02 +0200)]
Render API: Rename render > render_to_image; view_draw > render_to_view

This is part of the new draw manager design. Any engine (even clay, eevee, ...) should be able to draw to the viewport, as well as render to an image directly.
Changing the API names to conform to that.

3 years agoCycles: Use depsgraph instead of layers
Dalai Felinto [Tue, 25 Apr 2017 14:18:24 +0000 (16:18 +0200)]
Cycles: Use depsgraph instead of layers

3 years agoDepsgraph: Store Scene in depsgraph struct
Dalai Felinto [Tue, 25 Apr 2017 15:46:23 +0000 (17:46 +0200)]
Depsgraph: Store Scene in depsgraph struct

This way we can retrieve the scene from depsgraph that were not created from a G.main (e.g., when doing material thumbnail preview render).

3 years agoCleanup: Line-width
Dalai Felinto [Mon, 24 Apr 2017 10:41:54 +0000 (12:41 +0200)]
Cleanup: Line-width

3 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Tue, 25 Apr 2017 15:04:17 +0000 (17:04 +0200)]
Merge branch 'master' into blender2.8

3 years agoAlembic import: don't use global main
Sybren A. Stüvel [Tue, 25 Apr 2017 15:03:15 +0000 (17:03 +0200)]
Alembic import: don't use global main

3 years agoAlembic import: removed BaseLegacy from BKE_cachefile_clean
Sybren A. Stüvel [Tue, 25 Apr 2017 14:56:36 +0000 (16:56 +0200)]
Alembic import: removed BaseLegacy from BKE_cachefile_clean

Now we just iterate over all objects. It may be a better idea to use a
smarter approach for performance. However, since this function is not
called regularly (only when changing Alembic file paths), it's not a very
big deal.

3 years agoDraw Manager: clear draw global data after use
Campbell Barton [Tue, 25 Apr 2017 14:39:53 +0000 (00:39 +1000)]
Draw Manager: clear draw global data after use

3 years agoDraw Manager: store context vars per draw
Campbell Barton [Tue, 25 Apr 2017 14:35:08 +0000 (00:35 +1000)]
Draw Manager: store context vars per draw

Was performing context access per object for scene, region etc.
While not very slow they don't change during drawing so cache in a struct.

This also makes it possible to draw in views besides the current context.

3 years agoFix T51292: Alembic import, show notification when trying to load HDF5
Sybren A. Stüvel [Tue, 25 Apr 2017 12:30:01 +0000 (14:30 +0200)]
Fix T51292: Alembic import, show notification when trying to load HDF5

HDF5 Alembic files are not officially supported by Blender. With this
commit, the HDF5 format is detected even when Blender is compiled without
HDF5 support, and the user is given an explanatory error message (rather
than the generic "Could not open Alembic archive for reading".

3 years agoCycles: Fix strict compiler flags
Sergey Sharybin [Tue, 25 Apr 2017 12:11:45 +0000 (14:11 +0200)]
Cycles: Fix strict compiler flags

3 years agoFix OSX buildbot
Jens Verwiebe [Tue, 25 Apr 2017 12:05:03 +0000 (14:05 +0200)]
Fix OSX buildbot

3 years agoFix T51262: Blender CRASH with alembic file
Sybren A. Stüvel [Tue, 25 Apr 2017 10:05:55 +0000 (12:05 +0200)]
Fix T51262: Blender CRASH with alembic file

Also added a unit test for exporting & importing very long names.

3 years agoCycles: Cleanup, mainly line length in random module
Sergey Sharybin [Tue, 25 Apr 2017 09:42:36 +0000 (11:42 +0200)]
Cycles: Cleanup, mainly line length in random module

Was doing lots of investigation recently, with need to have lots of things
side by side.

3 years agoRevert "Alembic: Construct ISampleSelector once and pass along"
Sybren A. Stüvel [Tue, 25 Apr 2017 08:43:36 +0000 (10:43 +0200)]
Revert "Alembic: Construct ISampleSelector once and pass along"

This reverts commit 099816587a0e064fb6a52c82a737ae8814cf21df. It had some
unforseen side-effects that should be investigated first.

3 years agoCycles: Split vectorized math utilities to a dedicated files
Sergey Sharybin [Fri, 14 Apr 2017 12:05:23 +0000 (14:05 +0200)]
Cycles: Split vectorized math utilities to a dedicated files

This file was even a bigger mess than vectorized types header,
cleaning it up to make it easier to maintain this files and
extend further.

3 years agoCycles: Split vectorized types into separate files
Sergey Sharybin [Thu, 13 Apr 2017 17:34:45 +0000 (19:34 +0200)]
Cycles: Split vectorized types into separate files

The final goal to reach is to make vectorized types much easier to maintain
and the previous design had following issues:

- Having all types and methods implementation made the source file rather
  bloated and unfun to navigate in.

- It was not possible to quickly glance available API for the type you are
  interested in.

- Adding more vectorization types will bloat the file even more, making
  things even more tricky to follow.

3 years agoCycles: Cleanup, preprocessor indentation
Sergey Sharybin [Thu, 13 Apr 2017 16:59:46 +0000 (18:59 +0200)]
Cycles: Cleanup, preprocessor indentation

3 years agoFix T51284: Mesh not skinned
Sybren A. Stüvel [Tue, 25 Apr 2017 08:01:34 +0000 (10:01 +0200)]
Fix T51284: Mesh not skinned

3 years agoWM: don't search for app-template when its empty
Campbell Barton [Tue, 25 Apr 2017 07:14:46 +0000 (17:14 +1000)]
WM: don't search for app-template when its empty

Changing from a loaded app-template back to Default (none set)
would scan paths for a file with no name. Harmless but silly.

3 years agoOpenGL: better context creation on Windows
Mike Erwin [Tue, 25 Apr 2017 02:30:17 +0000 (22:30 -0400)]
OpenGL: better context creation on Windows

Compatibility profile was working fine, this is mostly to get the highest GL core profile version available.

Our minimum requirement is 3.3 core profile.  When we request a specific GL version:
 - AMD and Intel give us exactly this version
 - NVIDIA gives at least this version <-- desired behavior
so we ask for 4.5, 4.4 ... 3.3 in descending order to get the best version on the user's system.

Accept OpenGL 3.0 on Mesa instead of 3.3+ compatibility profile. (requested by @LazyDodo) This will be removed after we finish moving to core profile.

Part of T49012 and T51164

3 years agogroup WITH_LEGACY_OPENGL with the other GL options
Mike Erwin [Mon, 24 Apr 2017 21:41:26 +0000 (17:41 -0400)]
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.

3 years agoCycles: Remove re-hashing done in BPT volume code
Sergey Sharybin [Mon, 24 Apr 2017 19:47:17 +0000 (21:47 +0200)]
Cycles: Remove re-hashing done in BPT volume code

Since 9d50175 this is no longer needed, at least not with the current
sampler we are using.

3 years agoCollection: __FUNCTION__ > __func__
Dalai Felinto [Mon, 24 Apr 2017 16:15:37 +0000 (18:15 +0200)]
Collection: __FUNCTION__ > __func__

3 years agoLayer cleanup: Rename _Iterator_ > _iterator_
Dalai Felinto [Mon, 24 Apr 2017 16:14:41 +0000 (18:14 +0200)]
Layer cleanup: Rename _Iterator_ > _iterator_

3 years agoBring back outliner hierachy delete
Dalai Felinto [Mon, 24 Apr 2017 15:14:01 +0000 (17:14 +0200)]
Bring back outliner hierachy delete

3 years agoFix view local not working
Dalai Felinto [Mon, 24 Apr 2017 15:12:09 +0000 (17:12 +0200)]
Fix view local not working

3 years agoOutliner: Bring back bases when pertinent
Dalai Felinto [Mon, 24 Apr 2017 16:05:51 +0000 (18:05 +0200)]
Outliner: Bring back bases when pertinent

This partially reverts c4e34a84e0a4599a751758050528eef389bd061f

Note: This is necessary for the "delete hierarchy" functionality

3 years agoFOREACH_SELECTED_BASE iterator
Dalai Felinto [Mon, 24 Apr 2017 16:06:13 +0000 (18:06 +0200)]
FOREACH_SELECTED_BASE iterator

3 years agoFix own mistake in smoke.c
Luca Rood [Mon, 24 Apr 2017 15:15:17 +0000 (17:15 +0200)]
Fix own mistake in smoke.c

3 years agoConvert BaseLegacy to Base (part)
Luca Rood [Fri, 21 Apr 2017 12:28:23 +0000 (14:28 +0200)]
Convert BaseLegacy to Base (part)

3 years agoCleanup: remove unnecessary texface checks
Campbell Barton [Mon, 24 Apr 2017 12:45:40 +0000 (22:45 +1000)]
Cleanup: remove unnecessary texface checks

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 24 Apr 2017 12:11:05 +0000 (22:11 +1000)]
Merge branch 'master' into blender2.8

3 years agoCleanup: style
Campbell Barton [Mon, 24 Apr 2017 11:58:28 +0000 (21:58 +1000)]
Cleanup: style

3 years agoCycles: Cleanup, space after keyword
Sergey Sharybin [Mon, 24 Apr 2017 09:21:35 +0000 (11:21 +0200)]
Cycles: Cleanup, space after keyword

3 years agoAdd C internal version of msgfmt (similar to makesrna/dna binaries).
Bastien Montagne [Mon, 24 Apr 2017 08:49:54 +0000 (10:49 +0200)]
Add C internal version of msgfmt (similar to makesrna/dna binaries).

Fixes performance issues of C++ one with Windows MSVC debug builds...

Merely a translation from msgfmt.cc code by @sergey, using BLI libs intead of C++'s stdlib.

Reviewers: sergey, campbellbarton, LazyDodo

Subscribers: sergey

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

3 years agoBLI_dynstr: add memarena-based version, and helper to clear without freeing.
Bastien Montagne [Mon, 24 Apr 2017 08:42:10 +0000 (10:42 +0200)]
BLI_dynstr: add memarena-based version, and helper to clear without freeing.

3 years agoUsual i18n/UI messages fixes and cleanup.
Bastien Montagne [Mon, 24 Apr 2017 07:33:22 +0000 (09:33 +0200)]
Usual i18n/UI messages fixes and cleanup.

3 years ago[msvc/make.bat] Add convenience option to turn off game engine+player
lazydodo [Sun, 23 Apr 2017 20:45:51 +0000 (14:45 -0600)]
[msvc/make.bat] Add convenience option to turn off game engine+player

3 years agoCMake: Fix CMake for non Apple systems
Thomas Beck [Sun, 23 Apr 2017 17:10:04 +0000 (19:10 +0200)]
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.

3 years agoCMake: move some Apple specific code into platform_apple_xcode.cmake.
Brecht Van Lommel [Sun, 23 Apr 2017 15:42:45 +0000 (17:42 +0200)]
CMake: move some Apple specific code into platform_apple_xcode.cmake.

3 years agoCMake: disable WITH_CODEC_QUICKTIME for macOS > 10.11 for configurations.
Romain Foyard [Sun, 23 Apr 2017 15:27:59 +0000 (17:27 +0200)]
CMake: disable WITH_CODEC_QUICKTIME for macOS > 10.11 for configurations.

QtKit was removed in macOS Sierra, this patch disables WITH_CODEC_QUICKTIME
in Sierra and greater versions of macOS.

Reviewed By: brecht

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

3 years agoCMake: fix wrong alembic test name on Windows.
Brecht Van Lommel [Sun, 23 Apr 2017 15:27:12 +0000 (17:27 +0200)]
CMake: fix wrong alembic test name on Windows.

3 years ago[msvc/make.bat] Allow override of the build folder name
lazydodo [Sun, 23 Apr 2017 16:10:57 +0000 (10:10 -0600)]
[msvc/make.bat] Allow override of the build folder name

3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Sun, 23 Apr 2017 08:49:39 +0000 (10:49 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
build_files/cmake/platform/platform_apple.cmake

3 years agomissing from last commit
Campbell Barton [Sat, 22 Apr 2017 18:06:45 +0000 (04:06 +1000)]
missing from last commit

3 years agoFix armature drawing ignoring object matrix
Campbell Barton [Sat, 22 Apr 2017 18:01:54 +0000 (04:01 +1000)]
Fix armature drawing ignoring object matrix

Looks like name-space collision.

3 years agoDraw Manager: hide 2d curves normals
Campbell Barton [Sat, 22 Apr 2017 17:28:53 +0000 (03:28 +1000)]
Draw Manager: hide 2d curves normals

3 years agoOSX: satisfy macro to also apply alembic tests
Jens Verwiebe [Sat, 22 Apr 2017 17:03:59 +0000 (19:03 +0200)]
OSX: satisfy macro to also apply alembic tests

3 years agoDisable breaking alembic test for osx
Jens Verwiebe [Sat, 22 Apr 2017 16:39:11 +0000 (18:39 +0200)]
Disable breaking alembic test for osx

3 years agoCleanup: line length
Campbell Barton [Sat, 22 Apr 2017 06:11:12 +0000 (16:11 +1000)]
Cleanup: line length

3 years agoCleanup: use DRW_shgroup_call prefix for dynamic and fixed
Campbell Barton [Sat, 22 Apr 2017 05:53:11 +0000 (15:53 +1000)]
Cleanup: use DRW_shgroup_call prefix for dynamic and fixed

More useful for completion since an 'shgroup_dynamic' is not a thing
(would be confusing if other dynamic functions are added).

3 years agofix omission from previous commit
Mike Erwin [Sat, 22 Apr 2017 04:58:42 +0000 (00:58 -0400)]
fix omission from previous commit

Missed one old call on Linux/X11.
Follow-up to ef640ecf1004f7af9cfde09f5ce1cde2fb70747f

3 years agoOpenGL: remove use of GLEW MX
Mike Erwin [Sat, 22 Apr 2017 04:35:04 +0000 (00:35 -0400)]
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.

3 years agoOpenGL/GHOST: don't request accum buffer on Mac
Mike Erwin [Fri, 21 Apr 2017 20:04:03 +0000 (16:04 -0400)]
OpenGL/GHOST: don't request accum buffer on Mac

This was blocking core context setup on Mac, since accumulation buffers are obsolete. With this (and appropriate CMake options) I now get

renderer: 'Intel HD Graphics 4000 OpenGL Engine'
vendor: 'Intel Inc.'
version: '4.1 INTEL-10.24.45'

in system-info.txt intead of

version: '2.1 INTEL-10.24.45'

3 years agofix unitizialized use warning
Mike Erwin [Fri, 21 Apr 2017 19:51:08 +0000 (15:51 -0400)]
fix unitizialized use warning

The code would only use 'type' uninitialized in error conditions, but it's still better to avoid that.

caught by clang

3 years agoEevee/OpenGL: fix shader for core profile
Mike Erwin [Fri, 21 Apr 2017 19:48:56 +0000 (15:48 -0400)]
Eevee/OpenGL: fix shader for core profile

3 years ago[cmake] Fix Alembic build errors with msvc
lazydodo [Fri, 21 Apr 2017 18:18:19 +0000 (12:18 -0600)]
[cmake] Fix Alembic build errors with msvc

3 years agoEevee: Cascaded Shadow Maps, follow up.
Clément Foucault [Fri, 21 Apr 2017 14:43:14 +0000 (16:43 +0200)]
Eevee: Cascaded Shadow Maps, follow up.

- Compute coarse bounding box of split frustum. Can be improved
- Make use of 4 cascade.
- View dependant glitches are fixed.
- Optimized shader code.

3 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Fri, 21 Apr 2017 14:30:24 +0000 (16:30 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix crash when duplicating objects by tagging depsgraph
Dalai Felinto [Fri, 21 Apr 2017 13:52:16 +0000 (15:52 +0200)]
Fix crash when duplicating objects by tagging depsgraph

This may change once depsgraph becomes aware of workspaces.
For now this is the best we can do.

3 years agoAlembic unit tests: Removed trailing spaces
Sybren A. Stüvel [Fri, 21 Apr 2017 14:20:35 +0000 (16:20 +0200)]
Alembic unit tests: Removed trailing spaces

3 years agoAlembic unit tests: don't depend on ALEMBIC_ROOT_DIR being defined by user
Sybren A. Stüvel [Fri, 21 Apr 2017 14:20:01 +0000 (16:20 +0200)]
Alembic unit tests: don't depend on ALEMBIC_ROOT_DIR being defined by user

By mistake, the code relied on ALEMBIC_ROOT_DIR being defined by the user
running the tests. Now CMake macros are used to correctly find the Alembic
root directory.

3 years agoRe-enabling Alembic test
Dalai Felinto [Fri, 21 Apr 2017 13:58:14 +0000 (15:58 +0200)]
Re-enabling Alembic test

(disabled because of bug fixed on 19548040d91dedc2a63444f3277e4365837931e1)

3 years agoMatrix.decompose(): changed terminology, "location" → "translation"
Sybren A. Stüvel [Fri, 21 Apr 2017 13:48:53 +0000 (15:48 +0200)]
Matrix.decompose(): changed terminology, "location" → "translation"

Matrix.decompose() should either return "location, orientation, size" or
"translation, rotation, scale". Since there are constructors for the former,
I've replaced "location" in the documentation with "translation".

The code is still the same, I just changed the documentation.

3 years agoFix T51261: New objects aren't selected
Dalai Felinto [Fri, 21 Apr 2017 12:53:19 +0000 (14:53 +0200)]
Fix T51261: New objects aren't selected

The original code was failing because the base to object flushing was
only happening as part of the depsgraph. However we can use the
evaluated values to set the initial values of the base.

In this particular case, we couldn't set the new object visible because
its selectability flag was not set yet.

3 years agoFix objects visibility evaluation bug
Dalai Felinto [Fri, 21 Apr 2017 13:26:53 +0000 (15:26 +0200)]
Fix objects visibility evaluation bug

This was introduced on 4b77fb30759d1b62224033fc92c55eef7f3e414a no idea how I left this in, shame on me

3 years agoTag depsgraph update when hide and hide_select are changed
Dalai Felinto [Fri, 21 Apr 2017 12:31:38 +0000 (14:31 +0200)]
Tag depsgraph update when hide and hide_select are changed

We were not updating depsgraph when collection just "became" selectable,
but although this doesn't change object selection, it change its
selectability.

3 years agoCycles: Solve speed regression of classroom scene after principled commit
Sergey Sharybin [Fri, 21 Apr 2017 10:56:54 +0000 (12:56 +0200)]
Cycles: Solve speed regression of classroom scene after principled commit

This way we can skip it from compiling into OpenCL kernels by making
this shader compile-time feature.

3 years agoCycles: Make it a generic base class for all types of closure nodes
Sergey Sharybin [Fri, 21 Apr 2017 10:50:04 +0000 (12:50 +0200)]
Cycles: Make it a generic base class for all types of closure nodes

The idea is to have osme geenric BSDF node which is subclassed by
"regular" BSDF nodes and uber shaders.

This way we can access special type and closure type for making
decisions somewhere else.

3 years agoCMake: Add option to build against system-wide Glog
Sergey Sharybin [Fri, 21 Apr 2017 12:26:25 +0000 (14:26 +0200)]
CMake: Add option to build against system-wide Glog

Similar to previous commit for Gflags.

3 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Fri, 21 Apr 2017 12:19:05 +0000 (14:19 +0200)]
Merge branch 'master' into blender2.8

3 years agoAlembic import: changing cache modifier path no longer discards object paths
Sybren A. Stüvel [Fri, 21 Apr 2017 12:11:13 +0000 (14:11 +0200)]
Alembic import: changing cache modifier path no longer discards object paths

This allows, for example, the path of an Alembic file to be changed from
absolute to relative, without having to reconstruct all object paths.

3 years agoAlembic: properly initialising cachefile object paths list.
Sybren A. Stüvel [Fri, 21 Apr 2017 10:47:14 +0000 (12:47 +0200)]
Alembic: properly initialising cachefile object paths list.

3 years agoAlembic: fixed memory leak
Sybren A. Stüvel [Fri, 21 Apr 2017 10:28:49 +0000 (12:28 +0200)]
Alembic: fixed memory leak

3 years agoAlembic: Construct ISampleSelector once and pass along
Sybren A. Stüvel [Fri, 21 Apr 2017 09:04:47 +0000 (11:04 +0200)]
Alembic: Construct ISampleSelector once and pass along

No longer passing time as float and constructing ISampleSelectors all
over the place. Instead, just construct an ISampleSelector once and
pass it along.

3 years agoCleanup: move draw-cache creation from BKE to DRW
Campbell Barton [Fri, 21 Apr 2017 11:14:11 +0000 (21:14 +1000)]
Cleanup: move draw-cache creation from BKE to DRW

Creating draw-cache should only ever be used by the draw-manager.

3 years agoUnify RNA and core depsgraph.objects
Dalai Felinto [Fri, 21 Apr 2017 10:31:48 +0000 (12:31 +0200)]
Unify RNA and core depsgraph.objects

Note: Since this is not listbase nor array I'm also expanding
RNA_types.h to allow for custom data.

3 years agoMove DEG_OBJECT_ITER inside depsgraph
Dalai Felinto [Fri, 21 Apr 2017 09:42:59 +0000 (11:42 +0200)]
Move DEG_OBJECT_ITER inside depsgraph

3 years agoCycles: Cleanup, indentation in preprocessor
Sergey Sharybin [Fri, 21 Apr 2017 10:26:04 +0000 (12:26 +0200)]
Cycles: Cleanup, indentation in preprocessor

3 years agoCycles: Cleanup, indentation inside preprocessor
Sergey Sharybin [Fri, 21 Apr 2017 10:01:04 +0000 (12:01 +0200)]
Cycles: Cleanup, indentation inside preprocessor

3 years agoCycles: Fix regression in SSS rendering after principled commit
Sergey Sharybin [Fri, 21 Apr 2017 09:50:35 +0000 (11:50 +0200)]
Cycles: Fix regression in SSS rendering after principled commit

3 years agoCycles: Cleanup, indentation of comment
Sergey Sharybin [Fri, 21 Apr 2017 09:33:44 +0000 (11:33 +0200)]
Cycles: Cleanup, indentation of comment

Was broken after principled commit.

3 years agoCMake: Add option to link against system-wide Gflags library
Sergey Sharybin [Fri, 21 Apr 2017 08:58:01 +0000 (10:58 +0200)]
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.