15 months agoUI: Support Displaying Enums as Tabs
Julian Eisel [Mon, 29 Oct 2018 20:20:58 +0000 (21:20 +0100)]
UI: Support Displaying Enums as Tabs

Adds `uiLayout.prop_tabs_enum(data, property, icon_only)` to BPY.

15 months agoDope Sheet: new option to display keyframe interpolation mode and extremes.
Alexander Gavrilov [Fri, 19 Oct 2018 15:55:19 +0000 (18:55 +0300)]
Dope Sheet: new option to display keyframe interpolation mode and extremes.

With the new automatic handle algorithm, it is possible to do a lot
of the animation via keyframes without touching the curves. It is
however necessary to change the keyframe interpolation and handle
types in certain cases. Currently the dopesheet/action editor
allows changing the types, but does not show them in any way.

To fix, add a new menu option to display this information. For handle
type, it is represented using the shape of the key icons: diamond for
Free, clipped diamond for Aligned, square for Vector, circle for Auto
Clamp, and cirle with dot for Automatic.

Non-bezier interpolation is a property of intervals between keys,
so it is marked by drawing lines, similar to holds. In this initial
version, only the fact of non-bezier interpolation is displayed,
without distinguishing types. For summaries, the line is drawn at
half alpha if not all curves in the group are non-bezier.

In addition, it is sometimes helpful to know the general direction
of change of the curve, and which keys are extremes. This commit
also adds an option to highlight extremes, based on comparing the
keyed values with adjacent keys. Half-intensity display is used
for overshot bezier extremes, or non-uniform summaries.

Reviewers: brecht, aligorith, billreynish

Differential Revision:

15 months agoUI: icon set updates Andrzej Ambroz, and various fixes.
William Reynish [Sun, 28 Oct 2018 16:51:40 +0000 (17:51 +0100)]
UI: icon set updates Andrzej Ambroz, and various fixes.

* Text editor word wrap, line numbers & syntax toggles now use consistent icons
  that don’t change when you enable or disable them.
* Replaced icon toggle buttons in the snapping popover with normal checkboxes
  and descriptive text labels. This makes it clearer which item is the main
  radio button, is more consistent with other popovers, and allows us to use
  more descriptive text.
* Added correct icons for grease pencil add menu.
* Added bespoke icons for grease pencil modifiers.
* Added icon for particle instance modifier.
* Added icon for fake user on & off states.
* Added correct icons for enabling/disabling modifiers in the dopesheet &
  f-curve editor.
* Made it so the restrict viewport & restrict render toggles for modifier
  update correctly when enabled or disabled, by flipping the order in the
  icon sheet. This also required changing the outliner to match.
* Removed the few old remaining icons in the old style and made sure to replace
  the last places where they were used.
* Updated many icons to be clearer & more consistent.

15 months agoUI: allow off/on icons to be in reverse order.
Brecht Van Lommel [Mon, 29 Oct 2018 15:58:34 +0000 (16:58 +0100)]
UI: allow off/on icons to be in reverse order.

The same icons are reused for "hide" and "show" properties, which need
to be in reverse order compared to each other.

15 months agoCleanup: remove unused RNA flag.
Brecht Van Lommel [Mon, 29 Oct 2018 15:19:03 +0000 (16:19 +0100)]
Cleanup: remove unused RNA flag.

15 months agoDepsgraph: use full operation key to preserve update tags on rebuild.
Alexander Gavrilov [Mon, 29 Oct 2018 17:52:32 +0000 (20:52 +0300)]
Depsgraph: use full operation key to preserve update tags on rebuild.

The key used by find_operation consists of the operation code,
node name, and an index for array property drivers. All three
elements are required to unambiguously look up a node.

15 months agoFix T57488: crash in Shrinkwrap constraint due to unsafe multi-threading.
Alexander Gavrilov [Mon, 29 Oct 2018 17:30:31 +0000 (20:30 +0300)]
Fix T57488: crash in Shrinkwrap constraint due to unsafe multi-threading.

- Constraints must not use mesh_get_eval_final as it isn't thread-safe.
- Depsgraph should keep lastDataMask when re-running COW.

15 months agoGP: Remove unneeded code to get icon
Antonioya [Mon, 29 Oct 2018 16:49:26 +0000 (17:49 +0100)]
GP: Remove unneeded code to get icon

