blender.git
2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 23 Jan 2018 00:24:44 +0000 (11:24 +1100)]
Merge branch 'master' into blender2.8

2 years agoGrease Pencil dat files fix
Dalai Felinto [Mon, 22 Jan 2018 17:33:20 +0000 (15:33 -0200)]
Grease Pencil dat files fix

The ones I previously commited were done with Inkspace 0.92.2
But apparently this renders some parts of the icons transparent.

For example, the tip of the new grease pencil pencil icon.

2 years agoGrease-Pencil: Fixup for icons
Dalai Felinto [Mon, 22 Jan 2018 17:12:12 +0000 (15:12 -0200)]
Grease-Pencil: Fixup for icons

I tried to cleanup the .svg but I overdid it a bit

2 years agoGrease-Pencil: Icons from the grease pencil branch
Dalai Felinto [Mon, 22 Jan 2018 16:35:27 +0000 (14:35 -0200)]
Grease-Pencil: Icons from the grease pencil branch

2 years agoCollections/Layer cleanup: Remove placeholder for de/select objects
Dalai Felinto [Mon, 22 Jan 2018 14:41:29 +0000 (12:41 -0200)]
Collections/Layer cleanup: Remove placeholder for de/select objects

No need for placeholders bloating the source code. They can come back once
we decide to implement them.

2 years agoCollections/Layer cleanup: Remove all reference to filter objects
Dalai Felinto [Mon, 22 Jan 2018 14:33:57 +0000 (12:33 -0200)]
Collections/Layer cleanup: Remove all reference to filter objects

This was not implemented yet. So it's a bit pointless to have all this
placeholder code around without any functionality coming out of it.

2 years agoCollections/Layer cleanup: Remove TODO_LAYER_OVERRIDE from most places
Dalai Felinto [Mon, 22 Jan 2018 14:24:49 +0000 (12:24 -0200)]
Collections/Layer cleanup: Remove TODO_LAYER_OVERRIDE from most places

This was originally a good idea. However we will need to pay special attention
to this when doing the dynamic overrides anyways. The placeholders won't be
enough to spare us that job.

That said I left the ones on layer.c because we are actually calling these
BKE_override_*_add() functions from doversion, yet they don't do anything.

2 years agoT53831: Fixed vertical line alignment & expand Collection and Scene buttons position.
Philippe Schmid [Mon, 22 Jan 2018 14:04:28 +0000 (12:04 -0200)]
T53831: Fixed vertical line alignment & expand Collection and Scene buttons position.

This was fixed in master with commit 9d873fc3debe0. However, this fix never made it to 2.8.
(The following merge (a96008f3aae2) did not import the fixes.)

Note: This fix is ment to fix the alignment problem.
I don't know if other parts of the code not merged are interesting or not.

But if they are, they should be tackled separately.

Reviewers: dfelinto

Subscribers: venomgfx, dfelinto, raa, Severin

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

2 years agoFix broken merge in fb45821, was missing changes from cc64872.
Brecht Van Lommel [Mon, 22 Jan 2018 13:28:43 +0000 (14:28 +0100)]
Fix broken merge in fb45821, was missing changes from cc64872.

2 years agoFix T53850: Lock to Cursor breaks 3D manipulators
Campbell Barton [Mon, 22 Jan 2018 09:11:34 +0000 (20:11 +1100)]
Fix T53850: Lock to Cursor breaks 3D manipulators

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 22 Jan 2018 03:14:33 +0000 (14:14 +1100)]
Merge branch 'master' into blender2.8

2 years agoWM: add mouse-move after smooth-view
Campbell Barton [Mon, 22 Jan 2018 03:06:32 +0000 (14:06 +1100)]
WM: add mouse-move after smooth-view

When hot-spots moved under the pointer,
clicking wouldn't activate the correct item.

2 years agoManipulator: draw all rules while dragging
Campbell Barton [Mon, 22 Jan 2018 02:52:45 +0000 (13:52 +1100)]
Manipulator: draw all rules while dragging

2 years agoCleanup: commends
Campbell Barton [Mon, 22 Jan 2018 00:32:03 +0000 (11:32 +1100)]
Cleanup: commends

Avoid copy-pasting same comments.

