13 months agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 9 Nov 2018 00:51:14 +0000 (11:51 +1100)]
Merge branch 'master' into blender2.8

13 months agoreadme: use name 'macOS'
Campbell Barton [Fri, 9 Nov 2018 00:49:49 +0000 (11:49 +1100)]
readme: use name 'macOS'

13 months agoKeymap: skip loading the keymap preset in background mode
Campbell Barton [Fri, 9 Nov 2018 00:43:45 +0000 (11:43 +1100)]
Keymap: skip loading the keymap preset in background mode

Caused a crash on exit and isn't needed.

13 months agoKeymap: move builtin keymaps from C to Python
Brecht Van Lommel [Thu, 8 Nov 2018 04:59:51 +0000 (15:59 +1100)]
Keymap: move builtin keymaps from C to Python

This should be purely an implementation change,
for end users there should be no functional difference.

The entire key configuration is in one file with ~5000 lines of code.
Mostly avoiding code duplication and preserve comments and utility
functions from the C code.
It's a bit long but for searching and editing it's also convenient to
have it all in one file.


- Actual keymap is shared by blender / blender_legacy
  and stored in `keymap_data/`

  This only generates JSON-like data to be passed into
  `keyconfig_import_from_data`, allowing other presets to load and
  manipulate the default keymap.

- Each preset defines 'keyconfig_data'
  which can be shared between presets.

- Some of the utility functions for generating keymap items still
  need to be ported over to Python.

- Some keymap items can be made into loops (marked as TODO).

See: D3907

13 months agoEevee: Fix broken Vector Transform node
Clément Foucault [Thu, 8 Nov 2018 20:50:17 +0000 (21:50 +0100)]
Eevee: Fix broken Vector Transform node

The Camera to Object space matrix was not implemented in gpu_codegen.

13 months agoEevee: Add partial support for the Light Path Node
Clément Foucault [Thu, 8 Nov 2018 18:17:41 +0000 (19:17 +0100)]
Eevee: Add partial support for the Light Path Node

This makes it possible to tweak indirect lighting in the shader.

Only a subset of the outputs is supported and the ray depth has not exactly
the same meaning:

Is Camera : Supported.
Is Shadow : Supported.
Is Diffuse : Supported.
Is Glossy : Supported.
Is Singular : Not supported. Same as Is Glossy.
Is Reflection : Not supported. Same as Is Glossy.
Is Transmission : Not supported. Same as Is Glossy.
Ray Length : Not supported. Defaults to 1.0.
Ray Depth : Indicate the current bounce when baking the light cache.
Diffuse Depth : Same as Ray Depth but only when baking diffuse light.
Glossy Depth : Same as Ray Depth but only when baking specular light.
Transparent Depth : Not supported. Defaults to 0.
Transmission Depth : Not supported. Same as Glossy Depth.

Caveat: Is Glossy does not work with Screen Space Reflections but does work
with reflection planes (when used with SSR or not).
We have to render the world twice for that to work.

13 months agoEevee: Fix geometry node for environments and support true_normal
Clément Foucault [Thu, 8 Nov 2018 12:16:06 +0000 (13:16 +0100)]
Eevee: Fix geometry node for environments and support true_normal

Also minor cleanup for the Bump node.

13 months agoEevee: Fix refraction materials
Clément Foucault [Thu, 8 Nov 2018 12:07:22 +0000 (13:07 +0100)]
Eevee: Fix refraction materials

Fix refraction depth not working without ScreenSpace Refraction.
Fix ScreenSpace Refraction masking reflections.

13 months agoFix wrong selectability icon in viewport menu.
Brecht Van Lommel [Thu, 8 Nov 2018 18:06:42 +0000 (19:06 +0100)]
Fix wrong selectability icon in viewport menu.

13 months agoFix X-Ray option showing in LookDev mode, where it does nothing.
Brecht Van Lommel [Thu, 8 Nov 2018 17:58:00 +0000 (18:58 +0100)]
Fix X-Ray option showing in LookDev mode, where it does nothing.