Test the object type is not good idea here.

15 months agoGP: Cleanup typo
Antonioya [Mon, 29 Oct 2018 15:42:47 +0000 (16:42 +0100)]
GP: Cleanup typo

15 months agoDepsgraph cleanup: use proper DEG_debug_print_eval call...
Bastien Montagne [Mon, 29 Oct 2018 15:37:00 +0000 (16:37 +0100)]
Depsgraph cleanup: use proper DEG_debug_print_eval call...

15 months agoBBox accessor: switch to `switch`, add missing gpencil case.
Bastien Montagne [Mon, 29 Oct 2018 11:06:27 +0000 (12:06 +0100)]
BBox accessor: switch to `switch`, add missing gpencil case.

15 months agoEevee: Fix Sun soft shadows not starting at first sample
Clément Foucault [Mon, 29 Oct 2018 15:02:13 +0000 (16:02 +0100)]
Eevee: Fix Sun soft shadows not starting at first sample

15 months agoEdit Mode: Fix "Hidden Wire" option not working
Clément Foucault [Mon, 29 Oct 2018 14:34:47 +0000 (15:34 +0100)]
Edit Mode: Fix "Hidden Wire" option not working

15 months agoUI: Typo in tooltip
Pablo Vazquez [Mon, 29 Oct 2018 13:43:12 +0000 (14:43 +0100)]
UI: Typo in tooltip

15 months agoFix: Pose Breakdown operator (continued)
Jacques Lucke [Mon, 29 Oct 2018 13:07:47 +0000 (14:07 +0100)]
Fix: Pose Breakdown operator (continued)

15 months agoFix: Pose Breakdown operator
Jacques Lucke [Mon, 29 Oct 2018 12:57:17 +0000 (13:57 +0100)]
Fix: Pose Breakdown operator

Reviewer: brecht

Differential Revision: D3848

15 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Mon, 29 Oct 2018 12:26:09 +0000 (13:26 +0100)]
Merge branch 'master' into blender2.8

15 months agoCycles: more detailed tooltips for cryptomatte options.
Brecht Van Lommel [Mon, 29 Oct 2018 12:05:29 +0000 (13:05 +0100)]
Cycles: more detailed tooltips for cryptomatte options.

15 months agoEnable dependency graph update while rendering
Sergey Sharybin [Mon, 29 Oct 2018 11:16:18 +0000 (12:16 +0100)]
Enable dependency graph update while rendering

It is a whole point of copy-on-write to make such updates safe.
If this causes an issues, we need to solve them.

Fixes T57302: Viewport (selection etc) not updated while rendering

15 months agoFix unneeded/unwanted user counter when freeing CoW NLA
Sergey Sharybin [Mon, 29 Oct 2018 10:13:19 +0000 (11:13 +0100)]
Fix unneeded/unwanted user counter when freeing CoW NLA

15 months agoFix T57360: Crash when Play Animation in this scene
Sergey Sharybin [Mon, 29 Oct 2018 10:06:53 +0000 (11:06 +0100)]
Fix T57360: Crash when Play Animation in this scene

Was caused by a code which was putting animation value back to
original datablock.

The tricky part here is that we don't always know ID, so can not
put those values. Would be nice to have a solution for this, but
for until then we should be relatively good.

15 months agoFix T57372: Second full scene copy crashes on deletion.
Bastien Montagne [Mon, 29 Oct 2018 10:42:38 +0000 (11:42 +0100)]
Fix T57372: Second full scene copy crashes on deletion.

Hope this time we are done for good (root of the issue was that master
collections are not in bmain...).

15 months agoFix stupid multiple-call of same function in Collections remapping code.
Bastien Montagne [Mon, 29 Oct 2018 09:49:46 +0000 (10:49 +0100)]
Fix stupid multiple-call of same function in Collections remapping code.

Related to T57372: Second full scene copy crashes on deletion (fixes
deleting second copy, but now it crashes on deleting the first copy...).

15 months agoFix T57384: Depsgraph assert after loading file with Mask Node
Philipp Oeser [Fri, 26 Oct 2018 08:32:57 +0000 (10:32 +0200)]
Fix T57384: Depsgraph assert after loading file with Mask Node

Maniphest Tasks: T57384

Differential Revision:

