Commit Graph

150077 Commits

Author SHA1 Message Date
Clément Foucault
1a96d73f52 Fix: DRW: PassSimple do not pass resource_id correctly
This only happened if there are multiple different resource
handle used inside the same `PassSimple`.

Fix is to use the same logic to find the first instance.

Fix #130384
2024-11-17 19:17:12 +01:00
Clément Foucault
94d2a1e6a2 GPU: GLSL CPP stubs: Allow printf in code 2024-11-17 19:17:12 +01:00
Jun Mizutani
dcec1d5f68 Fix #130365 : Hard to read brush names in Blender Light theme
Pull Request: https://projects.blender.org/blender/blender/pulls/130366
2024-11-17 17:41:01 +01:00
kitt
140ff12eae VSE: Add Box Roundness option to text strips
The background box for VSE text strips can have rounded corners now.

Actual rounded shape is a superellipse with 2.1 exponent; this is
very close to a circle section but feels a bit nicer with more
continuity between the flat part and the rounded part of the box.

At very large rounding radius this is not very fast; optimization
for that case will come in a separate commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/129665
2024-11-17 12:07:16 +01:00
Jacques Lucke
b4fc5754fd Cleanup: avoid constructing std::string from nullptr
This probably never in practice in these cases.
Constructing a `std::string` from nullptr is invalid.
Starting with C++23, the `nullptr_t` is even explicitly deleted.
2024-11-16 23:48:49 +01:00
Sean Kim
c88c2bfda9 Cleanup: Convert BKE_multires.hh enum to enum class
Pull Request: https://projects.blender.org/blender/blender/pulls/130363
2024-11-16 23:16:37 +01:00
Jacques Lucke
4836e0209a Cleanup: remove invalid template usage
This does not compile with GCC on C++20.
2024-11-16 23:10:44 +01:00
Jacques Lucke
b84498e20b Cleanup: avoid name clash with lerp function in C++20 2024-11-16 23:10:44 +01:00
Jacques Lucke
af3ddb5551 Fix #130369: wrong attributes removed in Extrude Mesh node
The issue was that pointers to `CustomDataLayer.name` are not stable when
attributes are removed. So the change is to create a temporary copy of the
names that need to be removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/130373
2024-11-16 21:58:29 +01:00
Bastien Montagne
bb3eb9aa23 Cleanup: Add missing BLI headers.
Not sure why I got an error about this today in one of my usual
builds... very mysterious, but the `BLI_array_utils.hh` include does
seem to be missing anyway.
2024-11-16 19:06:23 +01:00
Clément Foucault
85e12e7dc0 Cleanup: Select Engine: Move debug draw to new draw manager 2024-11-16 15:29:29 +01:00
Jesse Yurkovich
e68897e117 Fix: prevent duplicate shader node links during USD import
When reading UsdPreviewSurface materials from USD files, duplicate links
between nodes would often result. This typically occurs between the
Image node and its upstream UV Mapping node, or between the Image node
and a downstream Separate RGB node. As processing progresses, we
de-duplicate the nodes themselves as each new input/output socket is
discovered. However, we would unconditionally add a link between the
nodes even if we've already added one.

Cycles will complain about this situation and it's obviously incorrect:
`Cycles shader graph connect: input already connected.`

As most UsdPreviewSurface material networks are all fairly small
(<10 links total) I'm not worried about the cost of counting the links
at this point.

Pull Request: https://projects.blender.org/blender/blender/pulls/130356
2024-11-16 04:12:07 +01:00
Clément Foucault
39e5e3c4fe Cleanup: Grease Pencil: Remove unused functions 2024-11-15 19:21:40 +01:00
Omar Emara
6e814e7597 Compositor: Implement Mao UV node for new CPU compositor
Reference #125968.
2024-11-15 19:20:28 +02:00
Omar Emara
7f7ababec2 Compositor: Implement Displace node for new CPU compositor
Reference #125968.
2024-11-15 19:18:31 +02:00
Sebastian Parborg
ca1bf7928d Tests: Add sanity check test for Linux releases
This test does some rudimentary checks to see if the binaries and
folder structure are ready for a release.

