blender.git
21 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

21 months agoinstall_deps: Added optional build of Embree to install_deps.sh, 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 install_deps.sh, turned off by default.

21 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.

21 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.

21 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

21 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

21 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

21 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.

21 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.

21 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

21 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.

21 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.

21 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

21 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
doing:

- 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".

21 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

21 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.

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

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

21 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.

21 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.

21 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.

21 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.

21 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

21 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: https://developer.blender.org/D3682

21 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.

21 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

21 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.

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

21 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

21 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.

21 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.

21 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

21 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

21 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
  `CURVE_OT_select_similar`

* Radius in world space is the average of the radius scaled in x, y and z
  directions
* 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: https://developer.blender.org/D3895

21 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

21 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.

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

21 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.

21 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

21 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

21 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

21 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

21 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:
* SIMCURHAND_TYPE
* SIMCURHAND_RADIUS
* SIMCURHAND_WEIGHT
* SIMCURHAND_DIRECTION

Limits:
* 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: https://developer.blender.org/D3846

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
   patch.

21 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.

21 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.

21 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

21 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.

21 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.

21 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

21 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.

21 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

21 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.

21 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.

21 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.

21 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.

21 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

21 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
overlaps.

21 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.

21 months agoCleanup: naming (inconsistent paint_mode term)
Campbell Barton [Tue, 6 Nov 2018 22:43:07 +0000 (09:43 +1100)]
Cleanup: naming (inconsistent paint_mode term)

21 months agoCleanup: use BKE_brush_tool_get/set macros
Campbell Barton [Tue, 6 Nov 2018 21:42:15 +0000 (08:42 +1100)]
Cleanup: use BKE_brush_tool_get/set macros

Also add API call WM_toolsystem_ref_sync_from_context
(was in rna_workspace_api.c)

21 months agoPaint: bring back brush switching
Campbell Barton [Tue, 6 Nov 2018 20:17:31 +0000 (07:17 +1100)]
Paint: bring back brush switching

Was temporarily replace with code that used the tool-system,
bring back logic which cycles and toggles brushes.

Tool slots are used for the initial brush,
after that toggle or cycle is used.

21 months agoPaint: fix for creating duplicate brushes
Campbell Barton [Tue, 6 Nov 2018 10:15:17 +0000 (21:15 +1100)]
Paint: fix for creating duplicate brushes

Setting the tool added a brush if none was found
but wasn't checking for existing brushes.

21 months agoPaint: correct brush defaults
Campbell Barton [Tue, 6 Nov 2018 10:08:48 +0000 (21:08 +1100)]
Paint: correct brush defaults

21 months agoCleanup: style
Campbell Barton [Tue, 6 Nov 2018 19:53:29 +0000 (06:53 +1100)]
Cleanup: style

21 months agoUI: Move pin icon to the right in the context breadcrumbs.
Pablo Vazquez [Tue, 6 Nov 2018 21:43:12 +0000 (22:43 +0100)]
UI: Move pin icon to the right in the context breadcrumbs.

Leaves more room for the actual breadcrumbs path, and it's less intrusive.

Thanks Luciano for the suggestion!

21 months agoUI: Use icons for some operators.
Pablo Vazquez [Tue, 6 Nov 2018 21:05:05 +0000 (22:05 +0100)]
UI: Use icons for some operators.

* Area and Workspace duplicate.
* Toggle Area Fullscreen
* Operator Search
* Workspace reorder to front/back (arrows help to know which direction means front/back)

21 months agoFix broken shortcuts in F3 'operator search' menu.
Bastien Montagne [Tue, 6 Nov 2018 19:55:12 +0000 (20:55 +0100)]
Fix broken shortcuts in F3 'operator search' menu.

From own changes in that area... Now we also enforce handling shortcuts
in case relevant drawflag of searchbutton is set. Should allow to cover
all cases, hopefully.

