Commit Graph

75472 Commits

Author SHA1 Message Date
Campbell Barton
53e062da94 Cleanup: sync w/ blender2.8 branch
Split screen_draw.c from screen_edit.c (avoid conflicts syncing).
2018-01-19 17:57:37 +11:00
Campbell Barton
4444ea42f2 Merge branch 'master' into blender2.8 2018-01-19 17:37:01 +11:00
Campbell Barton
c850320b35 Merge branch 'master' into blender2.8 2018-01-19 17:21:15 +11:00
mano-wii
ebf01d44ee WM: window draw callbacks and split preview snap
This moves window overlay from hard coded flags into drawing callbacks.

It also supports snapping (holding Ctrl).
2018-01-19 17:15:45 +11:00
Campbell Barton
7a24e0d175 Cleanup: typos 2018-01-19 15:34:54 +11:00
Campbell Barton
368414efac Fix T53823: Particle weight brush crash
Entering particle edit mode w/ the weight brush enabled crashed
on non-hair particle systems.
2018-01-19 12:25:09 +11:00
Campbell Barton
2b9fb723ed Fix T53832: Particle weight paint crash
Drawing hair weights read before the hair array start.
This code could be improved since it currently copy-pastes,
from do_particle_interpolation, but this would need larger changes.

For now just correct existing logic.
2018-01-19 12:14:53 +11:00
Clément Foucault
4d3d002b65 Eevee: Fix translucency light powers. 2018-01-18 22:43:05 +01:00
Clément Foucault
59989fd4e0 Eevee: Volumetrics: Update/fix the lamp power convertion.
Include a better fit for area lights.
2018-01-18 21:52:36 +01:00
Clément Foucault
03e432bcdb Eevee: Implement Sun area lighting and few fixes/opti.
Sun is treated as a unit distant disk like in cycles.

Opti: Since computing the diffuse contribution via LTC is the same as not using the Linear Transformation, we can bypass most of the LTC code.
This replaces the sphere analytical diffuse computation as it gives a more pleasing result very close to cycles' AND cheaper.

Lights power have been retweaked to be coherent with cycles (except sun lamp with large radius where cycles has a non-uniform light distribution).
2018-01-18 21:52:36 +01:00
Clément Foucault
0cec092eca Eevee: Optimize rectangle area light.
Use the latest LTC optimisation techniques. That said, the final output is a bit more biased (and a bit further away from cycles).
2018-01-18 21:52:36 +01:00
Clément Foucault
220f1ad67e Eevee: Use inversesqrt() when possible. 2018-01-18 21:52:36 +01:00
Clément Foucault
8ed0161aa7 Eevee: Implement new LTC algorithm for Sphere Lights.
This is an improvement on the old spining quad method that was giving artifacts when the reflection ray was nearly aligned with the sphere center.
This might be a bit heavier but it's worth it.
2018-01-18 21:52:36 +01:00
Dalai Felinto
dc296542d4 Outliner: Fix parenting clear poll 2018-01-18 18:02:32 -02:00
Dalai Felinto
f1cfe67594 Outliner: Use (temporary) icons for collections
We need new icons for collections.

Yet we are using them in a few places, so we may as well be consistent and use
it everywhere.
2018-01-18 17:30:37 -02:00
Dalai Felinto
74f872df3a Outliner: Rename "Active View Layer" > "View Layer"
The original name came from a cheap conversion of the "active layer" option
to "active render layer" and then "active view layer".
2018-01-18 14:17:07 -02:00
Dalai Felinto
51bcf7bd5f Outliner: Get rid of Search Menu
Use inline options instead. This will be collapsable once we merge the upcoming
filter sytem.
2018-01-18 13:20:10 -02:00
Dalai Felinto
9398db07cc Outliner: Keep header operator-free and edit menu cleanup
Headers should not have operators as much as possible. The exception here is
for datablocks mode when you want to see the active keyset.

