blender.git
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

3 years agoFix (unreported) broken uvsculpt in Scene's toolsettings' copying.
Bastien Montagne [Mon, 10 Jul 2017 19:16:48 +0000 (21:16 +0200)]
Fix (unreported) broken uvsculpt in Scene's toolsettings' copying.

This was serious bug actually, probably a crasher in case you free
original or copy after duplication...

3 years agoFix (unreported) Scene's copying toolsettings' clone and canvas, and particles' scene...
Bastien Montagne [Mon, 10 Jul 2017 19:12:42 +0000 (21:12 +0200)]
Fix (unreported) Scene's copying toolsettings' clone and canvas, and particles' scene and object pointers.

imapaint's clone and canvas are refcounting Image usages.

And particle's editsettings' object and scene seem to be pure runtime
data (they are reset to NULL in readcode), so resetting them to NULL
here as well.

3 years agoFix strict compiler warning
Sergey Sharybin [Mon, 10 Jul 2017 15:43:27 +0000 (17:43 +0200)]
Fix strict compiler warning

3 years agoRevert "Revert "Revert "Temporarily disable material preview (T51796 workaround)"""
Sergey Sharybin [Mon, 10 Jul 2017 14:49:04 +0000 (16:49 +0200)]
Revert "Revert "Revert "Temporarily disable material preview (T51796 workaround)"""

This reverts commit 6df053e527b2808767f3a3417e1e7d683b979149.

3 years agoDepsgraph: Use explicit bmain pointer passed to layer utilities
Sergey Sharybin [Mon, 10 Jul 2017 14:47:12 +0000 (16:47 +0200)]
Depsgraph: Use explicit bmain pointer passed to layer utilities

it is not necessarily that depsgraph is built from G.bmain.

This will solve issue reported in T51782.

3 years agoDepsgraph: Fix wrong layer used
Sergey Sharybin [Mon, 10 Jul 2017 13:45:06 +0000 (15:45 +0200)]
Depsgraph: Fix wrong layer used

Should be context, not render active one here.

3 years agoRevert "Revert "Temporarily disable material preview (T51796 workaround)""
Sergey Sharybin [Mon, 10 Jul 2017 13:43:04 +0000 (15:43 +0200)]
Revert "Revert "Temporarily disable material preview (T51796 workaround)""

The "fix" happened due to a mistake in copy-on-write commit, that mistake solved
preview render but broke something else.

This reverts commit 45720922f7b927865b9b63f31c9d2a0b3d4b753e.

3 years agoFix (unreported) Scene copying doing very stupid things with World and LineStyle...
Bastien Montagne [Mon, 10 Jul 2017 13:10:17 +0000 (15:10 +0200)]
Fix (unreported) Scene copying doing very stupid things with World and LineStyle usercounts.

Really, really, really need to get rid of this usercount handling
everywhere, hopefully incomming ID copying rewrite will help sanitize
that mess. But fix was needed for 2.79 release!

3 years agoFix T51931: VBO not updating when UVs are added to shader node tree
Luca Rood [Mon, 10 Jul 2017 12:43:57 +0000 (14:43 +0200)]
Fix T51931: VBO not updating when UVs are added to shader node tree

UVs need specific data in the VBO, which is not computed unless the
shaders assigned to the mesh actually use UVs. When adding UVs to the
shader, the VBOs were not being recomputed to include the required data.

This adds a DEG relation between the shader and the mesh, and recomputes
the required data if the shader changed.

Thanks Sergey, for all the DEG stuff...

3 years agoPartial fix of T51989: Don't set image user offset for movie files
Sergey Sharybin [Mon, 10 Jul 2017 12:22:33 +0000 (14:22 +0200)]
Partial fix of T51989: Don't set image user offset for movie files

While this is handy for image sequences, it's totally meaningless for movie files.

3 years agoFix T52011: Border render is incorrect with multiple scenes
Sergey Sharybin [Mon, 10 Jul 2017 10:17:13 +0000 (12:17 +0200)]
Fix T52011: Border render is incorrect with multiple scenes

The code was somewhat weird: it was first copying border/crop settings from
the "source" scene, then was checking border settings of the current scene
and only then was copying border from "source" scene.

Now we first copy border/crop flags, then copy border from source and then
check whether border is a full-frame.

3 years agoFix image empties not drawing
Luca Rood [Mon, 10 Jul 2017 09:36:16 +0000 (11:36 +0200)]
Fix image empties not drawing

A pointer to the uniform data for the empty drawing was being freed
before the actual draw call, which invalidates the uniform.

This makes the data only be freed after drawing.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 10 Jul 2017 07:48:57 +0000 (17:48 +1000)]
Merge branch 'master' into blender2.8

3 years agoError in last commit
Campbell Barton [Mon, 10 Jul 2017 07:44:49 +0000 (17:44 +1000)]
Error in last commit

3 years agoFix T51998: Anim player uses 100% CPU
Campbell Barton [Mon, 10 Jul 2017 07:37:00 +0000 (17:37 +1000)]
Fix T51998: Anim player uses 100% CPU

The loop running with no events didn't sleep.
Now wait for events when paused.

3 years agoFix T51052: CacheFile Open crashes from Python
Campbell Barton [Mon, 10 Jul 2017 07:06:25 +0000 (17:06 +1000)]
Fix T51052: CacheFile Open crashes from Python

Note that bpy.data access makes more sense here,
but better not crash when called from Python.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 10 Jul 2017 06:35:56 +0000 (16:35 +1000)]
Merge branch 'master' into blender2.8

3 years agoCurve: add assert for invalid next/prev use
Campbell Barton [Mon, 10 Jul 2017 06:27:15 +0000 (16:27 +1000)]
Curve: add assert for invalid next/prev use

