Commit Graph

132147 Commits

Author SHA1 Message Date
Sergey Sharybin
6414ca6510 Fix invalid assignment of a clamped color in paint
Was recently introduced by #117460

Pull Request: https://projects.blender.org/blender/blender/pulls/117473
2024-01-24 10:13:29 +01:00
Omar Emara
70a8a9e4d9 Compositor: make Flip node works in local space
This patch changes the operation space of the Flip node from the global
space to the local space. This means that the Flip node will now flip
the image without changing its location.
2024-01-24 11:08:41 +02:00
Sergey Sharybin
03828a47f4 Fix slow toggling of scene tool settings
For example, snapping or pivot point.

The slowdown happens in complex files with drivers which use scene
properties as input. Can be seen in the demo file from #117335.

This change adds ability to mark RNA property as required to bring
the evaluated ID up-to-date, but not do possibly expensive tag for
drivers.

The tool settings possibly can be tagged as do-not-do-deg-tag at
all, but safer seems to follow the current behavior a bit closer.

Pull Request: https://projects.blender.org/blender/blender/pulls/117405
2024-01-24 10:05:33 +01:00
Jacques Lucke
0d420ee97a BLI: use less hacky source of randomness when generating random seed 2024-01-24 09:59:54 +01:00
Sergey Sharybin
52a31ce31b Fix blur processing in keyign node in GPU compositor
Align the blur filter with the CPU compositor, which uses box filter.
The pre filter was already using box filter, while the post filter was
using gaussian filter.

Additionally, GPU compositor was doing twice amount of blur due to the
mismatch between radius and size semantic: node setting is in size,
while the separable blur expects radius.

Pull Request: https://projects.blender.org/blender/blender/pulls/117454
2024-01-24 09:55:51 +01:00
Sergey Sharybin
dd1374fb7b Fix keying matte operation in GPU compositor
The calculation of the matte could lead to a division-by-zero
leading to completely different results on different graphics
backends.

Perform the same checks of the input and key saturation before
performing division as it is done in the CPU compositors.

The `node keying matte` test is still failing on Metal, but the
look of the result is much closer to what it would be.
2024-01-24 09:55:48 +01:00
Sergey Sharybin
aecf1fba84 Fix #116098: Change default texture mapping for brushes to View Plane
The Tiled default is the least commonly used mapping mode, switch the
default to something that is more commonly used.

Do it for all modes, since according to Julien it is reasonable default
behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/116933
2024-01-24 09:48:27 +01:00
Jason Fielder
190567f941 EEVEE Next: Optimize HiZ with fast image load store routines
Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/116953
2024-01-24 09:36:25 +01:00
Stefan Werner
d16d2bbd3a Cycles: Adding OIDN support for CUDA and OptiX devices
Small changes to turn on support and to build OIDN with the CUDA backend.

Co-authored-by: Werner, Stefan <stefan.werner@intel.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/115828
2024-01-24 08:19:39 +01:00
Campbell Barton
56ccc9cdd9 Fix missing import in 9cc6ee75e7bad264c4bbcb274add5c71abf113d5 2024-01-24 17:06:57 +11:00
Campbell Barton
9cc6ee75e7 Extensions: support using a default local user directory
This is needed so extensions repositories can reference
user-script directories without them having hard-coded paths
which will be invalid when upgrading a Blender version.
2024-01-24 16:50:32 +11:00
YimingWu
f54348edc9 GPv3: Smooth modifier
Smooth modifier ported to Grease Pencil 3.0

Exposed `smooth_curve_attribute()` from `grease_pencil_edit.cc`
to achieve the smoothing effect. It will not be the exact same result
as the old algorithm.

Pull Request: https://projects.blender.org/blender/blender/pulls/116975
2024-01-24 04:36:36 +01:00
Campbell Barton
53a8570aec Extensions: enable the package management add-on when enabled
Package management has been moved into addons_contrib so the addon
can be enabled when enabling extension repositories.

This means users can test extension repositories without having to
install a separate add-on.

Additional work is still needed with the server before this is ready
for general testing though.

