Commit Graph

150077 Commits

Author SHA1 Message Date
Habib Gahbiche
4e069f8f5a Tests: Compositor: update failing images only
Previously, when a file output test failed, all images within the same
test case were updated, even images that did not cause the test to fail.

This patch only updates changed/removed images so when the test is run
using `BLENDER_TEST_UPDATE=1 ctest -R compositor_cpu_file_output` git
will only show the modified, added or removed images

Pull Request: https://projects.blender.org/blender/blender/pulls/134852
2025-02-24 12:09:06 +01:00
YimingWu
981246ef4a Fix #134969: Grease Pencil: Ensure correct mode for image tracing
When source reference image is a single image type, selecting "sequence"
mode for tracing image into grease pencil will result in a crash in
`trace_end_job` because it's trying to finalize more frames than traced,
now ensures tracing mode to be `Single` when reference image is single
image type even when tracing mode selector is set to sequence.

Pull Request: https://projects.blender.org/blender/blender/pulls/134981
2025-02-24 11:51:46 +01:00
Janne Nylander
cefc6626f1 Fix #134985: Merging layers resets layer opacity
Layer had their opacity reset whenever a modifier was applied.
This was due to the property not being transferred when a new GreasePencil
object was created in `geometry::merge_layers` function. This PR makes sure
to transfer the Layer opacity (similar to other layer properties).

Pull Request: https://projects.blender.org/blender/blender/pulls/135006
2025-02-24 11:45:02 +01:00
Clément Foucault
a79bc953d3 Fix #134886: Crash with Subdivision modifier update
This was caused by 91de4a50ab refactor which replaced
the evaluator cache singleton by local variable.

It was unknown that the evaluators in the cache
are actually referenced by the modifier data.

To fix this and fix the thread-unsafety of the global
variable, a mutex is introced around a reduced critical
section inside `draw_subdiv_create_requested_buffers`.

The global evaluator cache is now also refcounted to allow
freeing of the cache when no evaluator is referenced
anymore.

Pull Request: https://projects.blender.org/blender/blender/pulls/134926
2025-02-24 11:37:57 +01:00
Laurynas Duburas
2c42294557 Curves: add Split operator
Adds Split operator to curves. It should have the same behavior as the
corresponding operator for legacy curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/131788
2025-02-24 11:32:59 +01:00
Bastien Montagne
fc6a15b2eb Merge branch 'blender-v4.4-release' 2025-02-24 11:30:43 +01:00
Bastien Montagne
847a50fe46 I18N: Updated UI translations from git/weblate repository (8b79ffdf509885). 2025-02-24 11:29:25 +01:00
Jacques Lucke
dcd5e54f58 BLI: ignore empty lines when parsing CSV files 2025-02-24 11:26:43 +01:00
Lukas Tönne
8a1e29be0d Merge branch 'blender-v4.4-release' 2025-02-24 10:27:39 +01:00
Lukas Tönne
63c460d93d Fix #134482: Grease Pencil: Interpolation creates uninitialized values
This was partially fixed in ef844bad but left some unhandled corner cases with
uninitialized memory.

The core problem is that the `dst_curve_mask` used by the interpolation
functions can contain indices that don't actually exist in either the "from" or
"to" source drawings. Specifically when the "from" drawing has more curves, the
indices are still used but the supplemental `to_curve_indices` array contains
`-1` entries, indicating that only the "from" curve should be used.

The main copy code for positions takes this into account, but the generic copy
of attributes below that does not! It passes the `dst_curve_mask` straight into
the `array_utils` functions and that causes crashes. The original fix in
ef844bad was to clamp the size of the index mask, but the way this was done
could lead to empty index masks, leaving attribute values uninitialized.

The correct solution is to use index masks that exclude invalid entries for the
respective source curves. The new masks are non-overlapping, so the full set of
destination curves can be filled by combining these masks.

Pull Request: https://projects.blender.org/blender/blender/pulls/134865
2025-02-24 10:26:53 +01:00
Omar Emara
7ab7e1efa6 Fix #134939: Passes are incorrectly interpreted as vectors
Some passes are now interpreted as vectors by the compositor Image node.
This is because it assumes 3-channel passes are always vector, but this
is not the case for passes that are RGB without an alpha channel. To fix
this, we also consider channel IDs to disambiguate the type of the pass.
2025-02-24 11:17:36 +02:00
Philipp Oeser
76cf859b33 Merge branch 'blender-v4.4-release' 2025-02-24 08:49:42 +01:00
Philipp Oeser
866e3d28c1 Fix #134821: "Copy To Selected" can act on non-matching nodes
Was reported for alt-editing, thats the same code though.

Previously ( da1038c768 ), the check for "matching" nodes was based on
the `legacy_type`.
This does not uniquely identify a node type, only the `idname` does.
By "matching", I mean having the same properties (so later setting
values can happen on all selected nodes).

If we allow "non-matching" nodes into our list in
`UI_context_copy_to_selected_list`, setting values on non-existent
properties later can act up (throwing `AttributeError` , also
`RNA_property_boolean_set` would actually try to create an equally named
IDP).