15 months agoFix topbar UI being lost on undo w/ mode change
Campbell Barton [Mon, 29 Oct 2018 09:20:16 +0000 (20:20 +1100)]
Fix topbar UI being lost on undo w/ mode change

15 months agoFix topbar tool UI being lost on undo
Campbell Barton [Mon, 29 Oct 2018 06:32:15 +0000 (17:32 +1100)]
Fix topbar tool UI being lost on undo

Using operators to the object mode was resetting the tool.

See: T56865

15 months agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 29 Oct 2018 04:23:02 +0000 (15:23 +1100)]
Merge branch 'master' into blender2.8

15 months agoFix assert weight painting after undo
Campbell Barton [Mon, 29 Oct 2018 04:21:25 +0000 (15:21 +1100)]
Fix assert weight painting after undo

15 months agoMulti-Object EditMode: curve select next/prev
Campbell Barton [Mon, 29 Oct 2018 02:41:44 +0000 (13:41 +1100)]
Multi-Object EditMode: curve select next/prev

D3842 & D3843 by @zazizizou

15 months agoMulti-Object EditMode: curve select more/less
Campbell Barton [Mon, 29 Oct 2018 02:25:04 +0000 (13:25 +1100)]
Multi-Object EditMode: curve select more/less

D3844 by @zazizizou with support for select-less

15 months agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 29 Oct 2018 02:04:47 +0000 (13:04 +1100)]
Merge branch 'master' into blender2.8

15 months agoModifier: mask threshold option
Campbell Barton [Mon, 29 Oct 2018 02:01:48 +0000 (13:01 +1100)]
Modifier: mask threshold option

D3834 by @Allosteric

15 months agoCleanup: avoid C++ keyword in DNA
Campbell Barton [Mon, 29 Oct 2018 01:49:47 +0000 (12:49 +1100)]
Cleanup: avoid C++ keyword in DNA

15 months agoPyAPI: remove GPUVertFormat() creation from a list
Campbell Barton [Mon, 29 Oct 2018 00:08:55 +0000 (11:08 +1100)]
PyAPI: remove GPUVertFormat() creation from a list

We already have `attr_add` method,
best not have two ways to do the same thing.

See: D3830

15 months agoCleanup: typo
Campbell Barton [Sun, 28 Oct 2018 23:35:05 +0000 (10:35 +1100)]
Cleanup: typo

15 months agoCleanup: style
Campbell Barton [Sun, 28 Oct 2018 23:24:42 +0000 (10:24 +1100)]
Cleanup: style

15 months agoFix crash flipping region without active area
Julian Eisel [Sun, 28 Oct 2018 21:55:21 +0000 (22:55 +0100)]
Fix crash flipping region without active area

Would happen when cursor is in-between editors for example.

15 months agoDRW: Cleanup: Redundant check
Clément Foucault [Sun, 28 Oct 2018 20:46:52 +0000 (21:46 +0100)]
DRW: Cleanup: Redundant check

15 months agoEevee: Implement jittered soft shadowmap
Clément Foucault [Sun, 28 Oct 2018 20:41:40 +0000 (21:41 +0100)]
Eevee: Implement jittered soft shadowmap

This new option is located in the shadows options in the render settings.
This approach is simple and just randomize the shadow map position (not
the lamp itself) and just let the temporal supersampling do the average of
all the shadowing. The downside is that is needs quite a large number of
samples to give smooth results and individual sample position can remain

Enabling this option will make the viewport refresh all shadow maps every
redraw so it has a serious performance impact.

This approach is not physicaly based at all and will not match cycles.


The sampling for point lamps (spheres) is not

15 months agoBLI: Add comment about to orthogonalize_m3/4
Clément Foucault [Sun, 28 Oct 2018 18:27:14 +0000 (19:27 +0100)]
BLI: Add comment about to orthogonalize_m3/4

15 months agoEevee: Fix contact shadow creating to overshadowing
Clément Foucault [Sun, 28 Oct 2018 18:24:56 +0000 (19:24 +0100)]
Eevee: Fix contact shadow creating to overshadowing

This was because the shadow rays could be generated below the geometric

15 months agoUse keyword argument for ui label text in cryptomatte passes
Philipp Oeser [Sun, 28 Oct 2018 19:39:44 +0000 (20:39 +0100)]
Use keyword argument for ui label text in cryptomatte passes

