Commit Graph

132043 Commits

Author SHA1 Message Date
Jaume Bellet aa476c4dae Merge branch 'bf-blender' into mb-0002-readme-file
Conflicts:
	README.md
2024-01-19 20:58:06 +01:00
Jaume Bellet 5e8e5ff6c0 Merge branch 'main' of https://projects.blender.org/blender/blender into bf-blender 2024-01-19 20:46:48 +01:00
Aras Pranckevicius d2e4da0f5b Cleanup: reduce C-isms in imbuf headers
Pull Request: https://projects.blender.org/blender/blender/pulls/117327
2024-01-19 20:29:43 +01:00
Aras Pranckevicius a705259b4b Cleanup: move imbuf .h files to .hh 2024-01-19 20:29:38 +01:00
Brecht Van Lommel 487adcb992 Fix: build error when not using unity build 2024-01-19 20:12:45 +01:00
Harley Acheson 9de0dac46e Cleanup: Make format
Formatting changes resulting from Make Format
2024-01-19 11:10:00 -08:00
Hans Goudey 02342aee0c Cleanup: Sculpt: Store auto-masking cache in unique_ptr 2024-01-19 13:44:42 -05:00
Hans Goudey 0163a92cca Cleanup: Simplify local automasking function names
Remove redundancy with the file's namespace.
2024-01-19 13:27:03 -05:00
Brecht Van Lommel 2afd9e530a Fix: wrong name in bpy_extras.object_utils, causing API doc build failure 2024-01-19 19:03:33 +01:00
Aras Pranckevicius 0dc3ffb5af Fix: windows compile error
Another ambiguous conversion for msvc introduced in baeb4d7753
2024-01-19 19:34:56 +02:00
Hans Goudey 21407901f8 Cleanup: Various clang tidy changes 2024-01-19 12:08:48 -05:00
Hans Goudey 7ca4dcac5a Cleanup: Use std::string for UI drop box tooltip return type
And use fmt for formatting strings.
2024-01-19 12:08:48 -05:00
Aras Pranckevicius b2ef92361f Fix: windows compile error
Ambiguous conversions for msvc introduced in baeb4d7753
2024-01-19 18:58:55 +02:00
Harley Acheson a510bad81a UI: Change of File Save Icon
UI Module agreed to change of the Save icon to a version, also created
by Andrzej Ambroz, that resembles a traditional floppy-disc style.

Pull Request: https://projects.blender.org/blender/blender/pulls/117251
2024-01-19 17:54:29 +01:00
Omar Emara 4bf08198a7 Compositor: Do not flip bounds of Crop node
The Crop node currently flips its bounds if the lower bound is larger
than the higher bound, which is not a good design. Instead, clamp the
bounds.
2024-01-19 18:42:45 +02:00
Sergey Sharybin 73d9271701 Fix Keying Screen node on Metal GPU
The "Keying Screen" texture is written by the compositor_keying_screen
shader and is not read by the shader. Use appropriate usage flag which
matches the shader behavior.

Note that the texture is read by a node down the road, so both flags are
needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/117340
2024-01-19 17:20:07 +01:00
Lukas Tönne baeb4d7753 GPv3: Tint and Color modifiers
Implements the Tint and Color (aka. "Hue/Saturation") modifiers.

Pull Request: https://projects.blender.org/blender/blender/pulls/117297
2024-01-19 16:59:39 +01:00
Christoph Lendenfeld 5e28601d69 Anim: Separate keying flags
Splits the flag `..._FLAG_INSERTNEEDED` between autokey and
manual keying. The fact that this flag was shared between the two
systems has been the cause of issues in the past. It wouldn't
let you insert a keyframe even though you explicitly used an operator
to do so.

In order to be clearer what options are used where, the user preferences
have been reordered.

By default "Only Insert Needed" will be enabled for auto-keying, but not for manual keying.
The versioning code will enable both if it was enabled previously.

# Code side changes

The keying system has flags that define the behavior
when keys are inserted. Some of those flags were shared
between keying and auto-keying. Some were only used for
auto-keying.
To clarify that, prefix flags that used exclusively in one or the other
system with `AUTOKEY`/`MANUALKEY`