Part of #117286.
2024-01-24 13:25:27 +11:00
Hans Goudey
99f9084bee Cleanup: Replace some CLAMP macros with C++ functions
Pull Request: https://projects.blender.org/blender/blender/pulls/117460
2024-01-23 21:10:33 +01:00
Hans Goudey
1c503c094c Outliner: Add option to apply object modifier
In discussions about #93551, some users mentioned it would be helpful
to have the ability to apply modifiers from the outliner. Adding that
ability is quite simple, and it makes sense since we already have the
option to remove modifiers there.

---

![image](/attachments/e64c0dd4-a6ec-4115-a46b-7d2fca487c07)

Pull Request: https://projects.blender.org/blender/blender/pulls/117349
2024-01-23 20:54:13 +01:00
Harley Acheson
ba096bae18 UI: TreeView Hierarchy Line with Region Zoom
Adjust size and positions of TreeView hierarchy lines as region is zoomed.

Pull Request: https://projects.blender.org/blender/blender/pulls/117420
2024-01-23 20:39:15 +01:00
Brecht Van Lommel
461a598ed5 Build: don't write __pycache__ files into lib folder for make commands
These scripts are not performance critical, and the cache files could
potentially interfere with library updates in the future.
2024-01-23 20:29:07 +01:00
Brecht Van Lommel
440b1d9179 Cleanup: cmake warning in make deps 2024-01-23 20:29:07 +01:00
salipourto
dd7a7791d7 Cycles: Remove and update deprecated compiler options for HIP
Pull Request: https://projects.blender.org/blender/blender/pulls/117428
2024-01-23 20:28:39 +01:00
Hans Goudey
91b4f9f1f6 Data Transfer: Avoid unnecessarily computing existing normals
If the mix factor means the old values won't be used at all,
the existing corner normals from before the modifier don't
matter and we can skip computing them.
2024-01-23 12:42:31 -05:00
Hans Goudey
da6405fee7 Fix #117410: Corner normals cache not reset on geometry clear
For example, the old corner normals would be used when a mesh's
geometry is completely replaced (when applying a modifier).
2024-01-23 12:42:31 -05:00
Brecht Van Lommel
e0ff7731e0 Core: make BKE_appdir functions thread safe, using optional<string>
The static variables can cause the wrong path to be used, for example
when asset indexing in a thread affects loading toolbar icons.

Fix #117416: toolbar icon randomly missing

Pull Request: https://projects.blender.org/blender/blender/pulls/117419
2024-01-23 18:38:15 +01:00
Harley Acheson
4e483dad4b Fix: String Offset Assert in Color Picker
Dragging on a color value slider in the color picker will assert for
an invalid string offset. We now using std::string for uiBut->str, the
string is empty and we are checking against str[1]. This replaces that
with an std::basic_string::find which handles this fine.

Pull Request: https://projects.blender.org/blender/blender/pulls/117455
2024-01-23 17:39:55 +01:00
Philipp Oeser
d8b085089c Fix: 3D Viewport header missing update changing paintslots
Since 3b5df8a7ea, we are displaying a "canvas picker" in the 3DView
header. In texture paint mode, this gives us the active paintslot to
paint on, however the header wasnt updating to another slot.

See https://projects.blender.org/blender/blender/pulls/
112227#issuecomment-1018440

Part of #112186.

Pull Request: https://projects.blender.org/blender/blender/pulls/115802
2024-01-23 17:27:28 +01:00
Harley Acheson
606723b3e2 UI: More Defaults for Search Placeholders
When looking for automatic placeholder string For UI_BTYPE_SEARCH_MENU,
use property UI Name as last resort.

Pull Request: https://projects.blender.org/blender/blender/pulls/113792
2024-01-23 17:15:50 +01:00
Richard Antalik
06be6c5fb1 IMB: Add gif to list of movie extensions
Pull Request: https://projects.blender.org/blender/blender/pulls/117343
2024-01-23 15:55:54 +01:00
Hans Goudey
eb23b299db Fix: Add versioning for change in object info scale behavior
When the object info node was originally created, the transform of an
object with a negative scale would also have negative scale. At some
point that behavior changed though, and the matrix always had positive
scale.