Better to exclude these as soon as possible, now remove nodes from
"selected_nodes" based on the `idname` (rather than `legacy_type`), this
way we can be sure properties match.

Pull Request: https://projects.blender.org/blender/blender/pulls/134930
2025-02-24 08:49:11 +01:00
Harley Acheson
5f6c919553 Merge branch 'blender-v4.4-release' 2025-02-23 13:42:21 -08:00
Harley Acheson
89f61ee6cb Fix: Use Font Flag to Identify Default Fonts
with #133413 the intent was that VSE Text strips would not use the
fallback font stack if using a custom (non-default) font. However this
determination was done by comparing the font id. This was very weak as
the id can vary quite a bit within the first few fonts. This PR instead
adds a BLF function (BLF_is_builtin) that uses BLF_DEFAULT font flag
instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/135014
2025-02-23 22:41:08 +01:00
Harley Acheson
4e0d5647a8 Merge branch 'blender-v4.4-release' 2025-02-23 13:20:17 -08:00
Harley Acheson
12b1f8bd7a Fix #134972: Do Not Render Text Characters in Control Code Range
Text characters in the CO Controls range, 0-31, are not meant to have
any displayable representation. For most Blender code this hasn't
mattered since we usually specifically exclude this range in text
processing. But for times when we don't we need to avoid rendering
glyphs in this range as some fonts contain blank (but not empty) items
here.

Pull Request: https://projects.blender.org/blender/blender/pulls/135013
2025-02-23 22:19:09 +01:00
Lukas Stockner
e6839df2a3 Cleanup: Cycles: Deduplicate code in geometry_attributes.cpp
#134644 would make this even worse, so it's time to clean up a bit.

Pull Request: https://projects.blender.org/blender/blender/pulls/134645
2025-02-23 16:34:34 +01:00
Campbell Barton
44d6ff6f8b Merge branch 'blender-v4.4-release' 2025-02-23 22:21:29 +11:00
Campbell Barton
0013db5aef Fix #134948: face orientation depends on pivot type (for a single face)
Technically a regression in [0] since switching the pivot between
the "Median Point" and "Active Element" would previously use the
same orientation with a single face selected.

However the same issue existed when multiple faces were selected so
changing the pivot type can still change the orientation in some
situations.

Restore the previous behavior by removing logic to pick the "best"
tangent when a single face is selected.

[0]: c7104f5392
2025-02-23 22:19:27 +11:00
Campbell Barton
ab77b6066b Cleanup: correct argument names in recent RNA API function 2025-02-23 21:12:51 +11:00
Campbell Barton
4a6d687d53 PyAPI: Support KeyMap.keymap_items.find_match(...)
There was no convenient way for an add-on to show it's "user"
key-map items in the preferences, "user" meaning the key-map
item which is edited in the key-map editor, not the original
key-map item created in `wm.keyconfigs.addon`.

Add a method to key-maps to lookup a user key-map item from an
add-on key-map & key-map-item.

Ref !134830
2025-02-23 21:05:19 +11:00
Campbell Barton
28126b83a5 PyAPI: Support KeyConfig.keymaps.find_match(...)
Add a convenience function to find the matching key-map
from another key-configuration.

This is a more convenient alternative to expanding the
ID, space_id & region_id from the key-map, then passing these
to the "find(...)" method.

Split out of !134830.
2025-02-23 21:02:56 +11:00
Campbell Barton
85af07f438 Cleanup: spelling in comments 2025-02-23 21:02:54 +11:00
Campbell Barton
ed4a0faccf Cleanup: quiet unused variable warning 2025-02-23 21:02:53 +11:00
Pratik Borhade
8eb84fdf99 Cleanup: Grease Pencil: Remove unused drawing vector
Noticed during !134899

Pull Request: https://projects.blender.org/blender/blender/pulls/134900
2025-02-22 11:17:42 +01:00
Pratik Borhade
33b4835471 Merge branch 'blender-v4.4-release' 2025-02-22 15:40:22 +05:30
Pratik Borhade
92d1764e30 Fix #134843: Grease Pencil: Crash duplicating active keyframe
Crash in above operation when no drawing exists at current frame. This
is due to accessing value from a nullopt optional. Not fixed with extra
condition before calling `value()`. Also moved this logic into a lambda to
avoid duplicate code.

