4 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

4 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

4 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

4 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

4 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

4 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.

4 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.

4 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.

4 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.

4 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.

4 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.

4 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.

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

4 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.

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

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

4 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

4 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.

4 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.

4 years agoDocs: diagram for reflect_v3_v3v3
Campbell Barton [Fri, 21 Apr 2017 07:26:27 +0000 (17:26 +1000)]
Docs: diagram for reflect_v3_v3v3

4 years agoStore edit-font select-box length
Campbell Barton [Fri, 21 Apr 2017 07:08:28 +0000 (17:08 +1000)]
Store edit-font select-box length

A little awkward to calculate when drawing.

4 years agoD2607: Switch eye dropper to use linear color space internally
Stefan Werner [Thu, 20 Apr 2017 20:41:26 +0000 (22:41 +0200)]
D2607: Switch eye dropper to use linear color space internally

This switches the internal color representation of the eye dropper from display space to linear. Any time a linear color is requested and the color is picked from a linear object, the result is now precise to the bit as the color gets patched through directly. Color space conversion now only happens when a color is picked from non-linear display space objects or when the color is requested to be returned in non-linear space.

In addition, this patch changes the DifferenceMatte node to interpret a tolerance of 0.0 to accept colors that are identical bit by bit, as apposed to simply refusing all colors.

4 years agoD2608: Allow HDR picking from Compositor background
Stefan Werner [Thu, 20 Apr 2017 20:32:00 +0000 (22:32 +0200)]
D2608: Allow HDR picking from Compositor background
Replaced some STREQ(snode->tree_idname, ...) calls with ED_node_is_*() calls for improved readability, fixed one case where the STREQ was used the wrong way

4 years agoFix Surface Deform not unbinding if target is removed
Luca Rood [Thu, 20 Apr 2017 15:48:37 +0000 (17:48 +0200)]
Fix Surface Deform not unbinding if target is removed

4 years agoAlembic export: don't show warning for every exported frame
Sybren A. Stüvel [Thu, 20 Apr 2017 13:24:48 +0000 (15:24 +0200)]
Alembic export: don't show warning for every exported frame

The warning about not having a UV map is now only shown once per hair

4 years agoFix T45350: Cache not being recomputed with "Bake All Dynamics"
Luca Rood [Thu, 20 Apr 2017 12:59:02 +0000 (14:59 +0200)]
Fix T45350: Cache not being recomputed with "Bake All Dynamics"

4 years agoAlembic import: select imported objects
Sybren A. Stüvel [Thu, 20 Apr 2017 10:01:31 +0000 (12:01 +0200)]
Alembic import: select imported objects

When the Alembic import is finished, all imported objects are selected.

4 years agoFix T51198: Crash with new Datablock ID Properties
Alexander Romanov [Thu, 20 Apr 2017 08:39:20 +0000 (11:39 +0300)]
Fix T51198: Crash with new Datablock ID Properties

4 years agoUse reflect for calculating second normal
Campbell Barton [Thu, 20 Apr 2017 08:08:05 +0000 (18:08 +1000)]
Use reflect for calculating second normal

4 years agoDocs: move note (was mixed up)
Campbell Barton [Thu, 20 Apr 2017 07:11:12 +0000 (17:11 +1000)]
Docs: move note (was mixed up)

4 years agoFix T51248: user preferences window size not adapted to DPI.
Brecht Van Lommel [Wed, 19 Apr 2017 22:17:42 +0000 (00:17 +0200)]
Fix T51248: user preferences window size not adapted to DPI.

4 years agoFix T51243: Delete Globally won't work with Datablock ID Properties.
Bastien Montagne [Wed, 19 Apr 2017 20:07:57 +0000 (22:07 +0200)]
Fix T51243: Delete Globally won't work with Datablock ID Properties.

That's a quick hack to address that specific case, new pointer IDProp
actually enlights a generic problem - datablocks using themselves - which
is not really handled by current code, would consider this not-so-urgent
TODO though.

4 years agoFix (unreported) missing handling of GPencil Layer's parent Object pointer in BKE_lib...
Bastien Montagne [Wed, 19 Apr 2017 19:47:01 +0000 (21:47 +0200)]
Fix (unreported) missing handling of GPencil Layer's parent Object pointer in BKE_library_query.

Grrrr... still finding missing pointers here... :/

4 years agoAlembic import: added simple unit test for importer.
Sybren A. Stüvel [Wed, 19 Apr 2017 15:27:40 +0000 (17:27 +0200)]
Alembic import: added simple unit test for importer.

It only tests the presence of the objects and their parent/child pointers.
Matrix and animated properties should be done in a later test.

4 years agoUI: Reorganize the UV/Image "Game Properties" Pannel
Aaron Carlisle [Wed, 19 Apr 2017 15:09:07 +0000 (11:09 -0400)]
UI: Reorganize the UV/Image "Game Properties" Pannel

This uses the same amount of room while giving it a more clean look and adds a label for the mapping options so users can tell the purpose.

4 years agoAlembic import/export: added as_background_job option
Sybren A. Stüvel [Wed, 19 Apr 2017 12:40:57 +0000 (14:40 +0200)]
Alembic import/export: added as_background_job option

The ABC_export and ABC_import functions both take a as_background_job
parameter, and return a boolean.

When as_background_job=true, returns false immediately after scheduling
a background job. This was the old behaviour of this function, which makes
it very hard for scripts to do something with the data after the import
or export completes.

When as_background_job=false, performs the export synchronously, and
returns true when the export was ok, and false if there were any errors.
This allows further processing.

The Scene.alembic_export() function is deprecated, and will be removed from
Blender 2.8 in favour of calling the bpy.ops.wm.alembic_export() operator.
As such, it has been hard-coded to the old background job behaviour.

4 years agoAlembic export: made hair/particle export optional.
Sybren A. Stüvel [Wed, 19 Apr 2017 11:03:52 +0000 (13:03 +0200)]
Alembic export: made hair/particle export optional.

The export is still slower than needed, as the particle systems themselves
aren't disabled during the export. It's only the writing to the Alembic
file that's skipped.

