Commit Graph

100890 Commits

Author SHA1 Message Date
Ankit Meel afd13710b8 Cleanup: Clang-tidy readability-named-parameter
No functional change.
2020-10-21 13:21:00 +05:30
Ankit Meel 7ac6f4d26c Cleanup: Clang-tidy readability-redundant-string-init
No functional change.
2020-10-21 13:15:17 +05:30
Ankit Meel ee90effd3a Clang-tidy: disable new warnings.
Until it is decided whether to work on, or ignore these
warning, disable them. See T78535 

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D9281
2020-10-21 12:58:39 +05:30
Campbell Barton a8f44a4799 Cleanup: early return from animation step, reduce indentation level 2020-10-21 18:07:24 +11:00
Jeroen Bakker e60bc528f0 DrawManager: Adding Custom Render Passes
Currently render passes in the draw manager (eevee) must be predefined
in the render result. This patch would ask the render engine for the
render passes it needs, and create these as a preparation step during
rendering. This allows any draw engine to define more complex render
passes setup.

Render passes can only be added before the call to `RE_engine_begin_result`.
`RE_engine_begin_result` makes a full copy of the render passes. During
rendering the render engines renders to the duplicated passes.
`RE_engine_end_result` syncs the data back to the original render passes,
but only if the passes existed in the original render result.
Currently we work-around this issue by registering the passes in
`render_result_new`. This is legacy blender internal structure and should
be avoided.

With upcoming projects (AOV/Cryptomatte) it becomes a bit of a mess as we
are extending legacy code to support new features. This patch allows us to
let each draw engine register their own render passes at render time
(similar to cycles and other render engines). In the future we could get
rid of legacy render passes registration in render_result_new.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D9088
2020-10-21 08:14:21 +02:00
Pablo Dobarro 1ad100d556 Fix T81079: Switch object ignoring visibility settings
Replace ED_transform_snap_object_context_create with
ED_view3d_give_base_under_cursor & ED_view3d_autodist_simple so object
visibility is respected and non-geometry objects can be supported.

Ref D9255
2020-10-21 13:53:03 +11:00
Harley Acheson 4bf6ffc022 Fix for T81757: Incorrect Overlay Line Height
Fixes error in determining 3DView Overlay Line Height. Do not base on current default font height.

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

Reviewed by Campbell Barton
2020-10-20 19:11:36 -07:00
Campbell Barton a80c1fc011 Cleanup: simplify lasso transform from 17cb2a6da0
Access as 2D array, loop forwards over the pointer since it's
more common and simpler to read.
2020-10-21 13:03:53 +11:00
Campbell Barton 4e90dff60f Cleanup: avoid error prone nested switch statements (missing break)
17cb2a6da0 missed a break statement after a nested switch,
while it didn't cause a bug nesting switch doesn't read well
and is prone to errors like this.

Split modal-keymap checks into their own branch to avoid this happening,
also use matching event checks for all gesture operators.
2020-10-21 12:54:35 +11:00
Sebastián Barschkis 7167a57197 Fluid: Added obstacle fluid distance parameter
Being able to adjust the distance between fluid and obstacles comes in handy when trying to achieve a fluid motion over inclined obstacles.

Depending on the slope of such obstacles, already small adjustments of this value can help when particles stick to obstacle surfaces (i.e. make particles not stick to obstacles).
2020-10-20 23:07:53 +02:00
Pablo Dobarro 14d56b4217 UI: Add angle snapping to line gesture tools
This adds support for snapping for line gesture tool. It is implemented
in the modal keymap as Snap, which is a toggle (similar to how snapping
in the transform operator works).

Right now it snaps the angle of the line to 15 degree increments, which
is defined in code. This should be easy to expose in the UI in the future
if we need to.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D9115
2020-10-20 22:52:12 +02:00
Pablo Dobarro cf8aa20967 Fix error in the last commit
I accidentally commited a file without saving it
2020-10-20 22:33:26 +02:00
Pablo Dobarro 17cb2a6da0 UI: Move gesture selection with spacebar
This patch adds a modal key to move the selection box/lasso/line while
drawing it. It also sets "repeat": False on the animation playback key
to prevent accidental playback if the spacebar is released after the
mouse button.

Reviewed By: #user_interface, pablovazquez, Severin

Differential Revision: https://developer.blender.org/D9227
2020-10-20 22:18:01 +02:00
Clément Foucault b55c44e3ed EEVEE: Screen Space Reflection: Improve self intersection cases.
This patch fix most self intersection comming from reflection rays.
We regenerate the ray if it goes below the shading normal (should be the
geometric normal but we have no access to it here).

Also add the same precision based bias we use for contact shadows.

