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

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
f5535fcb83fd7c1374697923b43565c9e303d225

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: https://developer.blender.org/D2719

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: https://developer.blender.org/D2709

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: https://developer.blender.org/D2458

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

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.

3 years agoFix T51118: Outliner crash when unlinking collection
Luca Rood [Fri, 30 Jun 2017 10:32:18 +0000 (12:32 +0200)]
Fix T51118: Outliner crash when unlinking collection

The outliner tree was not being rebuilt after unlinking a collection,
and thus a dangling pointer to the collection was kept in the tree.

3 years agoDwM: Use GWN_vertbuf_raw_* access for shading data
Campbell Barton [Fri, 30 Jun 2017 08:01:20 +0000 (18:01 +1000)]
DwM: Use GWN_vertbuf_raw_* access for shading data

Gives approx 14% speedup here.

3 years agoFix T51919: Tangents need UV's allocated
Campbell Barton [Fri, 30 Jun 2017 07:48:18 +0000 (17:48 +1000)]
Fix T51919: Tangents need UV's allocated

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 30 Jun 2017 03:46:53 +0000 (13:46 +1000)]
Merge branch 'master' into blender2.8

3 years agoCycles: Use float constants instead of double
Mai Lavelle [Fri, 30 Jun 2017 02:52:31 +0000 (22:52 -0400)]
Cycles: Use float constants instead of double

3 years agoCycles: Disable baking in mega kernel when not in use to improve build times
Mai Lavelle [Fri, 30 Jun 2017 02:50:00 +0000 (22:50 -0400)]
Cycles: Disable baking in mega kernel when not in use to improve build times

3 years agoFix T50887: Holes in fluid mesh on Windows
Campbell Barton [Fri, 30 Jun 2017 01:30:15 +0000 (11:30 +1000)]
Fix T50887: Holes in fluid mesh on Windows

D2556 by @chrisr

3 years agoFix unpredictable trackball rotation
Campbell Barton [Fri, 30 Jun 2017 00:33:42 +0000 (10:33 +1000)]
Fix unpredictable trackball rotation

D2729 by @IgorNull

Currently, trackball rotation sequentially applies rotation across x axis and y axis,
which produces a strange/unusable result on diagonal pointer motion.

This change fixes the problem by using a single axis which is orthogonal
and proportional to mouse delta - matching view-port trackball.

3 years agoWorkaround T51934: Array's > SHRT_MAX aren't supported
Campbell Barton [Fri, 30 Jun 2017 00:04:32 +0000 (10:04 +1000)]
Workaround T51934: Array's > SHRT_MAX aren't supported

3 years agoEevee: Fix broken default coordinate (reported via IRC by Dalai Felinto).
Clément Foucault [Thu, 29 Jun 2017 18:22:52 +0000 (20:22 +0200)]
Eevee: Fix broken default coordinate (reported via IRC by Dalai Felinto).

3 years agoNo need to free all the shaders when appending or reloading libraries
Dalai Felinto [Thu, 29 Jun 2017 17:05:26 +0000 (19:05 +0200)]
No need to free all the shaders when appending or reloading libraries

To recompile all the shaders is expensive. And something to be avoided at all costs.

It was needed before because for every new lamp in the file we needed to
recompile the shaders. Now this is no longer required since we are using
UBOs for the sahders.

3 years agoEevee: No need to free all the gpu materials when world changes.
Dalai Felinto [Thu, 29 Jun 2017 16:56:38 +0000 (18:56 +0200)]
Eevee: No need to free all the gpu materials when world changes.

We have a world probe that is used to prevent exactly that.

3 years agoFix hair shading after Eevee shader refactor
Luca Rood [Thu, 29 Jun 2017 16:45:11 +0000 (18:45 +0200)]
Fix hair shading after Eevee shader refactor

3 years agoEevee: Fix world probe with world without nodetree.
Clément Foucault [Thu, 29 Jun 2017 15:32:13 +0000 (17:32 +0200)]
Eevee: Fix world probe with world without nodetree.

3 years agoEevee: Remove Geometry shader usage for background.
Clément Foucault [Thu, 29 Jun 2017 15:07:41 +0000 (17:07 +0200)]
Eevee: Remove Geometry shader usage for background.

This fix the behaviour of the light path node that separates the probes background from the viewport background.

3 years agoEevee: Fix T51922: Avoid division by 0.
Clément Foucault [Thu, 29 Jun 2017 15:06:09 +0000 (17:06 +0200)]
Eevee: Fix T51922: Avoid division by 0.

Problem was caused by a division by 0 when rendering the probes. This patch make the visibility equal to 1.0 in this case.