2 years agoCleanup: reuse camera frame arrays
Campbell Barton [Mon, 22 Jan 2018 00:26:32 +0000 (11:26 +1100)]
Cleanup: reuse camera frame arrays

Use GWN_vertbuf_raw_step in a loop for less verbose vbo creation.

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 21 Jan 2018 23:42:42 +0000 (10:42 +1100)]
Merge branch 'master' into blender2.8

2 years agoFix linking error when compiling without clay engine
Ines Almeida [Sun, 21 Jan 2018 23:19:38 +0000 (00:19 +0100)]
Fix linking error when compiling without clay engine

2 years agoDRW: Object Mode: Fix bad camera display in camera view
Clément Foucault [Sun, 21 Jan 2018 23:14:28 +0000 (00:14 +0100)]
DRW: Object Mode: Fix bad camera display in camera view

This fix T53485 : Ortho cameras display frame when in camera view

2 years agoFix manual lookups (data is now lowercase)
Campbell Barton [Sun, 21 Jan 2018 22:50:41 +0000 (09:50 +1100)]
Fix manual lookups (data is now lowercase)

2 years agoFix T53843: Error opening online manual
Campbell Barton [Sun, 21 Jan 2018 22:45:51 +0000 (09:45 +1100)]
Fix T53843: Error opening online manual

2 years agoCleanup: unused var
Campbell Barton [Sun, 21 Jan 2018 23:00:23 +0000 (10:00 +1100)]
Cleanup: unused var

2 years agoEevee: Probes: Add support for intensity tweak.
Clément Foucault [Sun, 21 Jan 2018 22:15:57 +0000 (23:15 +0100)]
Eevee: Probes: Add support for intensity tweak.

This works for grid and cubemaps.

The intensity is baked into the map itself. Thus you need to refresh/rebake the probe to see the changes.

2 years agoEevee: Fix grid lighting disappearing when adding a new cubemap probe.
Clément Foucault [Sun, 21 Jan 2018 21:57:12 +0000 (22:57 +0100)]
Eevee: Fix grid lighting disappearing when adding a new cubemap probe.

2 years agoClay: Performance: Disable AO codepath if not necessary.
Clément Foucault [Sun, 21 Jan 2018 18:12:59 +0000 (19:12 +0100)]
Clay: Performance: Disable AO codepath if not necessary.

This optimisation only works if no material in the scene require the AO pass.
For this either set the AO distance to 0 or both Cavity and Edges factors to 0.

This double the performance of scenes with very high triangle count.

2 years agoDRW: Make the lamp widgets lines stippled.
Clément Foucault [Sun, 21 Jan 2018 17:32:40 +0000 (18:32 +0100)]
DRW: Make the lamp widgets lines stippled.

2 years agoDRW: Remove unused material uniforms.
Clément Foucault [Sun, 21 Jan 2018 17:17:59 +0000 (18:17 +0100)]
DRW: Remove unused material uniforms.

This might have some consequences but in my testing I did not found any.

2 years agoEevee: SSR: Optimize the AO out when not enabled.
Clément Foucault [Sun, 21 Jan 2018 16:31:47 +0000 (17:31 +0100)]
Eevee: SSR: Optimize the AO out when not enabled.

2 years agoEevee: Put all constant uniforms in a global UBO.
Clément Foucault [Sun, 21 Jan 2018 16:25:10 +0000 (17:25 +0100)]
Eevee: Put all constant uniforms in a global UBO.

This is an optimization / cleanup commit.

The use of a global ubo remove lots of uniform lookups and only transfert data when needed.

Lots of renaming for more consistent codestyle.

2 years agoMerge branch 'master' into blender2.8
Germano [Sun, 21 Jan 2018 20:45:47 +0000 (18:45 -0200)]
Merge branch 'master' into blender2.8

# Conflicts:
# intern/cycles/blender/blender_mesh.cpp
# source/blender/editors/screen/screen_ops.c
# source/blender/editors/space_view3d/drawobject.c

2 years agoUpdate description of the screen_draw functions
Germano [Sun, 21 Jan 2018 20:22:39 +0000 (18:22 -0200)]
Update description of the screen_draw functions

