3 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Dalai Felinto [Fri, 7 Jul 2017 09:27:48 +0000 (11:27 +0200)]
Merge remote-tracking branch 'origin/master' into blender2.8

3 years agoCycles: Fix ambiguity in call of min() function
Sergey Sharybin [Fri, 7 Jul 2017 08:40:19 +0000 (10:40 +0200)]
Cycles: Fix ambiguity in call of min() function

3 years agoFix T51978: Setup Tracking Scene after Motion Tracking fails the first time
Sergey Sharybin [Fri, 7 Jul 2017 07:36:25 +0000 (09:36 +0200)]
Fix T51978: Setup Tracking Scene after Motion Tracking fails the first time

3 years agoFix T51980: Motion Tracking - png image files appear in the Blender program directory...
Sergey Sharybin [Fri, 7 Jul 2017 07:27:24 +0000 (09:27 +0200)]
Fix T51980: Motion Tracking - png image files appear in the Blender program directory when using refine

Residue of debug code remained form some older bug fix.

3 years agoEevee: Add dimension panel to eevee
Thomas Beck [Thu, 6 Jul 2017 21:39:54 +0000 (23:39 +0200)]
Eevee: Add dimension panel to eevee

Up until now users had to switch to Blender Internal to set the dimension of their openGl renderings. This simple change adds the panel at the top of the scene render tab.

3 years agoEevee: Fix Planar Reflection bug / background artifact.
Clément Foucault [Thu, 6 Jul 2017 16:28:25 +0000 (18:28 +0200)]
Eevee: Fix Planar Reflection bug / background artifact.

This was cause by a missing uniform.

3 years agoGPUTexture: Change default comparison mode to GL_NONE.
Clément Foucault [Thu, 6 Jul 2017 15:02:16 +0000 (17:02 +0200)]
GPUTexture: Change default comparison mode to GL_NONE.

This default will prevent more errors in the future.
Also compare mode is less used nowadays.

Fixes T51904

3 years agoEevee: Fix the NaN pixel issue.
Clément Foucault [Thu, 6 Jul 2017 14:01:21 +0000 (16:01 +0200)]
Eevee: Fix the NaN pixel issue.

It's cause by degenerate triangle having normals set to (0,0,0) which may not be compressed like it should.
This fix the problem in the final indirect lighting evaluation which might be costly.

3 years agoAdd option to OpenImage operator not to detect sequences.
Bastien Montagne [Thu, 6 Jul 2017 12:50:10 +0000 (14:50 +0200)]
Add option to OpenImage operator not to detect sequences.

Otherwise, there would be no way to load a bunch of pictures with
'sequence pattern' in name in a single operation.

Related to T51778.

3 years agoEevee: Unlock compatible bsdfs in node add menu.
Clément Foucault [Thu, 6 Jul 2017 11:32:07 +0000 (13:32 +0200)]
Eevee: Unlock compatible bsdfs in node add menu.

3 years agoEevee: Add support for common BSDFs.
Clément Foucault [Thu, 6 Jul 2017 11:31:36 +0000 (13:31 +0200)]
Eevee: Add support for common BSDFs.

Add Diffuse BSDF, and Glossy.

Also Use World normal instead of view normal as input.

3 years agoFix T51943: Depsgraph: world update happening eternally on background (set) scene
Sergey Sharybin [Thu, 6 Jul 2017 11:29:59 +0000 (13:29 +0200)]
Fix T51943: Depsgraph: world update happening eternally on background (set) scene

The issue was caused by updates being flushed for all scenes, while actual update
was only called for an active one.