13 months agoFix depsgraph console warning after recent changes.
Brecht Van Lommel [Thu, 8 Nov 2018 17:53:30 +0000 (18:53 +0100)]
Fix depsgraph console warning after recent changes.

13 months agoFix Cycles viewport render info overlapping other text.
Brecht Van Lommel [Thu, 25 Oct 2018 09:47:37 +0000 (11:47 +0200)]
Fix Cycles viewport render info overlapping other text.

Now it shows more compact info below the view/object name. Render time and
memory usage is left out, as in most cases this is not so important. These
could be added back optionally if needed.

13 months agoUI: Tweaks to Add menu in Video Sequencer Editor.
Pablo Vazquez [Thu, 8 Nov 2018 15:01:02 +0000 (16:01 +0100)]
UI: Tweaks to Add menu in Video Sequencer Editor.

Mainly organization and bringing it closer to the Add menu in the 3D Viewport.

* Icons for most top-level items when available.
* New Transitions menu for Cross, Gamma Cross and Wipe.
* Move Color and Text to top level. These options are used way too often to be in a submenu.
Having a menu with 2 entries defeats the purpose, so I've removed it for now. I checked if
add-ons used it and apparently not. It can be brought back if needed.
* Avoid empty dropdown in Scene/Mask/Clip. Solution is ugly for now and should be improved in C.
* Some effects couldn't be used without 1 or 2 strips selected, now the menu entry is grayed out accordingly.
* Some more icons for other menus.

13 months agoUI: Some icons for Image menu in Image editor.
Pablo Vazquez [Wed, 7 Nov 2018 17:16:04 +0000 (18:16 +0100)]
UI: Some icons for Image menu in Image editor.

13 months agoFix T57689: world nodes / texture not updating for Eevee.
Brecht Van Lommel [Thu, 8 Nov 2018 14:56:56 +0000 (15:56 +0100)]
Fix T57689: world nodes / texture not updating for Eevee.

Only do GPU material updates through depsgraph evaluation now. This was
already happening for material, just missing for the world.

13 months agoCleanup, compiler warnings in release mode
Sergey Sharybin [Thu, 8 Nov 2018 14:49:25 +0000 (15:49 +0100)]
Cleanup, compiler warnings in release mode

13 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Thu, 8 Nov 2018 14:13:43 +0000 (15:13 +0100)]
Merge branch 'master' into blender2.8

13 months agoCleanup, spelling
Sergey Sharybin [Wed, 7 Nov 2018 16:22:02 +0000 (17:22 +0100)]
Cleanup, spelling

13 months agoFix build on 32bit after Embree changes.
Brecht Van Lommel [Thu, 8 Nov 2018 13:48:54 +0000 (14:48 +0100)]
Fix build on 32bit after Embree changes.

13 months agoFix: show options of image empty only for image empties
Jacques Lucke [Thu, 8 Nov 2018 13:30:27 +0000 (14:30 +0100)]
Fix: show options of image empty only for image empties

13 months agoRNA: tag animation update when changing Action Extrapolation/Blend/etc.
Alexander Gavrilov [Thu, 8 Nov 2018 10:56:57 +0000 (13:56 +0300)]
RNA: tag animation update when changing Action Extrapolation/Blend/etc.

These fields affect the final result when using NLA.

13 months agoRNA API: ViewLayers: add name to LayerCollection struct.
Bastien Montagne [Thu, 8 Nov 2018 10:34:18 +0000 (11:34 +0100)]
RNA API: ViewLayers: add name to LayerCollection struct.

Just use Collection name (same as for material slots e.g.).

That way, one can access those by their names as well, in
LayerCollection.children ... collection property (yeah, collection,
collection, and moar collection).

