blender.git
3 years agoMerge branch 'master' into blender2.8
mano-wii [Fri, 14 Jul 2017 20:26:46 +0000 (17:26 -0300)]
Merge branch 'master' into blender2.8

3 years agoSnap System: Fixed index of objects used to make `snap to volume`
mano-wii [Fri, 14 Jul 2017 20:25:16 +0000 (17:25 -0300)]
Snap System: Fixed index of objects used to make `snap to volume`

*note: make a complete test scene

3 years agoMerge branch 'master' into blender2.8
mano-wii [Fri, 14 Jul 2017 19:56:36 +0000 (16:56 -0300)]
Merge branch 'master' into blender2.8

# Conflicts:
# source/blender/editors/transform/transform_snap_object.c

3 years agoSnap System: Use function that does the interactor instead of Macro
mano-wii [Fri, 14 Jul 2017 19:52:31 +0000 (16:52 -0300)]
Snap System: Use function that does the interactor instead of Macro

Macro makes debugging difficult. And in that case I was escaping from the style used in Blender

3 years agoFix MSVSC compiler warning
Antonio Vazquez [Fri, 14 Jul 2017 18:59:26 +0000 (20:59 +0200)]
Fix MSVSC compiler warning

A void function cannot return a value

3 years agoSnap System: minor issues
mano-wii [Fri, 14 Jul 2017 17:46:07 +0000 (14:46 -0300)]
Snap System: minor issues

rename obj -> ob_iter

3 years agoImplement Uniformbuffer objects for nodetree parameters
Dalai Felinto [Fri, 14 Jul 2017 15:40:54 +0000 (17:40 +0200)]
Implement Uniformbuffer objects for nodetree parameters

For users that means you can tweak shaders in the nodetree and things
are way faster. This is a huge improvement, particularly in
systems that have no shader cache.

From the code perspective it means we are no longer re-compiling the
shader every time a value is tweaked in the UI. We are using uniforms
for those values.

It would be slow to add that many uniforms for all the shaders. So
instead we are using UBO (Uniform Buffer Objects).

This fixes the main issue of T51467. However GWN_shaderinterface_create() still
needs to be improvedi. When opening a .blend all shaders are compiled once, so
optimizing it will bring a measurable impact.

========================================================================
NOTE: This breaks update of Cycles material upon nodetree nodes
tweaking. It will be fixed separately by depsgraph, once tackling T51925
(Animated Eevee values slowdown).

The idea is to make Depsgraph update more granular. The XXX TODO in
rna_nodetree.c will be tackled at that time as well.
========================================================================

Reviewers: sergey, brecht, fclem

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

3 years agoDwM: don't use context to apply color-management
Campbell Barton [Fri, 14 Jul 2017 14:49:48 +0000 (00:49 +1000)]
DwM: don't use context to apply color-management

Would give different results for off-screen rendering.

3 years agoMerge branch 'master' of git@git.blender.org:blender.git into blender2.8
mano-wii [Fri, 14 Jul 2017 14:24:43 +0000 (11:24 -0300)]
Merge branch 'master' of git@git.blender.org:blender.git into blender2.8

3 years agoSnap System: missing change
mano-wii [Fri, 14 Jul 2017 14:20:28 +0000 (11:20 -0300)]
Snap System: missing change

3 years agoMerge branch 'master' of git@git.blender.org:blender.git into blender2.8
mano-wii [Fri, 14 Jul 2017 13:42:59 +0000 (10:42 -0300)]
Merge branch 'master' of git@git.blender.org:blender.git into blender2.8

3 years agoSnap System: fix rename `ob` to `obj`
mano-wii [Fri, 14 Jul 2017 13:41:47 +0000 (10:41 -0300)]
Snap System: fix rename `ob` to `obj`

This would bring problems with dupli objects

3 years agoDepsgraph: Initial support of armatures for copy-on-write
Sergey Sharybin [Fri, 14 Jul 2017 12:56:54 +0000 (14:56 +0200)]
Depsgraph: Initial support of armatures for copy-on-write

This commit makes simple cases to work, for example:

- IK solver to an external object
- Object with Armature modifier, "parented" to the deforming armature
  (via animation).