21 months agoFix T57656: Keyframes cannot be selected in Grease Pencil Dopesheet.
Alexander Gavrilov [Tue, 6 Nov 2018 19:31:57 +0000 (22:31 +0300)]
Fix T57656: Keyframes cannot be selected in Grease Pencil Dopesheet.

Partial revert of rBf250f9256e065: GP and masks use integer
frames, so float code isn't working or even needed.

21 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Tue, 6 Nov 2018 19:04:06 +0000 (20:04 +0100)]
Merge branch 'master' into blender2.8

21 months agoUI: change Cycles render panels organization.
Brecht Van Lommel [Tue, 6 Nov 2018 18:52:19 +0000 (19:52 +0100)]
UI: change Cycles render panels organization.

Move geometry panels to top level, move device/OSL back to top, and
various other changes.

21 months agoFix T56055: color discrepancy between viewport and render for Filmic transforms.
Troy Sobotka [Tue, 6 Nov 2018 18:35:50 +0000 (19:35 +0100)]
Fix T56055: color discrepancy between viewport and render for Filmic transforms.

21 months agoShrinkwrap: new mode that projects along the target normal.
Alexander Gavrilov [Tue, 6 Nov 2018 18:04:53 +0000 (21:04 +0300)]
Shrinkwrap: new mode that projects along the target normal.

The Nearest Surface Point shrink method, while fast, is neither
smooth nor continuous: as the source point moves, the projected
point can both stop and jump. This causes distortions in the
deformation of the shrinkwrap modifier, and the motion of an
animated object with a shrinkwrap constraint.

This patch implements a new mode, which, instead of using the simple
nearest point search, iteratively solves an equation for each triangle
to find a point which has its interpolated normal point to or from the
original vertex. Non-manifold boundary edges are treated as infinitely
thin cylinders that cast normals in all perpendicular directions.

Since this is useful for the constraint, and having multiple
objects with constraints targeting the same guide mesh is a quite
reasonable use case, rather than calculating the mesh boundary edge
data over and over again, it is precomputed and cached in the mesh.

Reviewers: mont29

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

21 months agoBKE_mesh: add a utility to get edge indices from looptri.
Alexander Gavrilov [Sat, 20 Oct 2018 18:02:52 +0000 (21:02 +0300)]
BKE_mesh: add a utility to get edge indices from looptri.

Not all three sides of a tesselated mesh triangle are guaranteed
to be original mesh edges, so a somewhat complicated check is
required to detect which ones are real. It seems that until now
there was no utility function for that, only some example code.

21 months agoBLI_kdopbvh: add an option to use a priority queue in find_nearest.
Alexander Gavrilov [Sat, 20 Oct 2018 18:02:52 +0000 (21:02 +0300)]
BLI_kdopbvh: add an option to use a priority queue in find_nearest.

Simple find_nearest relies on a heuristic for efficient culling of
the BVH tree, which involves a fast callback that always updates the
result, and the caller reusing the result of the previous find_nearest
to prime the process for the next vertex.

If the callback is slow and/or applies significant restrictions on
what kind of nodes can qualify for the result, the heuristic can't
work. Thus for such tasks it is necessary to order and prune nodes
before the callback at BVH tree level using a priority queue.

Since, according to code history, for simple find_nearest the
heuristic approach is faster, this mode has to be an option.

21 months agoDefaults: disable AV Sync by default again, it breaks physics caching.
Brecht Van Lommel [Tue, 6 Nov 2018 15:55:48 +0000 (16:55 +0100)]
Defaults: disable AV Sync by default again, it breaks physics caching.

This reverts back to the 2.79 situation. The better solution would be to make
physics caching somehow simulate the skipped frames. But for now the more
important thing is to have working physics.

Ref T54943, T56352.

21 months agoUI: some reordering of Cycles panels.
Brecht Van Lommel [Tue, 6 Nov 2018 10:03:40 +0000 (11:03 +0100)]
UI: some reordering of Cycles panels.

21 months agoFix/cleanup RNA viewlayer API.
Bastien Montagne [Tue, 6 Nov 2018 16:20:49 +0000 (17:20 +0100)]
Fix/cleanup RNA viewlayer API.