15 months agoGP: Refactor Instance modifier and rename to Array
Antonioya [Sun, 28 Oct 2018 17:08:24 +0000 (18:08 +0100)]
GP: Refactor Instance modifier and rename to Array

The old name Instance was logic when the modifier created new object instances, but now works equal to mesh Array modifier, so the old name was not logic and must be Array.

Also added a Object to use as offset similar to mesh Array modifier.

15 months agoFix label misalignment when there are multiple buttons on the right side.
Brecht Van Lommel [Thu, 25 Oct 2018 13:27:31 +0000 (15:27 +0200)]
Fix label misalignment when there are multiple buttons on the right side.

15 months agoCleanup: fix compiler warnings.
Brecht Van Lommel [Sun, 28 Oct 2018 16:22:26 +0000 (17:22 +0100)]
Cleanup: fix compiler warnings.

15 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Sun, 28 Oct 2018 15:41:30 +0000 (16:41 +0100)]
Merge branch 'master' into blender2.8

15 months agoFix snaps appearing in system bookmarks on Linux.
Roel Koster [Sun, 28 Oct 2018 12:03:50 +0000 (13:03 +0100)]
Fix snaps appearing in system bookmarks on Linux.

Differential Revision:

15 months agoFix Linux build after Cryptomatte commit.
Brecht Van Lommel [Sun, 28 Oct 2018 13:53:08 +0000 (14:53 +0100)]
Fix Linux build after Cryptomatte commit.

15 months agoFix T57394: missing bl_category in panel (custom props / stereoscopy)
Philipp Oeser [Fri, 26 Oct 2018 18:30:41 +0000 (20:30 +0200)]
Fix T57394: missing bl_category in panel (custom props / stereoscopy)

Differential Revision:

15 months agoCycles: Added Cryptomatte output.
Stefan Werner [Sun, 28 Oct 2018 09:37:41 +0000 (05:37 -0400)]
Cycles: Added Cryptomatte output.

This allows for extra output passes that encode automatic object and material masks
for the entire scene. It is an implementation of the Cryptomatte standard as
introduced by Psyop. A good future extension would be to add a manifest to the
export and to do plenty of testing to ensure that it is fully compatible with other
renderers and compositing programs that use Cryptomatte.

Internally, it adds the ability for Cycles to have several passes of the same type
that are distinguished by their name.

Differential Revision:

15 months agoCleanup: More meaningful variable name
Severin [Sat, 27 Oct 2018 15:12:51 +0000 (17:12 +0200)]
Cleanup: More meaningful variable name

15 months agoFix T57393: Cycles OSL bevel and AO not working after OSL upgrade.
Brecht Van Lommel [Fri, 26 Oct 2018 17:26:06 +0000 (19:26 +0200)]
Fix T57393: Cycles OSL bevel and AO not working after OSL upgrade.

15 months agoTool System: pie menu style activate-on-release
Campbell Barton [Sat, 27 Oct 2018 01:22:20 +0000 (12:22 +1100)]
Tool System: pie menu style activate-on-release

Support activate on release for the popup toolbar.

15 months agoUI: operator to press the active button
Campbell Barton [Sat, 27 Oct 2018 01:21:19 +0000 (12:21 +1100)]
UI: operator to press the active button

Needed to use the keymap to activate buttons from other keys.

15 months agoMulti-Objects: Curve - select pick, linked and short path
Dalai Felinto [Fri, 26 Oct 2018 22:54:11 +0000 (19:54 -0300)]
Multi-Objects: Curve - select pick, linked and short path

I'm following mesh editing to decide when to switch active object, or
deselect the other objects. I hope we can keep this all consistent in
the end.

15 months agoCleanup: Remove silly redundant if check in ED_armature_edit_select_pick
Dalai Felinto [Fri, 26 Oct 2018 22:20:12 +0000 (19:20 -0300)]
Cleanup: Remove silly redundant if check in ED_armature_edit_select_pick

15 months agoFix T57367: Multi-Object-Mode: Edit Lattice selection only working for active object
Dalai Felinto [Fri, 26 Oct 2018 22:18:49 +0000 (19:18 -0300)]
Fix T57367: Multi-Object-Mode: Edit Lattice selection only working for active object