Pull Request: https://projects.blender.org/blender/blender/pulls/130319
2024-11-15 18:12:52 +01:00
Bastien Montagne
992c52ff1e Fix #130310: Improve Enum props API doc regarding separators.
Doc only mentioned 'None' separators, but 'tuple' items with an empty
identifier string are also valid separators, and allow to get 'named'
separators in the UI.
2024-11-15 17:36:22 +01:00
Jeroen Bakker
c1379ff2b3 Fix #130161: Vulkan: Grid overlay artifact when copying to swap chain
When copying the window to the swap chain the image needs to be copied
upside down to match Vulkan/OpenGL image coordinate differences.

There was an of by 1 error when copying resulting in minor drawing
glitch which was noticeable when looking at the viewport grid.

Pull Request: https://projects.blender.org/blender/blender/pulls/130328
2024-11-15 17:12:24 +01:00
Falk David
60df9fd982 Merge branch 'blender-v4.3-release' 2024-11-15 17:01:46 +01:00
Falk David
d3d26233fc Fix: GPv3: Edit Mode: Crash during extrude
The crash was caused by the selection attribute not being
initialized properly. The size was 0.

The fix uses `ed::curves::ensure_selection_attribute` to ensure
the attribute is created and on the right domain.

Extrude should only work for a point selection, so the poll
function of the operator is updated to reflect this.

Pull Request: https://projects.blender.org/blender/blender/pulls/130333
2024-11-15 17:01:06 +01:00
Miguel Pozo
40eaa01d8c Fix #130235: Eevee: Viewport Render Animation causes white/black flashes of materials
Disable deferred compilation for viewport image renders.

Pull Request: https://projects.blender.org/blender/blender/pulls/130335
2024-11-15 16:47:58 +01:00
Clément Foucault
1d48d8428c Refactor: Grease Pencil: Port depth merge and mask invert to new draw manager
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/130326
2024-11-15 16:16:53 +01:00
Lukas Tönne
366c8e247a Fix #130275: Trace sequence operator only uses first frame
The operator needs to look for exact frame matches, otherwise
it simply re-uses the first frame over and over.

Pull Request: https://projects.blender.org/blender/blender/pulls/130317
2024-11-15 15:54:56 +01:00
Falk David
1d571a810f Fix: Cycles: Compiler warning
The `ProjectionTransform` object has no trivial copy-assignment constructor.
This results in the following warning on `gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0`:
```
/.../blender-git/blender/intern/cycles/kernel/../util/projection.h: In function ‘ccl::ProjectionTransform ccl::projection_inverse(ProjectionTransform)’:
/.../blender-git/blender/intern/cycles/kernel/../util/projection.h:219:9: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘ccl::ProjectionTransform’ {aka ‘struct ccl::ProjectionTransform’} with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
  219 |   memcpy(&tfmR, R, sizeof(R));
      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~~
/.../blender-git/blender/intern/cycles/kernel/../util/projection.h:67:16: note: ‘ccl::ProjectionTransform’ {aka ‘struct ccl::ProjectionTransform’} declared here
   67 | typedef struct ProjectionTransform {
      |                ^~~~~~~~~~~~~~~~~~~
```
To fix the warning, cast the pointer to `(void *)`.