Not sure why do we need to flush updates for all scenes, so now we only flush
scenes which are updated.

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 6 Jul 2017 10:19:59 +0000 (12:19 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix T51955: Changing Auto-IK length crashes Blender (with new-depsgraph)
Sergey Sharybin [Wed, 5 Jul 2017 15:52:42 +0000 (17:52 +0200)]
Fix T51955: Changing Auto-IK length crashes Blender (with new-depsgraph)

New dependency graph is tacking root bone into account when building the graph.
This is required in order to get proper dependencies between bones. so we can
reliably use bones as targets from the same rig (and even indirect relations
via external objects). This forces us to tag relations for update when we change
root IK chain bone.

Since relations rebuild is not fully trivial operation, we only do it for
the new dependency graph. In the future it'll be nice to avoid whole graph
rebuild for such cases, but that's mentioned as a TODO.

3 years agoFix T51015: Pack all into blend automatically leaves checkbox enabled.
Bastien Montagne [Thu, 6 Jul 2017 09:52:44 +0000 (11:52 +0200)]
Fix T51015: Pack all into blend automatically leaves checkbox enabled.

Makes absolutely no sense to forcefully enable that automatic packing option here,
user can do this himself if they likes, from the very same menu...

3 years agoCycles: Add artificial memory limit debug option for OpenCL
Mai Lavelle [Thu, 6 Jul 2017 00:16:41 +0000 (20:16 -0400)]
Cycles: Add artificial memory limit debug option for OpenCL

3 years agoRevert "Cycles: use std::min and max for extra overloads"
Mai Lavelle [Thu, 6 Jul 2017 08:21:29 +0000 (04:21 -0400)]
Revert "Cycles: use std::min and max for extra overloads"

We already have this in util_algorithm.h

This reverts commit cff172c7621d89773baa99a9460f19056efb5f1e.

3 years agoCycles: Dont allow global size to fall to zero
Mai Lavelle [Thu, 6 Jul 2017 00:15:47 +0000 (20:15 -0400)]
Cycles: Dont allow global size to fall to zero

3 years agoCycles: Detect out of memory before buffer allocation in OpenCL devices
Mai Lavelle [Wed, 5 Jul 2017 23:44:18 +0000 (19:44 -0400)]
Cycles: Detect out of memory before buffer allocation in OpenCL devices

3 years agoCycles: use std::min and max for extra overloads
Mai Lavelle [Wed, 5 Jul 2017 23:43:34 +0000 (19:43 -0400)]
Cycles: use std::min and max for extra overloads

3 years agoEevee: Volumetrics: Avoid light leaking if last step is going trough geometry.
Clément Foucault [Wed, 5 Jul 2017 22:27:42 +0000 (00:27 +0200)]
Eevee: Volumetrics: Avoid light leaking if last step is going trough geometry.

3 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Wed, 5 Jul 2017 20:25:05 +0000 (22:25 +0200)]
Merge branch 'master' into blender2.8

3 years agoBetter fix for sequencer crash when text strip doesn't have effect data.
Sybren A. Stüvel [Wed, 5 Jul 2017 20:18:36 +0000 (22:18 +0200)]
Better fix for sequencer crash when text strip doesn't have effect data.

This situation happens when a file with a text effect sequencer strip is
loaded in Blender < 2.76 and saved. This destroys the effect data, causing
a crash in Blender ≥ 2.76.

d2f748a222ad19f prevented the crash when opening such a file, but accessing
the strip still caused a crash. This commit fixes that by actually
initialising the invalid strip. Of course this still causes data loss, but
that already happened by opening & overwriting the file in Blender < 2.76.

3 years agoEevee: Volumetrics: Fix enum flag.
Clément Foucault [Wed, 5 Jul 2017 20:16:48 +0000 (22:16 +0200)]
Eevee: Volumetrics: Fix enum flag.

3 years agoCycles: Fix compilation error after recent logging changes
Sergey Sharybin [Wed, 5 Jul 2017 18:39:34 +0000 (20:39 +0200)]
Cycles: Fix compilation error after recent logging changes

This file uses std::ostream for helper << operators, so need to make sure
corresponding header is included.

3 years agoSequencer: Prevent crash when text strip doesn't have effect data.
Sybren A. Stüvel [Wed, 5 Jul 2017 18:22:28 +0000 (20:22 +0200)]
Sequencer: Prevent crash when text strip doesn't have effect data.

3 years agoEevee: Fix typo...
Clément Foucault [Wed, 5 Jul 2017 17:56:38 +0000 (19:56 +0200)]
Eevee: Fix typo...

3 years agoFix User Interface for Volumetric
Dalai Felinto [Wed, 5 Jul 2017 17:23:57 +0000 (19:23 +0200)]
Fix User Interface for Volumetric