4 years agoAlembic export: converted some export params to actual bools
Sybren A. Stüvel [Wed, 19 Apr 2017 09:43:35 +0000 (11:43 +0200)]
Alembic export: converted some export params to actual bools

The variables were interpreted as booleans, and had a 1-bit width. I don't
see a reason to not just use the bool type instead.

4 years agoFix 'API defined' ID properties still having 'remove' button in UI.
Bastien Montagne [Wed, 19 Apr 2017 07:51:36 +0000 (09:51 +0200)]
Fix 'API defined' ID properties still having 'remove' button in UI.

We could not edit them, but still could delete them, which makes no
sense, API-defined properties are similar to class members, removing
them from single instances is pure garbage. And it was broken anyway.

Found by @a.romanov while checking on T51198, thanks.

4 years agoAlembic import: little fix for D2634
Sybren A. Stüvel [Tue, 18 Apr 2017 15:00:21 +0000 (17:00 +0200)]
Alembic import: little fix for D2634

Now it doesn't crash any more when the Alembic curves object doesn't
have any user properties.

4 years agoAlembic import/export: write curve resolution to user property
Sybren A. Stüvel [Tue, 18 Apr 2017 14:36:33 +0000 (16:36 +0200)]
Alembic import/export: write curve resolution to user property

Curve resolution isn't natively supported by Alembic, hence it is stored
in a user property "blender:resolution". I've looked at a Maya curves
example file, but that also didn't contain any information about curve

Differential Revision:

Reviewers: kevindietrich

4 years agoCleanup: missing headers
Campbell Barton [Tue, 18 Apr 2017 14:25:31 +0000 (00:25 +1000)]
Cleanup: missing headers

4 years agoFix for new Ubuntu 17.04, which does not have libopenjpeg!
Bastien Montagne [Tue, 18 Apr 2017 13:13:59 +0000 (15:13 +0200)]
Fix for new Ubuntu 17.04, which does not have libopenjpeg!

4 years agoFix T51187: Memory leak when exporting OpenEXR monochrome animation
Sergey Sharybin [Tue, 18 Apr 2017 12:27:52 +0000 (14:27 +0200)]
Fix T51187: Memory leak when exporting OpenEXR monochrome animation

4 years agoAlembic unittest: pass unknown CLI arguments to unittest.main()
Sybren A. Stüvel [Tue, 18 Apr 2017 10:20:41 +0000 (12:20 +0200)]
Alembic unittest: pass unknown CLI arguments to unittest.main()

This allows specifying test names on the CLI, in order to run only one
of the tests.

4 years agoAlembic import: fall back to linear when variable order array is invalid.
Sybren A. Stüvel [Tue, 18 Apr 2017 10:19:39 +0000 (12:19 +0200)]
Alembic import: fall back to linear when variable order array is invalid.

This seems like more sane behaviour than to keep the orderu at the
invalid default value 0.

4 years agoAlembic export: fixed curve type and order.
Sybren A. Stüvel [Tue, 18 Apr 2017 10:17:07 +0000 (12:17 +0200)]
Alembic export: fixed curve type and order.

The order number written to Alembic is the same as we use in memory, so
the +1 wasn't needed, at least according to the reference Maya exporter
maya/AbcExport/MayaNurbsCurveWriter.cpp, function
MayaNurbsCurveWriter::write(), in the Alembic source code.

Furthermore, when writing an array of nurb orders, the curve type should
be set to kVariableOrder, otherwise the importer will ignore it.

4 years agoSquashed commit of the following:
Pascal Schoen [Tue, 18 Apr 2017 09:43:09 +0000 (11:43 +0200)]
Squashed commit of the following:

commit 90778901c9ea1e16d5907981e91bceba25ff207d
Merge: 76eebd9 3bf0026
Author: Schoen <>
Date:   Mon Apr 3 07:52:05 2017 +0200

    Merge branch 'master' into cycles_disney_brdf

commit 76eebd9379a5dad519ff01cf215fbe3db6de931e
Author: Schoen <>
Date:   Thu Mar 30 15:34:20 2017 +0200

    Updated copyright for the new files.

commit 013f4a152a3898946ba5c616141c6e44d928ccfd
Author: Schoen <>
Date:   Thu Mar 30 15:32:55 2017 +0200

    Switched from multiplication of base and subsurface color to blending
    between them using the subsurface parameter.

commit 482ec5d1f20ceabc9cbda4838d4ae37d1d673458
Author: Schoen <>
Date:   Mon Mar 13 15:47:12 2017 +0100

    Fixed a bug that caused an additional white diffuse closure call when using
    path tracing.

commit 26e906d162a6a8d67f2ebc8880993fcbab69559e
Merge: 0593b8c 223aff9
Author: Pascal Schoen <>
Date:   Mon Feb 6 11:32:31 2017 +0100

    Merge branch 'master' into cycles_disney_brdf

commit 0593b8c51bf7db0ed5ca92ed6f68d0d984dad0dd
Author: Pascal Schoen <>
Date:   Mon Feb 6 11:30:36 2017 +0100

    Fixed the broken GLSL shader and implemented the Disney BRDF in the
    real-time view port.

commit 8c7e11423be640dc44b1807912058480710e51f4
Author: Pascal Schoen <>
Date:   Fri Feb 3 14:24:05 2017 +0100

    Fix to comply strict compiler flags and some code cleanup

commit 17724e9d2dbffb1aaa61401224ecbf2349c1dac3
Merge: 379ba34 520afa2
Author: Pascal Schoen <>
Date:   Tue Jan 24 09:59:58 2017 +0100

    Merge branch 'master' into cycles_disney_brdf

commit 379ba346b0acd1ea779365b940fcd01f5ba1165f
Author: Pascal Schoen <>
Date:   Tue Jan 24 09:28:56 2017 +0100

    Renamed the Disney BSDF to Principled BSDF.

commit f80dcb4f34f1dc41841ced5965787fc26ace22a2
Author: Pascal Schoen <>
Date:   Fri Dec 2 13:55:12 2016 +0100

    Removed reflection call when roughness is low because of artifacts.