Pull Request: https://projects.blender.org/blender/blender/pulls/130321
2024-11-15 15:24:49 +01:00
Clément Foucault
d04d23bc40 Refactor: Grease Pencil: Port AntiAliasing drawing to new draw manager
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/130324
2024-11-15 14:32:28 +01:00
Clément Foucault
87cf01efab Refactor: Grease Pencil: Port Vfx drawing to new draw manager
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/130301
2024-11-15 14:04:14 +01:00
Falk David
8e75b5f4c7 Merge branch 'blender-v4.3-release' 2024-11-15 12:53:38 +01:00
Lukas Tönne
217fa8d09e Fix #130276: Trace operator needs to tag data after curves replacement
1. Trace operator was missing a topology cache tag after replacing the stroke
   data. This caused an invalid normals cache and crash in drawing code.
2. The drawings must not be manipulated outside the main thread. Job data now
   stores a curves geometry array that is used to update the drawings at the end of the job.
3. Since the job data now stores an array it has to be allocated using MEM_new.

Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/130313
2024-11-15 12:52:43 +01:00
Christoph Lendenfeld
dbcc9d7820 Refactor: Keying set code
No functional changes intended.

After moving the keying set code to animrig with b38d8ecb86,
a few things needed cleaning up.

* Improving comments
* adding `const` where possible
* simplify code in some areas

Pull Request: https://projects.blender.org/blender/blender/pulls/130314
2024-11-15 12:32:22 +01:00
Falk David
f20cd471fe Merge branch 'blender-v4.3-release' 2024-11-15 12:11:33 +01:00
Pratik Borhade
7e12131aaf Fix: GPv3: Adjustment panel in dopesheet
Missed in b4881f6b0a
Expose adjustment panel in Grease pencil dopesheet side panel as
done for others in 6e137f957f

Pull Request: https://projects.blender.org/blender/blender/pulls/130311
2024-11-15 12:10:28 +01:00
Nikita Sirgienko
2aa9203f2f Cycles: Reintroduce noinline keyword for oneAPI device
In 891d71a4d4 this keyword was
dropped due to performance regression after
fdc2962beb, but currently code
does not experience this performance degradation, and in fact
there is minor performance improvement on Lunar Lake GPUs,
along with an expected improvement in compile time.
However, this change brings a minor performance regression to
shade_surface kernel on Intel Arc and Meteor Lake GPUs, which
will be solved later by disabling this keyword for
these platforms only.

Pull Request: https://projects.blender.org/blender/blender/pulls/130299
2024-11-15 12:09:37 +01:00
Pratik Borhade
71dd56a325 Fix: Typo in class name
Mistake in 6e137f957f
Falk noticed it in !130311

Pull Request: https://projects.blender.org/blender/blender/pulls/130315
2024-11-15 11:59:25 +01:00
Aras Pranckevicius
3c4ee91926 Merge branch 'blender-v4.3-release' 2024-11-15 12:52:49 +02:00
Aras Pranckevicius
64198971ea Fix: Reading some old blend files fires assert in Sequencer data read
wdas_cloud.blend file on 4.3+ raises an assert, due to reading some
VSE data:

  readfile.cc:4798, blo_verify_data_address(), at
  'MEM_allocN_len(new_address) >= expected_size' Corrupt .blend
  file, unexpected data size.

This is caused by 30dbb7820d which removed completely unused
data from Sequence struct. But it turns out, Sequence serialization
inside scene_blend_read_data is "somewhat strange", to put it mildly,
and silently assumes that struct offset of seqbase and channels
will never change.

For now, restore the previously expected struct member offset,
ensure it stays like that via static_assert, and add notes on
how someone should fix this in a better way.

Pull Request: https://projects.blender.org/blender/blender/pulls/130296
2024-11-15 11:51:49 +01:00
Sybren A. Stüvel
b3af7e8cd6 Fix #130268: Assertion triggered when animate property from Material panel
Fix an assertion that an embedded data-block has a zero 'real user'
count. Apparently it's possible for the shader node tree (embedded by
the material) to have a user count of 1.

Since that looks valid to me (only one user, namely the material itself)
I think it's fine to extend the assertion to that.

I did keep the assertion, to ensure that the embedded data-block is not
shared by multiple users. That shouldn't be possible, in any case.

