Commit Graph

114661 Commits

Author SHA1 Message Date
Sebastian Parborg
763b8f1423 Clang-tidy: Ignore variable name length and .c/.cc include warnings
After some internal discussion it was decided that we should ignore name
variable length tidy warnings. Otherwise we would have warnings for
every variable that is under three characters long.

Additionally we will also ignore any warnings when including non header
files as the Unity library in our build system uses this excessively
2022-05-06 15:26:54 +02:00
Sebastian Parborg
dd2df5ceb0 Fix: Comments in clang-tidy checks list is not allowed
Clang-tidy will not parse any options after the comment.
2022-05-06 15:26:54 +02:00
Jacques Lucke
2ba081f59b Curves: disable Empty Hair operator when there is no active mesh 2022-05-06 15:17:44 +02:00
Bastien Montagne
cdd2c8bd07 Merge branch 'blender-v3.2-release' 2022-05-06 15:07:00 +02:00
Bastien Montagne
acafc7327e Fix T97466: Assert when pack sound in blender DEBUG.
This was very old code from 2008, totaly invalid with new depgraph &
evaluation system, now we just need to tag the Sound ID for update.
2022-05-06 15:05:26 +02:00
Jacques Lucke
edc92f779e Curves: support converting legacy curves to new curves object
This extends the existing object type conversion operator.

Currently, it is limited to converting to curves when the evaluated
source mesh actually has curves. This might not be the case when
it is converted to a mesh by some modifier during evaluation.

Differential Revision: https://developer.blender.org/D14872
2022-05-06 14:39:36 +02:00
Aras Pranckevicius
c7bffc8fa2 obj: move parsing utilities out of io_common, since they are fairly obj specific
As pointed out in https://developer.blender.org/rB213cd39b6db387bd88f12589fd50ff0e6563cf56#341113,
the utilities are quite OBJ specific due to treating backslash as a line
continuation character. It's unlikely that other formats need that.

No functionality changes, just pure code move (and renamed tests so that
their names reflect obj).

Reviewed By: Campbell Barton
Differential Revision: https://developer.blender.org/D14871
2022-05-06 14:54:09 +03:00
Omar Emara
bdfee6d831 EEVEE: Refactor curve nodes
This patches rewrites the GPU shaders of curve nodes for easier future
development. This is a non-functional change. The new code avoids code
duplication by moving common code into BKE curve mapping functions. It
also avoids ambiguous data embedding into the gradient vectors that are
passed to vectors and reduces the size of uniforms uploaded to the
shader by avoiding redundancies.

This is needed in preparation for the viewport compositor, which will
utilize and extend this implementation.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D14689
2022-05-06 13:33:23 +02:00
Omar Emara
8f6f28a0dc GPU: Move common shaders into a common directory
This patch moves some of the utility library shaders into a common
directory and makes the necessary renames across shaders. Additionally,
material-specific transform functions were moved outside of math utils
into a separate transform_utils.glsl file.

This is needed in preparation for the viewport compositor, which will
make use of some of those utilities and will require all material
specific bit to be removed out of those files.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D14688
2022-05-06 12:58:14 +02:00
Dalai Felinto
f5428736a7 Cleanup: Trailing white-space 2022-05-06 12:32:11 +02:00
Dalai Felinto
d02b8c1c3b UI: Expand the Snap Curves to Surface operator
The different methods are too different. It is worth having them as
individual choices by the users.

Differential Revision: https://developer.blender.org/D14873
2022-05-06 12:30:46 +02:00
Ramil Roosileht
90042b7d79 Switch viewport shading for color tools in solid mode
This patch implements T97613, switching viewport shading when using Color Filter and Mask By Color

ALSO, this patch makes it so viewport shading color switches only when SOLID mode is chosen, to prevent color switching when using other shading modes, without user noticing it.
{F13049889}

Reviewed By: JulienKaspar, joeedh, jbakker

Maniphest Tasks: T97613

Differential Revision: https://developer.blender.org/D14765
2022-05-06 12:30:09 +02:00
Jacques Lucke
b1517e26e2 Curves: use old Add > Curve menu for new curves object
* Removes the `Curves` menu (leaving only `Curve`).
* The `Curve > Random` option is still useful for testing, but it's under
  the second experimental flag so that it is turned off when only the
  "master ready" features are enabled.

Differential Revision: https://developer.blender.org/D14861
2022-05-06 12:06:57 +02:00
Piotr Makal
ce3dd12371 USD: add volume/VDB export
Add support for volume (OpenVDB) USD export:

- Allows to export both static and animated volumes.
- Supports volumes that have OpenVDB data from files or are generated in
  Blender with 'Mesh to Volume' modifier.
- For volumes that have generated data in Blender it also exports
  corresponding .vdb files. Those files are saved in a new folder named
  "volumes".