More complicated setups (like agent rig) are crashing still.

3 years agoAnother fix for snapping after merge in 2.8
Dalai Felinto [Fri, 14 Jul 2017 13:06:17 +0000 (15:06 +0200)]
Another fix for snapping after merge in 2.8

3 years agoFix snap in 2.8 after poor merge from master
Dalai Felinto [Fri, 14 Jul 2017 12:42:15 +0000 (14:42 +0200)]
Fix snap in 2.8 after poor merge from master

If you merge from master to blender2.8 after a commit, remember to test in 2.8, otherwise what is the point?
Specially if it's a non-essential commit such as c9817c67fc141ca85a6e1f9e42d9fa.

Bug introduced on: f4155d3778ba883566eeb87d16218c4c275ffc (the merge
that included the above commit).

3 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Dalai Felinto [Fri, 14 Jul 2017 12:34:46 +0000 (14:34 +0200)]
Merge remote-tracking branch 'origin/master' into blender2.8

3 years agoRevert "Fix T51794: Crash on hair file when opening with no UI"
Dalai Felinto [Fri, 14 Jul 2017 09:44:26 +0000 (11:44 +0200)]
Revert "Fix T51794: Crash on hair file when opening with no UI"

This reverts commit 0095f4f83465bc9fdc13b79d2126f5623e291d7c.

3 years agoWorkspace: Fix crash on preview, and sanitize placeholder functions
Dalai Felinto [Fri, 14 Jul 2017 09:16:25 +0000 (11:16 +0200)]
Workspace: Fix crash on preview, and sanitize placeholder functions

This commit effectively makes workspace switching useless as far as the
active scene layer goes.

The functions from the scene layer API to get the correct scene layer
from "context" were a placeholder to be addressed by the workspace
commit.

When workspace was merged, however G.main was used as a replacement to pass the
correct argument for the functions. As it turned out (surprise!) this
leads to crash on render preview.

We need to get rid of:
* BKE_scene_layer_context_active_ex_PLACEHOLDER
* BKE_scene_layer_context_active_PLACEHOLDER

And either use SceneLayer explicitly or replace it by:
* BKE_scene_layer_from_workspace_get

3 years agoFix unit test error on Windows
Sybren A. Stüvel [Fri, 14 Jul 2017 07:53:20 +0000 (09:53 +0200)]
Fix unit test error on Windows

3 years agoCleanup: use 'r_' prefix for return args
Campbell Barton [Fri, 14 Jul 2017 07:05:22 +0000 (17:05 +1000)]
Cleanup: use 'r_' prefix for return args

3 years agoCleanup: long lines
Campbell Barton [Fri, 14 Jul 2017 06:56:02 +0000 (16:56 +1000)]
Cleanup: long lines

3 years agoDwM: Show face-mask overlay even with full-shading
Campbell Barton [Fri, 14 Jul 2017 06:45:47 +0000 (16:45 +1000)]
DwM: Show face-mask overlay even with full-shading

Without this face selection would be used but invisible,
display this over fully shaded surface.

3 years agoFix T51945: LMB select swaps manipulator buttons
Campbell Barton [Fri, 14 Jul 2017 06:14:19 +0000 (16:14 +1000)]
Fix T51945: LMB select swaps manipulator buttons

3 years agoFix T51979: Eevee: Bloom artifacts w/ zero area faces
Campbell Barton [Fri, 14 Jul 2017 05:27:08 +0000 (15:27 +1000)]
Fix T51979: Eevee: Bloom artifacts w/ zero area faces

3 years agoRevert "Eevee: Fix the NaN pixel issue."
Campbell Barton [Thu, 13 Jul 2017 11:45:39 +0000 (21:45 +1000)]
Revert "Eevee: Fix the NaN pixel issue."

This reverts commit d02711ed883ee0d1844d49d39a8814aca5b029c3.

3 years agoMerge branch 'master' of git@git.blender.org:blender.git into blender2.8
mano-wii [Thu, 13 Jul 2017 23:12:17 +0000 (20:12 -0300)]
Merge branch 'master' of git@git.blender.org:blender.git into blender2.8

# Conflicts:
# source/blender/editors/transform/transform_snap_object.c