This fix T81105 Eevee SSR quality regression in 2.91 alpha
2020-10-20 22:06:43 +02:00
Clément Foucault 65a3195781 EEVEE: Screen Space Reflection: Fix undefined behavior with invalid LOD
Some issues happened because the lod can become negative in some cases.
Also avoid sampling LOD with interpolation (floor).
2020-10-20 22:06:43 +02:00
Pablo Dobarro 3e5a354333 Fix sculpt pen tilt support changing the brush strength
SCULPT_tilt_apply_to_normal expects a normal, and offset was already
scaled by radius. The funcion returns a normalized vector, so the
strength of the brush was changed.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D9275
2020-10-20 21:41:32 +02:00
Ankit Meel 98540511b1 Cleanup: Clang-tidy -readability-inconsistent-declaration-parameter-name
Changes in source/blender/makesrna only.

No functional change.
2020-10-21 01:09:31 +05:30
Ankit Meel f76d9de7ed Cleanup: Clang-tidy bugprone-redundant-branch-condition
No functional change.
2020-10-21 01:08:26 +05:30
Ankit Meel 10e2b77121 Cleanup: makesrna, Clang-tidy else-after-return-fixes.
It got left out of {rBc04088fed1b8faea6b2928bb5e09ab3}.

No functional change.
2020-10-21 01:08:26 +05:30
Ankit Meel 6c2bea6492 Cleanup: Clang-tidy silence readability-non-const-parameter
This is a false alarm, `getFileSystemRepresentation` changes the
return value argument.
So used `NOLINTNEXTLINE`.
2020-10-21 01:02:16 +05:30
Ray Molenkamp 43e4d6e5b1 CMake/Windows: Compile GMP library as fat library 2020-10-20 13:04:53 -06:00
Rahul Chaudhary 0c1c6e7ecf UI:Add icon for Displacement Eraser brush
This patch adds icons for the multires displacement
eraser tool in sculpt mode

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D9286
2020-10-20 20:59:29 +02:00
Rahul Chaudhary e74b7e1615 UI: Add icons for line genture tools
This patch adds icons for line gesture tools
Line mask and line project

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D9285
2020-10-20 20:55:48 +02:00
Rahul Chaudhary a264b1f710 UI: Add icon for boundary brush
This patch adds icon for the boundary brush in sculpt mode

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D9284
2020-10-20 20:52:36 +02:00
Hans Goudey 3d78e98d52 Ocean Modifier: allow spray maps to be baked
In comments made by a tester on rB17b89f6dacba007bf, it seems that baking
of the spray maps would be useful. This commit adds that capability. Both
the spray map and its inverse are baked out in this change, for maximum
convenience and to avoid assuming what the user wants.

Differential Revision: https://developer.blender.org/D8470
2020-10-20 12:47:58 -05:00
Jacques Lucke de77aa337c Cleanup: warning on windows 2020-10-20 17:50:22 +02:00
Harley Acheson c0a0789af5 UI: Sculpt 'Inverse Cursor Color' Label
Shorten name of 'Inverse Cursor Color' to 'Inverse Color' so that it does not overflow its popover.

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

Reviewed by Brecht Van Lommel
2020-10-20 08:25:28 -07:00
Jeroen Bakker e05ce1ea20 UV/Image: Remove Legacy Drawing
With D8234 a new drawing method for UV/Image editor was introduced. For debugging
reasons we left the old drawing method in the code base. This patch will remove
the old drawing method.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D9011
2020-10-20 17:06:13 +02:00
Philipp Oeser 239eb95ef8 Fix T81865, T81860: CustomData Correction can fail on non standard names
Caused by rBaafd71a8a160.

In the process of CustomData Correction, we need to make sure we also
have matching layer names [as was done before above commit], otherwise
this will create layers with default names, applying
(mesh_customdatacorrect_apply and friends) will fail then.

Maniphest Tasks: T81865

Differential Revision: https://developer.blender.org/D9278
2020-10-20 16:22:36 +02:00
Sergey Sharybin 1c08ab4535 CMake: Compile GMP library as fat library
The idea behind this is to compile all versions of functions,
and let the library to pick the best at runtime.

Attempting to fix T81835
2020-10-20 16:18:59 +02:00
Jacques Lucke 8319279fdb Cleanup: remove dead code 2020-10-20 15:23:15 +02:00
Jeroen Bakker 7320ecee9b EEVEE: ShaderToRGB alpha inversed
The alpha out socket output the average transmittance, not the alpha.
This patch will convert the transmittance to alpha.