commit 732db8a57f6d4e5d6f44bbad176c15fd55377f0a
Author: Pascal Schoen <>
Date:   Wed Nov 16 09:22:25 2016 +0100

    Indication if to use fresnel is now handled via the type of the BSDF.

commit 0103659f5e705b314cde98b0e4a01c14c55acd5e
Author: Pascal Schoen <>
Date:   Fri Nov 11 13:04:11 2016 +0100

    Fixed an error in the clearcoat where it appeared too bright for default
    light sources (like directional lights)

commit 0aa68f533529c9fd197a3ab0427f9e41a15456b9
Author: Pascal Schoen <>
Date:   Mon Nov 7 12:04:38 2016 +0100

    Resolved inconsistencies in using tabs and spaces

commit f5897a9494e352de274b99e7bee971336c0dc386
Author: Pascal Schoen <>
Date:   Mon Nov 7 08:13:41 2016 +0100

    Improved the clearcoat part by using GTR1 instead of GTR2

commit 3dfc240e61b3d4d0e7c476989792e4ada869ce91
Author: Pascal Schoen <>
Date:   Mon Oct 31 11:31:36 2016 +0100

    Use reflection BSDF for glossy reflections when roughness is 0.0 to
    reduce computational expense and some code cleanup

    Code cleanup includes:
    - Code style cleanup and removed unused code
    - Consolidated code in the bsdf_microfacet_multi_impl.h to reduce
      some computational expense

commit a2dd0c5fafdabe1573299170fb3be98a3e46d17a
Author: Pascal Schoen <>
Date:   Wed Oct 26 08:51:10 2016 +0200

    Fixed glossy reflections and refractions for low roughness values and
    cleaned up the code.

    For low roughness values, the reflections had some strange behavior.

commit 981737591231a1a5a1c85950950580b65d029505
Author: Pascal Schoen <>
Date:   Tue Oct 25 12:37:40 2016 +0200

    Removed default values in setup functions and added extra functions for
    GGX with fresnel.

commit bbc5d9d4527346a74155cf17be21fb02ee3e0779
Author: Pascal Schoen <>
Date:   Tue Oct 25 11:09:36 2016 +0200

    Switched from uniform to cosine hemisphere sampling for the diffuse and
    the sheen part.

commit d52d8f2813d64363713f11160a6c725d4cafbcfa
Author: Pascal Schoen <>
Date:   Mon Oct 24 16:17:13 2016 +0200

    Removed the color parameters from the diffuse and sheen shader and use
    them as closure weights instead.

commit 8f3d92738532ad867a0a3543c00393626ab8f6ec
Author: Pascal Schoen <>
Date:   Mon Oct 24 09:57:06 2016 +0200

    Fixed the issue with artifacts when using anisotropy without linking the
    tangent input to a tangent node.

commit d93f680db9acaaade0354b34857a3ccaf348557f
Author: Pascal Schoen <>
Date:   Mon Oct 24 09:14:51 2016 +0200

    Added subsurface radius parameter to control the per color channel
    effection radius of the subsurface scattering.

commit c708c3e53b323773fc852bdc239bc51e157dcaef
Author: Pascal Schoen <>
Date:   Mon Oct 24 08:14:10 2016 +0200

    Rearranged the inputs of the shader.

commit dfbfff9c389074d3e5c1f49dd38a95e9b317eb1f
Author: Pascal Schoen <>
Date:   Fri Oct 21 09:27:05 2016 +0200

    Put spaces in the parameter names of the shader node

commit e5a748ced17c8f59e5e73309096adeea3ba95e04
Author: Pascal Schoen <>
Date:   Fri Oct 21 08:51:20 2016 +0200

    Removed code that isn't in use anymore

commit 75992bebc128c8b44cab4f0d8855603787f57260
Author: Pascal Schoen <>
Date:   Fri Oct 21 08:50:07 2016 +0200

    Code style cleanup

commit 4dfcf455f7769752044e051b399fb6a5dfcd0e22
Merge: 243a0e3 2cd6a89
Author: Pascal Schoen <>
Date:   Thu Oct 20 10:41:50 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit 243a0e3eb80ef82704d5ea2657384c3a4b9fb497
Author: Pascal Schoen <>
Date:   Thu Oct 20 10:01:45 2016 +0200

    Switching between OSL and SVM is more consistant now when using Disney

    There were some minor differences in the OSL implementation, e.g. the
    refraction roughness was missing.

commit 2a5ac509223c838285a00c4c12775567666e7154
Author: Pascal Schoen <>
Date:   Tue Sep 27 09:17:57 2016 +0200

    Fixed a bug that caused transparency to be always white when using OSL and
    selecting GGX as distribution of the Disney BSDF

commit e1fa8623915407cea942a07fd0a106b04e113c09
Merge: d0530a8 7f76f6f
Author: Pascal Schoen <>
Date:   Tue Sep 27 08:59:32 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit d0530a8af0e076c0aca4c9a61b0a64cada45ac4d
Author: Pascal Schoen <>
Date:   Tue Sep 27 08:53:18 2016 +0200

    Cleanup the Disney BSDF implementation and removing unneeded files.

commit 3f4fc826bd9c1f47c694c0f6b2947daf5b524b1a
Author: Pascal Schoen <>
Date:   Tue Sep 27 08:36:07 2016 +0200

    Unified the OSL implementation of the Disney clearcoat as a simple
    microfacet shader like it was previously done in SVM

commit 4d3a0032ecea99031979f342bfd5f66ea5a8625a
Author: Pascal Schoen <>
Date:   Mon Sep 26 12:35:36 2016 +0200

    Enhanced performance for Disney materials without subsurface scattering

commit 3cd5eb56cf5c9006837f111c8866e4c6e1c2a6fd
Author: Pascal Schoen <>
Date:   Fri Sep 16 08:47:56 2016 +0200

    Fixed a bug in the Disney BSDF that caused specular reflections to be too
    bright and diffuse is now reacting to the roughness again

    - A normalization for the fresnel was missing which caused the specular
      reflections to become too bright for the single-scatter GGX
    - The roughness value for the diffuse BSSRDF part has always been
      overwritten and thus always 0
    - Also the performance for refractive materials with roughness=0.0 has
      been improved