For the records, curves still have this problem.

15 months agoFix lasso selection not working for lattices
Dalai Felinto [Fri, 26 Oct 2018 21:29:42 +0000 (18:29 -0300)]
Fix lasso selection not working for lattices

Regression introduced on e88e80a6.
This was broken for both single and multi-objects.

It is a typo that apparently slipt through testing, oh well.
I'm glad I caught this, I just wished it would have been faster.

15 months agoFix crash when switching to Scripting workspace
Dalai Felinto [Fri, 26 Oct 2018 18:33:03 +0000 (15:33 -0300)]
Fix crash when switching to Scripting workspace

Crash introduced on: a4a6ed1ba3c86ed842f4373c65d64d28d827f864.

15 months agoSmall cleanup: Remove uneeded/wrong check
Dalai Felinto [Fri, 26 Oct 2018 16:45:35 +0000 (13:45 -0300)]
Small cleanup: Remove uneeded/wrong check

If ob was NULL it would crash in the else part of the if statement.
If we really think we may run into that (which we should not) we can just assert
or add a if (ob == NULL) return; in the top of the function.

15 months agoFix unreported: Crash when adding lattice vertex group
Dalai Felinto [Fri, 26 Oct 2018 16:44:14 +0000 (13:44 -0300)]
Fix unreported: Crash when adding lattice vertex group

15 months agoFix unreported: Crash when removing lattice vertex group
Dalai Felinto [Fri, 26 Oct 2018 16:36:30 +0000 (13:36 -0300)]
Fix unreported: Crash when removing lattice vertex group

15 months agoRefactor cleanup: BKE_object_is_in_editmode
Dalai Felinto [Fri, 26 Oct 2018 16:21:54 +0000 (13:21 -0300)]
Refactor cleanup: BKE_object_is_in_editmode

Using switch and keep it concise.

15 months agoFix T57368: Multi-Object-Mode: Edit Lattice draws only active
Dalai Felinto [Fri, 26 Oct 2018 16:11:07 +0000 (13:11 -0300)]
Fix T57368: Multi-Object-Mode: Edit Lattice draws only active

As it turned out the issue wasn't that we were drawing only the active,
but that the "object mode" lattice drawing was drawing on top of the
drawing for all the edit mode lattice objects.

We are doing the same original behaviour for curves and even meshes. To be
investigated if it is ok for those other cases.

15 months agoCycles: Expose noisy image pass by default when rendering with denoiser
Lukas Stockner [Thu, 30 Aug 2018 21:28:10 +0000 (23:28 +0200)]
Cycles: Expose noisy image pass by default when rendering with denoiser

Apparently quite a few users would like to have the noisy pass available when using the denoiser, and since it's being generated anyways we might as well expose it by default.

Reviewers: brecht

Differential Revision:

15 months agoMulti-Objects: LATTICE_OT_make_regular
Dalai Felinto [Fri, 26 Oct 2018 14:01:53 +0000 (11:01 -0300)]
Multi-Objects: LATTICE_OT_make_regular

Committing this for the sake of completionism. I'm going to bring this
up for review, I think we may want to revert it.

Fundamentally I'm changing the behaviour of the operator both in object
mode (acting on all selected lattice objects), as well as the edit mode
(acting on all lattices in edit mode, regardless of them having any
 selected vertice).

15 months agoEevee: SSS: Fix issue with mac and stencil buffer blitting
Clément Foucault [Thu, 25 Oct 2018 20:13:46 +0000 (22:13 +0200)]
Eevee: SSS: Fix issue with mac and stencil buffer blitting

Adding a workaround in this case: we blit the depth buffer instead of the
stencil buffer and use the copy as the texture. This is slower but at
least it should work.

15 months agoGPU: Add workarounds for buggy glBlitFramebuffer function on macOS + Radeon
Clément Foucault [Thu, 25 Oct 2018 19:57:40 +0000 (21:57 +0200)]
GPU: Add workarounds for buggy glBlitFramebuffer function on macOS + Radeon

When calling glBlitFramebuffer on most (if not all) mac that have a GPU
from the Radeon Pro series, the data is not properly copied and only a
subset of the pixels are correctly copied.

This only happens when blitting the depth buffer if the depth buffer is