13 months agoUI: fix glitch showing the redo panel
Campbell Barton [Thu, 8 Nov 2018 04:43:42 +0000 (15:43 +1100)]
UI: fix glitch showing the redo panel

13 months agobuild: add proper embree support to platform_win32.cmake
Ray Molenkamp [Thu, 8 Nov 2018 02:34:49 +0000 (19:34 -0700)]
build: add proper embree support to platform_win32.cmake

made the use of findpackage optional and add support for debug builds

13 months agobuild_environment: add debug libs for embree on windows
Ray Molenkamp [Thu, 8 Nov 2018 02:33:07 +0000 (19:33 -0700)]
build_environment: add debug libs for embree on windows

13 months agobuild_deps_windows: add option to to only create project files.
Ray Molenkamp [Thu, 8 Nov 2018 02:18:53 +0000 (19:18 -0700)]
build_deps_windows: add option to to only create project files.

13 months agoCycles: Write Cryptomatte metadata according to the specification
Lukas Stockner [Wed, 7 Nov 2018 03:05:47 +0000 (04:05 +0100)]
Cycles: Write Cryptomatte metadata according to the specification

Reviewers: brecht, sergey, swerner

Subscribers: creamsurfer, Tanguy, Noss, SteffenD

Differential Revision:

13 months agoRender API: Support arbitrary length for custom image metadata fields
Lukas Stockner [Thu, 8 Nov 2018 00:05:55 +0000 (01:05 +0100)]
Render API: Support arbitrary length for custom image metadata fields

13 months agoUI: hide bundled addons which haven't been updated
Campbell Barton [Wed, 7 Nov 2018 23:10:08 +0000 (10:10 +1100)]
UI: hide bundled addons which haven't been updated

All are displayed when '--debug' is set, see: T56351

13 months agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 7 Nov 2018 22:56:22 +0000 (09:56 +1100)]
Merge branch 'master' into blender2.8

13 months agoCleanup: minor simplification to user-addon check
Campbell Barton [Wed, 7 Nov 2018 22:54:13 +0000 (09:54 +1100)]
Cleanup: minor simplification to user-addon check

13 months agoRNA: Object.select_set use boolean, only select
Campbell Barton [Wed, 7 Nov 2018 21:51:03 +0000 (08:51 +1100)]
RNA: Object.select_set use boolean, only select

- Was setting active state, making it necessary to backup/restore
  active object in cases where this isn't needed.
  Existing scripts are explicitly setting the active object when needed.