commit 7cb37d711938e5626651db21f20da50edd96abaf
Author: Pascal Schoen <>
Date:   Thu Sep 8 12:24:43 2016 +0200

    Added selection field to the Disney BSDF node for switching between
    "Multiscatter GGX" and "GGX"

    In the "GGX" mode there is an additional parameter for changing the
    refraction roughness for materials with smooth surfaces and rough interns
    (e.g. honey). With the "Multiscatter GGX" this effect can't be produced at
    the moment and so here will be no separation of the two roughness values.

commit cdd29d06bb86672ed0779eefb8eee95796b8f939
Merge: 02c315a b40d1c1
Author: Pascal Schoen <>
Date:   Tue Sep 6 15:59:05 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit 02c315aeb0f0d7bb429d4396912e03dbb8a77340
Author: Pascal Schoen <>
Date:   Tue Sep 6 15:16:09 2016 +0200

    Implemented the OSL part of the Disney shader

commit 5f880293aeeacf269032824248b46d613691a36c
Merge: 630b80e b399a6d
Author: Pascal Schoen <>
Date:   Fri Sep 2 10:53:36 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit 630b80e08b6acf83834bc95264af4ccdbbc5f82c
Author: Pascal Schoen <>
Date:   Fri Sep 2 10:52:13 2016 +0200

    Fresnel in the microfacet multiscatter implementation improved

commit 0d9f4d7acb2de65d1c98d425cea4bf364795c155
Author: Pascal Schoen <>
Date:   Fri Aug 26 11:11:05 2016 +0200

    Fixed refraction roughness problem (refractions were always 100% rough)
    and set IOR of clearcoat to 1.5

commit 9eed34c7d980e1b998df457c4f76021162c80f78
Merge: ef29aae ae475e3
Author: Pascal Schoen <>
Date:   Tue Aug 16 15:22:32 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit ef29aaee1af8074e0228c480d962700e97ea5b36
Author: Pascal Schoen <>
Date:   Tue Aug 16 15:17:12 2016 +0200

    Implemented the fresnel in the multi-scatter GGX for the Disney BSDF

    - The specular/metallic part uses the multi-scatter GGX
    - The fresnel of the metallic part is controlled by the specular value
    - The color of the reflection part when using transparency can be
      controlled by the specularTint value

commit 88567af085ac94119b98c95246b6d6f63161bc01
Merge: cc267e5 285e082
Author: Pascal Schoen <>
Date:   Wed Aug 3 15:05:09 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit cc267e52f20d036a66aeeff127ee1c856f7c651b
Author: Pascal Schoen <>
Date:   Wed Aug 3 15:00:25 2016 +0200

    Implemented the Disney clearcoat as a variation of the microfacet bsdf,
    removed the transparency roughness again and added an input for
    anisotropic rotations

commit 81f6c06b1f53180bf32a5c11ac1fa64e2b6abf52
Merge: ece5a08 7065022
Author: Pascal Schoen <>
Date:   Wed Aug 3 11:42:02 2016 +0200

    Merge branch 'master' into cycles_disney_brdf

commit ece5a08e0d6e51a83c223ea87346134216e5b34e
Author: Pascal Schoen <>
Date:   Tue Jul 26 16:29:21 2016 +0200

    Base color now applied again to the refraction of transparent Disney

commit e3aff6849e06853c56da7bd610210dcab70e6070
Author: Pascal Schoen <>
Date:   Tue Jul 26 16:05:19 2016 +0200

    Added subsurface color parameter to the Disney shader

commit b3ca6d8a2f4f866b323fc2df0a3beff577218c27
Author: Pascal Schoen <>
Date:   Tue Jul 26 12:30:25 2016 +0200

    Improvement of the SSS in the Disney shader

     * Now the bump normal is correctly used for the SSS.
     * SSS in Disney uses the Disney diffuse shader

commit d68729300ee557e90a8e7e4be6eb8ef98db80fe2
Author: Pascal Schoen <>
Date:   Tue Jul 26 12:23:13 2016 +0200

    Better calculation of the Disney diffuse part

    Now the values for NdotL und NdotV are clamped to 0.0f for a better look
    when using normal maps

commit cb6e500b12e7bce884d3db19ee138c975c215f2d
Author: Pascal Schoen <>
Date:   Mon Jul 25 16:26:42 2016 +0200

    Now one can disable specular reflactions again by setting specular and
    metallic to 0 (cracked this in the previous commit)

commit bfb9cb11b548103369de2a46ce18b4ddf661362c
Author: Pascal Schoen <>
Date:   Mon Jul 25 16:11:07 2016 +0200

    fixed the Disney SSS and cleaned the initialization of the Disney shaders

commit 642c0fdad12548c1a2ccbf595bae3a995d3022f7
Author: Pascal Schoen <>
Date:   Mon Jul 25 16:09:55 2016 +0200

    fixed an error that was caused by the missing LABEL_REFLECT in the Disney
    diffuse shader

commit c10b484dcad3412c34455736e9656cd38716bcb0
Author: Jens Verwiebe <>
Date:   Fri Jul 22 01:15:21 2016 +0200

    Rollback attempt to fix sss crashing, it prevented crash by disabling sss completely, thus useless

commit 462bba3f97fcc41834e0e20cc806a7958e5106f5
Author: Jens Verwiebe <>
Date:   Thu Jul 21 23:11:59 2016 +0200

    Add an undef for sc_next for safety

commit 32d348577d69be251aa04110c5f6156cd2645f48
Author: Jens Verwiebe <>
Date:   Thu Jul 21 00:15:48 2016 +0200

    Attempt to fix Disney SSS

commit dbad91ca6d46f5a4a6f2ba7ed4c811ffa723942f
Author: Pascal Schoen <>
Date:   Wed Jul 20 11:13:00 2016 +0200

    Added a roughness parameter for refractions (for scattering of the rays
    within an object)

    With this, one can create a translucent material with a smooth surface and
    with a milky look.

    The final refraction roughness has to be calculated using the surface
    roughness and the refraction roughness because those two are correlated
    for refractions. If a ray hits a rough surface of a translucent material,
    it is scattered while entering the surface. Then it is scattered further
    within the object. The calculation I'm using is the following:

    RefrRoughnessFinal = 1.0 - (1.0 - Roughness) * (1.0 - RefrRoughness)