RNA's ViewLayer would present 'first level' of layer collection as a
list (collection property), when it is actually now only a single item,
same as the scene's master collection.

Note: did not try to update view_layer python tests, those are already
fully broken for quiet some time I guess (they still assume
view_layer.collections to be mutable e.g.)...

21 months agoProper fix for new 'SimpleHeap' gtests...
Bastien Montagne [Tue, 6 Nov 2018 15:12:29 +0000 (16:12 +0100)]
Proper fix for new 'SimpleHeap' gtests...

This reverts reverting commit rB55324b8a2e6799300, and do proper 'cleanup' (sigh)
in gtest as well.

Sorry for the noise, did not understood what had happened here
immediately. :/

21 months agoRevert rBfee6ab18e7e9 in BLI_heap_test.cc
Bastien Montagne [Tue, 6 Nov 2018 15:06:53 +0000 (16:06 +0100)]
Revert rBfee6ab18e7e9 in BLI_heap_test.cc

Most certainly commite by mistake, FastHeap is not in BLI yet!

21 months agoCleanup: No need to save/restor frame buffer twice
Jacques Lucke [Tue, 6 Nov 2018 14:46:07 +0000 (15:46 +0100)]
Cleanup: No need to save/restor frame buffer twice

21 months agoGPU: frame buffer stack
Jacques Lucke [Tue, 6 Nov 2018 14:24:13 +0000 (15:24 +0100)]
GPU: frame buffer stack

Reviewers: fclem

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

21 months agoUI: Tooltip for context properties too verbose.
Pablo Vazquez [Tue, 6 Nov 2018 13:27:09 +0000 (14:27 +0100)]
UI: Tooltip for context properties too verbose.

"Type of active data to display and edit" is a bit too descriptive and takes
away from reading which context we're actually viewing. Also minor tweaks to
context description.

21 months agoGP: Fix unreported error moving material slots
Antonioya [Tue, 6 Nov 2018 12:08:31 +0000 (13:08 +0100)]
GP: Fix unreported error moving material slots

21 months agoMultires: Refactor propagation to the higher levels
Sergey Sharybin [Tue, 6 Nov 2018 10:44:02 +0000 (11:44 +0100)]
Multires: Refactor propagation to the higher levels

Now it is forumlated in terms of deltas, and consists of the
following steps:

- Original displacement at the reshape level are being backed up.
- New displacement is being written by the reshape routines.
- Delta of the displacement is calculated.
- Deltas are propagated to the higher levels, which also includes
  their interpolation/
- Original displacement is restored.
- New interpolated displacements are added to the original ones.

This is a base ground for the upcoming change related on using
Catmull-Clark smoothing for the deltas instead of linear
interpolation. Currently is no changes for artists, just preparing
for upcoming work.

21 months agoEevee: Make nodegroup fix recursive.
Clément Foucault [Tue, 6 Nov 2018 11:05:09 +0000 (12:05 +0100)]
Eevee: Make nodegroup fix recursive.

21 months agoEevee: Fix broken shader if only using an Ambient Occlusion node
Clément Foucault [Tue, 6 Nov 2018 11:04:28 +0000 (12:04 +0100)]
Eevee: Fix broken shader if only using an Ambient Occlusion node

This quick fix does generate some invalid uniform. Will fix that later on.

21 months agoEevee: Fix missing UBO bound if using a muted Shader to RGB node with SSS
Clément Foucault [Mon, 5 Nov 2018 19:09:04 +0000 (20:09 +0100)]
Eevee: Fix missing UBO bound if using a muted Shader to RGB node with SSS

This is a nasty bug. Because the node does not get properlly tagged as SSS
(sss_id is 0) but is still evaluated (so tagging the GPUMaterial as having
SSS). The sssProfile UBO is still declared and we need to bind something
to it.

21 months agoEevee: Correctly handle Sharp glossy/refraction BSDF nodes
Clément Foucault [Mon, 5 Nov 2018 19:07:47 +0000 (20:07 +0100)]
Eevee: Correctly handle Sharp glossy/refraction BSDF nodes