- Slightly changes the USD export UI panel. "Relative Texture Paths"
  becomes "Relative Paths" (and has separate UI box) as the
  functionality will now apply to both textures and volumes. Disabling
  of this option due to "Materials" checkbox being turned off has been
  removed.

Reviewed By: sybren, makowalski

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

Manifest Task: T95407
2022-05-06 11:43:43 +02:00
Jacques Lucke
f3b56246d1 Cleanup: improve const correctness in material API 2022-05-06 11:40:23 +02:00
Omar Emara
eac403b6e1 BLI: Add float3x3
This patch adds a float3x3 class that represents a 3x3 matrix. The class
can be used to represent a 2D affine transformation stored in a 3x3
matrix in column major order. The class provides various constructors
and processing methods, which utilizes the existing mat3 utilities in
BLI. Corresponding tests were also added.

This is needed by the upcoming viewport compositor to represent domain
transformations.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D14687
2022-05-06 11:22:10 +02:00
Bastien Montagne
908976b09a Merge branch 'blender-v3.2-release' 2022-05-06 11:12:58 +02:00
Bastien Montagne
84756b68e6 Add documentation about Image/ImBuf to python/RNA API.
Related to T95616, the relationship between Image ID and ImBuf 'cached'
buffers can be fairly confusing when using the RNA API.

Reviewed By: campbellbarton, jbakker

