Commit Graph

121197 Commits

Author SHA1 Message Date
Falk David
bc70bed850 Cleanup: Grease Pencil: Remove "fast draw" code
This was used by the legacy Grease Pencil system while using the draw
tool to quickly render a stroke buffer.

Nowadays, we don't use this buffer anymore and just rerender
the Grease Pencil object.
2025-07-02 11:12:15 +02:00
Clément Foucault
06dff0151d Fix #103499: View Pan not working for smaller clip start value
Changing the computation to be split in 2 steps (one for each matrix)
fixes the issue.

However, it seems this function is used in a lot of places which
I am not sure if this has the potential to slow down some other
operations. So I will simply add a precise version of the function
for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/141327
2025-07-02 10:59:12 +02:00
Clément Foucault
0df7b4daed Fix #103710: Crash on calling bpy.ops.mesh.loopcut in python script
In this case `region->runtime->type` is null in background mode.

This patch fixes it by just adding nullptr checks.

Pull Request: https://projects.blender.org/blender/blender/pulls/141324
2025-07-02 10:50:27 +02:00
Guillermo Venegas
a0f9e25682 Refector: UI: Add uiLayout decorator, menu_contents and progress_indicator methods
This replaces uiItemMContents, uiItemDecoratorR* and
uiItemProgressIndicator API with uiLayout methods following
uiLayout refactors and the Python API.

`eButProgressType` is changed to a typed enum class
`blender::ui::ButProgressType`

Part of: #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/141189
2025-07-02 10:06:48 +02:00
Aras Pranckevicius
9809385ffa Merge remote-tracking branch 'origin/blender-v4.5-release' 2025-07-02 11:01:45 +03:00
Aras Pranckevicius
21870da9e2 Fix #141282: VSE cache issues when rendering at reduced resolution scale
If render settings resolution scale had lowered resolution, cached
images from render image/animation session could "stay around"
and be incorrectly used in the VSE preview area. Two cases I found are
fixed here:
- Intra-frame cache was not flushed upon actual final resolution
  change,
- "Source images" for effect/scene strips were not removed when
  requested resolution no longer matches their rendered resolution.

Pull Request: https://projects.blender.org/blender/blender/pulls/141297
2025-07-02 09:58:11 +02:00
Lukas Tönne
b613216864 Refactor: clean up bone envelope falloff function and modernize math
This just refactors the `distfactor_to_bone` function using modern C++
math and better variable names to clarify what it does.
No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/141289
2025-07-02 09:57:34 +02:00
Jacques Lucke
21d603895e Refactor: Geometry Nodes: support detection of syncable closure/bundle nodes
This is extracted from #140967.

Previously, it was possible to sync a bundle/closure node based on what's linked.
However, it was not possible to detect if the syncing was possible or necessary
in the first place. Knowing this helps building UI features that inform the user
about outdated nodes.
2025-07-02 07:38:30 +02:00
Jacques Lucke
bd65e9c6ba Geometry Nodes: support tracing bundles and closures through closure calls
This makes the "sync sockets" operation work on more cases than before.