2 years agoWM: Fix snapping on split area without preview
Germano [Sun, 21 Jan 2018 20:18:12 +0000 (18:18 -0200)]
WM: Fix snapping on split area without preview

In addition to removing unnecessary variables and `tag_redraw` whenever the factor changes;

2 years agoFix T49159: missing Cycles tangents for adaptive subdivision.
Brecht Van Lommel [Sun, 21 Jan 2018 14:19:34 +0000 (15:19 +0100)]
Fix T49159: missing Cycles tangents for adaptive subdivision.

2 years agoCleanup: BLI_kdopbvh avoid negative array access
Campbell Barton [Sun, 21 Jan 2018 08:28:54 +0000 (19:28 +1100)]
Cleanup: BLI_kdopbvh avoid negative array access

It's harder to reason about array access with negative indices.

2 years agoCleanup: style
Campbell Barton [Sun, 21 Jan 2018 00:41:28 +0000 (11:41 +1100)]
Cleanup: style

2 years agoFix old files with changed node socket type not loading correctly.
Brecht Van Lommel [Sat, 20 Jan 2018 00:04:07 +0000 (01:04 +0100)]
Fix old files with changed node socket type not loading correctly.

This would lead to sock.default_value pointing to the wrong data type,
possibly causing crashes. Unfortunately, this bug will still exist for
older Blender versions that try to load newer files, which makes
changing the type of a node socket problematic.

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 20 Jan 2018 14:47:49 +0000 (01:47 +1100)]
Merge branch 'master' into blender2.8

2 years agoCleanup: doxy groups for screen_ops.c
Campbell Barton [Sat, 20 Jan 2018 14:41:58 +0000 (01:41 +1100)]
Cleanup: doxy groups for screen_ops.c

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 20 Jan 2018 13:55:08 +0000 (00:55 +1100)]
Merge branch 'master' into blender2.8

2 years agoFix screen split preview refresh issues
Campbell Barton [Sat, 20 Jan 2018 13:39:06 +0000 (00:39 +1100)]
Fix screen split preview refresh issues

Switching direction didn't refresh, also cursors were flipped.

2 years agoManipulator: tweak shape drawing
Campbell Barton [Sat, 20 Jan 2018 08:41:41 +0000 (19:41 +1100)]
Manipulator: tweak shape drawing

Draw triangles over wire for a more subtle outline.

2 years agoGPU_batch: Add GPU_batch_wire_from_poly_2d_encoded
Campbell Barton [Sat, 20 Jan 2018 07:41:11 +0000 (18:41 +1100)]
GPU_batch: Add GPU_batch_wire_from_poly_2d_encoded

Draws wire around polygon shapes:
better visibility w/ any background color.

2 years agoFix collections names no longer unique when moved around
Dalai Felinto [Fri, 19 Jan 2018 20:44:11 +0000 (18:44 -0200)]
Fix collections names no longer unique when moved around

We were not checking for uniqueness after moving. And in some cases the new
siblings of our collection may have conflicting names.

2 years agoCollections: Fix for auto-named children when parent name is MAX_NAME
Dalai Felinto [Fri, 19 Jan 2018 19:19:55 +0000 (17:19 -0200)]
Collections: Fix for auto-named children when parent name is MAX_NAME

Reported via IRC by Vuk Gardašević (lijenstina).

2 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Dalai Felinto [Fri, 19 Jan 2018 19:06:32 +0000 (17:06 -0200)]
Merge remote-tracking branch 'origin/master' into blender2.8

2 years agoFixup for integer digits commit
Dalai Felinto [Fri, 19 Jan 2018 19:04:19 +0000 (17:04 -0200)]
Fixup for integer digits commit

2 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Dalai Felinto [Fri, 19 Jan 2018 19:01:48 +0000 (17:01 -0200)]
Merge remote-tracking branch 'origin/master' into blender2.8

2 years agoUtil function to determine number of digits from an integer
Dalai Felinto [Fri, 19 Jan 2018 18:52:59 +0000 (16:52 -0200)]
Util function to determine number of digits from an integer

2 years agoOutliner: Remove User Preferences
Dalai Felinto [Fri, 19 Jan 2018 17:44:26 +0000 (15:44 -0200)]
Outliner: Remove User Preferences