3 years agoEevee: Fixups.
Clément Foucault [Wed, 5 Jul 2017 17:15:32 +0000 (19:15 +0200)]
Eevee: Fixups.

Fix float promotion and missing layer parameters.

3 years agoEevee: Volumetrics: Add Light contribution clamping.
Clément Foucault [Wed, 5 Jul 2017 17:14:50 +0000 (19:14 +0200)]
Eevee: Volumetrics: Add Light contribution clamping.

This avoid too much variance at light centers and remove some noise.

3 years agoEevee: Volumetrics: Do not add anisotropy attribute, average it.
Clément Foucault [Wed, 5 Jul 2017 16:31:43 +0000 (18:31 +0200)]
Eevee: Volumetrics: Do not add anisotropy attribute, average it.

This makes no sense to add theses. In cycles, each volume node is computed separatly. In eevee only the combined parameters are evaluated and phase should be averaged in this case.

3 years agoDrawManager: Fix manipulator blend mode.
Clément Foucault [Wed, 5 Jul 2017 16:29:40 +0000 (18:29 +0200)]
DrawManager: Fix manipulator blend mode.

This was giving issue with volumetrics.

3 years agoEevee: Volumetrics: Add settings.
Clément Foucault [Wed, 5 Jul 2017 16:28:48 +0000 (18:28 +0200)]
Eevee: Volumetrics: Add settings.

3 years agoEevee: Volumetrics: Add support for Position Coordinates.
Clément Foucault [Tue, 4 Jul 2017 16:02:13 +0000 (18:02 +0200)]
Eevee: Volumetrics: Add support for Position Coordinates.

This enables texturing of the noise via procedural or baked textures.
Note that it gets quickly really heavy.

3 years agoEevee: Volumetrics: Add Volume Absorption node.
Clément Foucault [Tue, 4 Jul 2017 13:29:18 +0000 (15:29 +0200)]
Eevee: Volumetrics: Add Volume Absorption node.

3 years agoEevee: Volumetrics: Colored Transmittance support.
Clément Foucault [Tue, 4 Jul 2017 13:28:17 +0000 (15:28 +0200)]
Eevee: Volumetrics: Colored Transmittance support.

Render the transmittance in another color buffer and apply it separatelly.
It's a bit more slow because the upsample step needs to be done twice.

3 years agoEevee: Volumetrics: Match cycles scattering.
Clément Foucault [Tue, 4 Jul 2017 12:47:06 +0000 (14:47 +0200)]
Eevee: Volumetrics: Match cycles scattering.

3 years agoEevee: Move volumetric to its own panel, new settings to come
Dalai Felinto [Wed, 5 Jul 2017 12:44:43 +0000 (14:44 +0200)]
Eevee: Move volumetric to its own panel, new settings to come

3 years agoOverride template: Add text and icon optional parameters
Dalai Felinto [Wed, 5 Jul 2017 12:44:19 +0000 (14:44 +0200)]
Override template: Add text and icon optional parameters

3 years agoExpose rna_translate_ui_text to be used for interface templates
Dalai Felinto [Wed, 5 Jul 2017 12:43:43 +0000 (14:43 +0200)]
Expose rna_translate_ui_text to be used for interface templates

3 years agoCode comments regarding last commit (forgotten to add before)
Luca Rood [Wed, 5 Jul 2017 14:16:57 +0000 (16:16 +0200)]
Code comments regarding last commit (forgotten to add before)

Using an arbitrary face as the source of the UV data is mostly fine, as
vertices on seams will generally map to different parts of the texture
that have the same color.

This is regarding fed853ea782211298c902759ec8cd8e455d8b41d