Also the flag name on the user preferences and the tool settings was renamed.
Previously it was called `autokey_flag`. To indicated that it is not only used
for autokeying, rename it `keying_flag`.

Fixes: #73773

Pull Request: https://projects.blender.org/blender/blender/pulls/115525
2024-01-19 16:26:10 +01:00
Omar Emara 2bff75c303 Tests: Enable blacklisted GPU compositor tests
Those tests are now expected to work.
2024-01-19 16:36:31 +02:00
Hans Goudey e0202a6e42 Cleanup: Use C++ vector types in paint stroke struct 2024-01-19 09:27:56 -05:00
Hans Goudey 75b5ef3270 Cleanup: Remove unused paint stroke field 2024-01-19 09:27:56 -05:00
Hans Goudey 61692370d2 Cleanup: Use C++ random number generator for paint stroke 2024-01-19 09:27:56 -05:00
Hans Goudey d7cca9f1d8 Cleanup: Move paint stroke code to C++ namespace 2024-01-19 09:27:56 -05:00
Hans Goudey 8c6e763fd0 Cleanup: Remove unused BLI_time.h includes 2024-01-19 09:27:56 -05:00
Hans Goudey 490c50c718 Cleanup: Use camel case for file tooltip struct name 2024-01-19 09:27:56 -05:00
Hans Goudey 6abf43cef5 Cleanup: Use std::string to store and pass tooltip text
Store temporrary tooltip text as `std::string` instead of
manually allocated C strings. Use `fmt` to format instead
of our own formatting utilities that return an allocated C
string.
2024-01-19 09:27:56 -05:00
Hans Goudey 90c4e2e6ec Cleanup: Replace UI button "string info" function
Instead of a single function with variadic arguments, a special enum
type containing which string to request, and a special struct to
contain the request and the result, just use separate functions for
each request, and return a std::string by value. Also change the enum
item string access to just give access to the enum item itself and add
const in a few places as necessary.

The callers of the API function get much clearer this way, and it's
much easier to see which information is used to create certain tooltip
strings.
2024-01-19 09:27:56 -05:00
Brecht Van Lommel cb787a458b Build: use C++17 for CUDA kernels when supported
This helps with compatibility with recent clang versions as host compiler.

Pull Request: https://projects.blender.org/blender/blender/pulls/117311
2024-01-19 15:19:33 +01:00
Falk David c5dff902a6 GPV3: Modifiers: Add `get_drawing_infos_for_write`
This API returns a vector with a pointer to each drawing as well
as the starting frame for the keyframe that the drawing came from.
2024-01-19 14:58:07 +01:00
Falk David b6ed5eea8d GPv3: Return std::optional from `frame_key_at`
Previously, `frame_key_at` would return `-1` for when it couldn't find
a key for the given frame.
This could lead to issues though, because `-1` is a valid key (it is a valid scene frame number).

This changes the API to return an optional instead. This makes it very clear
when no key was found, and should make it less error prone.
2024-01-19 14:58:07 +01:00
Sybren A. Stüvel 0602683ec2 Cleanup: Anim, add missing `#pragma once`
No functional changes.
2024-01-19 14:54:45 +01:00
Philipp Oeser 8189e2266b Revert "Fix #68436: External Particle Disk Cache Playback Is Broken"
this broke the dynamic paint test

This reverts commit ab9c0af1ce.
2024-01-19 14:53:43 +01:00
Sergey Sharybin f8c283d2b7 Fix: Assert in geometry nodes in specific files
Possibly also fixes write past array boundaries.

Happens with the mikassa-shading.blend file, by simply opening
the file in debug mode. The fix is suggested by Jacques.

Pull Request: https://projects.blender.org/blender/blender/pulls/117331
2024-01-19 14:52:43 +01:00
Jacques Lucke 4b47b46f9c Cleanup: rename PIL to BLI
The term `PIL` stands for "platform independent library." It exists since the `Initial Revision`
commit from 2002. Nowadays, we generally just use the `BLI` (blenlib) prefix for such code
and the `PIL` prefix feels more confusing then useful. Therefore, this patch renames the
`PIL` to `BLI`.