commit 50ea5e3e34394a727e3cceb6203adb48834a9ab7
Author: Pascal Schoen <>
Date:   Tue Jun 7 10:24:50 2016 +0200

    Disney BSDF is now supporting CUDA

commit 10974cc826a4bfa8fb3ef59177abf0b0dc441065
Author: Pascal Schoen <>
Date:   Tue May 31 11:18:07 2016 +0200

    Added parameters IOR and Transparency for refractions

    With this, the Disney BRDF/BSSRDF is extended by the BTDF part.

commit 218202c0905a4ec93ee19850360d1a39966d2c25
Author: Pascal Schoen <>
Date:   Mon May 30 15:08:18 2016 +0200

    Added an additional normal for the clearcoat

    With this normal one can simulate a thin layer of clearcoat by applying a
    smoother normal map than the original to this input

commit dd139ead7e04aa87a894ccf3732cfce711258ff1
Author: Pascal Schoen <>
Date:   Mon May 30 12:40:56 2016 +0200

    Switched to the improved subsurface scattering from Christensen and

commit 11160fa4e1c32230119d4506e7e9fd3da2ab37f2
Author: Pascal Schoen <>
Date:   Mon May 30 10:16:30 2016 +0200

    Added Disney Sheen shader as a preparation to get to a BSSRDF

commit cee4fe0cc94515ee60d4afa4d4e10c41003f1579
Merge: 4f955d0 6b5bab6
Author: Pascal Schoen <>
Date:   Mon May 30 09:08:09 2016 +0200

    Merge branch 'cycles_disney_brdf' of into cycles_disney_brdf


commit 4f955d052358206209454decf2c3539e6a21b42f
Author: Pascal Schoen <>
Date:   Tue May 24 16:38:23 2016 +0200

    SVM and OSL are both working for the simple version of the Disney BRDF

commit 1f5c41874b01ad297eb8a6bad9985296c6c0a6e1
Author: Pascal Schoen <>
Date:   Tue May 24 09:58:50 2016 +0200

    Disney node can be used without SVM and started to cleanup the OSL implementation

    There is still some wrong behavior for SVM for the Schlick Fresnel part at the
    specular and clearcoat

commit d4b814e9304ebb44cc7c291cd83f7b7cdebcd152
Author: Pascal Schoen <>
Date:   Wed May 18 10:22:29 2016 +0200

    Switched from a parameter struct for Disney parameters to ShaderClosure params

commit b86a1f5ba5019c7818153cb70b49f5f7a0bc52a0
Author: Pascal Schoen <>
Date:   Wed May 18 10:19:57 2016 +0200

    Added additional variables for storing parameters in the ShaderClosure struct

commit 585b88623695fa07dfca9c9909d6d9184c3519c8
Author: Pascal Schoen <>
Date:   Tue May 17 12:03:17 2016 +0200

    added output parameter to the DisneyBsdfNode

    That has been forgotten after removing the inheritance of BsdfNode

commit f91a28639884cbda7804715b910d64abba0718ef
Author: Pascal Schoen <>
Date:   Tue May 17 10:40:48 2016 +0200

    removed BsdfNode class inheritance for DisneyBsdfNode

    That's due to a naming difference. The Disney BSDF uses the name 'Base Color'
    while the BsdfNode had a 'Color' input. That caused a text message to be
    printed while rendering.

commit 30da91c9c51d8cbc6a7564c7aaa61c9efe2ab654
Author: Pascal Schoen <>
Date:   Wed May 4 16:08:10 2016 +0200

    disney implementation cleaned

commit 30d41da0f0352fad29375a395ffcb9cb7891eeb1
Author: Pascal Schoen <>
Date:   Wed May 4 13:23:07 2016 +0200

    added the disney brdf as a shader node

commit 1f099fce249cb35e949cc629f7cca2167fca881a
Author: Pascal Schoen <>
Date:   Tue May 3 16:54:49 2016 +0200

    added clearcoat implementation

commit 00a1378b98e435e9cdbfbac86eb974c19b2a8151
Author: Pascal Schoen <>
Date:   Fri Apr 29 22:56:49 2016 +0200

    disney diffuse und specular implemented

commit 6baa7a7eb787638661cddad0c4e7f78bd3a8fa5c
Author: Pascal Schoen <>
Date:   Mon Apr 18 15:21:32 2016 +0200

    disney diffuse is working correctly

commit d8fa169bf3caf71c40a124101b33dee6c510188e
Author: Pascal Schoen <>
Date:   Mon Apr 18 08:41:53 2016 +0200

    added vessel for disney diffuse shader

commit 6b5bab6cecde153122625cf8dc10e4209ed1eb0f
Author: Pascal Schoen <>
Date:   Wed May 18 10:22:29 2016 +0200

    Switched from a parameter struct for Disney parameters to ShaderClosure params

commit f6499c2676e074a36033627ffc7540107777630d
Author: Pascal Schoen <>
Date:   Wed May 18 10:19:57 2016 +0200

    Added additional variables for storing parameters in the ShaderClosure struct

commit 7100640b65c2ff5447a18c01fc4e93594b4f486a
Author: Pascal Schoen <>
Date:   Tue May 17 12:03:17 2016 +0200

    added output parameter to the DisneyBsdfNode

    That has been forgotten after removing the inheritance of BsdfNode

commit 419ee5441100a906b4b3fd8373cb768a71bfdfe6
Author: Pascal Schoen <>
Date:   Tue May 17 10:40:48 2016 +0200

    removed BsdfNode class inheritance for DisneyBsdfNode

    That's due to a naming difference. The Disney BSDF uses the name 'Base Color'
    while the BsdfNode had a 'Color' input. That caused a text message to be
    printed while rendering.

