Commit Graph

75472 Commits

Author SHA1 Message Date
Clément Foucault
1982e724f4 Eevee: Refactor of shading code to be more modular.
This will enable creating shading models more easily.
2017-06-28 16:32:08 +02:00
Luca Rood
0782c9f8dc Fix T51920: Invalidate draw cache when changing object origin 2017-06-28 14:58:25 +02:00
Bastien Montagne
16eca8f47e Fix own really stupid mistake/typo in previous commit... 2017-06-28 13:21:04 +02:00
Bastien Montagne
2c0ee61f6d 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.
2017-06-28 10:53:52 +02:00
Campbell Barton
4a061a87e6 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.
2017-06-28 13:44:28 +10:00
Campbell Barton
e78c0840f2 DwM: create eevee materials before the mesh
To know which custom-data layers will be needed in the mesh.

No functional change yet.
2017-06-28 13:36:55 +10:00
Campbell Barton
fc3d0da2fd DWM: Fix own error checking wrong layer type
Would calculate all tangents for every UV layer.
2017-06-28 11:39:05 +10:00
Campbell Barton
87dd9c31a0 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.
2017-06-28 10:59:25 +10:00
Campbell Barton
037876659f Fix own error removing texface
Setting the name crashed with NULL poly layer.
2017-06-28 10:23:27 +10:00
Campbell Barton
87a95558a0 Fix own error removing texface
Using pointer offsets from different arrays
2017-06-28 10:11:49 +10:00
Campbell Barton
df70e3de63 DWM: separate tangents from UV conversion
Prepare for different number of UV/Tangent layers.
2017-06-28 09:55:40 +10:00
Campbell Barton
dbaa6c2aa2 GPU: GPU_generate_pass_new now takes vertex-attrs
Needed so we can tell which custom-data layers to use from the mesh.
2017-06-28 09:37:44 +10:00
Luca Rood
2ed82d2e6b Fix missing globalsBlock in edit mode latice drawing
This was causing lattice vertices not to be drawn.
2017-06-27 18:40:39 +02:00
Dalai Felinto
f11bcbed9d 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 c31f74de6b.

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.
2017-06-27 16:56:43 +02:00
Luca Rood
d04f30c5d8 Implement weight colors for lattices in draw manager 2017-06-27 15:59:13 +02:00
Clément Foucault
6e83ace809 LightProbes: Change 3d view display shape.
Introduce specific shape for each probe type to easily identify them.
2017-06-27 15:00:14 +02:00
Luca Rood
cbfdd02f2c Fix typo in Eevee hair UV handling 2017-06-27 11:59:22 +02:00
Campbell Barton
bb0e8f1c55 Cleanup: remove unused function 2017-06-27 18:05:44 +10:00
Clément Foucault
c218d4b008 Eevee: Bloom: fix black bloom artifacts. 2017-06-27 05:18:00 +02:00
Campbell Barton
62b1d11613 RNA: update_gpu_tag() to force Batch re-generation 2017-06-27 11:09:30 +10:00
Campbell Barton
e6be5b8a2c Merge branch 'master' into blender2.8 2017-06-27 09:59:36 +10:00
Campbell Barton
03b46f7941 Cleanup: quiet warning
Passing NULL arg when nonnull attr is used.
2017-06-27 07:39:44 +10:00
Campbell Barton
8cc8aad4f9 Scene object iterator: minor optimization
Avoid an extra hash when adding to gset
2017-06-27 07:30:21 +10:00
Clément Foucault
0394c04a7f Eevee: Add Planar reflection blurring.
This method is very cheap and inaccurate. This will fill the gap untill better model is supported.
2017-06-26 21:04:53 +02:00
Antonio Vazquez
daf02baaea Add new DRW_draw_pass_subset function
This function allows to draw only a selected range of shading groups.

This is required for some special situations as grease pencil strokes.
2017-06-26 20:42:58 +02:00
Bastien Montagne
5a1bdf2c3a Add warning that 'purge all' action in Outliner does save to current .blend file.
This is a very important, potentially deadly side-effect of this
operator. If something goes wrong, it can save a broken .blend file.

Ideally we could get rid of that operation anyway, once ID management if
fully renewed, but for now would rather keep it around.

Related to T51902.
2017-06-26 19:00:45 +02:00
Bastien Montagne
d4ca2ec9d5 Fix T51902: Severe problem with relocating linked libraries when using proxies.
Fix is a bit ugly, but cannot think of another solution for now, at
least this **should** not break anything else.

And now I go find myself a very remote, high and lonely mountain, climb
to its top, roar "I hate proxies!" a few times, and relax hearing the echos...
2017-06-26 18:55:30 +02:00
Dalai Felinto
1758330220 Fix viewport rendering with anti-aliasing - workaround
This commit makes the fullsample option for viewport renderings always
on: Render > OpenGL Render Options > Full Sample.

(The UI still allows users to set this, so we will need to revisit this
before 2.8 releases).