The negative scale is the more expected behavior (see #104926), and
66dc0ebf2eb7e572991d restored that behavior. But node setups started to
rely on the non-negative behavior in the meantime. So this commit adds
an absolute value node with versioning.

The versioning is added to the 401.10 file subversion bump, since
that's when the behavior changed back to the current state.

Pull Request: https://projects.blender.org/blender/blender/pulls/117425
2024-01-23 15:34:17 +01:00
Stefan Werner
4f58cffb4e Cycles: Use default CUDA context instead of creating a new one
This allows for Cycles and OIDN to share the same context.

Co-authored-by: Werner, Stefan <stefan.werner@intel.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/117230
2024-01-23 15:31:45 +01:00
Lukas Tönne
f72dbc1ef8 Fix #117422: Move undefined type removal behind after-linking-versioning
There are still node versioning bits running after linking, for example
`version_geometry_nodes_replace_transfer_attribute_node`. This code
relies on node types being untouched at that point.

Move the unknown node type replacement from `ntreeSetTypes` into the
`ntreeUpdateAllNew` function. This is called _after_ late versioning.

Pull Request: https://projects.blender.org/blender/blender/pulls/117441
2024-01-23 15:15:08 +01:00
Jeroen Bakker
481bc7a777 EEVEE: Update Render tests script
Last month we have been in the process of fixing the render tests of EEVEE-Next.
These render tests had some issues. Currently we are in a state that render
differences can be explained or related to an existing issue.

Having these render tests will also enable testing differences between Metal and OpenGL.

The new setup alters the position of the reflection probe so it doesn't intersect the ground
or the sphere at the same time. An offset was added, which adds a small difference
between cycles and eevee-next renders.

There is a known issue with the HiZ buffers when render size is too small. We change the
reflection probe render size as a temporary fix.

Pull Request: https://projects.blender.org/blender/blender/pulls/117447
2024-01-23 15:11:15 +01:00
Hans Goudey
0284715ab4 Cleanup: Make format 2024-01-23 07:56:49 -05:00
Pratik Borhade
71925e9157 Fix: Debug crash when translating more than 1024 verts
Caused by 1bcf3933a839a8388889db2135a7afb36f281aef
This is due to accessing value of uninitialized variable.

Pull Request: https://projects.blender.org/blender/blender/pulls/117442
2024-01-23 12:40:48 +01:00
Nika Kutsniashvili
5a0b50e0a6 Anim: Reorganize items in 'View' menus in animation and video editors
View menu in animation and video editors are too
different from each other and unorganized.
Same operators appear in different places in different editors.
That makes navigating them harder, because for example
you expect framing operators at the bottom because they're
at the bottom in graph editor, but they're at the top in Sequencer
and 3D Viewport. It's important that ordering of operators
match as well as possible, so that users can expect certain
operators in certain places and dont spend time searching
for buttons in messy menus.

I tried to match ordering to 3D viewport menu
as much as possible, and also to use separators right,
so that grouping of items is logical and can be shareable between editors.

This grouping also looks better and makes navigation easier,
because it splits huge pile of toggles at the top of the menus
in smaller chunks and puts operators between them,
so they're esier to separate them in one glance.

Split off from #116492

Pull Request: https://projects.blender.org/blender/blender/pulls/117162
2024-01-23 12:11:22 +01:00
Jeroen Bakker
cd756143cf OpenGL: Fix Shader Linking Error
When a shader performs a geometry shader injectoin to work around
features that are not supported natively on the GPU (viewport,
barycentric coordinates, layered rendering), linking would fail.

The reason was that the geometry shader was stored in a slot that was
patched by the specialization constants, resulting in an empty geometry
shader. An empty shader can be compiled, but doesn't match the interface
with other stages, so the linking would fail.

This fixes the issue that EEVEE crashed on Intel iGPUs. These GPUs
don't support viewports.

Pull Request: https://projects.blender.org/blender/blender/pulls/117440
2024-01-23 11:12:30 +01:00
Omar Emara
46322e4927 Fix: Compositor Texture node differ between CPU and GPU
The compositor Texture node differ between CPU and GPU. That's because
CPU falls back to the texture intensity as the alpha channel if no alpha
channel exists. And it also broadcast the texture intensity to all color
channels if no RGB evaluation exist. So adjust the GPU implementation to
follow that.
2024-01-23 11:59:38 +02:00
Campbell Barton
dd8c42bfaf CMake: mark freetype & tiff directories as advanced
It's not clear what these are used for as they seem like recent
additions and are set to "NOT-FOUND" even when tiff/freetype are found.

Marking as advanced instead of removing so as not to interfere with
freetype/tiff finding logic.
2024-01-23 20:45:19 +11:00
Campbell Barton
1e4bab4eb5 CMake: always mark CMAKE_BUILD_TYPE_INIT as advanced
When defined this wasn't marked as advanced.
2024-01-23 20:40:00 +11:00
Campbell Barton
6cc8ac7cb3 Cleanup: rename ImBuf anim & anim_index structs
Rename: anim -> ImBufAnim
Rename: anim_index -> ImBufAnimIndex

There were cases where removing redundant "struct" qualifier caused
a warning since the name of the struct member was also anim.

Use uppercase type name to conform with other types names.

Ref !117394
2024-01-23 20:26:55 +11:00
Jeroen Bakker
30a152216e EEVEE: Change UI Naming
This PR renames the UI names of EEVEE render engines, due to the decision to
postpone EEVEE-Next to Blender 4.2.

* `EEVEE` is now named `EEVEE-Next`.
* `EEVEE (Legacy)` is now named `EEVEE`.

Pull Request: https://projects.blender.org/blender/blender/pulls/117437
2024-01-23 10:06:15 +01:00
Philipp Oeser
c16b0216fe 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 and only to particle
systems). 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/117401
2024-01-23 09:37:41 +01:00
Jeroen Bakker
062a9f9540 Fix: Compiling EEVEE test cases
Due to recent changes eevee test cases didn't compile anymore.
The issue was that a header file was migrated from C to CPP.