Pull Request: https://projects.blender.org/blender/blender/pulls/141014
2025-07-02 06:23:24 +02:00
Jacques Lucke
0596c7f119 Fix: crash using tab in attribute search
The crash happens when hitting tab while using attribute search in the Geometry
Nodes modifier. This triggers some auto-completion code (which doesn't work here
currently, but that's potentially a separate problem). However, the
auto-completion code did not handle the case when the string that's
auto-completed does not have a maximum length, i.e. it is dynamic.

This patch adds some handling for the case when the auto-completed string
storage has a dynamic size.

Pull Request: https://projects.blender.org/blender/blender/pulls/141200
2025-07-02 06:22:34 +02:00
Laurynas Duburas
d21517c6c7 UI: Curves: NURBS weight in Transform panel
Adds NURBS weight, radius and tilt to Transform panel.
To avoid code duplication  code is a bit refactored and `struct TransformMedian_GreasePencil` is removed.
Also GP case has a race condition in existing version. It is fixed using `std::atomic`.

Pull Request: https://projects.blender.org/blender/blender/pulls/141079
2025-07-02 05:38:21 +02:00
Sean Kim
5bd6f41ff5 Fix: Silence deprecated warning
Introduced in d73b8dd4f3

Unfortunately, the `Sculpt` struct has an implicitly generated copy
constructor which accesses the deprecated field in `sculpt_ops.cc`,
instead of allowing access to potentially deprecated fields at runtime,
this commit silences the warning by appending `_deprecated` to the field
and removing `DNA_DEPRECATED` from it.

Additionally, to preserve forward compatibility, the field is added to
`dna_rename_defs.h`

Pull Request: https://projects.blender.org/blender/blender/pulls/141298
2025-07-02 05:27:00 +02:00
Hans Goudey
1f92fd7577 Refactor: Use AttrType instead of CustomData type in attribute API
Change `eCustomDataType` to `bke::AttrType` for uses of the attribute
API (the `AttributeAccessor` one anyway). I didn't touch any values that
might be saved in files; those should be handled on a case by case basis.

Part of #122398

Pull Request: https://projects.blender.org/blender/blender/pulls/141301
2025-07-01 22:14:26 +02:00
Hans Goudey
09902044ff Fix: Default value ignored for some new builtin attributes
0dbe435aa8 was not complete.

Pull Request: https://projects.blender.org/blender/blender/pulls/141304
2025-07-01 21:27:14 +02:00
Jesse Yurkovich
2683c876f0 Fix: Increase maximum collection name length for Collection Export
Follow up to fdaaea6328

The initial collection export code used the wrong define.

Pull Request: https://projects.blender.org/blender/blender/pulls/141239
2025-07-01 20:14:35 +02:00
Hans Goudey
b6e58c54bb Cleanup: Use attribute API in Mesh RNA API
Pull Request: https://projects.blender.org/blender/blender/pulls/141295
2025-07-01 19:20:07 +02:00
Hans Goudey
0dbe435aa8 Fix: Invalid default value when creating some builtin attributes 2025-07-01 19:20:05 +02:00
Hans Goudey
85dae1757e Cleanup: Use attribute API for some solidify modifier inputs 2025-07-01 19:20:05 +02:00
Hans Goudey
d0b749beb8 Cleanup: Use attribute API in texture paint code 2025-07-01 19:20:05 +02:00
Hans Goudey
e9cd348a36 Cleanup: Use attribute API for colors in particle instance modifier 2025-07-01 19:20:05 +02:00
Hans Goudey
c2cadc4174 Cleanup: Use attribute API to access UV map select/pin attributes 2025-07-01 19:20:05 +02:00
Hans Goudey
bf0bcfb7c6 Cleanup: Use attribute API to access selection attributes 2025-07-01 19:20:05 +02:00
Hans Goudey
22e6aa619b Cleanup: Use attribute API to access UV maps in a few places 2025-07-01 19:20:05 +02:00
Hans Goudey
e54fc0a78d Cleanup: Use span accessor for mesh edges in softbody.cc 2025-07-01 19:20:05 +02:00
Hans Goudey
1f49ad963d Cleanup: Attributes: Remove outdated comment 2025-07-01 19:20:05 +02:00
Hans Goudey
54f81da296 Cleanup: Use span arguments for mesh mapping function
And use the attribute API to retieve UV seam data.
2025-07-01 19:20:05 +02:00
Hans Goudey
8fa54601e8 Cleanup: Remove unused mesh mapping function 2025-07-01 19:20:05 +02:00
Sean Kim
7e61ae1a2b Merge branch 'blender-v4.5-release' 2025-07-01 10:07:56 -07:00
Sean Kim
531bc5ca69 Fix: SubdivCCG uses 2x as much memory as needed for edge adjacency
On a Suzanne mesh with 125k faces subdivided at level 3, this patch
results in a 40MB savings of memory, from 1.24 GB measured in Blender
itself to 1.20 GB with this patch applied.

Pull Request: https://projects.blender.org/blender/blender/pulls/141167
2025-07-01 19:07:10 +02:00
Sean Kim
1278088aee Merge branch 'blender-v4.5-release' 2025-07-01 09:40:50 -07:00
Sean Kim
113225d6f8 Cleanup: Use references instead of pointers for subdiv_ccg.cc
Pull Request: https://projects.blender.org/blender/blender/pulls/141257
2025-07-01 18:36:05 +02:00
Sean Kim
750845589e Cleanup: Remove unused struct from subdiv_ccg.cc
Pull Request: https://projects.blender.org/blender/blender/pulls/141255
2025-07-01 18:31:21 +02:00
YimingWu
d6fcb6d1fe Fix #140934: Compositor: Support Grease Pencil pass in viewport
This patch adds support for viewport compositor for grease pencil pass.
It also comes with an option for viewing grease pencil pass directly
inside the viewport without compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/140960
2025-07-01 16:39:28 +02:00
Clément Foucault
caf659880f Fix #101702: EEVEE: Script node with shader output crashes blender
Fixed by removing connections to the script node before
doing any complex tree processing.

Pull Request: https://projects.blender.org/blender/blender/pulls/141280
2025-07-01 16:33:06 +02:00
Hans Goudey
68759af516 Attributes: Use AttributeStorage for curves and Grease Pencil
This commit moves Curves and Grease Pencil to use `AttributeStorage`
instead of `CustomData`, except for vertex groups. This PR mostly
involves extending the changes from the above commit for point clouds
to generalize to other geometry types.

This is mostly straightforward, though a couple non-trivial places of
note are the joining of Grease Pencil objects (`merge_attributes`), the
"default render fallback" UV for curves objects which was previously
unused at the UI level and just ended up being the first attribute, and
the `update_curve_types()` call in the curves versioning function.

Similar to:
- fa03c53d4a
- f74e304b00

Part of #122398.

Pull Request: https://projects.blender.org/blender/blender/pulls/140936
2025-07-01 16:30:00 +02:00
Christoph Lendenfeld
8da357f1ea Fix #140669: Graph Editor Gaussian smoothing causing artifacts for keys on subframes
This adds to the fix done with #110059.
With the changes of this patch, the smoothing still happens ONLY on full frames.
Any subframe data is linearly interpolated to reduce the stepping seen before this PR.

As a side effect, the operator now has to store the original y values of the keys in question.
This is needed for correct blending, whereas before it was assumed that the samples
contain the original y values.

No changes to the butterworth filter, because that already has a property to increase the
sample rate for sub-frame data.

Pull Request: https://projects.blender.org/blender/blender/pulls/140928
2025-07-01 16:02:49 +02:00
Falk David
8b9755b537 Merge branch 'blender-v4.5-release' 2025-07-01 15:33:50 +02:00
Falk David
cac2806ee2 Fix: Grease Pencil: Use correct "aspect_ratio" in draw tool
The `aspect_ratio` was defaulting to 0 when drawing. Now use the correct
brush setting values. This also ensures that the default is 1.
2025-07-01 15:33:01 +02:00
Miguel Pozo
75bf405647 Merge branch 'blender-v4.5-release' 2025-07-01 15:26:56 +02:00
Miguel Pozo
e2b898fea7 Fix #141132: Crash on background GP render
The crash seems to come from libepoxy GL functions pointing to null.
It seems that libepoxy "Automatically initializes as new GL functions are used."
and that to call a function without a GL context bound, the function
must have been called before with a bound context.

This just modifies the scope of the context binding from
DRW_module_exit to  RE_engines_exit, which seems the safest solution
for 4.5.

Pull Request: https://projects.blender.org/blender/blender/pulls/141233
2025-07-01 15:24:45 +02:00
Christoph Lendenfeld
8be420ff1f Merge branch 'blender-v4.5-release' 2025-07-01 14:33:41 +02:00
Christoph Lendenfeld
3233ddc3b3 Fix #141243: Crash when removing constraints with drivers via python
The issue was that the depsgraph was not rebuilt, thus
the driver node still stuck around. This then crashed when the
depsgraph evaluated.

The reason why this wasn't caught in the unit tests, was because the
depsgraph was not updated between creating and removing the data.

Pull Request: https://projects.blender.org/blender/blender/pulls/141272
2025-07-01 14:28:27 +02:00
Clément Foucault
c49e9e1773 Fix: Workbench: Incomplete commit 5231f0c02a
The commit didn't include the other part of the fix and
included an invalid changed line.
2025-07-01 12:44:12 +02:00
Philipp Oeser
5231f0c02a Action Slot selector UI: Show Slot Type
Expand the selector to not just show the name, but also the type icon,
similar to the Action editor channel list.
Adds it in the icon in both the unexpanded (currently selected) slot as
well as the Slots menu [the former being the more questionable one I
think].

Part of #137276

Pull Request: https://projects.blender.org/blender/blender/pulls/140970
2025-07-01 12:14:33 +02:00
Philipp Oeser
2c4dd6c6be Merge branch 'blender-v4.5-release' 2025-07-01 12:11:34 +02:00
Philipp Oeser
c261718085 Fix #141117: Sculpt mode edit voxel size stuck at certain values
It seemed "stuck" if the initial voxel size value under the remesh tab
was larger than or equal to the longer side of the bounding plane. It
actually was not stuck, but needed long mouse travels to get into the
range that we were clamping to (behavior from 4221f827cf clamps to
"sane" values on modal that make sense for differently sized meshes).

The "sane" sizes are kept, but this PR makes sure we actually start off
with an `init_voxel_size` that is already based on the clamped minimum/
maximum (so we dont have to mousetravel that far)

Pull Request: https://projects.blender.org/blender/blender/pulls/141208
2025-07-01 12:11:20 +02:00
Clément Foucault
1c41815c4d Fix: Workbench: Color imprecision for pure black color
The bias for mapping to log color space was wrong and
was assuming `log(2x)` instead of `log2(x)`.

This made pure black colors result in 0.00008 values
after AA resolve.

Using the correct bias ensures 0 stays at 0 during the
AA process and doesn't exhibit any imprecision.
2025-07-01 11:10:18 +02:00
Aras Pranckevicius
293cdac6ab Merge branch 'blender-v4.5-release' 2025-07-01 11:53:30 +03:00
Aras Pranckevicius
5cbb1c62c4 Fix #139552: VSE strips wrongly occlude others, when render resolution scale is small
get_strip_screen_quad function was not taking render scale into account,
unlike all other places that did a similar calculation.

Pull Request: https://projects.blender.org/blender/blender/pulls/141229
2025-07-01 10:49:10 +02:00
Damien Picard
81fa28fa26 I18n: Translate two report messages needing manual translation
This call to `BKE_reportf()` uses a tertiary operator to select a
message using singular or plural, which cannot be translated
automatically. This commit adds `RPT_()` translation for both
variants.

Reported by Ye Gui in #43295.
2025-07-01 10:47:09 +02:00