- Use a boolean select arg (toggle selection wasn't used anywhere).

- Add an optional view layer argument since scripts should be able to
  operate outside the user context.

13 months agoCleanup: use explicit 'select_and_set_active' API name
Campbell Barton [Wed, 7 Nov 2018 21:15:22 +0000 (08:15 +1100)]
Cleanup: use explicit 'select_and_set_active' API name

Selection should be separated from active state and handled by higher
level code (operators/editors) instead of happening automatically.

13 months agoGPU: Cleanups: Remove GPUMatType, Vectorize / MADD some operations
Clément Foucault [Wed, 7 Nov 2018 21:16:03 +0000 (22:16 +0100)]
GPU: Cleanups: Remove GPUMatType, Vectorize / MADD some operations

13 months agoEevee: Add support for interpolation options for Environment Texture nodes
Clément Foucault [Wed, 7 Nov 2018 21:14:18 +0000 (22:14 +0100)]
Eevee: Add support for interpolation options for Environment Texture nodes

13 months agoEevee: Support for extension type in the Node Image Texture
Clément Foucault [Wed, 7 Nov 2018 18:40:24 +0000 (19:40 +0100)]
Eevee: Support for extension type in the Node Image Texture

This does not work with the box projection mode. Implementing for box
projection mode would be difficult, slow, and produce a lot of code
duplication. Also i'm not sure this is worth it, as it's not a common use

13 months agoCleanup: style, use const args
Campbell Barton [Wed, 7 Nov 2018 21:02:02 +0000 (08:02 +1100)]
Cleanup: style, use const args

13 months agoCleanup: remove some useless BKE_library and BKE_main includes.
Bastien Montagne [Wed, 7 Nov 2018 17:00:24 +0000 (18:00 +0100)]
Cleanup: remove some useless BKE_library and BKE_main includes.

Makes it simpler to make some changes...

Also fix order of some includes (use alphabetical please).

13 months agoCleanup/Refactor: move Main stuff into BKE's new main.c file (and header).
Bastien Montagne [Wed, 7 Nov 2018 15:06:36 +0000 (16:06 +0100)]
Cleanup/Refactor: move Main stuff into BKE's new main.c file (and header).

We already had a BKE_main.h header, no reason not to put there
Main-specific functions, BKE_library has already more than enough to
handle with IDs and library management!

13 months agoCleanup: Remove 'BKE_library.h' include from 'BKE_main.h'
Bastien Montagne [Wed, 7 Nov 2018 14:37:31 +0000 (15:37 +0100)]
Cleanup: Remove 'BKE_library.h' include from 'BKE_main.h'

That kind of implicit includes should really only be done when totally,
absolutely necessary, and ideally only with rather simple 'second-level'

Otherwise not being explicit with includes always end up biting in
unexpected ways...

13 months agoFix dpesgraph wrongly refcounting NLA strip actions when duplicating IDs.
Bastien Montagne [Wed, 7 Nov 2018 12:55:29 +0000 (13:55 +0100)]
Fix dpesgraph wrongly refcounting NLA strip actions when duplicating IDs.

NLA strips are users of their action, so we need to pass along ID
management flags.

This commit also cleans up a bit things by passing along ID_CREATE/COPY
flags instead of dummy booleans...

13 months agoCycles: Fixed BVH UI options enabling/disabling when Embree is enabled.
Stefan Werner [Wed, 7 Nov 2018 19:50:45 +0000 (20:50 +0100)]
Cycles: Fixed BVH UI options enabling/disabling when Embree is enabled.

13 months agoMerge branch 'master' into blender2.8
Stefan Werner [Wed, 7 Nov 2018 19:44:40 +0000 (20:44 +0100)]
Merge branch 'master' into blender2.8

13 months agoinstall_deps: Added optional build of Embree to, turned off by default.
Stefan Werner [Wed, 7 Nov 2018 19:36:03 +0000 (20:36 +0100)]
install_deps: Added optional build of Embree to, turned off by default.

13 months agoNLA: use animsys_write_orig_anim_rna when applying NLA stack results.
Alexander Gavrilov [Wed, 7 Nov 2018 16:47:22 +0000 (19:47 +0300)]
NLA: use animsys_write_orig_anim_rna when applying NLA stack results.

Without this keyframing on top of an NLA stack is quite weirdly broken.

13 months agoDepsgraph: add proper handling of actions contained in NLA strips.
Alexander Gavrilov [Wed, 7 Nov 2018 15:14:00 +0000 (18:14 +0300)]
Depsgraph: add proper handling of actions contained in NLA strips.

13 months agoPy API Docs: improve 2D image example
Jacques Lucke [Wed, 7 Nov 2018 15:13:55 +0000 (16:13 +0100)]
Py API Docs: improve 2D image example

13 months agoGP: Show all objects sharing data in edit modes
Antonioya [Wed, 7 Nov 2018 15:13:21 +0000 (16:13 +0100)]
GP: Show all objects sharing data in edit modes

Only need hide particle objects

13 months agoPy API Docs: show gpu_extras module
Jacques Lucke [Wed, 7 Nov 2018 14:45:28 +0000 (15:45 +0100)]
Py API Docs: show gpu_extras module

13 months agoCycles: Rearranged macros in kernel_types.h to fix Embree build.
Stefan Werner [Wed, 7 Nov 2018 14:20:24 +0000 (15:20 +0100)]
Cycles: Rearranged macros in kernel_types.h to fix Embree build.

13 months agoDepsgraph: Ensure dependency cycle does not clear runtime memory
Sergey Sharybin [Wed, 7 Nov 2018 14:04:08 +0000 (15:04 +0100)]
Depsgraph: Ensure dependency cycle does not clear runtime memory

If there was a dependency cycle involved, it was possible that pchan
array will be freed before all bones are evaluated. Now clear is
done in a dedicated node, which is never a part of dependency cycle.

13 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Wed, 7 Nov 2018 13:54:32 +0000 (14:54 +0100)]
Merge branch 'master' into blender2.8

