Commit Graph

91929 Commits

Author SHA1 Message Date
Campbell Barton
0a3339456b 3D View: fix NDOF rotation around object locking pan 2019-11-29 18:32:20 +11:00
Campbell Barton
ac15f5e9b0 Cleanup: comments, redundant normalize 2019-11-29 18:09:47 +11:00
Ray Molenkamp
77c7440540 CMake: Remove stray WITH_JACK in blender_release.cmake
Missed one in the previous commit.
2019-11-28 15:02:54 -07:00
Ray Molenkamp
7e9a827c58 CMake: Remove stray WITH_JACK in full configuration 2019-11-28 15:00:30 -07:00
bbd5f30ad6 Build: change CMake option defaults to match "make full"
Previously some important features like OpenSubdiv were disabled by default,
which caused confusion.

The purpose of disabling some of these features was to avoid potentiall build
errors on Linux. But with precompiled libraries, install_deps.sh and better
library availability checking this is hopefully not much of a problem anymore.

This makes "make full" obsolete, but it's kept to not break docs or shell
scripts that people may have, and the .cmake config file remains useful to
modify an existing build folder.

This also changes some option to only be available on platforms where they
are actually supported (WITH_JACK, WITH_TBB_MALLOC_PROXY and X11 options).

Fixes T69742

Differential Revision: https://developer.blender.org/D6306
2019-11-28 19:20:06 +01:00
Campbell Barton
9325e5d593 Fix T71990: Apply bone transform results differ in edit/object mode
When negative scaled matrices were used, the roll calculation
didn't match, when calling Armature.transform().
2019-11-29 05:15:18 +11:00
Clément Foucault
4e42a98edd Fix T71147 Eevee stops rendering after selection attempt
This is caused by the fallback path used by OSX, which is reconfiguring
the same default VAO. But it seems to be an issue on certain drivers.
2019-11-28 18:39:17 +01:00
f445f72eca Tests: Blendfile-loading test class
This new test class minimally sets up Blender so that it can load blend
files and construct a depsgraph without crashing.

Note that it hasn't been tested on very complex blend files, so it may
still crash when the loaded blend file references/requires uninitialised
data structures.