3 years agoEevee: Prepare support for future Anisotropic shading.
Clément Foucault [Thu, 29 Jun 2017 13:49:51 +0000 (15:49 +0200)]
Eevee: Prepare support for future Anisotropic shading.

3 years agomaterial Glsl: Fix tangent with new orco.
Clément Foucault [Thu, 29 Jun 2017 13:49:20 +0000 (15:49 +0200)]
material Glsl: Fix tangent with new orco.

3 years agoRemove dupli-group support for non-empty objects
Campbell Barton [Thu, 29 Jun 2017 13:22:05 +0000 (23:22 +1000)]
Remove dupli-group support for non-empty objects

Behavior for mixing object-data & dupli data was confusing,
exporters and render engines often got it wrong.

3 years agoFix warnings in draw_cache_impl files
Luca Rood [Thu, 29 Jun 2017 13:46:00 +0000 (15:46 +0200)]
Fix warnings in draw_cache_impl files

3 years agoFix T51890: Turning off viewport display for array modifier is blocking dupliface...
Bastien Montagne [Thu, 29 Jun 2017 13:44:00 +0000 (15:44 +0200)]
Fix T51890: Turning off viewport display for array modifier is blocking dupliface in final render

DupliVert/Face were not using render DM at render time.

3 years agoFix T51821: Viewport not updating when switching worlds
Luca Rood [Thu, 29 Jun 2017 12:48:43 +0000 (14:48 +0200)]
Fix T51821: Viewport not updating when switching worlds

3 years agoFix error getting the tangent layer name
Campbell Barton [Thu, 29 Jun 2017 11:22:34 +0000 (21:22 +1000)]
Fix error getting the tangent layer name

3 years agoFix world not updating when changing node links
Luca Rood [Thu, 29 Jun 2017 10:24:05 +0000 (12:24 +0200)]
Fix world not updating when changing node links

When changing node links for the world material, a redraw of the
viewport was not being triggered.

3 years agoMissing from last commit
Campbell Barton [Thu, 29 Jun 2017 10:33:24 +0000 (20:33 +1000)]
Missing from last commit

3 years agoDwM: optimize mesh batch conversion
Campbell Barton [Thu, 29 Jun 2017 10:11:16 +0000 (20:11 +1000)]
DwM: optimize mesh batch conversion

- Replace GWN_vertbuf_attr_set with Gwn_VertBufRaw & GWN_vertbuf_raw_step
  to avoid intermediate copy.
- Avoid extra conversion step with: float[3] -> short[3] -> Gwn_PackedNormal.
  We can skip the short[3].

Gives approx 6% speedup here.

3 years agoGawain: add method of stepping over data directly
Campbell Barton [Thu, 29 Jun 2017 10:09:05 +0000 (20:09 +1000)]
Gawain: add method of stepping over data directly

This avoids using GWN_vertbuf_attr_set which needs to calculate the
offset and perform a memcpy every call.

Exposing the data directly allows us to avoid a memcpy in some cases
and means we can write to the vertex buffer's memory directly.

3 years agoGawain: Use common prefix for packed normal
Campbell Barton [Thu, 29 Jun 2017 08:52:39 +0000 (18:52 +1000)]
Gawain: Use common prefix for packed normal

3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Thu, 29 Jun 2017 08:11:17 +0000 (10:11 +0200)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/editors/space_outliner/outliner_select.c

3 years agoFix T51926: Selecting pose icon under expanded group in outliner causes crash.
Bastien Montagne [Thu, 29 Jun 2017 08:09:17 +0000 (10:09 +0200)]
Fix T51926: Selecting pose icon under expanded group in outliner causes crash.

Cannot switch uninstantiated armature to Pose mode...

3 years agoDwM: no need to calculate face normal
Campbell Barton [Thu, 29 Jun 2017 05:52:08 +0000 (15:52 +1000)]
DwM: no need to calculate face normal

3 years agoCleanup: quiet negative shift warning
Campbell Barton [Thu, 29 Jun 2017 05:34:50 +0000 (15:34 +1000)]
Cleanup: quiet negative shift warning

3 years agoDwM: add CD_AUTO_FROM_NAME for mesh conversion
Campbell Barton [Thu, 29 Jun 2017 05:23:47 +0000 (15:23 +1000)]
DwM: add CD_AUTO_FROM_NAME for mesh conversion

3 years agoFix crash & performance regression w/ base lookup
Campbell Barton [Thu, 29 Jun 2017 02:04:43 +0000 (12:04 +1000)]
Fix crash & performance regression w/ base lookup

Was doing O(n^2) list lookups with blender-render drawing & transform.
Also missing NULL checks would crash.