13 months agoFix T57390: properties editor crash creating new scene in some cases.
Brecht Van Lommel [Wed, 7 Nov 2018 13:51:06 +0000 (14:51 +0100)]
Fix T57390: properties editor crash creating new scene in some cases.

13 months agoFix build with OSL, remove unneeded file after Embree changes.
Brecht Van Lommel [Wed, 7 Nov 2018 12:29:20 +0000 (13:29 +0100)]
Fix build with OSL, remove unneeded file after Embree changes.

13 months agoMerge branch 'master' into blender2.8
Stefan Werner [Wed, 7 Nov 2018 13:27:41 +0000 (14:27 +0100)]
Merge branch 'master' into blender2.8

13 months agoPhysics baking: tag interface locked during backing
Sergey Sharybin [Wed, 7 Nov 2018 12:40:41 +0000 (13:40 +0100)]
Physics baking: tag interface locked during backing

This is a variation of older hach which was setting is_rendering
to truth to tell window manager to not do dependency graph update.

In the nowadays reality window manager is supposed to do dependency
graph update during rendering, that was the whole purpose of CoW
project. This works fine for rendering, since render engines has
their own dependency graphs.

Physics, on the other hand, is using same dependency graph as used
for the viewport, and what's worse: it modifies objects from it.
For example, in a single threaded evaluation ASAN instantly catches
case when cached BVH constructed by smoke is referencing looptri
layer which is freed by viewport's update.

Now we are locking interface, allowing only a subset of navigation
operators to run. This seems to be safest way of dealing with the
problem. There are following variations which we can consider

- Allow viewport navigation, which will require making it so draw
  manager does not write to the objects.

  A bit dangerous, since smoke simulation might in theory modify
  data which is also used by a draw manager.

- Make physics simulation to have own dedicated dependency graph,
  solving all threading conflicts all together.

This fixes crash when baking smoke. Steps to reproduce:

- Call "Quick Smoke"
- In smoke panel, click "Bake".

13 months agoCleanup, more meaningful and up to date comments
Sergey Sharybin [Wed, 7 Nov 2018 12:07:34 +0000 (13:07 +0100)]
Cleanup, more meaningful and up to date comments

13 months agoSkip dependency graph update when interface is locked
Sergey Sharybin [Wed, 7 Nov 2018 12:05:38 +0000 (13:05 +0100)]
Skip dependency graph update when interface is locked

This is a variation of legacy dependency graph update check based on
G.is_rendering. Now it is ensured, that locked interface does not
tempter around with the dependency graph.

13 months agoCleanup, indentation
Sergey Sharybin [Wed, 7 Nov 2018 12:03:14 +0000 (13:03 +0100)]
Cleanup, indentation

13 months agoCycles: Fixed a warning.
Stefan Werner [Wed, 7 Nov 2018 13:04:22 +0000 (14:04 +0100)]
Cycles: Fixed a warning.

13 months agoCycles: Fixed OpenCL render after the Embree checkin.
Stefan Werner [Wed, 7 Nov 2018 12:53:56 +0000 (13:53 +0100)]
Cycles: Fixed OpenCL render after the Embree checkin.

13 months agoFix 'Set and Use 3D Cursor' normal editing command.
Howard Trickey [Wed, 7 Nov 2018 12:40:26 +0000 (07:40 -0500)]
Fix 'Set and Use 3D Cursor' normal editing command.