Even in computers that can handle MSAA we had issues.
The way Blender gpu_* implementation is handling anti-aliasing is buggy.
For example, in Blender 2.7x if you have depth of field in a viewport
with multi-sampling, the DoF gives us jagged edges.

Since Eevee uses framebuffers for a lot of things, this issue was
leading to very visible buggy render in some computers, and more subtle
inconsistent buggy renders in others (easy to test with the depth of
field in Eevee).
2017-06-26 18:30:21 +02:00
Luca Rood
a48bd0db71 Remove disabled code for freeing shaders on scene update
Some code for freeing shaders on scene updates (because of previous
dependency shaders had on lamps) had been disabled, as it is no longer
required. This removes that code altogether.
2017-06-26 18:16:05 +02:00
Luca Rood
b50839038d Stop object shaders from being updated when changing lamp properties
Object shaders no longer depend on lamp data at compile time, thus they
don't need to be invalidated when lamps change. Disabling shader
recompilation allows fast viewport updates when changing lamp settings.

Note that even though shaders for lamps are currently not being used,
`lamp_changed` is still freeing the lamp shaders, as at some point we
might want to use shaders for lamps...
2017-06-26 17:53:47 +02:00
Luca Rood
bafb904807 Fix T51559: Update draw cache when changing flat/smooth shading
This also renames some flags/variables to be more generic for updating
purposes. The call used here was previously only used for updating
paint data, but as it was reused here, flags and variables were renamed
to accomodate more clearly to the new usages.
2017-06-26 14:52:59 +02:00
Dalai Felinto
37593b6a42 New scenes should use Eevee, not Blender Render 2017-06-26 12:47:33 +02:00
Luca Rood
e304150701 Enable shadow catching for Eevee hair
Shadow catching was disabled for hair in Eevee, because of an issue in
the shadow maps. The issue has since been resolved, so this re-enables
shadow catching for hair.
2017-06-26 12:30:30 +02:00
Luca Rood
cbbfacdac0 Hair UV implementation for Eevee
This implements UV support for Eevee hair, enabling the usage of
textures.
2017-06-26 12:17:18 +02:00
Dalai Felinto
6f0b80425b Fix shaders not working in Eevee
Not a single node based shader was working since a recent merge from
master.

The merge brought changes from the principle bsdf shader where
unsupported gl_ProjectionMatrix was still being used.
2017-06-26 12:14:21 +02:00
Campbell Barton
21f088018a Used Py3.6 feature by accident, check version 2017-06-26 19:57:48 +10:00
Campbell Barton
28b2f1c305 Manipulator: Python API
Initial support for Python/Manipulator integration
from 'custom-manipulators' branch.

Supports:

- Registering custom manipulators & manipulator-groups.
- Modifying RNA properties, custom values via get/set callbacks,
  or invoking an operator.
- Drawing shape presets for Python defined manipulators (arrow, circle, face-maps)

Limitations:

- Only float properties supported.
- Drawing only supported via shape presets.
  (we'll likely want a way to define custom geometry or draw directly).
- When to refresh, recalculate manipulators will likely need
  integration with notifier system.

Development will be continued in the 2.8 branch
2017-06-26 16:38:04 +10:00
Campbell Barton
c9e33b36de Correct copy-paste error manipulator 2017-06-26 15:46:27 +10:00
Campbell Barton
ba6d9fefc2 Rename wmManipulatorPropertyType.type -> data_type 2017-06-26 14:36:37 +10:00
Campbell Barton
3edff2e1a4 Manipulator: use 'void *' for callback data args
Non-float properties should be editable too.
2017-06-26 14:33:10 +10:00
Campbell Barton
2d2c64dd18 Building without Python works again 2017-06-26 13:50:11 +10:00
Campbell Barton
6d1ae5897f Merge branch 'master' into blender2.8 2017-06-26 13:43:56 +10:00
Gaia Clary
fb96228441 Collada: improved Error handling: Avoid shutdown of Blender when the Collada importer finds Syntax errors in import data 2017-06-26 13:41:44 +10:00
Campbell Barton
f0863f2a80 Merge branch 'master' into blender2.8 2017-06-26 13:27:54 +10:00
Campbell Barton
0172ed8fe5 Building w/o Python works again 2017-06-26 13:26:44 +10:00
Campbell Barton
a4f16c63a2 Manipulator: name setting function
Default name includes group-name,
we may want to set the name without a prefix.
2017-06-26 13:16:25 +10:00
Aaron Carlisle
b0ee9aaa5d Fix freestyle lineset panels being animatable 2017-06-25 20:03:19 -04:00
Aaron Carlisle
957a77c0ba UI: Fix Capitalization Inconsistency 2017-06-25 19:55:05 -04:00
Campbell Barton
3a1f77650d WM: Fix crash in transform-orientation access
Need to support orientation access when context is NULL.
2017-06-26 08:38:21 +10:00
Campbell Barton
70b5cec5fa Manipulator: add optional properties argument
Needed for RNA/Py API
2017-06-26 08:19:55 +10:00