3 years agoSnap System: Replace creation and destruction of the object list by a Macro
mano-wii [Thu, 13 Jul 2017 22:39:17 +0000 (19:39 -0300)]
Snap System: Replace creation and destruction of the object list by a Macro

The macro got a little strange, but it's better than using the MEM_mallocN inside a loop, or repeat the lines

3 years agoMerge branch 'master' into blender2.8
Antonio Vazquez [Thu, 13 Jul 2017 16:05:20 +0000 (18:05 +0200)]
Merge branch 'master' into blender2.8

3 years agoCleanup: Fix MSVC warning message
Antonio Vazquez [Thu, 13 Jul 2017 15:54:24 +0000 (17:54 +0200)]
Cleanup: Fix MSVC warning message

The const key is required by compiler to avoid warning

3 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Thu, 13 Jul 2017 15:36:52 +0000 (17:36 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix compilation error in Freestyle
Sergey Sharybin [Thu, 13 Jul 2017 15:20:24 +0000 (17:20 +0200)]
Fix compilation error in Freestyle

3 years agoCleanup/rename etc. dashed line shaders.
Bastien Montagne [Thu, 13 Jul 2017 14:44:02 +0000 (16:44 +0200)]
Cleanup/rename etc. dashed line shaders.

Goal is to make them more modular, to allow more variants (variable
single-color, thickness, ...) to be added without having to
copy-and-change-one-line of whole chain of shaders.

3 years agoSequence editor: Renamed "Override" to "Overwrite" in "Set Selected Strip Proxies"
Sybren A. Stüvel [Thu, 13 Jul 2017 14:26:19 +0000 (16:26 +0200)]
Sequence editor: Renamed "Override" to "Overwrite" in "Set Selected Strip Proxies"

The option has always (un)set the "Overwrite" flag on all strips. Calling
it "Override" seems misleading, since even when unchecking it, it overrides
whatever was set on the selected strips. It really just (un)sets the
"Overwrite" flag, and now it is also labeled as such.

3 years agoDepsgraph: Begin work on making depsgraph per-scene-layer
Sergey Sharybin [Thu, 13 Jul 2017 13:43:36 +0000 (15:43 +0200)]
Depsgraph: Begin work on making depsgraph per-scene-layer

This is a first step towards proper depsgraph "ownership", where
we would allow scene to be in multiple states dependent on active
workspace or scene layer.

This commit introduces a basic API to get proper dependency graph
for a given scene layer. It also renames scene->depsgraph to
depsgraph_legacy, so it's easier to search0-n-replace in the future.

3 years agoRemove unused function
Sergey Sharybin [Thu, 13 Jul 2017 13:23:02 +0000 (15:23 +0200)]
Remove unused function

It wasn't really correct from the copy-on-write point of view anyway,
so better not to have potentially really dangerous function.

3 years agoDepsgraph: Fix crash with copy-on-write enabled after recent changes
Sergey Sharybin [Thu, 13 Jul 2017 12:57:19 +0000 (14:57 +0200)]
Depsgraph: Fix crash with copy-on-write enabled after recent changes

The issue was caused by original datablock being returned where we
were expecting copy-on-written one to be returned.

3 years agoDepsgraph: Add extra information to debug logging
Sergey Sharybin [Thu, 13 Jul 2017 11:02:13 +0000 (13:02 +0200)]
Depsgraph: Add extra information to debug logging

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 13 Jul 2017 11:24:02 +0000 (21:24 +1000)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Make it more explicit in naming what version of data getetrs returns
Sergey Sharybin [Thu, 13 Jul 2017 10:57:19 +0000 (12:57 +0200)]
Depsgraph: Make it more explicit in naming what version of data getetrs returns

3 years agoUse explicit scene_layer variable name for public API
Sergey Sharybin [Thu, 13 Jul 2017 10:51:35 +0000 (12:51 +0200)]
Use explicit scene_layer variable name for public API

3 years agoFix texture paint crash when painting onto stencil
Campbell Barton [Thu, 13 Jul 2017 10:48:55 +0000 (20:48 +1000)]
Fix texture paint crash when painting onto stencil

3 years agoEevee small cleanups
Dalai Felinto [Thu, 13 Jul 2017 10:04:30 +0000 (12:04 +0200)]
Eevee small cleanups

3 years agoEevee: Fix crash on eevee lamps and shadows
Dalai Felinto [Thu, 13 Jul 2017 10:04:05 +0000 (12:04 +0200)]
Eevee: Fix crash on eevee lamps and shadows

3 years agoCorrect error from texface removal
Campbell Barton [Thu, 13 Jul 2017 09:28:20 +0000 (19:28 +1000)]
Correct error from texface removal

Missed stencil layer

3 years agoAlways using full shading for eevee + sculpt mode
Campbell Barton [Thu, 13 Jul 2017 09:09:40 +0000 (19:09 +1000)]
Always using full shading for eevee + sculpt mode

Also disable for dyntopo & multires since its currently not supported.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 13 Jul 2017 07:21:11 +0000 (17:21 +1000)]
Merge branch 'master' into blender2.8