Edit menus on the other hand should be clearly distinct from the RMB context
menus. Edit menu options should be only the ones that apply to the entire
outliner, regardless of the selected element.

Context (rmb) menus should be related to the element you RMB on to invoke the
menu. I'm also taking this opportunity to start bringing the context menus
to Python. There is little reason not to, and it helps editing them (In this
case I'm doing it only for the Scene Collection one).
2018-01-18 13:05:45 -02:00
Sergey Sharybin
539e170d79 Depsgraph: Fix crahs when selecting objects
Was wasy to reproduce by hitting A-key.

Missing part of the recent orig_id pointer commit.
2018-01-18 14:14:53 +01:00
Campbell Barton
42a562496b Fix memory leak in recent curve refactor
5b25605761fb7
2018-01-18 20:54:59 +11:00
Sybren A. Stüvel
7b3e441bcf Improved docstring of mathutils.Matrix.lerp() 2018-01-18 09:58:14 +01:00
Sybren A. Stüvel
9811150952 Improve docstring for mathutils.Matrix.decompose() 2018-01-18 09:38:01 +01:00
Campbell Barton
001789d733 Fix T53808: VSE doesn't show scene strip markers 2018-01-18 14:49:09 +11:00
Campbell Barton
e8452cf0bc Merge branch 'master' into blender2.8 2018-01-18 14:11:38 +11:00
Campbell Barton
6880a549ba Fix weight particle brush versioning 2018-01-18 14:02:26 +11:00
Campbell Barton
9b04a47070 Cleanup: label scene flags more clearly
Also correct typo in enum name
2018-01-18 13:51:49 +11:00
Campbell Barton
2be8598fe7 Fix T53811: "bmesh.ops.split" crash 2018-01-18 12:36:25 +11:00
mano-wii
7ffe838473 WM: improved area resize snapping
Instead of 10px steps, snap to mid-point & adjacent edges.

Not yet implemented for split preview.
2018-01-18 11:33:51 +11:00
Brecht Van Lommel
27dff3fbc1 Merge branch 'master' into blender2.8 2018-01-18 01:01:17 +01:00
Brecht Van Lommel
e6df02861e Fix buffer overflow vulnerability in curve, font, particles code.
Solves these security issues from T52924:
CVE-2017-12102
CVE-2017-12103
CVE-2017-12104

While the specific overflow issue may be fixed, loading the repro .blend
files may still crash because they are incomplete and corrupt. The way
they crash may be impossible to exploit, but this is difficult to prove.

Differential Revision: https://developer.blender.org/D3002
2018-01-18 00:54:07 +01:00
Brecht Van Lommel
e04d7c49dc Fix buffer overflow vulnerabilities in mesh code.
Solves these security issues from T52924:
CVE-2017-12081
CVE-2017-12082
CVE-2017-12086
CVE-2017-12099
CVE-2017-12100
CVE-2017-12101
CVE-2017-12105

While the specific overflow issue may be fixed, loading the repro .blend
files may still crash because they are incomplete and corrupt. The way
they crash may be impossible to exploit, but this is difficult to prove.

Differential Revision: https://developer.blender.org/D3002
2018-01-18 00:54:07 +01:00
Brecht Van Lommel
e0f2c7aff4 Fix Linux/GCC compiler warning in recent fixes. 2018-01-18 00:54:07 +01:00
Campbell Barton
235f578a0d Loop Cut: Allow mouse placement w/ numeric input
D2973 by @cyaoeu
2018-01-18 10:55:53 +11:00
Brecht Van Lommel
07aed404cf Fix buffer overflow vulernability in thumbnail file reading.
Fixes CVE-2017-2908 from T52924.

Differential Revision: https://developer.blender.org/D3001
2018-01-17 20:25:42 +01:00
Brecht Van Lommel
d30cc1ea0b Fix buffer overflows in TIFF, PNG, IRIS, DPX, HDR and AVI loading.
Solves these security issues from T52924:
CVE-2017-2899
CVE-2017-2900
CVE-2017-2901
CVE-2017-2902
CVE-2017-2903
CVE-2017-2904
CVE-2017-2905
CVE-2017-2906
CVE-2017-2907
CVE-2017-2918

Differential Revision: https://developer.blender.org/D2999
2018-01-17 19:59:47 +01:00
Sergey Sharybin
8400b4b566 Merge branch 'master' into blender2.8 2018-01-17 18:03:08 +01:00
Sergey Sharybin
46204f843b Depsgraph: Fix for fake dependency cycle being created for shape key drivers
One thing i'm not fully happy with is all this is_same_* functions. Need to
get rid of this by probably adding explicit entry/init/whatever nodes and
maybe making node criteria aware of whether key will be used as "from" or
as "to" node.
2018-01-17 18:02:51 +01:00
Sybren A. Stüvel
10e6da1f2d Merge branch 'master' into blender2.8 2018-01-17 17:47:38 +01:00
Sybren A. Stüvel
5d4ffb42a3 Delete Invalid Drivers: more lenient poll function
This function is faster and also allows for deletion of invalid drivers in
nested data blocks (for example in shape keys). Thanks @sergey!
2018-01-17 17:14:39 +01:00
Clément Foucault
8e35a9e4c7 Eevee: Perf: Update noises (in utilTex) via GPU drawing.
This leads to a ~3ms improvement of CPU time during drawing.
This prevent the rendering from being stalled waiting for the texture data to be transfered.
2018-01-17 14:02:48 +01:00
Clément Foucault
54e10dbd17 DRW: Add DRW_framebuffer_create() function.
This is because certain part of the engine may require a blank framebuffer to bind textures to.
This is the case when using only array textures, unsupported by DRW_framebuffer_init().
2018-01-17 13:55:49 +01:00
Sybren A. Stüvel
c6101b09eb Merge branch 'master' into blender2.8 2018-01-17 12:38:52 +01:00
Sybren A. Stüvel
0aaae43748 Simplified GRAPH_OT_driver_delete_invalid after feedback @aligorith
By adding the ANIMFILTER_NODUPLIS flag to the filter it'll only be
processing each F-Curve once, which means we can remove while iterating.

This also solves a potential issue when a datablock has a driver and is
shared among multiple objects.
2018-01-17 12:38:14 +01:00
Sergey Sharybin
333d4f3447 Depsgraph: Use more const qualifiers 2018-01-17 12:27:46 +01:00
Sybren A. Stüvel
971a44fe08 Merge branch 'master' into blender2.8 2018-01-17 12:21:05 +01:00
Sybren A. Stüvel
c38ebf93e3 Added "Delete Invalid Drivers" operator
This operator is available in the graph editor in the Drivers mode, and
allows quick cleanup of drivers marked as 'invalid'.
2018-01-17 12:12:37 +01:00
Campbell Barton
ca5987c8a5 Cleanup: replace BLI_dynstr w/ BLI_string_joinN
Use in place of recently reverted 'DRW_shader_create_lib'
2018-01-17 21:42:14 +11:00
Sergey Sharybin
f314d9ce47 Depsgrapph: Fix/workaround for missing hair
The issue was happening because dependency graph did not inform particle
settings as modified. This is a regression caused by tagging and flushing
mechanism refactor.

The real fix would be to make particle settings to use ID level recalc flags
rather than own flags, which will also simplify relations around particle system,
and particle settings evaluation.

Reported by Mai in IRC.
2018-01-17 11:23:16 +01:00
Campbell Barton
10ce5af2dd Revert "Fix use-after free in DRW_shader_create_with_lib"
Caused an error entering edit-mode.

d60f26f37a & 2659500835
2018-01-17 20:39:42 +11:00
Campbell Barton
2094bbd033 Fix assert in mesh batch conversion 2018-01-17 19:54:13 +11:00