3 years agoFix T51665: No orientation for nurbs, polygons
Campbell Barton [Mon, 10 Jul 2017 04:37:20 +0000 (14:37 +1000)]
Fix T51665: No orientation for nurbs, polygons

3 years agoFix T52007: Cancel bezier curve transform fails
Campbell Barton [Mon, 10 Jul 2017 03:38:28 +0000 (13:38 +1000)]
Fix T52007: Cancel bezier curve transform fails

Auto & aligned handles wouldn't restore to their correct locations.

Note that a more direct fix for the bug is possible
(storing the handle locations to restore on cancel).

But that still gives some odd behavior, see code-comments for details.

3 years agoFix T51898: missing sequence strip color space validation on load.
Brecht Van Lommel [Sun, 9 Jul 2017 23:03:20 +0000 (01:03 +0200)]
Fix T51898: missing sequence strip color space validation on load.

3 years agoFix blenderplayer
Dalai Felinto [Sun, 9 Jul 2017 17:53:33 +0000 (19:53 +0200)]
Fix blenderplayer

3 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Sat, 8 Jul 2017 21:45:36 +0000 (23:45 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix T52001: material draw mode principled BSDF artifacts at some angles.
Brecht Van Lommel [Sat, 8 Jul 2017 21:37:16 +0000 (23:37 +0200)]
Fix T52001: material draw mode principled BSDF artifacts at some angles.

The default anisotropic tangent computation could fail in some cases,
leading to NaNs and artifacts. Use a simpler formulation that doesn't
suffer from this.

3 years agoFix T51959: Windows + Intel GPU offset between UI drawing and mouse.
Brecht Van Lommel [Sat, 8 Jul 2017 20:08:38 +0000 (22:08 +0200)]
Fix T51959: Windows + Intel GPU offset between UI drawing and mouse.

Unfortunately this means disabling the code that ensures the title
bar is properly scaled with DPI, however better to have that as a
cosmetic issue than Blender being unusable with a lot of Intel GPUs.

3 years agoGawain: Add support for compressed index with instancing.
Clément Foucault [Sat, 8 Jul 2017 16:19:12 +0000 (18:19 +0200)]
Gawain: Add support for compressed index with instancing.

3 years agoFix T51967: OSL crash after rendering finished (mainly on Windows).
Brecht Van Lommel [Sat, 8 Jul 2017 00:46:06 +0000 (02:46 +0200)]
Fix T51967: OSL crash after rendering finished (mainly on Windows).

3 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Sat, 8 Jul 2017 00:08:41 +0000 (02:08 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix build after previous commit.
Brecht Van Lommel [Sat, 8 Jul 2017 00:07:39 +0000 (02:07 +0200)]
Fix build after previous commit.

3 years agoCycles: recognize Eevee material output.
Brecht Van Lommel [Fri, 7 Jul 2017 23:14:50 +0000 (01:14 +0200)]
Cycles: recognize Eevee material output.

3 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Fri, 7 Jul 2017 23:02:11 +0000 (01:02 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix T51889: new file or load factory settings results in broken UI.
Brecht Van Lommel [Fri, 7 Jul 2017 22:44:31 +0000 (00:44 +0200)]
Fix T51889: new file or load factory settings results in broken UI.

Fix some cases that still assumed there to be a global DPI, instead of a per
window DPI that needs to be set before reading U.dpi.

3 years agoFix T51977: New depsgraph removes the grass in victor scene
Sergey Sharybin [Fri, 7 Jul 2017 14:38:56 +0000 (16:38 +0200)]
Fix T51977: New depsgraph removes the grass in victor scene

For now just make new depsgraph do similar updates to the old one.

See bug report for more detailed information about what was going on.

3 years agoFix T51991: Disabled for viewport particle system becomes visible after BI render
Sergey Sharybin [Fri, 7 Jul 2017 14:13:50 +0000 (16:13 +0200)]
Fix T51991: Disabled for viewport particle system becomes visible after BI render

Move check for psys render data before it is actually requested for creation.

3 years agoGPU: Silence warning of potentially unused variable (NormalMatrix)
Dalai Felinto [Fri, 7 Jul 2017 13:09:03 +0000 (15:09 +0200)]
GPU: Silence warning of potentially unused variable (NormalMatrix)

3 years agoDraw Manager: Use defines instead of hardcoded enum values
Dalai Felinto [Fri, 7 Jul 2017 10:33:17 +0000 (12:33 +0200)]
Draw Manager: Use defines instead of hardcoded enum values

3 years agoFix T50973: Directional blur node doesn't clamp value if using driver
Sergey Sharybin [Fri, 7 Jul 2017 10:08:14 +0000 (12:08 +0200)]
Fix T50973: Directional blur node doesn't clamp value if using driver

The issue was caused by combination of following factors:

- Blender Internal viewport render can not distinguish between which parts of
  main database changed, so it does full database re-sync when anything is
  tagged for an update.

  This way, if any NodeTree (including compositor) is changed, Blender Internal
  viewport is tagged for full render database update.

- With old dependency graph, scene-level drivers are evaluated on every
  iteration of scene_update_tagged, even if nothing is tagged for an update.

  This causes compositor drivers be evaluated quite often.

- Driver evaluation checks whether value was changed, and if so it tags
  corresponding ID type as updated (this is what was telling viewport to do
  render database update).

  This check was quite stupid: current property value was checked against the
  one coming from driver expression. This means, if driver value is outside
  of the hard limit range of the property, the property will always be
  considered updated.

The fix is to compare current property value against clamped value from the
driver.

3 years agoEevee: Show the metadata and output panel when eevee is selected as a render engine
Thomas Beck [Fri, 7 Jul 2017 09:56:31 +0000 (11:56 +0200)]
Eevee: Show the metadata and output panel when eevee is selected as a render engine

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.