The test will certainly crash with Blend files created with Blender
older than 2.80, as the versioning code requires space types to be
registered. This is normally done by initialising the window manager,
which is not done in this test. The WM requires Python to run, which in
turn requires that Blender finds the release directory in the same
directory that contains the running executable, which is not the case
for GTest tests (they are written to `bin/tests/executablename`.

Reviewed By: sergey, mont29

Differential Revision: https://developer.blender.org/D6246
2019-11-28 17:41:32 +01:00
mano-wii
a8d29ad6e0 Fix T71558: Hair particles: Brush effect not occluded by emitter geometry 2019-11-28 13:41:11 -03:00
Patrick Mours
8caeae9f40 Fix crash if OptiX context creation fails in Cycles
When encountering an error during context creation, the "OptiXDevice" constructor aborts early.
This means the "cuda_stream" vector is never resized and the destructor iterated over non-existent data.
2019-11-28 17:07:14 +01:00
Bastien Montagne
627a344635 Fix (unreported) broken python resgistrable classes checks logic.
Logic for registering and checking properties of registrable classes was
broken, allowing to ignore some errors.

Recent fix rBeb798de101a `broke` the result of the
pyapi_idprop_datablock test, because previously that test would fail
(i.e. suceed, as it is an 'expected to break test') for a reason it was
not designed to check.

This is the problem with that kind of tests - you cannot really check
that they are failing on the expected reason(s)...
2019-11-28 15:58:28 +01:00
Campbell Barton
66328c0f4f Console: remove shortcuts from console splash
Menu items can be used to find shortcuts instead of keeping
keymap items here.
2019-11-29 01:42:08 +11:00
Jeroen Bakker
47bb3c5d5d EEVEE: RenderLayers
Small change do not draw an unsupported renderpass in the viewport
2019-11-28 15:35:33 +01:00
Patrick Mours
70a32adfeb Fix assert in Cycles memory statistics when using OptiX on multiple GPUs
The acceleration structure built by OptiX may be different between GPUs, so cannot assume the memory size is the same for all.
This fixes that by moving the memory management for all OptiX acceleration structures into the responsibility of each device (was already the case for BLAS previously, now for TLAS too).
2019-11-28 13:57:02 +01:00
Jens
d4835b88b2 Buildbot: Migrate package archive format for Linux from tar.bz2 to tar.xz
xz compresses 25% better than bz2, reducing download times and server load.
The numbers:

blender-2.80-linux-glibc217-x86_64.tar.bz2 (release): 134 886 174 bytes
with xz:    96 181 604 bytes (-28.7%)
with xz -9: 93 871 548 bytes (-30.4%)

blender-2.81-7c1fbe24ca33-linux-glibc217-x86_64.tar.bz2 (beta): 173 600 363 bytes
with xz:    133 100 664 bytes (-23.3%)
with xz -9: 129 534 124 bytes (-25.4%)

xz also decompresses more than twice as fast as bz2, however compression needs
four times as long (on my 7-year-old laptop 3-4 minutes instead of <1).

Also xz has become more common than bz2, e.g. Debian/Ubuntu deb packages have
been xz-compressed for years, so the dpkg package manager as well as systemd
and grub all depend on liblzma being present, whereas bz2 is becoming more and
more optional.

Current Linux archives also include the UID/GID of whatever user account
happens to be used for building by the blender.org infrastructure. If someone
then installs these archives as root e.g. to /usr/local/... and doesn't pay
full attention the files remain owned by a regular user, which is a serious
security issue. This patch fixes that by setting the UID/GID to 0.

Differential Revision: https://developer.blender.org/D6138
2019-11-28 11:41:25 +01:00
Jeroen Bakker
320d8ab155 EEVEE: Viewport Renderpasses
This patch will allow the user to select the EEVEE renderpass to be
shown in the viewport by default the combined pass will be shown.

Limitations:

* Viewport rendering stores the result in a `RenderResult`. RenderResult
  is not aware of the type of data it holds. In many places where RenderResult
  is used it is assumed that it stores a combined pass and the display+view
  transform are applied.

  I will propose to fix this in a future patch. But that is still being
  designed and discussed.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6319
2019-11-28 09:12:28 +01:00
Campbell Barton
ffcf39e3b5 BMesh: reduce memory usage existing edit-mode
- Don't duplicate the original vertices.
- Free old geometry before allocating the new geometry.
2019-11-28 18:14:08 +11:00
Campbell Barton
716c089032 Fix separating mesh parts breaking vertex parents & hooks
Follow up on T71865 which only reported the issue for shape keys.
2019-11-28 17:33:53 +11:00
Campbell Barton
6288dbffb6 NDOF: support panning when orbiting
Also make orbit the default rotation mode.

Based on feedback from T67579, this seems one of the main
pain points users are experiencing.
2019-11-28 15:09:27 +11:00
Lukas Stockner
4659fa5471 Cycles: Scale denoising albedo contribution of Principled BSDFs according to average fresnel
The Principled BSDF uses Microfacet closures that include a fresnel term,
which are a special case since their weight tends to be near white even
if their average contribution is fairly low.

The sample weight is scaled by the average fresnel weight to account for
this, but the denoising albedo still used the unscaled weight.

This was fine for the original denoiser, but apparently OIDN can't handle
the resulting albedo pass well. Therefore, this commit adds the described
scaling to the albedo pass contribution as well.

This problem was described in T69770.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6289
2019-11-27 21:26:47 +01:00
Campbell Barton
7711231838 Fix T71865: Separating mesh parts breaks shape keys
This was an old bug which could be caused by saving after separating.
Changes from 79b703bb635e made this fail reliably.

Update shape key indices when they may be used again later.
2019-11-28 06:17:14 +11:00
Campbell Barton
e7502ee0aa Cleanup: bmesh conversion comments 2019-11-28 06:15:54 +11:00
Dalai Felinto
9c4cec2de9 Fix T71000: Statistics don't take collections hidden state into account
Simple fix, to mimic what we had pre-local collections. So this is not
fully representative of the current load of the scene.

I started a more complex route where we literally just count objects
that are visible (taking object type restriction, local collections,
local view, ...). But in the end it is a bit overkill considering that
we have plans to change the statistics.
2019-11-27 15:09:49 -03:00
Campbell Barton
34902f2008 Fix crash exiting edit-mode with an active basis shape key
Exposed by T71865, while the bug remains this resolves the crash.
2019-11-28 04:22:13 +11:00
Pablo Dobarro
9e3006e507 Clay Brush: Input curves and update defaults
Updated defaults and pressure/size curves for the Clay brush.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6298
2019-11-27 17:33:51 +01:00
Pablo Dobarro
47645a8db6 Sculpt: Sample Voxel Size
This adds support to the current sculpt sample detail operator to sample
a voxel size for the voxel remesher when sculpting on regular meshes.

It provides an approximation of a voxel size that is going to preserve
the sampled sculpt details after remeshing. It is not going to be 100%
accurate in all cases as it relies on having consistent edge length in
the whole sculpt, but it saves a lot of time and avoids guessing the
voxel size by trying different values.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6251
2019-11-27 17:24:40 +01:00
Pablo Dobarro
9251b07720 Sculpt/Paint: Remove Unified SIZE_PRESSURE and ALPHA_PRESSURE
The relation between the pressure/size and the pressure/alpha is a
fundamental property that defines the behavior of a brush, so it does
not make sense to have it unified across all brushes. This applies both
for sculpting and painting.

Some of the new 2.82 brushes need pressure/size or pressure/alpha to be
enabled to work propely, while others don't. Users should not be
switching on and off this property manually when changing brushes if they
want to use unified size. This is also causing that some users are using
the brushes with an incorrect configuration.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6291
2019-11-27 17:17:46 +01:00
Pablo Dobarro
0e4014ef92 Sculpt/Paint: Move Elastic Deform Kelvinlets to BKE
After this commit it should be possible to share the same deformation
formulas that are used in the Elastic Deform brush with other areas of
Blender such as Grease Pencil or proportional editing.

This also removes a lot of code from sculpt.c that is not direclty
related to sculpting.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6281
2019-11-27 17:08:15 +01:00
Pablo Dobarro
b6d436ae28 Fix T71667: Use the Sculpt Mesh API in the Multires Smooth brush
This removes all multires code from the smooth brush and replaces it
with a new implementation that uses the sculpt mesh API. This makes the
code much easier to understand and maintain.

We could unify all the smooth brushes into a single implementation, but
mesh smoothing has code to deal with open boundaries that I don't want
to remove yet.

Most bugs and artifacts related to access neighbor grids should be fixed
(like T71667). This also fixes performance bugs such as T70689, that were
related to grid stitching after applying the brush.

Reviewed By: jbakker

Maniphest Tasks: T71667

Differential Revision: https://developer.blender.org/D6277
2019-11-27 17:02:02 +01:00
Pablo Dobarro
e85ab2cdc2 Fix T71868: Clay Strips brush collapsed geometry
We are now modifying the relation between pressure and radius using
custom functions to improve the brushes, but dyntopo was not prepared
for this. This fix sends the unmodified radius to dyntopo so it modifies
the geometry correctly.

Reviewed By: jbakker

Maniphest Tasks: T71868

Differential Revision: https://developer.blender.org/D6299
2019-11-27 16:55:13 +01:00
Pablo Dobarro
c9e7d8030f Fix typo in versiong code 2019-11-27 16:53:43 +01:00
Damien Picard
2ea8c81ac3 Text Object: change spacing now operates on selection
Without this, it's not practical to change spacing on large
blocks of text.
2019-11-28 02:26:57 +11:00
Jeroen Bakker
73fa066e8b Cleanup: Remove BIF_gl.h
BIF_gl.h included hacks like redefining glew functions and a constant.
The named constant `GLA_PIXEL_OFS` has been moved to `GPU_viewport.h`

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5860
2019-11-27 16:10:07 +01:00
Jeroen Bakker
83d3a7c12d Workbench: Performance
Small performance improvements by caching the world_ubo in the World.
It was detected that NVIDIA driver created threads to update the
world_ubo (304 bytes). This patch will reuse the previous created
ubo when not changed.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6087
2019-11-27 16:08:13 +01:00
Jeroen Bakker
2e6159a494 Curve: CurveMapping Extend Option
Extend options are currently stored per curve. This was not clearly
communicated to the user and they expected this to be a setting per
CurveMapping.

This change will move the option from `Curve` to `CurveMapping`. In
order to support this the API had to be changed.

BPY: CurveMap.evaluate is also moved to CurveMapping.evaluate what
breaks Python API. Cycles has been updated but other add-ons have
not. After release of 2.81 we can merge this to master and adapt
the add-ons.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D6169
2019-11-27 16:05:54 +01:00
Philipp Oeser
6992fc0b3b Add 'EDBM_selectmode_disable_multi' and use in knifeproject
As a followup to rB6f4e595e9ba9 and as per @campbellbarton suggestion,
this adds EDBM_selectmode_disable_multi, similar to
EDBM_mesh_deselect_all_multi & EDBM_mesh_deselect_all, so other similar
uses don't need to be done in a loop.

Also, selected_objects isn't a reliable way to handle this case - since
objects can be in edit-mode & not selected, use
BKE_view_layer_array_from_bases_in_edit_mode_unique_data instead

Differential Revision: https://developer.blender.org/D6317
2019-11-27 15:55:32 +01:00
Jeroen Bakker
7959dcd4f6 RenderViewport: Texture Format
When doing viewport rendering the color management happens on the CPU.
This has overhead in downloading a float texture from the gpu and
performing color management on the CPU.

Based on the scene fileformat bit depth the result will be rendered to
a byte texture where the colormanagement happens on the GPU or a float
texture where the colormanagement happens on the CPU.

This is only done during `Viewport Render Animation` in other
cases a float texture is being used.

Baseline (HD render of wanderer.blend workbench engine no samples) 15.688038 s
After changes: 9.412880s

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6195
2019-11-27 15:54:15 +01:00
Jeroen Bakker
9d7f65630b EEVEE: GLSL Renderpasses
Most of the renderpasses in EEVEE used post-processing on the CPU. For
final image rendering this is sufficient, but when we want to display
the data to the user we don't want to transfer to the CPU to do post
processing to then upload it back to the GPU to display the result.

This patch moves the renderpass postprocessing to a GLSL shader.

This is the first step to do, before we will enable the renderpasses in the viewport.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6206
2019-11-27 15:50:54 +01:00
Jeroen Bakker
17b63db4e2 EEVEE: Renderlayer artifacts
When rendering the Subsurface scattering lighting render layer with high
sample count render artifacts can appear. This patch will remove these
render artifacts by using a more precise texture format when samples
will be larger than 128. As with the new eevee-shadows it is more common
to use higher number of samples.

The reason why it was visible in the subsurface scattering is that every
sample could change the color. Adding different values will reduce
precision over the number of samples.

The subsurface color render layer also has this issue, but it is not noticeable as
the colors tend to be close to each other so the colors would
most of the time just shift the precision and hold up better.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6245
2019-11-27 15:40:07 +01:00
Campbell Barton
f1c994c555 Cleanup: move space text vars into a runtime struct
Also use more descriptive names.
2019-11-28 01:04:21 +11:00
Sebastian Parborg
f6cefbef22 Fix T30941: Add cloth air pressure simulation
This adds some basic simulation of internal air pressure inside of
closed cloth mesh objects.

Reviewed By: Jacques Lucke

Differential Revision: http://developer.blender.org/D5473
2019-11-27 15:01:15 +01:00
Bastien Montagne
eb798de101 Clean/Fix remaining cases of props assignments in resgistrable structs def.
We still had a few deprecated assignements of `bpy.props.xxx` to class
members in our API documentation and one of our py tests. Annotations
are to be used now.

Also remove the section about `register_module` utils, this has been
removed in 2.8.

Fix T71877: Python API overview sample code warning: class MyMaterialProps contains a property which should be an annotation!
Fix T71876: Python API overview references old bpy.utils.register_module function
2019-11-27 12:19:10 +01:00
Philipp Oeser
3fa2b85bfd Fix T71864: Broken 'Select' > 'More' in face mode in UV Editor
Caused by rBeead6a604602.

Above commit didnt account for different element types being tagged (face
select mode tagged faces, others tagged loops) and always flushed from
loops.

Now restore to flush from faces if we are in face select mode.

Maniphest Tasks: T71864

Differential Revision: https://developer.blender.org/D6315
2019-11-27 12:01:12 +01:00
Antonio Vazquez
50128e8e79 Avoid Brush user count increase when duplicates the Brush
When you create a new Brush, the user count is `2` (caller and fake user). The problem is when you duplicate a Brush, the user count grows to `3` and this is not correct, because is a new brush.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6310
2019-11-27 11:29:38 +01:00
Gaia Clary
0281411b48 fix T69772 Collada importer creates wrong fcurves for skeletal animation 2019-11-27 11:18:38 +01:00
OmarSquircleArt
1c2f7b022a Cycles: Add Random Per Island attribute.
The Random Per Island attribute is a random float associated with each
connected component (island) of the mesh. It is particularly useful
when artists want to add variations to meshes composed of separate
units. Like tree leaves created using particle systems, wood planks
created using array modifiers, or abstract splines created using AN.

Reviewed By: Sergey Sharybin, Jacques Lucke

Differential Revision: https://developer.blender.org/D6154
2019-11-27 12:07:20 +02:00
Gaia Clary
fc1a073bcd refactor: collada importer: calculate fcurve index only once when creating an fcurve 2019-11-27 10:50:24 +01:00
Campbell Barton
4fd99c9495 Cleanup: spelling, clang-format 2019-11-27 14:54:53 +11:00
Campbell Barton
b9e10273e0 Cleanup: warnings 2019-11-27 14:50:37 +11:00
Harley Acheson
7af5604389 Fix T69530: Do Not Refresh Bookmarks While Moving File Browser
Improve laggy performance while moving File Browser by not refreshing fsMenu lists in its init.

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

Reviewed by Bastien Montagne
2019-11-26 15:53:07 -08:00