3 years agoRevert T44320: UV island overlap considered linked
Campbell Barton [Thu, 13 Jul 2017 04:32:04 +0000 (14:32 +1000)]
Revert T44320: UV island overlap considered linked

In the reported example it seemed reasonable to apply this change.
But it causes a much more common case (selecting projections)
to be split into 2x islands.

Resolves T50970

3 years agoFix T51100: Vertex pick fails after extrude
Campbell Barton [Thu, 13 Jul 2017 04:13:59 +0000 (14:13 +1000)]
Fix T51100: Vertex pick fails after extrude

3 years agoMerge branch 'master' of git@git.blender.org:blender.git into blender2.8
mano-wii [Wed, 12 Jul 2017 23:45:02 +0000 (20:45 -0300)]
Merge branch 'master' of git@git.blender.org:blender.git into blender2.8

3 years agoSnap System: remove unused function
mano-wii [Wed, 12 Jul 2017 23:43:28 +0000 (20:43 -0300)]
Snap System: remove unused function

3 years agoDwM: Option to use final material over mode shading
Campbell Barton [Wed, 12 Jul 2017 14:27:06 +0000 (00:27 +1000)]
DwM: Option to use final material over mode shading

Support using full material shading in sculpt & paint modes mode.

Access 'Full Shading' from the display panel when in paint modes.

3 years agoGawain: add GWN_vertbuf_clear
Campbell Barton [Wed, 12 Jul 2017 14:28:18 +0000 (00:28 +1000)]
Gawain: add GWN_vertbuf_clear

Needed to clear the buffer without freeing.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 12 Jul 2017 13:18:11 +0000 (23:18 +1000)]
Merge branch 'master' into blender2.8

3 years agoBMesh: move safe loop-normal-calc to own function
Campbell Barton [Wed, 12 Jul 2017 13:06:59 +0000 (23:06 +1000)]
BMesh: move safe loop-normal-calc to own function

This makes sense when we want to avoid float precision error
for near co-linear edges. OTOH, this is an arbitrary decision,
so keep functions separate.

3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Wed, 12 Jul 2017 09:49:43 +0000 (11:49 +0200)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Remove meaningless comment
Sergey Sharybin [Wed, 12 Jul 2017 09:08:51 +0000 (11:08 +0200)]
Depsgraph: Remove meaningless comment

We are already on the new depsgraph only for quite some time now.

3 years agoCycles: Enable SSS from Principled BSDF only when actually in use
Mai Lavelle [Wed, 12 Jul 2017 08:36:46 +0000 (04:36 -0400)]
Cycles: Enable SSS from Principled BSDF only when actually in use

This gives speed up for the split kernel in scenes using the principled BSDF
but without subsurface scattering.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 12 Jul 2017 03:59:13 +0000 (13:59 +1000)]
Merge branch 'master' into blender2.8

3 years agoCleanup: unused vars
Campbell Barton [Wed, 12 Jul 2017 03:54:20 +0000 (13:54 +1000)]
Cleanup: unused vars

3 years agoCycles: Fix comparison in principled BSDF
Mai Lavelle [Wed, 12 Jul 2017 03:41:22 +0000 (23:41 -0400)]
Cycles: Fix comparison in principled BSDF

Could have lead to black pixels.

