Commit Graph

146466 Commits

Author SHA1 Message Date
Jonas Holzman
e2645bfaf1 macOS arm64/x64: Rebuild OpenEXR library with patch to fix DWA bug
Ref: blender/blender#135037
Fixes: blender/blender#134802
4.4 Changes Tracking Issue: blender/blender#128577

Pull Request: https://projects.blender.org/blender/blender/pulls/135180
2025-02-26 23:00:43 +01:00
Harley Acheson
f930b7a731 Fix #135097: Wrap Text Lines Without Control Chars in Glyph Cache
Our text wrapping code is written in a way that requires the Line Feed
character to be in our glyph cache. This is problematic as none of the
control characters will ever be there if not using fallback. With
fallback these glyphs could be a zero-width character from a symbol
font, or something with width if using a last resort font. So we'd have
to ignore the advance in the latter case. This came to a head recently
because we are turning off fallback in some circumstances. 12b1f8bd7a
removed the rendering of control characters so they are never in the
cache. That change requires this one, which does wrapping based on the
string's codepoint, not that of its glyph.

Pull Request: https://projects.blender.org/blender/blender/pulls/135196
2025-02-26 21:25:13 +01:00
Sergey Sharybin
1a2590afed Fix missing report about crashed render tests
Tricky non-obvious regression introduced by #133879: crashed test
was never appended to the test results.

Pull Request: https://projects.blender.org/blender/blender/pulls/135176
2025-02-26 17:05:44 +01:00
Julien Duroure
22aa2fbfa8 Fix #135129 glTF Collection Exporter: Avoid to export multiple scene info when Collection Export 2025-02-26 16:40:37 +01:00
Julien Duroure
0778ad776e glTF exporter: Better slot management:
Avoid non valid glTF file by avoiding exporting multiple slots with same target_id_type in the same animation for a single object:
- Make sure to create multiple animation when needed
- Use action.name for active slots (can have multiple slots when different target_id_type)
- Use action.name - slot.name_display for additional animations
2025-02-26 16:34:50 +01:00
Ray Molenkamp
2a283772e3 Deps: Windows: x64: Rebuild openexr with upstream PR 1986
This fixes #134802, blender side pr #135037
2025-02-26 07:57:13 -07:00
Philipp Oeser
a636b101d7 Fix #121609: Shrinkwrap invert vertex group (no group specified) wrong
Same was true for SimpleDeform.

Invert vertex group influence should only have an effect if there is a
group specified.
Shrinkwrap always uses a weight (gets weights via
`BKE_defvert_array_find_weight_safe` -- which gets full weight for no
group specified, rightfully so), if this gets inverted, we get no
influence at all.

Now move the inverting of the weights to `BKE_defvert_array_find_weight_safe`,
adjust the other callers accordingly (Bevel also does not need to check for a valid
vertexgroup beforehand).

Pull Request: https://projects.blender.org/blender/blender/pulls/121625
2025-02-26 15:56:08 +01:00
Weizhen Huang
9ee9a2b789 Fix #135145: object visible to volume scatter when ray visibility is off
The comment was added in e0857ad152, and volume scatter visibility is
supported since cdd1d5a93c.

Pull Request: https://projects.blender.org/blender/blender/pulls/135168
2025-02-26 15:45:58 +01:00
Philipp Oeser
bc3c6c4e7c Fix #134895: Cancelling sculpt mode elastic transforms deforms mesh
Since the transform system uses previous positions to update to
"original" positions upon cancel, the elastic transforms are not working
well with this (due to their `TransformDisplacementMode::Incremental`
nature).

To resolve, rely on restoring positions from undo (as done elsewhere in
sculpt).

Pull Request: https://projects.blender.org/blender/blender/pulls/134919
2025-02-26 15:38:29 +01:00
Philipp Oeser
7ac3de70fd Fix #135159: Copied modifier doesn't keep the name of the modifier
`BKE_modifier_copy_ex` did it (which is called e.g. when copying the
whole stack from one object to another), but when simply duplicating a
modifier (`modifier_copy`), it was just ensuring a unique name (based on
the default name) without copyig the existing name prior.

Pull Request: https://projects.blender.org/blender/blender/pulls/135172
2025-02-26 15:35:35 +01:00
Brecht Van Lommel
0741d0141e Fix: Blender as Python Module shared library directory wrong
This could affect for example the USD and MaterialX Python modules
that are now bundled, and need appropriate paths to their libraries.

Ref #134676