This was introduced to the outliner when we had no User Preference
window back in 2.5x. Right now it makes no sense to keep this around.

But how about addon user preferences:
* They belong in the user preference window under the addon.

How about the user preferences themselves:
* You find them in the user preference window.

And templates?
* Why are they here in the first place?

After talking to Pablo Vazquez (who in turn poked Sergey Sharybin) we found
it reasonable to get rid of this. If it turns out that we were wrong we
revert this.

As for leaving this exposed as a debug option (as suggested on IRC) I would say
no, please. This end up polluting the code and never cleaned up in the end.
(this was specific talking about templates).

Technical note: I left the functions in outliner still hanging around.
While I used UNUSED_FUNCTION for one of them, for the other one I had to use:
`#if 0` because the function was calling itself, which would fail to build if
I used UNUSED_FUNCTION.

2 years agoCycles: Make it more proper check on vectorization flags from DebugFlags
Sergey Sharybin [Fri, 19 Jan 2018 14:47:53 +0000 (15:47 +0100)]
Cycles: Make it more proper check on vectorization flags from DebugFlags

Mimics to checks in system_cpu_support() checks.

2 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Dalai Felinto [Fri, 19 Jan 2018 14:46:23 +0000 (12:46 -0200)]
Merge remote-tracking branch 'origin/master' into blender2.8

2 years agoOutliner Python UI cleanup: remove KEYMAPS
Dalai Felinto [Fri, 19 Jan 2018 14:44:38 +0000 (12:44 -0200)]
Outliner Python UI cleanup: remove KEYMAPS

This was removed since 2013 (ef765b360675). It should have been removed back
then from the UI file too.

2 years agoOutliner: Fix unparenting poll (when drag'n'droping an object)
Dalai Felinto [Fri, 19 Jan 2018 14:28:07 +0000 (12:28 -0200)]
Outliner: Fix unparenting poll (when drag'n'droping an object)

2 years agoCycles: Cleanup, stop using debug flags in system utilities
Sergey Sharybin [Fri, 19 Jan 2018 14:02:23 +0000 (15:02 +0100)]
Cycles: Cleanup, stop using debug flags in system utilities

Debug flags are to be controlling render behavior, nothing to do with low level
system utilities.

it was simple to hack, but logically is wrong. Lets do things where they are
supposed to be done!

2 years agoCycles: Remove util_debug include from kernel code
Sergey Sharybin [Fri, 19 Jan 2018 14:21:34 +0000 (15:21 +0100)]
Cycles: Remove util_debug include from kernel code

Not sure why it was in there, all the debug flags stuff is to be handled outside
of kernel.

2 years agoCycles: Remove unneeded include statements
Sergey Sharybin [Fri, 19 Jan 2018 13:55:53 +0000 (14:55 +0100)]
Cycles: Remove unneeded include statements

Also try to move them from headers to implementation files as much as possible.

2 years agoOutliner: Change All Scenes to Scenes and make it focus on compositing
Dalai Felinto [Thu, 18 Jan 2018 20:30:30 +0000 (18:30 -0200)]
Outliner: Change All Scenes to Scenes and make it focus on compositing

We have different ways of explore the scene objects, namely View Layer and
Collections. This change let us focus on compositing elements only such as:

* View Layers
** Collections
** Render Passes
* Freestyle
* Grease Pencil?

Not included in this commit is an option to handle filtering of
collections passes, ... Not sure if we would like, though.
Since they are all properly nested under a "Collections" / "Passes"
parent.

2 years agoOutliner Filtering System + Cleanup
Dalai Felinto [Fri, 19 Jan 2018 13:39:54 +0000 (11:39 -0200)]
Outliner Filtering System + Cleanup

User notes:

The outliner so far was a great system to handle the object oriented workflow
we had in Blender prior to 2.8. However with the introduction of collections
the bloated ammount of data we were exposed at a given time was eventually
getting on the way of fully utilizing the outliner to manage collections and
their objects.

We hope that with this filtering system the user can put together the outliner
with whichever options he or she seem fit for a given task.

Features:
* Collection filter: In case users are only focused on objects.
* Object filter: Allow users to focus on collections only.
* (Object) content filter: Modifiers, mesh, contrainst, materials, ...
* (Object) children filter: Hide object children [1].
* Object State (visible, active, selected).
* Compact header: hide search options under a search toggle.
* Preserve scrolling position before/after filtering [2].