Changing the depth buffer format to GPU_DEPTH32F_STENCIL8 fixes the issue
but only works if blitting the depth componnent. The stencil componnent
still provoke issues when being copied.

15 months agoGPUTexture: Add supports for GL_DEPTH32F_STENCIL8 texture format
Clément Foucault [Thu, 25 Oct 2018 17:08:35 +0000 (19:08 +0200)]
GPUTexture: Add supports for GL_DEPTH32F_STENCIL8 texture format

15 months agoWorkbench: Fix shadows on macOS
Clément Foucault [Thu, 25 Oct 2018 11:01:15 +0000 (13:01 +0200)]
Workbench: Fix shadows on macOS

15 months agoGP: Assign new materials to brushes
Antonioya [Fri, 26 Oct 2018 07:02:28 +0000 (09:02 +0200)]
GP: Assign new materials to brushes

When create a new material, this must be set to the brushes automatically.

15 months agoPyAPI: raise error when toolbar panels use tabs
Campbell Barton [Fri, 26 Oct 2018 04:05:07 +0000 (15:05 +1100)]
PyAPI: raise error when toolbar panels use tabs

Add-ons that register panels in the toolbar can
no longer use 'bl_categories' (tabs).

15 months agoCorrection for Gizmo.draw_custom_shape utility API
Campbell Barton [Fri, 26 Oct 2018 01:43:40 +0000 (12:43 +1100)]
Correction for Gizmo.draw_custom_shape utility API

15 months agoPyAPI: gpu utility module to create new batches
Jacques Lucke [Fri, 26 Oct 2018 01:38:04 +0000 (12:38 +1100)]
PyAPI: gpu utility module to create new batches

Support the common case of creating batches from python geometry,
a shader and optionally indices.

See D3779

15 months agoUpdate gpu offscreen PyAPI example
Campbell Barton [Fri, 26 Oct 2018 01:13:03 +0000 (12:13 +1100)]
Update gpu offscreen PyAPI example

15 months agoFix parsing single int for uniform_int
Campbell Barton [Fri, 26 Oct 2018 00:59:49 +0000 (11:59 +1100)]
Fix parsing single int for uniform_int

This worked for float but not int.

15 months agoCleanup: minor change to last commit
Campbell Barton [Fri, 26 Oct 2018 00:48:42 +0000 (11:48 +1100)]
Cleanup: minor change to last commit

15 months agoUpdate Gizmo.draw_custom_shape for API changes
Campbell Barton [Fri, 26 Oct 2018 00:26:39 +0000 (11:26 +1100)]
Update Gizmo.draw_custom_shape for API changes

15 months agoWM: default tool was being set for space types w/o tools
Campbell Barton [Thu, 25 Oct 2018 23:42:31 +0000 (10:42 +1100)]
WM: default tool was being set for space types w/o tools

Add mask for space types so we don't accidentally add tools
for space types that don't support it.

15 months agoPyAPI: draw handlers now store args in the capsule context
Campbell Barton [Thu, 25 Oct 2018 22:19:51 +0000 (09:19 +1100)]
PyAPI: draw handlers now store args in the capsule context

Was using the handlers custom-data which crashes
when Blender frees the screen data before Python removes the handler.

15 months agoPyAPI: Temp workaround for crash removing cursor
Campbell Barton [Thu, 25 Oct 2018 21:49:10 +0000 (08:49 +1100)]
PyAPI: Temp workaround for crash removing cursor

Opening a new file frees the cursors,
add check if the cursor is still valid.

This leaks a Python reference, so a better solution is needed.

15 months agoPyAPI: Make GPUVertFormat() argument optional
Campbell Barton [Thu, 25 Oct 2018 21:06:05 +0000 (08:06 +1100)]
PyAPI: Make GPUVertFormat() argument optional

15 months agoGP: Add warning when mix Build and Time Offset
Antonioya [Thu, 25 Oct 2018 17:15:32 +0000 (19:15 +0200)]
GP: Add warning when mix Build and Time Offset

15 months agoGP: Include option to render layers by view layer
Antonioya [Thu, 25 Oct 2018 14:50:42 +0000 (16:50 +0200)]
GP: Include option to render layers by view layer

This allows to make composition getting each grease pencil layer in a different render output.

15 months agoCleanup: comments and unused code
Ines Almeida [Thu, 25 Oct 2018 13:41:32 +0000 (13:41 +0000)]
Cleanup: comments and unused code