Pull Request: https://projects.blender.org/blender/blender/pulls/134937
2025-02-26 15:19:23 +01:00
Philipp Oeser
d2ecf66492 Fix #120697: better error for BVHTree.FromObject()
When called on an object that you cannot get a mesh from (e.g. Empties),
you would run into an unhelpful "SystemError: <built-in method
FromObject of type object at ...> returned NULL without setting an
exception"

Now be more specific in the error message.

Pull Request: https://projects.blender.org/blender/blender/pulls/135162
2025-02-26 14:14:14 +01:00
Clément Foucault
e9dfe79054 Fix #135018: EEVEE: Plane lightprobe renders incorrectly in ortho view
Caused by wrong view vector which is used to check which way
to point the clipping plane at.

To be backported to 4.2.

Pull Request: https://projects.blender.org/blender/blender/pulls/135166
2025-02-26 14:01:30 +01:00
Pratik Borhade
66a3500324 Fix #134737: Node: Panel deleted when Parented with children
Skip `move_to_parent()` operation when new_parent is already
children of "item" to avoid running into this situation.

Pull Request: https://projects.blender.org/blender/blender/pulls/135148
2025-02-26 11:10:40 +01:00
Philipp Oeser
462d887114 Fix #122152: Mask Points select API wrong
Only a single `select` prop was exposed, and this was set to "bezt.f1"
(so it affected the left handle only).

Now we add properties for `left`, `right` and the `single` handle, the
selection prop for the control point is renamed to
`select_control_point` [which is now in line with the API for a bezier
curve].

NOTE: setting/getting a `single` handle uses the existing functions for
this -- handle is selected if any of the right/left handle is selected,
setting the handle results in both handles getting selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/135114
2025-02-26 09:12:46 +01:00
Philipp Oeser
138ede7194 Fix #134092: Keymap Editor can add an extra . to the end of an attribute
This happened for context attributes if already "complete" attributes
were typed/pasted in.

Reason is that this copies functionality from our intellisense
codecompletion where this is expected behavior, for context attributes
we cannot really use "tab" to expand, so it is less useful here.

When confirming (with the additional "."), the keymap entry would be
broken, so better solve in a way that we dont end up with those "." by
removing it.

NOTE: there might be ways to enhance the string-search behavior here (by
properly supporting "tab-expanding"), but this is a bit out-of-scope for
this bugfix.

Pull Request: https://projects.blender.org/blender/blender/pulls/135098
2025-02-26 09:12:28 +01:00
YimingWu
78b54dd6d5 Fix #134489: Grease Pencil: Simplify operator should follow selection
Previously Grease Pencil simplify operator didn't take stroke selection
into account when it's running in Adaptive or Merge modes. Now filters
points with selected stroke to make all modes have consistent behaviour.

Note that the behaviour of simplify is to operate on the entire
stroke if there's anything selected on the stroke. This is consistent
with what we have prior to switching to Grease Pencil v3 (4.2 and prior)
Arguably some modes can be further improved by only work on selected
segments, but it's beyond the scope of this patch.

Pull Request: https://projects.blender.org/blender/blender/pulls/134497
2025-02-26 02:33:31 +01:00
Campbell Barton
1ed27184c1 Cleanup: correct Python type hint
The `mypy --strict` command I used for checking wasn't reporting this.
Thanks to Sybren for pointing it out.
2025-02-26 10:53:40 +11:00
Harley Acheson
199c046449 UI: Do Not Show Editor Border for Single Area Separated Windows
With recent changes to the matching of OS title bar to Blender colors
on MacOS and Windows, it looks far nicer to not show the editor border
for windows that only have a single area and also do not have any
global areas. This PR removes them in this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/134961
2025-02-26 00:38:50 +01:00
Yahia
132af79a82 Fix #135047: missing arrow to collapse/expand in properties
It used to be  `depth + 1` in 4.3 instead of `depth`.

Pull Request: https://projects.blender.org/blender/blender/pulls/135082
2025-02-26 00:27:03 +01:00
Jacques Lucke
96e87d1e64 Fix: missing import in gdb pretty printers
Not sure why this is suddenly necessary, but I get an error now
that I didn't get in the past without this. The error happened when
accessing `gdb.printing.PrettyPrinter` further down.
2025-02-25 22:56:12 +01:00
Bastien Montagne
6b6e6a2cd1 Fix (unreported) invalid crash in debug, disabled-by-default code.
Code printing memory usage of Main ID namemaps could try to run on
nullptr.
2025-02-25 20:53:42 +01:00
Aaron Carlisle
778b1efd84 PyAPI Docs: Properly document byte string types
Fixes blender/blender-manual#105044
2025-02-25 14:02:58 -05:00
Falk David
ddced37ea4 Fix #134984: Grease Pencil: Applying a modifier clears keyframe of hidden layer
This was happening because in `apply_eval_grease_pencil_data`
we gather all the potential original layers to clear. This was done
by taking the set of all original layers and then removing layers
from the set that map to an evaluated layer.
The remaining layers are unmapped and should be cleared.