Was missing a return of OPERATOR_RUNNING_MODAL for that subcommand.

13 months agoWorkbench: Scale shadowing based on density
Clément Foucault [Wed, 7 Nov 2018 12:24:58 +0000 (13:24 +0100)]
Workbench: Scale shadowing based on density

This makes previewing thick smoke a bit more plausible with better shadows.

The shadowing is clamped so that nothing is completely black. That said the
lower bound is pretty low.

This is not an option but could become one if users do not like it in
all situations.

13 months agoWorkbench: Add cubic filtering for smoke simulation
Clément Foucault [Wed, 7 Nov 2018 12:22:22 +0000 (13:22 +0100)]
Workbench: Add cubic filtering for smoke simulation

The option is per domain and only affects the solid / xray / wireframe view.

Eevee is not yet supported.

13 months agoEevee: Fix volumetric broken after recent change
Clément Foucault [Wed, 7 Nov 2018 09:25:30 +0000 (10:25 +0100)]
Eevee: Fix volumetric broken after recent change

13 months agoCycles: Added Embree as BVH option for CPU renders.
Stefan Werner [Wed, 7 Nov 2018 11:58:12 +0000 (12:58 +0100)]
Cycles: Added Embree as BVH option for CPU renders.

Note that this is turned off by default and must be enabled at build time with the CMake WITH_CYCLES_EMBREE flag.
Embree must be built as a static library with ray masking turned on, the `make deps` scripts have been updated accordingly.
There, Embree is off by default too and must be enabled with the WITH_EMBREE flag.

Using Embree allows for much faster rendering of deformation motion blur while reducing the memory footprint.

TODO: GPU implementation, deduplication of data, leveraging more of Embrees features (e.g. tessellation cache).

Differential Revision:

13 months agoFix installing Blender due to missing icons.
Bastien Montagne [Wed, 7 Nov 2018 10:31:07 +0000 (11:31 +0100)]
Fix installing Blender due to missing icons.

13 months agoCMake: missed removing from file list
Campbell Barton [Wed, 7 Nov 2018 10:14:40 +0000 (21:14 +1100)]
CMake: missed removing from file list

13 months agoDopesheet: correctly use floating point threshold in ActKeyColumn tree.
Alexander Gavrilov [Wed, 7 Nov 2018 07:34:50 +0000 (10:34 +0300)]
Dopesheet: correctly use floating point threshold in ActKeyColumn tree.

After some thinking, since the tree itself does always use floating
point numbers, it is better to use the threshold - but correctly.

13 months agoFix hidden action-zone interaction
Campbell Barton [Wed, 7 Nov 2018 07:13:15 +0000 (18:13 +1100)]
Fix hidden action-zone interaction

13 months agoFix for hidden regions becoming active
Campbell Barton [Wed, 7 Nov 2018 07:09:45 +0000 (18:09 +1100)]
Fix for hidden regions becoming active

13 months agoFix redraws from non-existing scrollbars
Campbell Barton [Wed, 7 Nov 2018 07:14:21 +0000 (18:14 +1100)]
Fix redraws from non-existing scrollbars

Cursor motion was often causing redraws.

Distance to scrollbars that don't exist in hidden regions
caused redraws (for alpha fading).

Check if scrollbars are used before calculating fade.

13 months agoTool System: display tooltip generation error
Campbell Barton [Wed, 7 Nov 2018 03:40:44 +0000 (14:40 +1100)]
Tool System: display tooltip generation error

While this shouldn't ever happen there have been reports
of tooltip creation failure - keep this until the issue is resolved.

13 months agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 7 Nov 2018 02:40:39 +0000 (13:40 +1100)]
Merge branch 'master' into blender2.8

13 months agoCleanup: use STRPREFIX for mount point checks
Campbell Barton [Wed, 7 Nov 2018 02:37:42 +0000 (13:37 +1100)]
Cleanup: use STRPREFIX for mount point checks