3 years agoFix T52027: OSL getattribute() crash, when optimizer calls it before rendering.
Brecht Van Lommel [Tue, 11 Jul 2017 20:39:51 +0000 (22:39 +0200)]
Fix T52027: OSL getattribute() crash, when optimizer calls it before rendering.

3 years agoMerge branch 'master' of git@git.blender.org:blender.git into blender2.8
mano-wii [Tue, 11 Jul 2017 20:06:43 +0000 (17:06 -0300)]
Merge branch 'master' of git@git.blender.org:blender.git into blender2.8

3 years agoFix [T51595]: Snap to edge does not work with high zoom level
mano-wii [Tue, 11 Jul 2017 20:03:49 +0000 (17:03 -0300)]
Fix [T51595]: Snap to edge does not work with high zoom level

That problem occurs because of the imprecision of `short int` (16 bits).
The 3d coordinates are converted to 2d, and when they are off the screen, their values can exceed 32767! (max short int value)

One quick solution is to use float instead of short

The snap code is actually a little tricky. I want to make some arithmetic simplifications in it

3 years agoEevee: Transparency: Fix crash when using transparent shadows.
Clément Foucault [Tue, 11 Jul 2017 19:52:02 +0000 (21:52 +0200)]
Eevee: Transparency: Fix crash when using transparent shadows.

Fixes T52024

3 years agoMerge branch 'master' of git@git.blender.org:blender.git into blender2.8
mano-wii [Tue, 11 Jul 2017 17:24:32 +0000 (14:24 -0300)]
Merge branch 'master' of git@git.blender.org:blender.git into blender2.8

3 years agoStyle (remove characters that caused "a binary file")
mano-wii [Tue, 11 Jul 2017 17:22:07 +0000 (14:22 -0300)]
Style (remove characters that caused "a binary file")

3 years agoMerge branch 'master' of git@git.blender.org:blender.git into blender2.8
mano-wii [Tue, 11 Jul 2017 16:54:08 +0000 (13:54 -0300)]
Merge branch 'master' of git@git.blender.org:blender.git into blender2.8

# Conflicts:
# source/blender/editors/transform/transform_snap_object.c

3 years agoSnap System: Separate raycast functions from nearest2d functions
mano-wii [Tue, 11 Jul 2017 16:47:28 +0000 (13:47 -0300)]
Snap System: Separate raycast functions from nearest2d functions

The only similarity between these functions is that both serve to snap.
However their codes are totally different from one another.
So by separating these functions, it:
- removes the need to put several conditions;
- simplifies and
- optimizes the code

3 years agoAvoid any possibility of using scene from different main in CTX_data_scene_layer
Sergey Sharybin [Tue, 11 Jul 2017 14:40:18 +0000 (16:40 +0200)]
Avoid any possibility of using scene from different main in CTX_data_scene_layer

While these functions might be considered a temporary solution, please still be
very accurate about data ownership and where data is coming from.

3 years agoAlembic: Adjusted unittest for Blender 2.8
Sybren A. Stüvel [Tue, 11 Jul 2017 14:28:52 +0000 (16:28 +0200)]
Alembic: Adjusted unittest for Blender 2.8