Pull Request: https://projects.blender.org/blender/blender/pulls/117436
2024-01-23 09:14:10 +01:00
Campbell Barton
c80a6d5b0f UI: remove addons categories when extensions are enabled
Part of #117285.
2024-01-23 17:33:22 +11:00
Campbell Barton
5574a2790f Cleanup: rename uuid to uid for local-view functionality
Follow up to 311ca3e6af1d761ab6c5944ae82d2460145e303d.
2024-01-23 16:07:39 +11:00
Campbell Barton
25e15660ac UI: rename extension repositories panel and close by default
Ref #117285.
2024-01-23 15:22:55 +11:00
Campbell Barton
b4e869e2fc Cleanup: quiet warnings when reloading scripts
Some UI classes weren't unregistered which caused a warning when
reloading scripts (since [0]). Register/Unregister these classes along
with the classes of other sub-modules.

[0]: c5e2ec8a1af5ca2b8f1a3a35692f5b034c38b357
2024-01-23 14:17:02 +11:00
Campbell Barton
8a9db8cfa7 Cleanup: remove redundant iface_ call 2024-01-23 14:06:41 +11:00
Campbell Barton
1fa896bb9a Cleanup: move bl_description to doc-strings
This is already done almost everywhere, prefer doc-strings unless
there is a reason for the tool-tip and Python doc-string to differ.
2024-01-23 13:59:15 +11:00
Campbell Barton
9a7b767226 Cleanup: reserve "r_" prefix for return arguments 2024-01-23 13:30:47 +11:00
Campbell Barton
0ce1102147 Cleanup: replace incorrect use of UUID with UID in bmesh_region_match
Follow up to 311ca3e6af1d761ab6c5944ae82d2460145e303d.
2024-01-23 13:22:04 +11:00
Lukas Stockner
b5a9c98e04 Fix #117081: Wrong Roughness when baking Principled BSDF
The pre-4.0 Principled BSDF had a special diffuse BSDF that contained
the roughness value from the node. Since 4.0, the regular Diffuse BSDF is used,
so we need to ignore it when determining the roughness value for baking.
2024-01-23 01:20:12 +01:00