Found during research of T80919; Issue introduced when `Closure.opacity` was migrated to `Closure.transmittance`.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D9010
2020-10-20 15:17:03 +02:00
Clément Foucault 257fe5a6e7 Volumes: Fix compilation when building without openVDB
And remove a warning.
2020-10-20 15:08:25 +02:00
Sergey Sharybin 360282cf1f Libmv: Refactor camera intrinsics parameter block
Use the newly introduced packed intrinsics, which allows to remove
code which was initializing parameters block based on distortion
model type.

Now such initialization is done by a particular implementation of
a distortion model.

Differential Revision: https://developer.blender.org/D9192
2020-10-20 15:02:50 +02:00
Sergey Sharybin 549841bbc0 Libmv: Add generic class for packed intrinsics
This is a common class which can be used in all sort of minimization
problems which needs camera intrinsics as a parameter block.

Currently unused, but will replace a lot of hard-coded logic in the
bundle adjustment code.
2020-10-20 15:02:50 +02:00
Sergey Sharybin 151173fefe Libmv: Add array<type, size> to libmv namespace 2020-10-20 15:02:50 +02:00
Clément Foucault abc017ae0b GLTexture: Fix Anisotropic filtering affecting the standard mipmap samplers
Everything's in the title...
2020-10-20 14:55:18 +02:00
Clément Foucault 45400b32d0 DRW: Disable anisotropic filtering on utility textures
Anisotropic filter may result in incorrect algorithm. This only
affects util textures (not Image datablocks gpu textures).
2020-10-20 14:55:18 +02:00
Sebastian Parborg 711b55b527 Fix libmv test on windows
There is no point in testing std::vector capacity as it can differ
between std implementations.
2020-10-20 14:46:48 +02:00
Jacques Lucke b3d469e78d Fix compile error
Haven't tested on windows, hope that works.
2020-10-20 14:16:42 +02:00
Sebastián Barschkis 5bd7eda093 Fluid: Add missing versioning for new options in 'Viewport Display' panel
Files created before D8705 was merged need to get initial values for the new viewport display fields.
2020-10-20 14:06:43 +02:00
Pablo Dobarro 14c0897671 Fix T81076: Crash on switch object operator undo
This fixes the crash and the assert, but undo is done in multiple steps

Reviewed By: campbellbarton

Maniphest Tasks: T81076

Differential Revision: https://developer.blender.org/D9256
2020-10-20 13:22:43 +02:00
Sebastian Parborg 0105f146bb Cleanup: General comment style clean up of graph_edit.c and fcurve.c
No functional changes.

Reviewed By: Sybren A. Stüvel

Differential Revision: http://developer.blender.org/D7850
2020-10-20 13:04:02 +02:00
Bastien Montagne 580fe9f5f8 Fix (unreported) install_deps: wrong version number for llvm in some cases.
Version reported by package manager is not always satisfying (on Debian
testing currently e.g. `llvm-dev` is reported as `9.0`, when exact one
is actually `9.0.1`, this break CMake build of Blender then).

Just use version reported by `llvm-config` instead, when using
distribution packages.
2020-10-20 12:52:17 +02:00
Pablo Dobarro 89eef19171 Fix T81776: Sculpt line gestures not working with transformed objects
The line gesture plane should be in object space, not in world space.
2020-10-20 12:14:28 +02:00
Jacques Lucke 6ced026ae1 Simulation: remove particle nodes with outdated design
The design for how we approach the "Everything Nodes" project
has changed. We will focus on a different part of the project initially.

While future me will likely refer back to some of the code I remove here,
there is no point in keeping this code around in master currently.
It would just confuse other developers working on the project.

This does not remove the simulation modifier and data block. Those are
just cleaned up, so that the boilerplate code can be reused in the future.
2020-10-20 12:07:42 +02:00
Jacques Lucke 63a9f24b55 Volumes: simplify volumes in modifiers or on load
This changes how the simplify volumes setting works. Before, it only
affeted viewport rendering. This was an issue, because all internal
computations would still have to happen on the high resolution volumes.
With this patch, the simplify setting already affects file loading and
procedural generation of volumes.

Rendering does not have to care about the simplify option anymore,
it just gets the correct simplified version from the depsgraph.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D9176
2020-10-20 11:00:16 +02:00
Jacques Lucke f3ecb4c91e Fix T81684: node location not handled correctly
Reviewers: ISS

Differential Revision: https://developer.blender.org/D9236
2020-10-20 10:51:19 +02:00
Campbell Barton efc2edc47f Fix T81190: Merge by Distance marks edges sharp
Make calculating edges sharp optional since it marks nearly all edges
sharp when the normals have been manually rotated.
2020-10-20 14:39:15 +11:00
Campbell Barton c4668b72e0 Cleanup: use BLI_listbase_is_single instead of counting 2020-10-20 14:16:47 +11:00