Pull Request: https://projects.blender.org/blender/blender/pulls/130281
2024-11-15 11:19:44 +01:00
Pratik Borhade
6e508c84a1 Fix: Avoid default in switch case
Discussed in !130213 to mention enum item explicitly instead
of `default`.

Pull Request: https://projects.blender.org/blender/blender/pulls/130267
2024-11-15 11:12:40 +01:00
Christoph Lendenfeld
b38d8ecb86 Refactor: move keyingsets to animrig
No functional changes intended.

This patch moves the relevant keying set code from editors to animrig.
All functions are in the animrig namespace, and as such have lost their
`ANIM_` prefix.
Other than that, the code has been moved as is into `animrig/intern/keyingsets.cc`

Note that I also had to move `id_frame_has_keyframe` and `fcurve_frame_has_keyframe`.
I moved that into `ANIM_keyframing.hh` and `ANIM_fcurve.hh` since I found that more fitting.

Due to Windows defining `DELETE` as macro I had to rename `ModifyKeyMode::DELETE`
to `ModifyKeyMode::DELETE_KEY`

As a result of this two includes from animrig to editors were removed.

This is part of #121336

Pull Request: https://projects.blender.org/blender/blender/pulls/129980
2024-11-15 10:51:41 +01:00
Jesse Yurkovich
38363fb2d7 USD: Add test data for additonal material import/export coverage 2024-11-14 20:03:09 -08:00
Hans Goudey
091c175c5c Refactor: Move region runtime to separate C++ runtime struct
This allows using C++ types in the region runtime data, which will
make it easier to move the remaining runtime data out of the
`ARegion` DNA type and improve code readability in these areas.

Pull Request: https://projects.blender.org/blender/blender/pulls/130196
2024-11-15 02:00:11 +01:00
Sean Kim
1e357cdca8 Cleanup: Change calc_*_intersect_data functions to take depth by value
Pull Request: https://projects.blender.org/blender/blender/pulls/130256
2024-11-14 23:52:30 +01:00
Clément Foucault
3c32a18fac Cleanup: EEVEE: Remove unused function with legacy API calls 2024-11-14 23:50:39 +01:00
Clément Foucault
92aa3fe46b Cleanup: Workbench: Address shader warnings 2024-11-14 23:39:01 +01:00
Clément Foucault
c0c816f846 GPU: GLSL compilation as C++ for workbench static shaders 2024-11-14 23:15:06 +01:00
Harley Acheson
39da29cedd Merge branch 'blender-v4.3-release' 2024-11-14 13:32:58 -08:00
Harley Acheson
d1171635ff Fix #129414: On linux, Join Use Active Window when Overlapping
On Linux we can't always determine topmost window under cursor,
therefore check for overlapping windows and, if so, only use the
active window.  This allows dragging between windows as long as
they don't overlap

Pull Request: https://projects.blender.org/blender/blender/pulls/130242
2024-11-14 22:31:36 +01:00
Hans Goudey
0684639e1b Cleanup: Grease Pencil: Remove indirect includes from headers
To avoid unnecessary header parsing during compilation.

Pull Request: https://projects.blender.org/blender/blender/pulls/130285
2024-11-14 22:07:19 +01:00
Hans Goudey
f879d23237 Cleanup: Use const for evaluated pre-modified mesh accessor
Conceptually this shouldn't be changed after it's created for the
first time.
2024-11-14 15:45:44 -05:00
Clément Foucault
ac58df78cc Cleanup: EEVEE: Use unique handle
- Move `ObjectRef` creation out of `object_sync`.
- Make unique handle only when needed inside the sync functions.

Pull Request: https://projects.blender.org/blender/blender/pulls/130294
2024-11-14 21:42:57 +01:00
Thomas Dinges
49b968cf39 Merge branch 'blender-v4.3-release' 2024-11-14 18:56:41 +01:00