[1] - Note we still need to be able to tell if a children of an object is in a
      collection, or if the parent object is the only one in the collection.
      This in fact was one of the first motivations for this patch. But it is to
      be addressed separately now that we can at least hide children away.

[2] - We look at the top-most collection in the outliner, and try to find it again
      after the filtering and make sure it is in the same position as before.
      This works nice now. But to work REALLY, REALLY nice we need to also store
      the previous filter options to be sure the element we try to keep on top
      was valid for both old and new filters. I would rather do this later though
      since this smell a lot like feature creeping ;)

Remove no longer needed display options:
 * Current Scene (replaced by View Layer/Collections)
 * Visible (replaced by filter)
 * Selected (same)
 * Active (same)
 * Same Type (same-ish)

How about All Scenes? I have a patch that will come next to replace the current
behaviour and focus only on compositing. So basically stop showing the objects
and show only view layers, their passes and collections, besides freestyle.

Also, while at this I'm also reorganizing the menu to keep View Layer and
Collections on top.

Developer notes:

* Unlike the per-object filtering, for collections we need to filter at tree
creation time, to prevent duplication of objects in the outliner.

Acknowledgements:

Thanks Pablo Vazquez for helping testing, thinking some design questions
together and pushing this to its final polished state as you see here.

Thanks Sergey Sharybin and Julian Eisel for code review. Julian couldn't do a
final review pass after I addressed his concerns. So blame is on me for any
issue I may be introducing here. Sergey was the author of the "preserve
scrolling position" idea. I'm happy with how it is working, thank you.

Reviewers: sergey, Severin, venomgfx
Subscribers: lichtwerk, duarteframos

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

2 years agoDepsgraph: Fix freeing of evaluated mesh
Sergey Sharybin [Fri, 19 Jan 2018 13:19:49 +0000 (14:19 +0100)]
Depsgraph: Fix freeing of evaluated mesh

Was accessing wrong pointer to get original version of the mesh.

2 years agoCorrect view3d_draw_bgpic_test declaration
Campbell Barton [Fri, 19 Jan 2018 12:11:57 +0000 (23:11 +1100)]
Correct view3d_draw_bgpic_test declaration

Was extern, which got out of sync, move into header.

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 19 Jan 2018 10:44:03 +0000 (21:44 +1100)]
Merge branch 'master' into blender2.8

2 years agoCleanup: reaname LINKLIST_FOREACH -> LISTBASE
Campbell Barton [Fri, 19 Jan 2018 10:39:18 +0000 (21:39 +1100)]
Cleanup: reaname LINKLIST_FOREACH -> LISTBASE

LinkList's are a different API, no need to confuse things.

2 years agoFix T53830: Cycles OpenCL debug assert on macOS,
Brecht Van Lommel [Thu, 18 Jan 2018 20:06:35 +0000 (21:06 +0100)]
Fix T53830: Cycles OpenCL debug assert on macOS,

This was probably harmless besides some unnecessary memory usage due to
aligning allocations too much.

2 years agoFix T53788: Camera animation not working
Sergey Sharybin [Thu, 18 Jan 2018 14:58:02 +0000 (15:58 +0100)]
Fix T53788: Camera animation not working

Both object level and camera datablock properties animation did not work with
copy on write enabled.

The root of the issue is going to the fact, that all interface elements are
referencing original datablock. For example, View3D has pointer to camera it's
using, and all areas which does access v3d->camera should in fact query for
the evaluated version of that camera, within the current context.

Annoying part of this change is that we now need to pass depsgraph in lots
of places. Which is rather annoying.

Alternative would be to cache evaluated camera in viewport itself, but then
it makes it annoying to keep things in sync.

Not sure if there is nicer solution here.

Reviewers: dfelinto, campbellbarton, mont29

Subscribers: dragoneex

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

2 years agoFix T53786: Proportional size from redo ignored
Campbell Barton [Fri, 19 Jan 2018 10:09:16 +0000 (21:09 +1100)]
Fix T53786: Proportional size from redo ignored