From D3846 by @kostex

13 months agoMulti-Objects: MBALL_OT_select_similar
Habib Gahbiche [Wed, 7 Nov 2018 01:36:50 +0000 (23:36 -0200)]
Multi-Objects: MBALL_OT_select_similar

Compared to previous implementation, the following has been changed:
* Threshold: is now an absolute value. This allows a comparison with e.g. radii
  that are much larger than selected radius. This is also consistent with

* Radius in world space is the average of the radius scaled in x, y and z
* Since MetaBalls are symmetrical, rotation is only considered from 0 to π/2.
  So for example rotations of 90° and -90° are considered equal.
  This is also consistent with the way `CURVE_OT_select_similar` works.

Fix/changes from committer (Dalai Felinto):
* Drawing not updating after changes. (see original patch for details).

Reviewers: dfelinto
Differential Revision:

13 months agoIcons: add ops.paint.weight_sample
Campbell Barton [Wed, 7 Nov 2018 01:55:20 +0000 (12:55 +1100)]
Icons: add ops.paint.weight_sample

13 months agoIcons: remove unused vertex paint icons
Campbell Barton [Wed, 7 Nov 2018 01:43:09 +0000 (12:43 +1100)]
Icons: remove unused vertex paint icons

Also update names to match enum.

13 months agoCleanup: style
Campbell Barton [Wed, 7 Nov 2018 01:57:11 +0000 (12:57 +1100)]
Cleanup: style

13 months agoMulti-Objects: MBALL_OT_select_all
Dalai Felinto [Wed, 7 Nov 2018 01:30:30 +0000 (23:30 -0200)]
Multi-Objects: MBALL_OT_select_all

Based on D3893 by Habib Gahbiche.

13 months agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 7 Nov 2018 01:19:10 +0000 (12:19 +1100)]
Merge branch 'master' into blender2.8

13 months agoCleanup: use BLI_compiler_compat.h for BLI_INLINE
Campbell Barton [Wed, 7 Nov 2018 01:17:58 +0000 (12:17 +1100)]
Cleanup: use BLI_compiler_compat.h for BLI_INLINE

13 months agoCleanup: remove GPENCIL_OT_sculpt_select
Campbell Barton [Wed, 7 Nov 2018 01:04:03 +0000 (12:04 +1100)]
Cleanup: remove GPENCIL_OT_sculpt_select

This can be done via WM_OT_context_set_enum

13 months agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 7 Nov 2018 00:58:57 +0000 (11:58 +1100)]
Merge branch 'master' into blender2.8

13 months agoMulti-Objects: CURVE_OT_select_similar
Habib Gahbiche [Wed, 7 Nov 2018 00:01:50 +0000 (22:01 -0200)]
Multi-Objects: CURVE_OT_select_similar

Implemented the following methods:

* DIRECTION does not support surfaces, because `BKE_nurb_bpoint_calc_normal`
  does not work with Nurbs of type `CU_CARDINAL`. This also didn't work prior
  to this patch, so we wait until surfaces are properly supported in EditMode.

* Also DIRECTION should take scaling into consideration. We need our own
  versions of BKE_nurb_bpoint_calc_normal/bezt.

* Threshold default is too large. Not sure if it's better to change the default
  or scale the threshold in code.

Differential Revision:

Changes from committer (Dalai Felinto):
 * Moved nurb_bpoint_direction_worldspace_get/bezt to functions.
 * Comments hinting at the mode (direction) that require scaling to be
   taken into account - to be addressed by patch creator in a future

13 months agoCleanup: renmae ePaintTexture(Projective) -> 3D
Campbell Barton [Wed, 7 Nov 2018 00:44:51 +0000 (11:44 +1100)]
Cleanup: renmae ePaintTexture(Projective) -> 3D

Matches ePaintTexture2D, less verbose.