Use Object.base_flag (already used by new draw manager in places)
to avoid list lookup.

Note, transform still performs inefficient lookups,
but only for selected parents (like 2.7x), not all parents.

3 years agoEevee: Add Initial support for Principle BRDF.
Clément Foucault [Wed, 28 Jun 2017 23:22:23 +0000 (01:22 +0200)]
Eevee: Add Initial support for Principle BRDF.

Lots of things not working yet but it's comming.

3 years agoEevee: Remove ShadingData struct.
Clément Foucault [Wed, 28 Jun 2017 23:20:35 +0000 (01:20 +0200)]
Eevee: Remove ShadingData struct.

That was a bad idea after all.

3 years agoFix assert calculating tangents with no faces
Campbell Barton [Wed, 28 Jun 2017 10:59:49 +0000 (20:59 +1000)]
Fix assert calculating tangents with no faces

3 years agoGPUTexture : Un-clamp float rect datas.
Clément Foucault [Wed, 28 Jun 2017 20:24:19 +0000 (22:24 +0200)]
GPUTexture : Un-clamp float rect datas.

We do not need it anymore because we do not use glu anymore. And we need full range for HDRI Lighting.

3 years agoFix T51909: Cycles: Uninitialized closure normals for the Hair BSDF
Lukas Stockner [Wed, 28 Jun 2017 19:25:30 +0000 (21:25 +0200)]
Fix T51909: Cycles: Uninitialized closure normals for the Hair BSDF

As the title says, the normal wasn't set for the Hair BSDF because it wasn't
needed before. However, the denoiser uses it to store the feature passes, so
it needs to be set now.

3 years agoGPU_codegen: Fix geometry shader.
Clément Foucault [Wed, 28 Jun 2017 19:28:24 +0000 (21:28 +0200)]
GPU_codegen: Fix geometry shader.

3 years agoGPU_codegen: Add support for passing attributes through the geometry stage.
Clément Foucault [Wed, 28 Jun 2017 19:05:43 +0000 (21:05 +0200)]
GPU_codegen: Add support for passing attributes through the geometry stage.

Should fix some issues with missing attributes in Eevee.

3 years agoFix node UI not using translation context correctly.
Bastien Montagne [Wed, 28 Jun 2017 18:50:21 +0000 (20:50 +0200)]
Fix node UI not using translation context correctly.

Now that some node types may have custom context, we need to handle that
in the (convoluted :| ) UI code of nodes as well.

Reported in T43295 by Gabriel Gazzán (@gab3d), thanks.

3 years agoEevee: Fix shader linking error.
Clément Foucault [Wed, 28 Jun 2017 16:28:52 +0000 (18:28 +0200)]
Eevee: Fix shader linking error.

3 years agoEevee: Fix Shadow Map bug: fix T51924
Clément Foucault [Wed, 28 Jun 2017 15:21:57 +0000 (17:21 +0200)]
Eevee: Fix Shadow Map bug: fix T51924

3 years agoEevee: Fix Shader compilation on certain driver.
Clément Foucault [Wed, 28 Jun 2017 14:51:31 +0000 (16:51 +0200)]
Eevee: Fix Shader compilation on certain driver.

3 years agoProbe: Irradiance Volume: Fix default clip start.
Clément Foucault [Wed, 28 Jun 2017 14:31:53 +0000 (16:31 +0200)]
Probe: Irradiance Volume: Fix default clip start.

3 years agoEevee: Refactor of shading code to be more modular.
Clément Foucault [Wed, 28 Jun 2017 14:31:25 +0000 (16:31 +0200)]
Eevee: Refactor of shading code to be more modular.

This will enable creating shading models more easily.

3 years agoFix T51920: Invalidate draw cache when changing object origin
Luca Rood [Wed, 28 Jun 2017 12:58:25 +0000 (14:58 +0200)]
Fix T51920: Invalidate draw cache when changing object origin

3 years agoFix own really stupid mistake/typo in previous commit...
Bastien Montagne [Wed, 28 Jun 2017 11:21:04 +0000 (13:21 +0200)]
Fix own really stupid mistake/typo in previous commit...

3 years agoFix T51900: Crash after pressing "F" multiple times.
Bastien Montagne [Wed, 28 Jun 2017 08:53:52 +0000 (10:53 +0200)]
Fix T51900: Crash after pressing "F" multiple times.

`BMO_iter_as_array()` may fill less items than requested in given array,
so we have to update number of items to work on from its returned value,
otherwise code might try to use uninitialized memory.

3 years agoDwM: mesh data now only creates data thats used
Campbell Barton [Wed, 28 Jun 2017 03:38:24 +0000 (13:38 +1000)]
DwM: mesh data now only creates data thats used