3 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Tue, 11 Jul 2017 14:18:17 +0000 (16:18 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix T52022 Alembic Inherits transform not taken into account
Sybren A. Stüvel [Tue, 11 Jul 2017 14:16:56 +0000 (16:16 +0200)]
Fix T52022 Alembic Inherits transform not taken into account

Alembic's "inherits transform" flag wasn't taken into account when
constructing the parent object relations.

3 years agoRNA/UI: Always use capitalized words in the UI
Dalai Felinto [Tue, 11 Jul 2017 13:46:15 +0000 (15:46 +0200)]
RNA/UI: Always use capitalized words in the UI

3 years agoA bunch of fixes for Pose Library while checking on T51607
Joshua Leung [Tue, 11 Jul 2017 13:33:08 +0000 (01:33 +1200)]
A bunch of fixes for Pose Library while checking on T51607

* Display a warning above the pose list if the pose library is in an invalid
  state (i.e. when it has keyframes but no pose-markers associated with those
  keyframes). This warning prompts users to run the "Sanitize Pose Library Action"
  operator, which should fix up such issues.

* "Sanitize" operator now creates unique names for each newly create pose
  marker it generates, including the frame on which it found the pose

3 years agoFix: Accidentally left debug print in last commit
Joshua Leung [Tue, 11 Jul 2017 11:39:35 +0000 (23:39 +1200)]
Fix: Accidentally left debug print in last commit

3 years agoFix T52009: F-Curve "Stepped interpolation" modifier "restrict frame-range" IN and...
Joshua Leung [Tue, 11 Jul 2017 06:07:11 +0000 (18:07 +1200)]
Fix T52009: F-Curve "Stepped interpolation" modifier "restrict frame-range" IN and OUT parameters cannot be edited

The problem here was that the "frame_start" and "frame_end" RNA properties of
the Stepped FModifier were shadowing/overriding "frame_start" and "frame_end"
properties of the base FModifier. As a result, when the range() callback
for the In/Out parameters (defined as part of the base FModifier) checked
it's start/end properties, they were always still zero, meaning that the
acceptable range for the In/Out parameters was 0 -> 0 = 0.

Note:
If you've got old files with this problem, you'll need to manually click on
the frame_start/end properties to flush out the old values. It's probably
not worth the effort of applying a version patch for this (given that this
modifier is not one of the most often used ones AFAIK).

3 years agoFix T51879: NLA Influence can not be autokeyed
Joshua Leung [Tue, 4 Jul 2017 03:35:27 +0000 (15:35 +1200)]
Fix T51879: NLA Influence can not be autokeyed

As with Strip Time, the updates here would get triggered before the
autokeying had a chance to record the unkeyed values, making it impossible
to autokey.

3 years agoTemporary fix for crash related to VBO update on shader change
Luca Rood [Tue, 11 Jul 2017 10:52:04 +0000 (12:52 +0200)]
Temporary fix for crash related to VBO update on shader change

This frees the whole mesh batch cache, instead of only the required
parts, as freeing specific parts of a cache is currently causing
crashes.

3 years agoEevee: Add failsafe check in shadow material.
Clément Foucault [Tue, 11 Jul 2017 10:42:59 +0000 (12:42 +0200)]
Eevee: Add failsafe check in shadow material.

3 years agoEevee: Transparency: Add transparent Shadow method UI.
Clément Foucault [Tue, 11 Jul 2017 10:39:20 +0000 (12:39 +0200)]
Eevee: Transparency: Add transparent Shadow method UI.

3 years agoEevee: Fix default closure to match cycles.
Clément Foucault [Mon, 10 Jul 2017 23:11:25 +0000 (01:11 +0200)]
Eevee: Fix default closure to match cycles.

3 years agoEevee: Transparency: Add support for Clip and Stochastic shadows.
Clément Foucault [Mon, 10 Jul 2017 23:10:57 +0000 (01:10 +0200)]
Eevee: Transparency: Add support for Clip and Stochastic shadows.

3 years agoEevee: Transparency: Add hide backside option.
Clément Foucault [Mon, 10 Jul 2017 16:34:33 +0000 (18:34 +0200)]
Eevee: Transparency: Add hide backside option.

3 years agoEevee: Transparency: Add object center Z sorting.
Clément Foucault [Mon, 10 Jul 2017 12:45:19 +0000 (14:45 +0200)]
Eevee: Transparency: Add object center Z sorting.

Better algo should take bounding box center, but it's not referenced yet in the draw call and cannot be tweaked by user.

3 years agoEevee: Transparency: Add Alpha Blend mode.
Clément Foucault [Mon, 10 Jul 2017 12:42:43 +0000 (14:42 +0200)]
Eevee: Transparency: Add Alpha Blend mode.

3 years agoDRW: Make Additive blending alpha premult.
Clément Foucault [Mon, 10 Jul 2017 09:42:24 +0000 (11:42 +0200)]
DRW: Make Additive blending alpha premult.

3 years agoEevee: Transparency: Add support for blend ADD and MULTIPLY.
Clément Foucault [Mon, 10 Jul 2017 09:41:33 +0000 (11:41 +0200)]
Eevee: Transparency: Add support for blend ADD and MULTIPLY.

This introduces a new transparency pass.
It bypass the radial distance encoding in alpha for the transparent shaders.

3 years agoDRW: Add shading group state disable.
Clément Foucault [Mon, 10 Jul 2017 09:26:16 +0000 (11:26 +0200)]
DRW: Add shading group state disable.

This is a way to remove some state flag per Shading Group.

3 years agoEevee: Material: Code cleanup in order to add transparency support.
Clément Foucault [Sun, 9 Jul 2017 15:50:39 +0000 (17:50 +0200)]
Eevee: Material: Code cleanup in order to add transparency support.

3 years agoEevee: Add support for Alpha clip and Hashed Alpha transparency.
Clément Foucault [Sun, 9 Jul 2017 10:01:29 +0000 (12:01 +0200)]
Eevee: Add support for Alpha clip and Hashed Alpha transparency.

Hashed Alpha transparency offers a noisy output but has the benefit of being correctly ordered. Noise can be attenuated with Multisampling / AntiAliasing.

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Tue, 11 Jul 2017 10:30:30 +0000 (12:30 +0200)]
Merge branch 'master' into blender2.8