commit 6006f91e8730f78df5874f808690d3908db103ab
Author: Pascal Schoen <>
Date:   Wed May 4 16:08:10 2016 +0200

    disney implementation cleaned

commit 0ed08959141fc7c5f8c6e37c6552ecb9fcc5749c
Author: Pascal Schoen <>
Date:   Wed May 4 13:23:07 2016 +0200

    added the disney brdf as a shader node

commit 0630b742d71c658915575a4a71a325094a0fc313
Author: Pascal Schoen <>
Date:   Tue May 3 16:54:49 2016 +0200

    added clearcoat implementation

commit 9f3d39744b85619750c79c901f678b8c07fe0ee2
Author: Pascal Schoen <>
Date:   Fri Apr 29 22:56:49 2016 +0200

    disney diffuse und specular implemented

commit 9b262063767d6b05a617891c967d887d21bfb177
Author: Pascal Schoen <>
Date:   Mon Apr 18 15:21:32 2016 +0200

    disney diffuse is working correctly

commit 4711a3927dfcadaa1c36de0ba78fc304fac1dc8a
Author: Pascal Schoen <>
Date:   Mon Apr 18 08:41:53 2016 +0200

    added vessel for disney diffuse shader

Differential Revision:

4 years agoCycles: Cleanup, style
Sergey Sharybin [Tue, 18 Apr 2017 09:39:21 +0000 (11:39 +0200)]
Cycles: Cleanup, style

4 years agoDepsgraph: Use proper scene to get frame from for pose constraints evaluaiton
Sergey Sharybin [Tue, 18 Apr 2017 09:31:45 +0000 (11:31 +0200)]
Depsgraph: Use proper scene to get frame from for pose constraints evaluaiton

Spotted by Luca, thanks!

4 years agoCycles: Remove meaningless volume shaders
Sergey Sharybin [Tue, 21 Mar 2017 16:18:25 +0000 (17:18 +0100)]
Cycles: Remove meaningless volume shaders

This is possible to use surface-only nodes and connect them to volume output.
If there was something connected to surface output those extra connections
will not change anything visually but will force volume features to be included
into feature-adaptive kernels.

In fact, this exact reason seems to be causing slowdown of Barcelone file
comparing AMD OpenCL to NVidia CUDA.

Currently only supported by the final F12 renders because of the current design
of what gets optimized out when and how feature-adaptive kernel accesses
list of required features.

Reviewers: dingto, nirved, maiself, lukasstockner97, brecht

Reviewed By: brecht

Subscribers: bliblubli

Differential Revision:

4 years agoFix strict compiler compilation
Sergey Sharybin [Tue, 18 Apr 2017 07:41:15 +0000 (09:41 +0200)]
Fix strict compiler compilation

4 years agoFix UI: double separator in Movie Clip Editor's view menu
Aaron Carlisle [Tue, 18 Apr 2017 03:54:19 +0000 (23:54 -0400)]
Fix UI: double separator in Movie Clip Editor's view menu

4 years agoFix brush menu broken before adding uv and texture data
Aaron Carlisle [Tue, 18 Apr 2017 03:42:17 +0000 (23:42 -0400)]
Fix brush menu broken before adding uv and texture data

To reproduce: 1) go to texture paint mode 2) go into the brush menu

Pointed out by @lijenstina on IRC also fix is authored by him.

4 years agoFix T51150: user_remap on itself changes users to 0.
Bastien Montagne [Mon, 17 Apr 2017 20:33:07 +0000 (22:33 +0200)]
Fix T51150: user_remap on itself changes users to 0.

Remapping to itself is nonsense here (was triggering an assert in
BKE_library code actually), just make it a bail out early in RNA
callback in that case.

4 years agoFix T51176: Cache file location can be blank and prevent fluid simulation from readin...
Bastien Montagne [Mon, 17 Apr 2017 15:26:18 +0000 (17:26 +0200)]
Fix T51176: Cache file location can be blank and prevent fluid simulation from reading baked data