Pull Request: https://projects.blender.org/blender/blender/pulls/117325
2024-01-19 14:32:28 +01:00
Omar Emara 35dcd79391 Fix: Syntax error in latest commit 2024-01-19 14:52:05 +02:00
Martijn Versteegh a3b7674c6e Compositor: Add a Nearest sampling to Map UV node
When using the MapUV node for certain NPR workflows (for example palette
based remapping of colors) it can be useful to not use the default
anisotropic filtering.

In preparation of potentially adding more filter modes at a later stage
and to keep things consistent with the 'transform' node we use the full
set of interpolation modes in the enum, but expose only the implemented
ones in RNA..
2024-01-19 13:24:22 +01:00
Omar Emara 56f3cef4c1 Fix: Cryptomatte fails with multi-layer images
The GPU Cryptomatte node fails when the source is a multi-layer image.
This is because the check that compares the Cryptomatte Type Name with
the layer name was reversed.
2024-01-19 14:07:00 +02:00
Falk David d3cd2c5556 Fix: GPv3: Error in shader caused by mixing data types 2024-01-19 12:34:59 +01:00
Brecht Van Lommel fd07c43f5e Release: change LTS release notes script from wiki to markdown 2024-01-19 12:21:56 +01:00
Omar Emara 23f90dea4c Fix #117317: Empty Defocus output when Z is less than 0
The Defocus node produces an empty output when the Z input is less than
0. This patch fixes that by ensuring zero or positive blur radius.
2024-01-19 13:19:22 +02:00
Omar Emara 20932608ea Fix #117318: Empty Defocus output when max blur is less than 1
The Defocus node produces an empty output when the max blur is less than
1. This patch fixes that by passing the image through in that case,
since it is identity in this case.
2024-01-19 13:08:19 +02:00
Omar Emara 91f7216eb1 Compositor: Optimize Pixelate node for unit pixel size
Pass the input image through for unit pixel sizes.
2024-01-19 13:03:28 +02:00
Omar Emara d537e63fa6 Fix: Plane Deform mask retains original alpha
The Plane Deform mask output retains the original alpha of the input
image, while it should be a binary mask. This patch ignores the alpha of
the image and uses a binary mask instead.
2024-01-19 12:59:31 +02:00
Jacques Lucke f384622343 BLI: add utility to create random number generator with seed based on time
This is used in a bunch of different places and is done in slightly different ways
every time. Now the intend of the code is more obvious.
2024-01-19 11:58:02 +01:00
Falk David 4197270ca1 Cleanup: GPv3: Unused variable 2024-01-19 11:49:46 +01:00
Philipp Oeser ab9c0af1ce Fix #68436: External Particle Disk Cache Playback Is Broken
This has been broken since 2.8.

The highlevel reason for this is that the "info file" (saved as frame
zero) was not written anymore.
Reason for that in turn is that when calling `BKE_ptcache_write` outside
the bake job, the `PTCacheID` `calldata` (a psys in our case) is not the
evaluated particle system, causing a check for `totpoint` to fail (these
were always zero).

Deeper reasoning is unclear, no further investigations were done as to
why/when this happened.

The solution proposed here is using the evaluated psys when writing the
info frame (and this is isolated to just this spot). File then gets
written and can/will be read when using this as an external disk cache
in another file.

Pull Request: https://projects.blender.org/blender/blender/pulls/117291
2024-01-19 11:47:36 +01:00
casey bianco-davis 3b23105120 GPv3: Pass more attributes to the renderer
This implements the following: rotation, aspect, hardness, vertex color, fill color and stroke UVs.

Pull Request: https://projects.blender.org/blender/blender/pulls/109093
2024-01-19 11:47:00 +01:00
Lukas Tönne 81a8e0b0c1 Cleanup: Removed unused grease pencil code lines. 2024-01-19 11:37:36 +01:00
Lukas Tönne b157b80462 Grease Pencil: Use a "Color" modifier category for GP2 compatibility
This will be used for Opacity/Tint/Color modifiers which change color
attributes of grease pencil objects. The category is not shown for other
object types.
2024-01-19 11:35:26 +01:00
Lukas Tönne 01d4e8a345 Grease Pencil: Replace opacity modifier DNA flag for influence panel.
Use `BKE_panel_layout_panel_state_ensure` to get a panel open/close flag
without requiring a DNA flag.
2024-01-19 11:32:44 +01:00