Changing PET size while transforming stores the size in the
tool settings, but changing in the redo panel didn't.

2 years agoWM: operator flag to check repeat/redo execution
Campbell Barton [Fri, 19 Jan 2018 10:07:43 +0000 (21:07 +1100)]
WM: operator flag to check repeat/redo execution

2 years agoFix sculpt error freeing NULL vertex buffer
Campbell Barton [Fri, 19 Jan 2018 08:35:27 +0000 (19:35 +1100)]
Fix sculpt error freeing NULL vertex buffer

Relates to T53806 which needs further investigation

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 19 Jan 2018 07:03:43 +0000 (18:03 +1100)]
Merge branch 'master' into blender2.8

2 years agoCleanup: sync w/ blender2.8 branch
Campbell Barton [Fri, 19 Jan 2018 06:55:51 +0000 (17:55 +1100)]
Cleanup: sync w/ blender2.8 branch

Split screen_draw.c from screen_edit.c (avoid conflicts syncing).

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 19 Jan 2018 06:31:10 +0000 (17:31 +1100)]
Merge branch 'master' into blender2.8

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 19 Jan 2018 06:21:15 +0000 (17:21 +1100)]
Merge branch 'master' into blender2.8

2 years agoWM: window draw callbacks and split preview snap
mano-wii [Fri, 19 Jan 2018 06:14:27 +0000 (17:14 +1100)]
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).

2 years agoCleanup: typos
Campbell Barton [Fri, 19 Jan 2018 04:34:54 +0000 (15:34 +1100)]
Cleanup: typos

2 years agoFix T53833: Particle Info node and Displacement Crash
Mai Lavelle [Fri, 19 Jan 2018 03:40:48 +0000 (22:40 -0500)]
Fix T53833: Particle Info node and Displacement Crash

The displacement shared was running before particle data was copied to the
device causing bad memory access when the particle info node was used. Fix
is simply to move particle update before mesh update so the data is
available to displacement shaders.

(Altho this fixes the crash the particle info node is still mostly useless
with displacement for now...)

2 years agoFix T53823: Particle weight brush crash
Campbell Barton [Fri, 19 Jan 2018 01:25:09 +0000 (12:25 +1100)]
Fix T53823: Particle weight brush crash

Entering particle edit mode w/ the weight brush enabled crashed
on non-hair particle systems.

2 years agoFix T53832: Particle weight paint crash
Campbell Barton [Fri, 19 Jan 2018 01:07:14 +0000 (12:07 +1100)]
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.

2 years agoEevee: Fix translucency light powers.
Clément Foucault [Thu, 18 Jan 2018 21:43:05 +0000 (22:43 +0100)]
Eevee: Fix translucency light powers.

2 years agoEevee: Volumetrics: Update/fix the lamp power convertion.
Clément Foucault [Thu, 18 Jan 2018 20:52:16 +0000 (21:52 +0100)]
Eevee: Volumetrics: Update/fix the lamp power convertion.

Include a better fit for area lights.

2 years agoEevee: Implement Sun area lighting and few fixes/opti.
Clément Foucault [Thu, 18 Jan 2018 20:51:23 +0000 (21:51 +0100)]
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).

2 years agoEevee: Optimize rectangle area light.
Clément Foucault [Thu, 18 Jan 2018 20:00:24 +0000 (21:00 +0100)]
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).

2 years agoEevee: Use inversesqrt() when possible.
Clément Foucault [Thu, 18 Jan 2018 15:19:33 +0000 (16:19 +0100)]
Eevee: Use inversesqrt() when possible.

2 years agoEevee: Implement new LTC algorithm for Sphere Lights.
Clément Foucault [Thu, 18 Jan 2018 15:19:04 +0000 (16:19 +0100)]
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.

2 years agoOutliner: Follow up on "Alphabetical sorting"
Dalai Felinto [Thu, 18 Jan 2018 20:22:13 +0000 (18:22 -0200)]
Outliner: Follow up on "Alphabetical sorting"

Technicall this works for collections modes too (View Layer and Collections) even
if only for objects. So it should be in the menu as well.

2 years agoOutliner: Alphabetical sorting - Fixup on "Get rid of Search Menu"
Dalai Felinto [Thu, 18 Jan 2018 20:14:10 +0000 (18:14 -0200)]
Outliner: Alphabetical sorting - Fixup on "Get rid of Search Menu"