Sanitize a bit how cache path is handled by fluidsim (there is much more
to be done here though :( ), and forbid empty path (we reset to default
path relative to current .blend file in case it's empty).

If people really, really want to use current OS-wise directory, they can at
least use '.' as path. ;)

4 years agoBLI: make BLI_make_existing_file() return true on success, and false on failure...
Bastien Montagne [Mon, 17 Apr 2017 10:04:38 +0000 (12:04 +0200)]
BLI: make BLI_make_existing_file() return true on success, and false on failure...

4 years agoFluidsim cleanup: get rid of magic numbers!
Bastien Montagne [Mon, 17 Apr 2017 09:55:02 +0000 (11:55 +0200)]
Fluidsim cleanup: get rid of magic numbers!

4 years agoFix build error on Windows introduced in D2425
Alexander Romanov [Mon, 17 Apr 2017 10:41:05 +0000 (13:41 +0300)]
Fix build error on Windows introduced in D2425

4 years agoObject.raycast: more minor improvements ...
Germano Cavalcante [Sun, 16 Apr 2017 21:50:06 +0000 (18:50 -0300)]
Object.raycast: more minor improvements ...
- if it is to check a bool, let it be local;
- removes gotos;

4 years agoFix T49617: Grease Pencil Stroke Placement regression
Antonio Vazquez [Sun, 16 Apr 2017 15:52:39 +0000 (17:52 +0200)]
Fix T49617: Grease Pencil Stroke Placement regression

When moved the options to toolsetting, this part was missing. The problem was not the pointer as suggested in D2629.

Thanks Arvīds Kokins for his help fixing this bug

4 years agoFix T51149: Joining curves allows 2D curves in 3D
Campbell Barton [Sat, 15 Apr 2017 06:50:12 +0000 (16:50 +1000)]
Fix T51149: Joining curves allows 2D curves in 3D

4 years agoObject.raycast: error in previous commit
Germano Cavalcante [Sat, 15 Apr 2017 05:31:33 +0000 (02:31 -0300)]
Object.raycast: error in previous commit

This is taking longer than I expected.

4 years agoFix: Object.raycast: error to free treedata
Germano Cavalcante [Sat, 15 Apr 2017 05:24:04 +0000 (02:24 -0300)]
Fix: Object.raycast: error to free treedata

4 years agoObject.raycast: Also test distance from BoundBox
Germano Cavalcante [Sat, 15 Apr 2017 04:31:24 +0000 (01:31 -0300)]
Object.raycast: Also test distance from BoundBox

If `isect_ray_aabb_v3_simple` provides this information, why not take advantage of it?

4 years agoObject.raycast: Test the hit on the BoundBox first
Germano Cavalcante [Sat, 15 Apr 2017 03:44:05 +0000 (00:44 -0300)]
Object.raycast: Test the hit on the BoundBox first

This avoids the unnecessary creation of bvhtree, which can be highly inefficient in some cases
(for example: in the `` template)

4 years agoFix Player stubs (tm)
Jens Verwiebe [Fri, 14 Apr 2017 23:09:44 +0000 (01:09 +0200)]
Fix Player stubs (tm)

4 years agoFix T51216: SSAO attenuation not being scale invariant.
Brecht Van Lommel [Fri, 14 Apr 2017 22:02:55 +0000 (00:02 +0200)]
Fix T51216: SSAO attenuation not being scale invariant.

Unfortunately this does break compatibility in that the viewport will look a
bit different depending on the settings, but the old behavior was simply not
usable for higher distances.

4 years agoAlembic import: fixed dupligroup export when the dupli-empty has a parent
Sybren A. Stüvel [Fri, 14 Apr 2017 16:20:24 +0000 (18:20 +0200)]
Alembic import: fixed dupligroup export when the dupli-empty has a parent

4 years agoAlembic export: fixed flattened dupligroup import
Sybren A. Stüvel [Fri, 14 Apr 2017 14:38:26 +0000 (16:38 +0200)]
Alembic export: fixed flattened dupligroup import

4 years agoObject Info node support for GLSL mode and the internal render
Alexander Romanov [Fri, 14 Apr 2017 15:13:44 +0000 (18:13 +0300)]
Object Info node support for GLSL mode and the internal render

Object Info node can be useful to give some variation to a single material assigned to multiple instances. This patch adds support for Viewport and BI.


Example: {F499528}

Reviewers: merwin, brecht, dfelinto

Reviewed By: brecht

Subscribers: duarteframos, fclem, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision:

4 years agoFix T49429: incorrect Blender internal viewport border render with DrawPixels method.
Brecht Van Lommel [Fri, 14 Apr 2017 14:26:10 +0000 (16:26 +0200)]
Fix T49429: incorrect Blender internal viewport border render with DrawPixels method.

4 years agoAlembic import: greatly improved curve/hair import performance
Sybren A. Stüvel [Fri, 14 Apr 2017 13:26:45 +0000 (15:26 +0200)]
Alembic import: greatly improved curve/hair import performance

The U-resolution of the imported curves was kept at the default value
of 12, which is way too high for imported hair. We export hair at a
fairly high resolution already, so it's not needed to subdivide even
further when importing.

Of course this may have an impact on other curves that do require this
U-resolution to be higher. In that case the resolution can be
increased after importing.

I removed the default nu->orderu = num_verts, as that allowed every
point to influence the entire spline, which was more expensive for the
CPU, and unlikely to be needed. The orderu computations had off-by-one
errors in the curve importer, which are now also fixed. The correct
values are:

    - Linear: orderu = 2
    - Quadratic: orderu = 3
    - Cubic: orderu = 4

These values are also what is stored in the Alembic file for curves of
type kVariableOrder, according to the reference Maya exporter
maya/AbcExport/MayaNurbsCurveWriter.cpp, function
MayaNurbsCurveWriter::write(), in the Alembic source code.

The result is a frame rate increase of roughly 100x (tested with one
100-hair test on one machine, so take with grain of salt).

4 years agoAdded simple unittests for Alembic exporter
Sybren A. Stüvel [Fri, 14 Apr 2017 10:54:20 +0000 (12:54 +0200)]
Added simple unittests for Alembic exporter

This test checks that a set of cubes are exported with the correct
transform, both with flatten=True and flatten=False.

This commit also adds an easy to use superclass for upcoming Alembic
unit tests.

4 years agoCleanup: triple quotes for docstrings
Campbell Barton [Fri, 14 Apr 2017 10:01:43 +0000 (20:01 +1000)]
Cleanup: triple quotes for docstrings

4 years agoBLF: avoid glyph cache use-after free
Campbell Barton [Fri, 14 Apr 2017 09:52:29 +0000 (19:52 +1000)]
BLF: avoid glyph cache use-after free

Causes crash if the font size isn't set after clearing (see T51200)

4 years agoBuildbot: Fix typos
Sergey Sharybin [Fri, 14 Apr 2017 08:03:30 +0000 (10:03 +0200)]
Buildbot: Fix typos

4 years agoBuildbot: Attempt to fix CUDA compilation on OSX
Sergey Sharybin [Fri, 14 Apr 2017 08:01:28 +0000 (10:01 +0200)]
Buildbot: Attempt to fix CUDA compilation on OSX

Stupid toolkit is really fragile about CLang version.

4 years agoUI: Add/Improve a few tooltips
Aaron Carlisle [Thu, 13 Apr 2017 22:07:10 +0000 (18:07 -0400)]
UI: Add/Improve a few tooltips

See T51061

4 years agoAlembic export: unified code of exploreTransform and exploreObject.
Sybren A. Stüvel [Tue, 11 Apr 2017 12:59:48 +0000 (14:59 +0200)]
Alembic export: unified code of exploreTransform and exploreObject.

4 years agoAlembic export: added support for writing dupli-groups
Sybren A. Stüvel [Wed, 12 Apr 2017 10:35:09 +0000 (12:35 +0200)]
Alembic export: added support for writing dupli-groups

This supports our common character animation workflow, where a character,
its rig, and the custom bone shapes are all part of a group. This group
is then linked into the scene, the rig is proxified and animated. Such
a group can now be exported. Use "Renderable objects only" to prevent
writing the custom bone shapes to the Alembic file.

4 years agoFix Surface Deform crash with missing or freed DM
Luca Rood [Thu, 13 Apr 2017 13:39:16 +0000 (15:39 +0200)]
Fix Surface Deform crash with missing or freed DM

4 years agoCycles: Make vectorized types constructor from register explicit
Sergey Sharybin [Thu, 13 Apr 2017 13:07:07 +0000 (15:07 +0200)]
Cycles: Make vectorized types constructor from register explicit

This is not a cheap operation which we dont' want to happen silently.

4 years agoCycles: Remove unused function
Sergey Sharybin [Thu, 13 Apr 2017 13:01:55 +0000 (15:01 +0200)]
Cycles: Remove unused function

It was quite wrong actually by doing some __m128 to flaot4 round trips.

4 years agoAlembic import: fixed off-by-one error in start/end frame
Sybren A. Stüvel [Thu, 13 Apr 2017 12:50:02 +0000 (14:50 +0200)]
Alembic import: fixed off-by-one error in start/end frame

static_cast<int> truncates, so a computed end frame of 99.999999999998
would result in 99, instead of the correct 100.

4 years agoTask scheduler: Fix typo in TLS for pools created from non-main thread
Sergey Sharybin [Thu, 13 Apr 2017 11:32:39 +0000 (13:32 +0200)]
Task scheduler: Fix typo in TLS for pools created from non-main thread

Did a mistake which started to use same TLS for all threads for such pools.

Also added some extra asserts to help catching the bugs.

4 years agoFix Blenderplayer (c)
Bastien Montagne [Thu, 13 Apr 2017 10:36:19 +0000 (12:36 +0200)]
Fix Blenderplayer (c)

4 years agoAdd red alert in UI controls for datablock pointer properties
Alexander Romanov [Thu, 13 Apr 2017 09:59:04 +0000 (12:59 +0300)]
Add red alert in UI controls for datablock pointer properties

4 years agoDatablock ID Properties
Alexander Romanov [Thu, 13 Apr 2017 09:30:03 +0000 (12:30 +0300)]
Datablock ID Properties

The absence of datablock properties "will certainly be resolved soon as the need for them is becoming obvious" said the [[|Python Nodes release notes]]. So this patch allows Python scripts to create ID Properties which reference datablocks.
This functionality is implemented for `PointerProperty` and now such properties can be created with Python.

In addition to the standard update callback, `PointerProperty` can have a `poll` callback (standard RNA) which is useful for search menus. For details see the test included in this patch.

Original author: @artfunkel

Alexander (Blend4Web Team)

Reviewers: brecht, artfunkel, mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Subscribers: jta, sergey, campbellbarton, wisaac, poseidon4o, mont29, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov, fjuhec, sharlybg, cardboard, duarteframos, blueprintrandom, a.romanov, BYOB, disnel, aditiapratama, bliblubli, dfelinto, lukastoenne

Maniphest Tasks: T37754

Differential Revision:

4 years agoCycles: Header cleanup in BVH: move self header to be the first one
Sergey Sharybin [Thu, 13 Apr 2017 09:20:33 +0000 (11:20 +0200)]
Cycles: Header cleanup in BVH: move self header to be the first one

This makes us more sure that header files are more self-sufficient.

4 years agoCycles: Split BVH implementations into separate files
Sergey Sharybin [Thu, 13 Apr 2017 08:55:46 +0000 (10:55 +0200)]
Cycles: Split BVH implementations into separate files

4 years agoCycles: Use more explicit and commonly used names for BVH structures
Sergey Sharybin [Thu, 13 Apr 2017 08:29:14 +0000 (10:29 +0200)]
Cycles: Use more explicit and commonly used names for BVH structures

This renames BinaryBVH to BVH2 and QBVH to BVH8. There is no user measurable
difference, but allows us to add more types of BVH trees such as BVH8.

4 years agoTask scheduler: Prevent race condition for the pools created from non-main thread
Sergey Sharybin [Wed, 12 Apr 2017 16:18:33 +0000 (18:18 +0200)]
Task scheduler: Prevent race condition for the pools created from non-main thread

We can not re-use anything for such pools, because we will know nothing about whether
the main thread is sleeping or not. So we identify such threads as 0, but we don't
use main thread's TLS.

This fixes dead-locks and crashes reported by Luca when doing playblasts.

4 years agoFix T50227: Alembic uv export/load issue
Sybren A. Stüvel [Wed, 12 Apr 2017 14:33:40 +0000 (16:33 +0200)]
Fix T50227: Alembic uv export/load issue

Previously only a CD_MLOOPUV custom data layer was created. Now we also
create the accompanying CD_MTEXPOLY layer too.

4 years agoFix T51184: Crash of Blender when I try to join an object with one that has booleans...
Sergey Sharybin [Wed, 12 Apr 2017 14:12:28 +0000 (16:12 +0200)]
Fix T51184: Crash of Blender when I try to join an object with one that has booleans modifiers

4 years agoAlembic export: fixed exporting as "flat"
Sybren A. Stüvel [Wed, 12 Apr 2017 10:15:32 +0000 (12:15 +0200)]
Alembic export: fixed exporting as "flat"

This exports all objects in world coordinates without parenting.

4 years agoAlembic export: removed superfluous export_object() check.
Sybren A. Stüvel [Tue, 11 Apr 2017 12:07:26 +0000 (14:07 +0200)]
Alembic export: removed superfluous export_object() check.

The exploreTransform() function already does this check, and the check
isn't necessary when the object type isn't exported anyway.

4 years agoCleanup: use lowercase gpu prefix for static funcs
Campbell Barton [Wed, 12 Apr 2017 10:18:44 +0000 (20:18 +1000)]
Cleanup: use lowercase gpu prefix for static funcs

This was mostly followed already.

4 years agoColor management: Avoid memory copy into same buffer
Sergey Sharybin [Wed, 12 Apr 2017 08:23:38 +0000 (10:23 +0200)]
Color management: Avoid memory copy into same buffer

4 years agoDocs: minor improvement to code example
Campbell Barton [Wed, 12 Apr 2017 04:21:59 +0000 (14:21 +1000)]
Docs: minor improvement to code example