The problem is that invisible layers are no longer part of evaluated
data so there wouldn't be a mapping that could be found.

To fix this, we don't initialize the set of `orig_layers_to_clear` to
all the layers, but instead to only the layers that are visible.
This will ensure that we don't clear keyframes of hidden layers.

Pull Request: https://projects.blender.org/blender/blender/pulls/135121
2025-02-25 18:36:53 +01:00
Jonas Holzman
8f1d03cd75 Fix #133713: Crash when drag and dropping bitmap images on macOS
Drag and dropping bitmap images (as in drag and dropping directly from
another software such as a web browser, not from an image file in
Finder) inside the Blender window on macOS would segfault due to the
dropped image being [autorelease]d even though its data was meant to
outlive the function scope.

Fixed by removing the superflous autorelease and adding a comment note.
The only caller of this function (GHOST_SystemCocoa::handleDraggingEvent)
already properly [release]s the image in question.

Note that currently, non-file/bitmap image drag and drop is not
implemented on the WM side, and as such this feature/GHOST event does
not do anything practical.

Pull Request: https://projects.blender.org/blender/blender/pulls/135076
2025-02-25 16:24:55 +01:00
Miguel Pozo
cdf821c978 Fix #134890: Overlay: Missing Weight Paint overlays with Display as Wire
Support both opaque and masked transparency weight overlays at
the same time.

Pull Request: https://projects.blender.org/blender/blender/pulls/134942
2025-02-25 15:55:16 +01:00
Thomas Dinges
dfb416b4c4 Build: Patch OpenEXR 3.3.2 for dwa bug
Upstream commit: df162955c6

Ref #134802

Pull Request: https://projects.blender.org/blender/blender/pulls/135037
2025-02-25 14:17:19 +01:00
Nikita Lisitsa
e1bcd08f61 Fix #135073: OBJ import of emissive colors
The emissions strength was only set when using an emissive texture.
Additionally, for colors brighter than 1.0, normalize the color
into 0..1 range and set the strength accordingly.

Pull-Request: https://projects.blender.org/blender/blender/pulls/135094
2025-02-25 14:15:18 +02:00
Kamil Galik
dccdca2a22 Fix #134730: incorrect pan-speed with NDOF auto-center enabled
Regression in [0] caused the pan speed to be incorrectly calculated
when NDOF auto-center was enabled.

[0]: b113e848ef

Ref: !134868
2025-02-25 22:56:00 +11:00
Christoph Lendenfeld
5100a80f7f Fix #110650: Drivers not removed if removing their container
This applies to modifiers, constraints and shape keys.
Any driver on such data was not removed with it,
leaving invalid drivers on objects.

With this patch, the drivers are removed, but animation is left untouched.
This is because animation might be reused somewhere else and we don't
want to introduce potential side effects there.

This also adds unit tests for the fixed cases

Pull Request: https://projects.blender.org/blender/blender/pulls/134511
2025-02-25 12:11:15 +01:00
Sybren A. Stüvel
ba149680a2 Fix #134810: animating Grease Pencil layer "hide" option doesn't un-hide
Only remove a grease pencil layer from the evaluated copy when its
visibility is not animated.

Animation evaluation does not recreate the evaluated copy from scratch,
and thus once a layer is removed due to it being invisible, it never got
back.

The animatedness of the `.hide` property is determined once, when the
evaluated copy is created. This is subsequently used during evaluation
to determine whether the layer can be removed or not.

Pull Request: https://projects.blender.org/blender/blender/pulls/135057
2025-02-25 10:43:33 +01:00
Pratik Borhade
e51fff61c5 Grease Pencil: Channel color for groups
`channel_color` property was created for layers in 03b2fc744e. Now
exposed for layer groups too.

Pull Request: https://projects.blender.org/blender/blender/pulls/135088
2025-02-25 09:44:21 +01:00
Campbell Barton
cd9156bb32 Extensions: use dynamically created link to the manual
The literal URL was used before extensions was included in a release.
2025-02-25 15:14:10 +11:00
Campbell Barton
d9eda9322d Cleanup: remove unused prefix from a used argument 2025-02-25 14:05:14 +11:00
Harley Acheson
130c074487 Fix #131779: Display "inf" / "-inf" for Correct Range of UI Values
Our UI code is currently showing the text "inf" when a numerical input
contains _exactly_ the value of FLT_MAX. But this is the max value for
doubles and we enforce a maximum float precision of 6 digits.  This
means that a property can start with "inf" by default but it is
impossible edit, or even keep the same value, by editing in the UI
and show as "inf".  This PR defines values that are the actual minimum
and maximums currently usable in the UI and values greater than or
equal to are shown as "inf" (equivalent for "-inf").