This is a quick workaround, but I don't see the point of making the
lighting functions more complex than it is now in order to optimize this
rather not so common case.

21 months agoGP: Fix Time Offset for frames before range
Antonioya [Tue, 6 Nov 2018 10:09:52 +0000 (11:09 +0100)]
GP: Fix Time Offset for frames before range

21 months agoGP: Rename variable
Antonioya [Tue, 6 Nov 2018 08:43:51 +0000 (09:43 +0100)]
GP: Rename variable

21 months agoCleanup: Use annotation for the new class
Sergey Sharybin [Tue, 6 Nov 2018 08:57:03 +0000 (09:57 +0100)]
Cleanup: Use annotation for the new class

21 months agoImplement an Armature constraint that mimics the modifier.
Alexander Gavrilov [Sun, 15 Jul 2018 17:39:02 +0000 (20:39 +0300)]
Implement an Armature constraint that mimics the modifier.

The main use one can imagine for this is adding tweak controls to
parts of a model that are already deformed by multiple other major
bones. It is natural to expect such locations to deform as if the
tweaks aren't there by default; however currently there is no easy
way to make a bone follow multiple other bones.

This adds a new constraint that implements the math behind the Armature
modifier, with support for explicit weights, bone envelopes, and dual
quaternion blending. It can also access bones from multiple armatures
at the same time (mainly because it's easier to code it that way.)

This also fixes dquat_to_mat4, which wasn't used anywhere before.

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

21 months agoCleanup: remove unused brushes
Campbell Barton [Tue, 6 Nov 2018 07:21:18 +0000 (18:21 +1100)]
Cleanup: remove unused brushes

21 months agoBrush: split out vertex paint tool & blend mode
Campbell Barton [Tue, 6 Nov 2018 07:06:33 +0000 (18:06 +1100)]
Brush: split out vertex paint tool & blend mode

- Vertex & weight paint now use the 'blend' setting.
- Weight paint now has it's own tool setting,
  since weight paint doesn't deal with color - we'll likely
  support different tools eventually.

21 months agoCleanup: rename fast-heap -> heap-simple
Campbell Barton [Tue, 6 Nov 2018 02:01:18 +0000 (13:01 +1100)]
Cleanup: rename fast-heap -> heap-simple

In general prefer API names don't start with adjectives
since it causes grouping of unrelated API's for completion.

21 months agoCleanup: move fast heap into own source & header
Campbell Barton [Tue, 6 Nov 2018 01:52:34 +0000 (12:52 +1100)]
Cleanup: move fast heap into own source & header

21 months agoTool System: use tool type enum to access brushes
Campbell Barton [Tue, 6 Nov 2018 01:08:39 +0000 (12:08 +1100)]
Tool System: use tool type enum to access brushes

Previously the brush names were used which had the limit that:

- Brush names that were deleted wouldn't show up in the toolbar.
- Naming collisions between user defined brushes and existing tools
  broke tool selection.

Now brushes are created as needed when tools are selected.

Note, vertex/weight paint combine tool and blend modes,
this should be split out into a separate enum.

21 months agoCleanup: style
Campbell Barton [Tue, 6 Nov 2018 01:39:40 +0000 (12:39 +1100)]
Cleanup: style

21 months agoFix/Updated Object API example.
Bastien Montagne [Mon, 5 Nov 2018 19:42:00 +0000 (20:42 +0100)]
Fix/Updated Object API example.

Was still 2.7x code... ;)

21 months agoFix (unreported) potential race condition in view_layer_bases_hash_create().
Bastien Montagne [Mon, 5 Nov 2018 19:26:17 +0000 (20:26 +0100)]
Fix (unreported) potential race condition in view_layer_bases_hash_create().

When you check for undone work before acquiring a lock that ensures you
are the only one actually doing the work, you have to redo the check
*after* acquiring said lock.

Otherwise, there is room for nasty random race condition issues...