15 months agoCycles: Overhaul ensure_valid_reflection to fix issues with normal- and bumpmapping
Lukas Stockner [Sun, 21 Oct 2018 01:41:31 +0000 (03:41 +0200)]
Cycles: Overhaul ensure_valid_reflection to fix issues with normal- and bumpmapping

This function is supposed to prevent the black artifacts caused by strong normal- or bumpmapping, but failed in some cases.

Now the code correctly handles all test files and previous issues I am aware of and also has extensive comments describing
the algorithm and the math behind it.

Basically, the main problem was that there can be multiple valid solutions that fulfil the reflection angle criterium,
but I had assumed that only one would exist and therefore simply picked the first solution with a positive term in srqt().
Now, the code uses additional validity checks and a simple heuristic to pick the best valid solution.

Additionally, the code messed up very shallow reflections even if the normal map strength was zero due to the constant
limit for the outgoing ray angle, which caused shallow incoming rays to fail the initial test even when reflected directly
on Ng. Now, the code accounts for this by reducing the threshold in the case of a shallow incoming ray, ensuring that at
least N=Ng is always a valid solution.

Reviewers: brecht

Differential Revision:

15 months agoTool System: draw circle-select brush outline
Campbell Barton [Thu, 25 Oct 2018 10:05:29 +0000 (21:05 +1100)]
Tool System: draw circle-select brush outline

15 months agoTool System: support custom cursor drawing
Campbell Barton [Thu, 25 Oct 2018 10:03:41 +0000 (21:03 +1100)]
Tool System: support custom cursor drawing

15 months agoPyAPI: initial gpu_extras module (circle drawing utility)
Campbell Barton [Thu, 25 Oct 2018 10:04:38 +0000 (21:04 +1100)]
PyAPI: initial gpu_extras module (circle drawing utility)

15 months agoPyAPI: rename GPL VertBuf.attr_fill identifier to id
Campbell Barton [Thu, 25 Oct 2018 09:32:02 +0000 (20:32 +1100)]
PyAPI: rename GPL VertBuf.attr_fill identifier to id

This is used elsewhere in the API and its a common abbreviation.

15 months agoDepsgraph: don't lose the update tag on rebuild for op nodes with a name.
Alexander Gavrilov [Thu, 25 Oct 2018 07:29:17 +0000 (10:29 +0300)]
Depsgraph: don't lose the update tag on rebuild for op nodes with a name.

This fixes a missing update when clearing the Text On Curve
(follow_curve) option of a text object.

15 months agoCleanup: move params into their own struct
Campbell Barton [Thu, 25 Oct 2018 06:20:26 +0000 (17:20 +1100)]
Cleanup: move params into their own struct

15 months agoPyAPI: take paint-cursor space/region type args
Campbell Barton [Thu, 25 Oct 2018 05:27:13 +0000 (16:27 +1100)]
PyAPI: take paint-cursor space/region type args

15 months agoWM: space, region type filtering for paint cursor
Campbell Barton [Thu, 25 Oct 2018 05:06:47 +0000 (16:06 +1100)]
WM: space, region type filtering for paint cursor

Avoids calling poll on mouse-move for unrelated space/region types.

15 months agoPyAPI: support for Python paint cursors
Campbell Barton [Thu, 25 Oct 2018 04:31:02 +0000 (15:31 +1100)]
PyAPI: support for Python paint cursors

15 months agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 25 Oct 2018 04:19:35 +0000 (15:19 +1100)]
Merge branch 'master' into blender2.8

15 months agoWM: minor changes to cursor API
Campbell Barton [Thu, 25 Oct 2018 04:18:24 +0000 (15:18 +1100)]
WM: minor changes to cursor API

15 months agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 25 Oct 2018 01:26:08 +0000 (12:26 +1100)]
Merge branch 'master' into blender2.8

15 months agoCleanup: unused vars, correct bad (unused) logic
Campbell Barton [Thu, 25 Oct 2018 01:24:38 +0000 (12:24 +1100)]
Cleanup: unused vars, correct bad (unused) logic

15 months agoCleanup: unused variables
Campbell Barton [Thu, 25 Oct 2018 01:03:34 +0000 (12:03 +1100)]
Cleanup: unused variables