13 months agoPaint: paint.brush_select now supports gpencil
Campbell Barton [Wed, 7 Nov 2018 00:38:10 +0000 (11:38 +1100)]
Paint: paint.brush_select now supports gpencil

Replace grease pencil specific brush select operator.

13 months agoPaint: update shortcut detection for new logic
Campbell Barton [Tue, 6 Nov 2018 23:54:14 +0000 (10:54 +1100)]
Paint: update shortcut detection for new logic

13 months agoUI: Fix hard to see unselected channel name in Graph Editor.
Pablo Vazquez [Tue, 6 Nov 2018 23:43:29 +0000 (00:43 +0100)]
UI: Fix hard to see unselected channel name in Graph Editor.

And unify colors with the Dope Sheet.

13 months agoGPU: Make node texture "Blend" parameter interactive.
Clément Foucault [Tue, 6 Nov 2018 23:19:06 +0000 (00:19 +0100)]
GPU: Make node texture "Blend" parameter interactive.

This parameter is only used for Box projection type.

13 months agoWorkbench: Improve volume render by removing noise using temporal AA
Clément Foucault [Tue, 6 Nov 2018 23:17:36 +0000 (00:17 +0100)]
Workbench: Improve volume render by removing noise using temporal AA

13 months agoWorkbench: Fix volumetric blending leading to corrupted render results
Clément Foucault [Tue, 6 Nov 2018 23:16:46 +0000 (00:16 +0100)]
Workbench: Fix volumetric blending leading to corrupted render results

Use simpler premultiplied blending.

13 months agoWorkbench: Fix non transparent background in viewport render
Clément Foucault [Tue, 6 Nov 2018 23:15:30 +0000 (00:15 +0100)]
Workbench: Fix non transparent background in viewport render

13 months agoEevee: Wireframe: Increase precision a bit
Clément Foucault [Tue, 6 Nov 2018 19:52:06 +0000 (20:52 +0100)]
Eevee: Wireframe: Increase precision a bit

Take the full derivative and compute its length instead of using fwidth.

13 months agoEevee: Make Normal node interactive
Clément Foucault [Tue, 6 Nov 2018 19:50:37 +0000 (20:50 +0100)]
Eevee: Make Normal node interactive

Before it was triggering shader recompilation. Include small cleanup/opti.

13 months agoGPU: Fix wrong socket value struct
Clément Foucault [Tue, 6 Nov 2018 19:49:50 +0000 (20:49 +0100)]
GPU: Fix wrong socket value struct

This was causing bad behavior of the node Normal.

13 months agoEevee: Fix non normalized Normals in BSDFs and Layer Weight
Clément Foucault [Tue, 6 Nov 2018 18:44:13 +0000 (19:44 +0100)]
Eevee: Fix non normalized Normals in BSDFs and Layer Weight

Although the normal was normalized when evaluating the lighting, the normal
is often used for other purpose. In this case using the non normalized
normal maybe the source of errors.

13 months agoGPU: Cleanup: Vectorize operations and use MADD
Clément Foucault [Tue, 6 Nov 2018 18:36:03 +0000 (19:36 +0100)]
GPU: Cleanup: Vectorize operations and use MADD

13 months agoEevee: Improve Hashed Alpha transparency by reducing noise size
Clément Foucault [Tue, 6 Nov 2018 15:49:05 +0000 (16:49 +0100)]
Eevee: Improve Hashed Alpha transparency by reducing noise size

This only affect renders and static viewport accumulation.
It reduces helps reduce noise when lots of half transparent surfaces

13 months agoEevee: Support monochromatic Transparent BSDF correctly
Clément Foucault [Tue, 6 Nov 2018 13:53:54 +0000 (14:53 +0100)]
Eevee: Support monochromatic Transparent BSDF correctly

This fits Cycles better even if it is only for grey scale values. This only
work if the blend mode is Alpha Blend or Alpha Hashed.