Pull Request: https://projects.blender.org/blender/blender/pulls/134910
2025-02-22 11:07:20 +01:00
Julien Duroure
4137678033 Merge branch 'blender-v4.4-release' 2025-02-22 09:03:09 +01:00
Julien Duroure
dafff07ad9 Fix: glTF exporter: remove empty action in filter list when refresh 2025-02-22 09:02:06 +01:00
Julien Duroure
a94c31e8c7 Merge branch 'blender-v4.4-release' 2025-02-22 08:59:39 +01:00
Julien Duroure
1fcbab0503 Fix: glTF exporter: Fix typo in gltfpack option 2025-02-22 08:59:01 +01:00
Julien Duroure
63d086d8a9 Merge branch 'blender-v4.4-release' 2025-02-22 08:57:01 +01:00
Julien Duroure
9ea0655edf Fix: glTF exporter: Fix typo in cache system, leading to endless loop 2025-02-22 08:56:08 +01:00
Julien Duroure
8d61eb49c0 Merge branch 'blender-v4.4-release' 2025-02-22 08:54:16 +01:00
Julien Duroure
69adbd3af1 Fix: glTF exporter: fix filter on collection when using both collection exporter and full collection hierarchy" 2025-02-22 08:53:01 +01:00
Julien Duroure
a05aaec6d4 Merge branch 'blender-v4.4-release' 2025-02-22 08:51:31 +01:00
Julien Duroure
a2aabd75bc Fix: glTF exporter: export all single armature actions only when "actions" mode
Other modes are not compatible with this option
2025-02-22 08:50:14 +01:00
Julien Duroure
eadc6bee55 Merge branch 'blender-v4.4-release' 2025-02-22 08:47:33 +01:00
Julien Duroure
3af38e1132 Fix: glTF exporter: Reset skin if mesh failed to export 2025-02-22 08:46:14 +01:00
Sean Kim
02221289e7 Merge branch 'blender-v4.4-release' 2025-02-21 16:35:54 -08:00
Sean Kim
1bf6d78d18 Fix #134954: Mask by Color doesn't work
Mistake in a0e6e16da5

Testing of the previous commit was inadequate, it works when a brush
tool is selected and invoked via the operator search, as the
`active_vert` property will be set by the raycast. When the Mask by
Color tool is actually active, the brush cursor, and thus the function
that performs a racyast is inactive, preventing the operator from
running.

Pull Request: https://projects.blender.org/blender/blender/pulls/134960
2025-02-22 01:34:18 +01:00
Sean Kim
0819e071e0 Cleanup: Remove outdated comment
Pull Request: https://projects.blender.org/blender/blender/pulls/134957
2025-02-21 23:59:20 +01:00
Brecht Van Lommel
9fa4112748 Merge branch 'blender-v4.4-release' 2025-02-21 23:52:30 +01:00
Brecht Van Lommel
01a151c89d Fix: Build error in lite build 2025-02-21 23:42:30 +01:00
Maxime-Cots
92aab7c3db USD: Add Capsule_1 and Cylinder_1 Shapes to USD importer
This PR adds support for 2 additional USD Prim Shape Schemas :
* Cylinder_1
* Capsule_1

Additional tests will be added afterwards but a simple test is simply to
import the resulting file:
```python
from pxr import Usd, UsdGeom
stage = Usd.Stage.CreateNew('shapes.usda')
UsdGeom.Xform.Define(stage, '/world')
UsdGeom.Cylinder_1.Define(stage, '/world/cylinder_1')
UsdGeom.Capsule_1.Define(stage, '/world/capsule_1')
stage.GetRootLayer().Save()
```

Linked issue : https://projects.blender.org/blender/blender/issues/134138

Co-authored-by: Nig3l <nig3lpro@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/134944
2025-02-21 22:54:09 +01:00
Sean Kim
8fef9214a7 Tests: Move sculpting render tests out of WITH_GPU_RENDER_TESTS
Adds a new CMake option so that these tests can be run independently of
other tests, and so that existing tests that use WITH_GPU_RENDER_TESTS
are not forced to run these sculpt tests.

Pull Request: https://projects.blender.org/blender/blender/pulls/134893
2025-02-21 20:31:57 +01:00
Jesse Yurkovich
a810737716 USD: Improved sanitation of names with leading digits
USD identifiers cannot start with a digit and, like all unsupported
characters, they will be turned into an `_`. This is a bit unfortunate
since object names like "1" or "2" both become "_" in the output file.
This not only generates a naming collision, which is not currently
handled, but it needlessly loses information even when there is no
collision.

Treat leading digits separately and turn names like "1" and "2" into
"_1" and "_2" respectively. This will allow us to eventually enable the
`light_tree_node_subtended_angle` render test which uses such names for
the lights. Another recent test required investigation and then rework
due to the same problem.

Pull Request: https://projects.blender.org/blender/blender/pulls/134595
2025-02-21 20:17:42 +01:00
Sean Kim
dfa8991899 Cleanup: Remove unused CCGDerivedMesh Multires modified_flags property
Value was only ever set to 0 so corresponding cleanup functions had no
effect.

Pull Request: https://projects.blender.org/blender/blender/pulls/134889
2025-02-21 19:55:07 +01:00
Sean Kim
e1258f0858 Cleanup: Minor changes for sculpt flush functions
* Slightly changes naming to be more explicit in some places
* Updates comments
* Adds const where possible
* Reduces scope of variables
* Uses references where possible

Pull Request: https://projects.blender.org/blender/blender/pulls/134891
2025-02-21 19:51:45 +01:00