Differential Revision: https://developer.blender.org/D14833
2022-05-06 11:11:33 +02:00
Hans Goudey
477066adee Fix: Handle default better in curves type count cache
When the curve types array isn't allocated, the default type
is Catmull Rom. Because the type counts are calculated eagerly,
they must be in a valid state.
2022-05-06 10:58:54 +02:00
Campbell Barton
12a1fa9cf4 Cleanup: format 2022-05-06 18:27:44 +10:00
Campbell Barton
2c75857f9f Cleanup: spelling in comments, use doxygen comments 2022-05-06 17:56:59 +10:00
Campbell Barton
ae9ef28126 Merge branch 'blender-v3.2-release' 2022-05-06 17:49:29 +10:00
Campbell Barton
62450e8485 WM: suppress assertion when switching tools
Changing the object mode outside the 3D view would trigger this
assertion. This was harmless, only assert for space types that
define the tools mode.
2022-05-06 17:44:32 +10:00
Andrii Symkin
e58b18888c GHOST: Add support for precision touchpad gestures on Windows
This patch adds support for precision touchpad gestures on Windows 8.1
and newer using Direct Manipulation API. Gestures work exactly like on
macOS, with full support for pan/pinch and inertia. This works by
creating a viewport with a fake scrollable which is reset after every
gesture and converts any changes to the content's transform into GHOST
trackpad events (as explained [here](https://bugzilla.mozilla.org/show_bug.cgi?id=890878)).
The code is based on the implementation from the [Chromium project](https://chromium.googlesource.com/chromium/src/+/refs/heads/master/content/browser/renderer_host/direct_manipulation_helper_win.cc).

Tested on Windows 10.

Fixes {T70754}, {T69264}.

Demo:{F8520272}

Reviewed By: nicholas_rishel

Differential Revision: https://developer.blender.org/D7660
2022-05-06 00:40:27 -07:00
Campbell Barton
4a4f0a70eb Merge branch 'blender-v3.2-release' 2022-05-06 16:22:58 +10:00
Campbell Barton
693aa573db Fix T96585: Intersect(Knife) tool is selecting wrong edges
Regression caused by [0] which flushed selection from vertices -> edges,
causing additional edges to be selected. Now selected is flushed based
on the mode, instead of all elements. Note that these function names
could be improved to make it clearer how these flushing functions are
different.

Also skip flushing unless selection is performed.

[0]: 55c82d8380ea3fd37a9d966fad10f42cc5b365d5
2022-05-06 16:18:04 +10:00
Campbell Barton
4dc6d14bdc Merge branch 'blender-v3.2-release' 2022-05-06 13:43:57 +10:00
Campbell Barton
11f3a388ed Merge branch 'blender-v3.2-release' 2022-05-06 13:43:54 +10:00
Campbell Barton
11a7da675f Merge branch 'blender-v3.2-release' 2022-05-06 13:43:51 +10:00
Campbell Barton
e1476ca310 Cleanup: quiet missing-declarations warnings 2022-05-06 13:43:20 +10:00
Campbell Barton
929a210608 Fix T97758: Applying modifiers bakes shape-keys
Regression in [0] which is useful when applying modifiers as a shape-key
but not when applying modifiers which keeps the existing shape-keys.

[0]: 65c5ebf5779d07fb92fabd0ff992337f6c980cde
2022-05-06 13:40:54 +10:00
Harley Acheson
fcbd81fb0f Win32: WM_SETTINGCHANGE lParam Check for NULL
Check that lParam is non-NULL in WM_SETTINGCHANGE message handler.

See D14867 for details.

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

Reviewed by Jesse Yurkovich
2022-05-05 17:48:55 -07:00
Brecht Van Lommel
1b566b70c1 Fix T95308, T93913: Cycles mist pass wrong with SSS shader
It was wrongly writing passes twice, for both the surface entry and exit points.
We can skip code for filtering closures, emission and holdout also, as these do
nothing with only a subsurface diffuse closure present.
2022-05-05 22:01:45 +02:00
Brecht Van Lommel
e4931ab86d Cleanup: clang format 2022-05-05 21:57:08 +02:00
Brecht Van Lommel
108963d508 Merge branch 'blender-v3.2-release' 2022-05-05 21:01:54 +02:00
Brecht Van Lommel
75a051a6ab Fix T93246: Cycles wrong volume shading after transparent surface
The Russian roulette probability was not taken into account for volumes in all
cases. It should not be left out from the SD_HAS_ONLY_VOLUME case.
2022-05-05 20:51:01 +02:00
Pablo Vazquez
4fa71be89a UI: Sort Force Field enums alphabetically
For consistency with the rest of Blender.

* Use a blank icon for "None" type, so the label aligns with the rest.
* Use "None" instead of "Nothing" for Kink type dropdown entry.
2022-05-05 18:00:16 +02:00
jon denning
26cda38985 Docs: Clarify docs for BMesh methods
The previous docs for `normal_update` methods of `BMVert`, `BMEdge`,
`BMFace`, and `BMesh` were not clear on some behaviors.  These
behaviors are listed in D14370.  This commit updates the docs to be
clearer.

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D14370
2022-05-05 11:08:01 -04:00
Sergey Sharybin
26bc584e01 Cleanup: Better const correctness for DEG_get_eval_flags_for_id
The ID is not modified by this function, so it can be const.

Needed to tweak const correctness for original ID accessor as
well. Additionally, did the same for accessor of evaluated ID
for symmetry.
2022-05-05 15:52:57 +02:00
Sergey Sharybin
47ba541853 Merge branch 'blender-v3.2-release' 2022-05-05 15:39:58 +02:00
Campbell Barton
b891c72d2d Fix T97575: Toggling fullscreen causes compositor recalc
The root of the issue is that compositor is using refresh mechanism
to handle recalc.

The safest fix which does not require deep refactor is to check to
whether node space was tagged for refresh from listener (currently
it is listeners which are responsible for tackling compositor tree
recalc).

Differential Revision: https://developer.blender.org/D14856
2022-05-05 15:35:59 +02:00
Philipp Oeser
b968e2bf48 Outliner: add icons for nodegroups
These were missing in "Blender File" view.

before
{F13053175}
after
{F13053176}

Differential Revision: https://developer.blender.org/D14859
2022-05-05 14:44:31 +02:00
Patrick Mours
6fa5d520b8 Cycles: Add support for parallel compilation of OptiX module
OptiX 7.4 adds support for splitting the costly creation of an OptiX
module into smaller tasks that can be executed in parallel on a
thread pool.
This is only really relevant for the "shader_raytrace" kernel variant
as the main one is small and compiles fast either way. It sheds of
a few seconds there (total gain is not massive currently, since it is
difficult for the compiler to split up the huge shading entry point
that is the primary one taking up time, but it is still measurable).

Differential Revision: https://developer.blender.org/D14845
2022-05-05 14:35:41 +02:00
Jacques Lucke
5b24291be1 Curves: move curve sculpt settings out of advanced panel 2022-05-05 14:15:09 +02:00
Aras Pranckevicius
48f7574716 Merge branch 'blender-v3.2-release' 2022-05-05 15:01:28 +03:00
Aras Pranckevicius
1830a3dfb5 Fix T97863: new OBJ importer issues with extra whitespace after "f" keywords
While possible extra whitespace after all OBJ/MTL keywords was properly
skipped, it was not done for the "f" (face definition) keyword.

While at it, also support indented keywords, i.e. extra whitespace at
the beginning of the line.

There's a tiny bit of performance drop while importing (e.g. importing
blender 3.0 splash scene: 53.38sec -> 54.21sec on my machine). But
correctness is more important.

Reviewed By: Howard Trickey
Differential Revision: https://developer.blender.org/D14854
2022-05-05 14:59:46 +03:00
Jacques Lucke
ad119d327e Curves: change default name of curves object to Curves 2022-05-05 13:01:39 +02:00
Jacques Lucke
bff9bf728e Fix T97774: don't crash when no brush is selected 2022-05-05 12:52:19 +02:00
Campbell Barton
611b82621d Merge branch 'blender-v3.2-release' 2022-05-05 20:44:48 +10:00
Jacques Lucke
69c7ff1649 Cleanup: unused parameter warning 2022-05-05 12:43:16 +02:00