Pull Request: https://projects.blender.org/blender/blender/pulls/131876
2025-02-25 03:50:23 +01:00
YimingWu
9759a9df5e Fix #134793: Grease Pencil: Set Uniform Opacity cannot set fill opacities
Fill opacities of individual strokes was overlooked when implementing
the Set Uniform Opacity operator, now corrected and also added a
separate property for controlling stroke/fills opacity.

Pull Request: https://projects.blender.org/blender/blender/pulls/134982
2025-02-24 18:15:32 +01:00
Jacques Lucke
c6d2a6f856 Fix #134189: geometry name lost when processing instances 2025-02-24 17:49:46 +01:00
YimingWu
03706b6052 Fix #135052: Grease Pencil: "Convert To" missing in object context menu
Adds "Convert To" option back to the object context menu for Grease
Pencil.

Pull Request: https://projects.blender.org/blender/blender/pulls/135054
2025-02-24 17:00:21 +01:00
Falk David
5f220a2dec Fix: Grease Pencil ID data evaluation happening in the wrong function
Grease Pencil ID data was being evaluated in the
`BKE_grease_pencil_data_update` function, but this function
is called from the evaluated objects.

The fix adds a new `BKE_grease_pencil_eval_geometry` function
thats called as a callback from `build_object_data_geometry_datablock`.

Resolves #134980, #135004.

Pull Request: https://projects.blender.org/blender/blender/pulls/135051
2025-02-24 16:50:21 +01:00
Sybren A. Stüvel
3fd430d1c6 Anim: make BKE_fcurves_id_cb() only report F-Curves for that ID
Update `BKE_fcurves_id_cb(id, callback)` so that it only reports
F-Curves for `id`. With legacy Actions this used to be "all F-Curves in
the Action", but with slotted Actions it should only report the F-Curves
for the assigned slot.

`BKE_fcurves_id_cb()` is used in two places:

1. Updating F-Curve paths in versioning, for example when node sockets
   were added/removed. For this it is vital that the updates only happen
   for those nodes that were actually affected by this versioning code,
   and not blindly for all F-Curves in the Action.
2. Marking properties as 'animated' in the depsgraph, and the 'value
   backup' for those properties. This should also be only done for the
   properties of that ID, and thus be limited to the F-Curves for the
   assigned slot.

Pull Request: https://projects.blender.org/blender/blender/pulls/134851
2025-02-24 15:57:41 +01:00
Pratik Borhade
576d19add7 Fix #134809: Grease Pencil: Proportional edit tweaks locked material strokes
Entire curve points range is passed to transform-container  when
proportional editing is on. Consequence is, strokes from locked
materials are also affected. Use `editable_points` mask to resolve this.

Pull Request: https://projects.blender.org/blender/blender/pulls/134838
2025-02-24 15:17:26 +01:00
Thomas Dinges
da2555e41c Release: Update license.md for 4.4 2025-02-24 15:01:55 +01:00
Falk David
8cf9d01453 Fix #134909: Crazyspace has incorrect deformed positions due to armature modifier
The fix 8af27ce27e assumed that
the `edit_hints->positions()` were always empty and that we would always
fallback to using the evalauted positions instead.

But if the edit hints are populated, this fails. In this case, we populate the
positions in `remember_deformed_positions_if_necessary`.

The fix makes sure that we write to the `edit_hint` positions if they are
populated.

Pull Request: https://projects.blender.org/blender/blender/pulls/135033
2025-02-24 13:52:42 +01:00
Sybren A. Stüvel
857743db9d USD: import skeletal animation as slotted Actions
The USD importer was still creating legacy Actions, which are no longer
supported in Blender 4.4. This commit updates the code to produce
slotted Actions instead.

This also avoids the need to create F-Curves "from scratch", but rather
uses the available functionality. This makes the code somewhat easier to
maintain.

Pull Request: https://projects.blender.org/blender/blender/pulls/134866
2025-02-24 12:39:52 +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
Bastien Montagne
847a50fe46 I18N: Updated UI translations from git/weblate repository (8b79ffdf509885). 2025-02-24 11:29:25 +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
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
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