3 years agoCycles: Disable OpenCL clFlush workarounds
Sergey Sharybin [Tue, 11 Jul 2017 10:16:58 +0000 (12:16 +0200)]
Cycles: Disable OpenCL clFlush workarounds

This is something which was reported to work fine by Mai, Benjamin and
confirmed by myself. Disabling this workaround gains us some speedup:

                      Before           Now
bmw27                04:28.42        04:07.79
classroom            09:26.48        08:54.53
fishy_cat            08:44.01        08:18.70
koro                 09:17.98        08:57.18
pavillon_barcelone   12:26.64        11:52.81

Test environment is:
- Ubuntu 16.04, with all updates installed
- AMD RX 480 GPU
- amdgpu pro driver version 17.10-450821

3 years agoTheme Flatty Light
Pablo Vazquez [Tue, 11 Jul 2017 09:17:36 +0000 (11:17 +0200)]
Theme Flatty Light

Color GraphEditor tabs, brighter 3D viewport gradient

3 years agoFix memory leak caused by node clipboard
Sergey Sharybin [Tue, 11 Jul 2017 09:06:36 +0000 (11:06 +0200)]
Fix memory leak caused by node clipboard

The issue was caused by combination of following factors:

- Clipboard cleanup function will pass node tree as NULL to node free
  function.

  This is fine on it's own, we don't have tree in clipboard.

- Node free function will call node storage cleanup only when there is
  a non-NULL node tree.

  This is somewhat weird, because storage cleanup does not take node
  tree as argument.

So the solution here: move node storage cleanup outside of check that
node tree is not NULL.

3 years agoOpensubdiv: Fix compilation error with older Opensubdiv versions
Sergey Sharybin [Tue, 11 Jul 2017 09:05:21 +0000 (11:05 +0200)]
Opensubdiv: Fix compilation error with older Opensubdiv versions

3 years agoFix T49034: multi-drag crashes when UI forces exit
Campbell Barton [Tue, 11 Jul 2017 09:07:37 +0000 (19:07 +1000)]
Fix T49034: multi-drag crashes when UI forces exit

3 years agoLamps should not have their own gpu material
Dalai Felinto [Tue, 11 Jul 2017 09:00:46 +0000 (11:00 +0200)]
Lamps should not have their own gpu material

This was leading to multiple crashes when freeing the lamps or
materials when opening old files.

Follow up on b50839038d6b3d2.

3 years agoResolve T51745: Mesh extrude keep-orig needs edges
Campbell Barton [Tue, 11 Jul 2017 04:48:55 +0000 (14:48 +1000)]
Resolve T51745: Mesh extrude keep-orig needs edges

Document to avoid confusion when called from Python.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 11 Jul 2017 04:21:05 +0000 (14:21 +1000)]
Merge branch 'master' into blender2.8

3 years agoFix T51761: wpaint select depth limit fails
Campbell Barton [Tue, 11 Jul 2017 04:05:59 +0000 (14:05 +1000)]
Fix T51761: wpaint select depth limit fails

Limit select fails with circle and border select.

Regression in 2.76