3 years agoMerge branch 'master' into blender2.8
Luca Rood [Wed, 5 Jul 2017 13:50:01 +0000 (15:50 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix T51296: UVs not working for hair emitted from vertices
Luca Rood [Wed, 5 Jul 2017 10:23:42 +0000 (12:23 +0200)]
Fix T51296: UVs not working for hair emitted from vertices

3 years agoCompositor: Fix compilation error and crash when using defocus search
Sergey Sharybin [Wed, 5 Jul 2017 13:37:33 +0000 (15:37 +0200)]
Compositor: Fix compilation error and crash when using defocus search

Was just wondering what the option is doing. Not sure yet, but let's fix
couple of issues here.

3 years agoCycles: Pass string by const reference rather than by value
Sergey Sharybin [Wed, 5 Jul 2017 10:27:41 +0000 (12:27 +0200)]
Cycles: Pass string by const reference rather than by value

Some of the functions might have been inlined, but others i don't see
how that was possible (don't think virtual functions can be inlined here).

In any case, better be explicitly optimal in the code.

3 years agoCycles: Fix compilation error when building without Glog and no C++11
Sergey Sharybin [Wed, 5 Jul 2017 10:01:12 +0000 (12:01 +0200)]
Cycles: Fix compilation error when building without Glog and no C++11

3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Wed, 5 Jul 2017 07:20:48 +0000 (09:20 +0200)]
Merge branch 'master' into blender2.8


3 years agoEevee: Fix world test for volumetric
Dalai Felinto [Tue, 4 Jul 2017 16:07:34 +0000 (18:07 +0200)]
Eevee: Fix world test for volumetric

Compiler even throws a warning at this.

3 years agoThird fix for my merge: crash after switch to edit mode reported by @dfelinto
Alexander Romanov [Tue, 4 Jul 2017 14:53:19 +0000 (17:53 +0300)]
Third fix for my merge: crash after switch to edit mode reported by @dfelinto

3 years agoFix T51834: Active Object and Groups color difference imperceptible
Bastien Montagne [Tue, 4 Jul 2017 14:01:16 +0000 (16:01 +0200)]
Fix T51834: Active Object and Groups color difference imperceptible

16 was not enough here, -32 seems to give OK results.

3 years agoOne more fix for merged 'normal map tangents not working correctly when there are...
Alexander Romanov [Tue, 4 Jul 2017 13:03:04 +0000 (16:03 +0300)]
One more fix for merged 'normal map tangents not working correctly when there are no UV maps.'

3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Tue, 4 Jul 2017 11:13:49 +0000 (13:13 +0200)]
Merge branch 'master' into blender2.8


3 years agoFix T51965: Custom Bone Shape Wireframe setting affects wireframe thickness.
Bastien Montagne [Tue, 4 Jul 2017 11:10:08 +0000 (13:10 +0200)]
Fix T51965: Custom Bone Shape Wireframe setting affects wireframe thickness.

Clearing of custom bones outline's line thickness was not done at proper
point, wireframe drawing never changes line thickness, only solid draw
with outline does...

3 years agoFix T51703: Rigid body with delta transform jumps when transforming
Luca Rood [Tue, 4 Jul 2017 08:12:09 +0000 (10:12 +0200)]
Fix T51703: Rigid body with delta transform jumps when transforming

When doing any transformation on a rigid body object that has delta
transforms, the object would be offset by the amount of the delta

3 years agoEevee: Fix Closure define.
Clément Foucault [Tue, 4 Jul 2017 09:40:12 +0000 (11:40 +0200)]
Eevee: Fix Closure define.

3 years agoBetter fix for rigid body not resimulating
Luca Rood [Tue, 4 Jul 2017 08:57:57 +0000 (10:57 +0200)]
Better fix for rigid body not resimulating

Last fix only accounted for direct changes to the RB settings, but
failed for, say, object transformations. This fix accounts for any
change that might invalidate the RB cache.

3 years agoFix rigid body not resimulating after cache invalidation
Luca Rood [Tue, 4 Jul 2017 07:20:02 +0000 (09:20 +0200)]
Fix rigid body not resimulating after cache invalidation

Fix 9cd6b03187b91bb2c267a45eac3cee7738e0e220 introduced a bug that
prevented simulation after a cache invalidation (for instance when
changing a setting after simulating). This fixes that.

3 years agoEevee: Add support for volumetrics in node tree.
Clément Foucault [Mon, 3 Jul 2017 20:08:07 +0000 (22:08 +0200)]
Eevee: Add support for volumetrics in node tree.

Only volume scatter is implemented for now.

3 years agoGPU Codegen: Add new closure socket type.
Clément Foucault [Mon, 3 Jul 2017 19:39:52 +0000 (21:39 +0200)]
GPU Codegen: Add new closure socket type.

This allow specialized shaders to redefine the closure interface to fit their needs.

For instance, Volumetric closure needs to pass more than one vec4 (absorption vec3, scattering vec3, anisotropy float).

3 years agoEevee: Initial implementation of Volumetrics.
Clément Foucault [Mon, 3 Jul 2017 14:38:14 +0000 (16:38 +0200)]
Eevee: Initial implementation of Volumetrics.

3 years agoDraw Manager: Add new blend mode for transmission.
Clément Foucault [Mon, 3 Jul 2017 14:28:20 +0000 (16:28 +0200)]
Draw Manager: Add new blend mode for transmission.

This blend Mode is doing  Source + Destination * Alpha.

3 years agoEevee: Fix luma calculation for lamp fresnel.
Clément Foucault [Fri, 30 Jun 2017 14:26:33 +0000 (16:26 +0200)]
Eevee: Fix luma calculation for lamp fresnel.

3 years agoFix edit mode not drawing
Dalai Felinto [Mon, 3 Jul 2017 19:48:39 +0000 (21:48 +0200)]
Fix edit mode not drawing

This was introduced on 1ad0cc6bde.

3 years agoFix alembic after merge from master
Dalai Felinto [Mon, 3 Jul 2017 18:55:15 +0000 (20:55 +0200)]
Fix alembic after merge from master

3 years agoFix building with gcc6 after merge from master
Dalai Felinto [Mon, 3 Jul 2017 18:59:02 +0000 (20:59 +0200)]
Fix building with gcc6 after merge from master

3 years agoFix for merged 'normal map tangents not working correctly when there are no UV maps.'
Alexander Romanov [Mon, 3 Jul 2017 17:02:39 +0000 (20:02 +0300)]
Fix for merged 'normal map tangents not working correctly when there are no UV maps.'

3 years agoMerge branch 'master' into blender2.8
Alexander Romanov [Mon, 3 Jul 2017 16:49:35 +0000 (19:49 +0300)]
Merge branch 'master' into blender2.8

3 years agoFix T51950: Abnormally long Cycles OpenCL GPU render times with certain panoramic...
Lukas Stockner [Mon, 3 Jul 2017 16:22:35 +0000 (18:22 +0200)]
Fix T51950: Abnormally long Cycles OpenCL GPU render times with certain panoramic camera settings

The problem here was that when a "invalid" path is generated by the panoramic camera, it was tagged
as RAY_TO_REGENERATE with the intention of generating a new path in kernel_buffer_update.

However, since that state was not handled in kernel_queue_enqueue, kernel_buffer_update did not
process the path which resulted in an infinite loop.

3 years agoCycles: Add missing split kernel to CPUDevice
Lukas Stockner [Mon, 3 Jul 2017 16:22:20 +0000 (18:22 +0200)]
Cycles: Add missing split kernel to CPUDevice

3 years agoFix T51523: Lattice modifier affecting particles even when disabled
Luca Rood [Mon, 3 Jul 2017 16:00:13 +0000 (18:00 +0200)]
Fix T51523: Lattice modifier affecting particles even when disabled

Particles were ignoring the lattice modifier visibility, and
"influence" property.

3 years agoEevee: Hide lightprobe data when using "Only Render"
Dalai Felinto [Mon, 3 Jul 2017 14:16:24 +0000 (16:16 +0200)]
Eevee: Hide lightprobe data when using "Only Render"

3 years agoFixed build error on Windows / VS2015
Sybren A. Stüvel [Mon, 3 Jul 2017 13:50:19 +0000 (15:50 +0200)]
Fixed build error on Windows / VS2015

3 years agoAlembic: fix T51820 for sequence files not loading properly.
Sybren A. Stüvel [Mon, 3 Jul 2017 11:49:16 +0000 (13:49 +0200)]
Alembic: fix T51820 for sequence files not loading properly.

3 years agoAlembic: avoid crashing when doing certain file operations.
Sybren A. Stüvel [Mon, 3 Jul 2017 13:28:19 +0000 (15:28 +0200)]
Alembic: avoid crashing when doing certain file operations.

Things like missing directories are now properly checked for, rather than
crashing Blender.

This also adds support for relative paths when opening an ABC file.

3 years agoMerge branch 'master' into blender2.8
Dalai Felinto [Mon, 3 Jul 2017 13:07:14 +0000 (15:07 +0200)]
Merge branch 'master' into blender2.8

3 years agoAlembic: renamed offset → sequence_offset
Sybren A. Stüvel [Mon, 3 Jul 2017 10:29:01 +0000 (12:29 +0200)]
Alembic: renamed offset → sequence_offset

3 years agoFix T51883: Wrong matrix computation in "Make Duplicates Real"
Luca Rood [Mon, 3 Jul 2017 10:41:40 +0000 (12:41 +0200)]
Fix T51883: Wrong matrix computation in "Make Duplicates Real"

3 years agoFix T51963: Eevee: ASAN crash on copy_attrib_name
Dalai Felinto [Mon, 3 Jul 2017 10:46:58 +0000 (12:46 +0200)]
Fix T51963: Eevee: ASAN crash on copy_attrib_name

Bug introduced on f6bb3262f17.

CustomData_get_named_layer returns a different result than

3 years agoFix missing return error introduced by last commit
Luca Rood [Mon, 3 Jul 2017 10:12:27 +0000 (12:12 +0200)]
Fix missing return error introduced by last commit

End of non-void function was being reached since

3 years agoFi T51023: MixRGB constant folding not effective with clamp option.
Brecht Van Lommel [Mon, 3 Jul 2017 03:25:27 +0000 (05:25 +0200)]
Fi T51023: MixRGB constant folding not effective with clamp option.

3 years agoFix T51855: Cycles emssive objects with NaN transform break lighting.
Brecht Van Lommel [Mon, 3 Jul 2017 03:04:43 +0000 (05:04 +0200)]
Fix T51855: Cycles emssive objects with NaN transform break lighting.

3 years agoFix T51889: broken UI after File > New without a userpref.blend.
Brecht Van Lommel [Mon, 3 Jul 2017 00:24:40 +0000 (02:24 +0200)]
Fix T51889: broken UI after File > New without a userpref.blend.

BLO_update_defaults_userpref_blend() was being run when no user preferences
were loaded from memory.

3 years agoFix T51734: batch-generate previews crashes on some materials.
Brecht Van Lommel [Sun, 2 Jul 2017 21:35:40 +0000 (23:35 +0200)]
Fix T51734: batch-generate previews crashes on some materials.

3 years agoFix T51759: fluid simulation particles not remoevd when colliding with outflow objects.
Lucas Veber [Sun, 2 Jul 2017 20:38:16 +0000 (22:38 +0200)]
Fix T51759: fluid simulation particles not remoevd when colliding with outflow objects.

Reviewed By: brecht

Differential Revision:

3 years agoFix T51951: cell noise texture precision issue at unit vertex coordinates.
Brecht Van Lommel [Sun, 2 Jul 2017 19:53:23 +0000 (21:53 +0200)]
Fix T51951: cell noise texture precision issue at unit vertex coordinates.

Solution is to bias the coordinates a little, same as Cycles checker texture.

3 years agoFix T51746: normal map tangents not working correctly when there are no UV maps.
Alexander Romanov [Sun, 2 Jul 2017 18:21:19 +0000 (20:21 +0200)]
Fix T51746: normal map tangents not working correctly when there are no UV maps.

Patch by Alexander, with some refactoring by Brecht.

Reviewed By: brecht

Differential Revision:

3 years agoFix T51772: double undo entry for color picker editing.
Brecht Van Lommel [Sun, 2 Jul 2017 19:25:25 +0000 (21:25 +0200)]
Fix T51772: double undo entry for color picker editing.

3 years agoFix T51956: color noise with principled sss, radius 0 and branched path.
Brecht Van Lommel [Sun, 2 Jul 2017 17:10:11 +0000 (19:10 +0200)]
Fix T51956: color noise with principled sss, radius 0 and branched path.

3 years agoFix T51957: principled BSDF mismatches in GLSL viewport.
Brecht Van Lommel [Sun, 2 Jul 2017 15:59:31 +0000 (17:59 +0200)]
Fix T51957: principled BSDF mismatches in GLSL viewport.

3 years agoFix principled BSDF incorrectly missing subsurface component with base color black.
Brecht Van Lommel [Sun, 2 Jul 2017 16:16:39 +0000 (18:16 +0200)]
Fix principled BSDF incorrectly missing subsurface component with base color black.

3 years agoFix T51947: failure setting sequence.use_proxy/crop/translation to False
Brecht Van Lommel [Sat, 1 Jul 2017 20:14:34 +0000 (22:14 +0200)]
Fix T51947: failure setting sequence.use_proxy/crop/translation to False

3 years agoCleanup: unused defines
Campbell Barton [Sat, 1 Jul 2017 10:19:12 +0000 (20:19 +1000)]
Cleanup: unused defines

3 years agoFix ED_OT_undo_redo operator
Aleksandr Zinovev [Sat, 1 Jul 2017 07:50:29 +0000 (10:50 +0300)]
Fix ED_OT_undo_redo operator

3 years agoFix T51877: Deleting a scene uses freed memory
Dalai Felinto [Fri, 30 Jun 2017 16:59:29 +0000 (18:59 +0200)]
Fix T51877: Deleting a scene uses freed memory

At the moment libblock_remap_data_preprocess is using
FOREACH_SCENE_OBJECT to iterate over all the objects of the scene and
unlink them.

However we were storing a reference to the Base of the removed object.
Anyways, the loop is now sanitized so that this crash no longer happens.

Also now we have an unittest for this.

3 years agoFix T50230: Rigid Body simulation shouldn't step when time is beyond cached area
Luca Rood [Fri, 30 Jun 2017 13:56:44 +0000 (15:56 +0200)]
Fix T50230: Rigid Body simulation shouldn't step when time is beyond cached area

This makes the last time (`ltime`) stored in the rigid body world (`rbw`)
only be updated once a simulation step actually occurs, this prevents
another simulation step from being solved unless the current time is
exactly one frame after the last cached frame. Thus this prevents the
formation of gaps in the cache, such as seen in T50230.

Reviewers: mont29, sergey, angavrilov

Tags: #physics

Maniphest Tasks: T50230

Differential Revision:

3 years agoBetter fix for isfinite problem - works in older gcc's too.
Howard Trickey [Fri, 30 Jun 2017 13:04:01 +0000 (09:04 -0400)]
Better fix for isfinite problem - works in older gcc's too.

Previous fix relying on __cplusplus value didn't fix for older
gcc's on linux, but this fix does.

3 years agoFix compile error after recent 9c2bbfb6 commit.
Howard Trickey [Fri, 30 Jun 2017 11:47:37 +0000 (07:47 -0400)]
Fix compile error after recent 9c2bbfb6 commit.

Older C++ compilers use finite instead of isfinite.

3 years agoFix T51721: OpenGL Detection is broken on Windows
Dalai Felinto [Fri, 30 Jun 2017 11:33:54 +0000 (13:33 +0200)]
Fix T51721: OpenGL Detection is broken on Windows

Now computers that support OpenGl3.3 (but not 4.5) can run Blender 2.8.

For any given HDC, you may only call SetPixelFormat *ONCE* any future
calls for the same HDC will fail. And computers that would support only
OpenGL 3.3 wouldn't have a change to get a valid OpenGL context because
the pixelformat was already set while trying to probe the supported

We fix this by splitting the final context creation from the query of
supported OpenGL versions.

Patch by Ray Molenkamp (bzzt_ploink/LazyDodo) with code style fixes and
comments by me.

3 years agoEevee: Principled BSDF: add support for specular tint + optimisation
Clément Foucault [Fri, 30 Jun 2017 12:12:25 +0000 (14:12 +0200)]
Eevee: Principled BSDF: add support for specular tint + optimisation

Only use clearcoat version if there is something linked or if the clearcoat value is not 0.

3 years agoEevee: Fix specular shadowing.
Clément Foucault [Fri, 30 Jun 2017 12:10:42 +0000 (14:10 +0200)]
Eevee: Fix specular shadowing.

Compute luminance approximation instead of using green channel.
This is to match cycles principled bsdf.