Issue introduced on 51bcf7bd5f3f2.

Alphabetical sorting is not related to search, so it shouldn't have been
touched by the Search Menu changes.

2 years agoOutliner: Fix parenting clear poll
Dalai Felinto [Thu, 18 Jan 2018 20:02:32 +0000 (18:02 -0200)]
Outliner: Fix parenting clear poll

2 years agoOutliner: Use (temporary) icons for collections
Dalai Felinto [Thu, 18 Jan 2018 19:30:35 +0000 (17:30 -0200)]
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.

2 years agoOutliner: Rename "Active View Layer" > "View Layer"
Dalai Felinto [Thu, 18 Jan 2018 16:11:28 +0000 (14:11 -0200)]
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".

2 years agoOutliner: View Layer: add option to add a new collection to the current view layer
Dalai Felinto [Thu, 18 Jan 2018 15:54:01 +0000 (13:54 -0200)]
Outliner: View Layer: add option to add a new collection to the current view layer

This operator not only links a collection, but it creates a new one and then it
links it. Although the preferrable method for users to handle their collections
is when viewing the "Collections", let's explore this workflow for now.

Suggested by Pablo Vazquez, thank you.

2 years agoOutliner: Get rid of Search Menu
Dalai Felinto [Thu, 18 Jan 2018 15:20:10 +0000 (13:20 -0200)]
Outliner: Get rid of Search Menu

Use inline options instead. This will be collapsable once we merge the upcoming
filter sytem.

2 years agoOutliner: Keep header operator-free and edit menu cleanup
Dalai Felinto [Thu, 18 Jan 2018 15:05:43 +0000 (13:05 -0200)]
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).

2 years agoDepsgraph: Fix crahs when selecting objects
Sergey Sharybin [Thu, 18 Jan 2018 13:14:53 +0000 (14:14 +0100)]
Depsgraph: Fix crahs when selecting objects

Was wasy to reproduce by hitting A-key.

Missing part of the recent orig_id pointer commit.

2 years agoFix memory leak in recent curve refactor
Campbell Barton [Thu, 18 Jan 2018 09:54:49 +0000 (20:54 +1100)]
Fix memory leak in recent curve refactor

5b25605761fb7

2 years agoImproved docstring of mathutils.Matrix.lerp()
Sybren A. Stüvel [Thu, 18 Jan 2018 08:58:14 +0000 (09:58 +0100)]
Improved docstring of mathutils.Matrix.lerp()

2 years agoImprove docstring for mathutils.Matrix.decompose()
Sybren A. Stüvel [Thu, 18 Jan 2018 08:37:54 +0000 (09:37 +0100)]
Improve docstring for mathutils.Matrix.decompose()

2 years agoFix T53808: VSE doesn't show scene strip markers
Campbell Barton [Thu, 18 Jan 2018 03:49:09 +0000 (14:49 +1100)]
Fix T53808: VSE doesn't show scene strip markers

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 18 Jan 2018 03:11:38 +0000 (14:11 +1100)]
Merge branch 'master' into blender2.8

2 years agoFix weight particle brush versioning
Campbell Barton [Thu, 18 Jan 2018 03:02:26 +0000 (14:02 +1100)]
Fix weight particle brush versioning

2 years agoCleanup: label scene flags more clearly
Campbell Barton [Thu, 18 Jan 2018 02:50:52 +0000 (13:50 +1100)]
Cleanup: label scene flags more clearly

Also correct typo in enum name

2 years agoFix T53811: "bmesh.ops.split" crash
Campbell Barton [Thu, 18 Jan 2018 01:36:25 +0000 (12:36 +1100)]
Fix T53811: "bmesh.ops.split" crash

2 years agoWM: improved area resize snapping
mano-wii [Thu, 18 Jan 2018 00:22:58 +0000 (11:22 +1100)]
WM: improved area resize snapping

Instead of 10px steps, snap to mid-point & adjacent edges.

Not yet implemented for split preview.

2 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Wed, 17 Jan 2018 23:58:54 +0000 (00:58 +0100)]
Merge branch 'master' into blender2.8