Read from the GPUMaterial to find custom-data layers used for drawing.

This resolves problem where having UV's would always calculate tangents
causing noticeable slow down compared to 2.7x.

3 years agoDwM: create eevee materials before the mesh
Campbell Barton [Wed, 28 Jun 2017 03:33:55 +0000 (13:33 +1000)]
DwM: create eevee materials before the mesh

To know which custom-data layers will be needed in the mesh.

No functional change yet.

3 years agoDWM: Fix own error checking wrong layer type
Campbell Barton [Wed, 28 Jun 2017 01:39:05 +0000 (11:39 +1000)]
DWM: Fix own error checking wrong layer type

Would calculate all tangents for every UV layer.

3 years agoGPU: split GPU_material_from_nodetree in two
Campbell Barton [Wed, 28 Jun 2017 00:50:33 +0000 (10:50 +1000)]
GPU: split GPU_material_from_nodetree in two

Add GPU_material_from_nodetree_find to avoid having to construct other
arguments which won't be used in the case the material is exists.

3 years agoFix own error removing texface
Campbell Barton [Wed, 28 Jun 2017 00:23:27 +0000 (10:23 +1000)]
Fix own error removing texface

Setting the name crashed with NULL poly layer.

3 years agoFix own error removing texface
Campbell Barton [Wed, 28 Jun 2017 00:11:49 +0000 (10:11 +1000)]
Fix own error removing texface

Using pointer offsets from different arrays

3 years agoDWM: separate tangents from UV conversion
Campbell Barton [Tue, 27 Jun 2017 23:55:40 +0000 (09:55 +1000)]
DWM: separate tangents from UV conversion

Prepare for different number of UV/Tangent layers.

3 years agoGPU: GPU_generate_pass_new now takes vertex-attrs
Campbell Barton [Tue, 27 Jun 2017 23:37:44 +0000 (09:37 +1000)]
GPU: GPU_generate_pass_new now takes vertex-attrs

Needed so we can tell which custom-data layers to use from the mesh.

3 years agoFix missing globalsBlock in edit mode latice drawing
Luca Rood [Tue, 27 Jun 2017 16:39:45 +0000 (18:39 +0200)]
Fix missing globalsBlock in edit mode latice drawing

This was causing lattice vertices not to be drawn.

3 years agoFix T51913: Context tab for textures issue
Dalai Felinto [Tue, 27 Jun 2017 14:53:43 +0000 (16:53 +0200)]
Fix T51913: Context tab for textures issue

The original code was doing a sanity check to see if existing index was
out of range. However the comparison was wrong.

So if the previous ct->user (active index of texture node) was larger
than then number of available texture nodes + 1 in the other material,
we would never re-set the index to 0.

Bug introduced on c31f74de6bb7.

There was an early attempt of fixing this (2b2ac5d3cc) but it was just working
by pure, luck. And failing in cases like the one from this bug report.

3 years agoImplement weight colors for lattices in draw manager
Luca Rood [Tue, 27 Jun 2017 13:59:13 +0000 (15:59 +0200)]
Implement weight colors for lattices in draw manager

3 years agoLightProbes: Change 3d view display shape.
Clément Foucault [Tue, 27 Jun 2017 12:59:53 +0000 (14:59 +0200)]
LightProbes: Change 3d view display shape.

Introduce specific shape for each probe type to easily identify them.

3 years agoFix typo in Eevee hair UV handling
Luca Rood [Tue, 27 Jun 2017 09:58:59 +0000 (11:58 +0200)]
Fix typo in Eevee hair UV handling

3 years agoCleanup: remove unused function
Campbell Barton [Tue, 27 Jun 2017 08:05:44 +0000 (18:05 +1000)]
Cleanup: remove unused function

3 years agomikktspace: minor optimization
Campbell Barton [Tue, 27 Jun 2017 05:34:12 +0000 (15:34 +1000)]
mikktspace: minor optimization

Add a safe version of normalize since all uses of normalize
did zero length checks, move this into a function.

Also avoid unnecessary conversion.

Gives minor speedup here (approx 3-5%).

3 years agoEevee: Bloom: fix black bloom artifacts.
Clément Foucault [Tue, 27 Jun 2017 03:17:42 +0000 (05:17 +0200)]
Eevee: Bloom: fix black bloom artifacts.

3 years agoRNA: update_gpu_tag() to force Batch re-generation
Campbell Barton [Tue, 27 Jun 2017 01:09:30 +0000 (11:09 +1000)]
RNA: update_gpu_tag() to force Batch re-generation

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 26 Jun 2017 23:57:40 +0000 (09:57 +1000)]
Merge branch 'master' into blender2.8