Commit Graph

117028 Commits

Author SHA1 Message Date
Campbell Barton
fed8ecdaaf Fix use of MEM_callocN for a struct containing a PointerRNA 2025-02-07 16:05:58 +11:00
Richard Antalik
69b2f603de Fix: VSE duplicate snapping values
Enums `SEQ_SNAP_TO_RETIMING` and `SEQ_SNAP_TO_PREVIEW_BORDERS` were mistakenly
assigned same value.

Pull Request: https://projects.blender.org/blender/blender/pulls/134140
2025-02-07 01:29:03 +01:00
Campbell Barton
7bdffe124a Fix #134201: Invalid doc-string for Scene.ray_cast 2025-02-07 11:17:57 +11:00
Hans Goudey
69b5124e09 Fix: Link error from missing include
Back ported from:
3b4ead2ecc
2025-02-07 10:39:45 +11:00
Campbell Barton
b113e848ef NDOF: implement new methods to pick the orbit-center
Note: this is a back-port from `main`, details below,
Original message:

Add support for dynamic NDOF orbit center calculation.

- When "Auto" NDOF preference is enabled:
  All visible objects in the viewport are used to calculate a
  bounding box center, if the bounds are outside the view or the center
  is behind the viewport, use a Z-Buffer test to calculate the depth in
  the middle of the region.

- When "Use Selected Items" NDOF preferences is enabled,
  calculating the bounds from the selection.

- An option to show the orbit center as a guide has also been added.

Ref !129594

Co-authored-by: Kamil Galik <kgalik@3dconnexion.com>

Back-ported as this change as this only missed the 4.4 branch by hours
and is considered an important feature for 4.4 by 3dconnexion.

This includes the following commits from main:

1a14d69498
30399fd165
3a8658958f
da8d9d989e
2a0ce11104
fb539baa89
2025-02-07 10:23:45 +11:00
Harley Acheson
fd97a8f578 Fix #134166: Show Context Menus as "Options" on Status Bar
The Status Bar often shows context menu items as the name of that menu,
which is confusing in this context. For example in Object mode it shows
"Object" as the right-click operation. In Grease Pencil it shows this
as "Draw" even though you don't draw with it. In "Sculpt" mode you see
two items as "Sculpt", one on left click and the other on right click.
This PR makes all these show as "Options" instead. This seems like a
very succinct description of what is available on right-click.

Pull Request: https://projects.blender.org/blender/blender/pulls/134191
2025-02-06 20:15:44 +01:00
Clément Foucault
59db8d427f Fix #132663: Selection: Object selection is broken on Intel Macs
Copy the fix that is used by EEVEE shadow code.
2025-02-06 19:30:41 +01:00
Sybren A. Stüvel
f9a45702fa Anim: remove ActionLayer.mix_mode and .influence from RNA
Remove the `ActionLayer.mix_mode` and `ActionLayer.influence` properties
from RNA. The animation evaluation already takes these into account, but
there is no guarantee that the mixing that is currently implemented is
going to be mathematically identical to the eventual implementation. So
better to not expose the properties quite yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/134186
2025-02-06 17:49:45 +01:00
YimingWu
fc43f4e1e8 Fix #134035: Grease Pencil: Correct index for multistroke modifier
The stroke index was wrong when a influence filter is active in the
modifier, this would lead to crashes. Now corrected this by only
iterating duplicated strokes in front of the curves geometry.

Pull Request: https://projects.blender.org/blender/blender/pulls/134038
2025-02-06 15:08:07 +01:00
Ray Molenkamp
1540817576 For VFX platform 2025 and more.
Boost (removed!)
Cython 3.0.11
Expat 2.6.4
GMP 6.3.0
MaterialX 1.39.2
Nanobind 2.1.0 (new, for OpenVDB)
NumPy 1.26.4
OpenColorIO 2.4.1
OpenEXR 3.3.2
OpenImageIO 3.0.3.1
OpenVDB 12.0.0
OSL 1.14.3-beta
Python 3.11.11
Robinmap 1.3.0
TBB 2021.13.0
TIFF 4.7.0
USD 25.02
libxml2 2.13.5
zlib 1.3.1

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Jonas Holzman <jonas@holzman.fr>
Co-authored-by: Sebastian Parborg <sebastian@blender.org>

Ref #128577

Pull Request: https://projects.blender.org/blender/blender/pulls/134178
2025-02-06 14:57:02 +01:00
Brecht Van Lommel
d5823ad895 Fix: MaterialX 1.39 subsurface not exporting correctly
Pull Request: https://projects.blender.org/blender/blender/pulls/134139
2025-02-06 14:29:42 +01:00
Brecht Van Lommel
7b3fa03e56 Math: Work around Windows math::is_negative build failures
Don't template size for matrix is_negative. These are causing random
build failures on the Windows buildbot.

Note that these already have the assumption of 3D coordinates baked
in. For 2D or 4D coordinates the implementation would have to be
different. So templating these for arbitrary dimensions does not
make much sense.

Pull Request: https://projects.blender.org/blender/blender/pulls/134137
2025-02-06 14:29:09 +01:00
YimingWu
981f9f767d Fix #134082: Clarify description for subsurface scattering radius
User may think of the `radius` vector value as RGB color, however it's
meant to be the depth of scattering for R/G/B channels. Now clarified in
the desctiption.

Pull Request: https://projects.blender.org/blender/blender/pulls/134088
2025-02-06 12:23:23 +01:00
Jacques Lucke
3b49b5b587 Fix: Geometry Nodes: Instance on Points ignores Grease Pencil layer transform
It already doesn't work in a very fairly simple case when the Grease Pencil
geometry is transformed. This simple case used to work before we changed
the Transform Geometry node to transform layers instead of points.

Pull Request: https://projects.blender.org/blender/blender/pulls/134131
2025-02-06 11:34:58 +01:00
Falk David
8af27ce27e Fix #133969: Crazyspace broken with bezier curves and armature modifier
The issue was that the topology of the drawing changes when the bezier
curves get resampled to poly curves in the armature modifier.
This means that the crazyspace code fails to find deformed positions
with the same length as the original positions.

The fix does multiple things:
* First, we make sure that we create an `GeometryComponentEditData` in
  weight paint mode.
* When the armature modifier runs, we remember the current positions in
  this component.
* Then, we store the curve offsets and weights _before_ converting the
   bezier curves.
* Finally we deform the positions stored in the edit hint component
   (which have the same length as the original positions).

Since the resampling just adds new points, there might be a way to
avoid running the armature deformation a second time on the edit
hints, but I'll leave that for another day as a performance improvement.
In any case, this is only done when we actually need the deformation
(e.g. in weight paint mode when we paint the weights).

Pull Request: https://projects.blender.org/blender/blender/pulls/134030
2025-02-06 11:15:32 +01:00
Bastien Montagne
734af8206c Fix #134162: Crash when opening a file with a compositor image node.
Yet another remaining case of non-trivial data created with C-style
allocation.

While 4.4 and previous did not exhibit the crash, the invalid code
responsible for this crash is present here as well, and it would be
dangerous not to fix it.
2025-02-06 11:07:04 +01:00
Christoph Lendenfeld
ca65379d70 Fix: Indicate that creating a pose asset opens a pop up
As indicated by pablovazquez , operators that open a pop up should end with `...`.

I decided to change the operator name instead of doing it in python with `text=`
This seemed more reasonable to me because it can't be forgotten when adding this operator
somewhere else, but I am not sure if this is the right way to do it.

Pull Request: https://projects.blender.org/blender/blender/pulls/134062
2025-02-06 10:51:04 +01:00
Omar Emara
0a066c11ea Fix #134151: Crash when appending Bloom node
Blender crashes when appending a Bloom node. This is because the scene
is needed to infer the render size while versioning, and the scene
doesn't exist while appending, so we need to fallback to a default
render size in those cases.
2025-02-06 09:47:31 +02:00
Campbell Barton
8e122ccc72 Cleanup: correct spelling in comments (check_spelling_*) 2025-02-06 12:37:32 +11:00
Harley Acheson
b39c637d63 Fix #134061: Consider 2D Zoom in Event Icon Text Sizing
Most event icons shown on the status bar are made up of an icon with
text inside of it. The icon sizing used 2D zoom aspect value, but the
text does not. I had not noticed any use of these outside of Status Bar
so this wasn't tested. Using aspect requires much more precise
measurement and placement of the text using calculated margin values.

Pull Request: https://projects.blender.org/blender/blender/pulls/134146
2025-02-05 22:29:48 +01:00
Clément Foucault
0f9c2e47e5 Fix #133576: EEVEE: 'offscreen.draw_view3d' projection matrix broken
This was caused by the input matrix not being used.
Instead EEVEE was trying to derive the projection matrix
again based on the actual viewport state. But this state
was not reflecting the input matrix.

To fix this, we remove any camera setup from the rv3d during
the offscreen drawing and set the lens param to 0.
This ensure EEVEE loads the input projection matrix.
2025-02-05 19:37:05 +01:00
Julian Eisel
9a9e2e19a9 Fix #130007: Invalid current file asset catalogs after saving file
Second part to fix #130007, after 50f7666785.

When saving a new file with the current file asset library loaded, the
library wasn't converted properly to an on-disk library. While the
library was loaded again as on-disk library, the previous runtime
version of it wasn't cleared, so catalog definitions could be duplicated
across available libraries.

Make sure the runtime only library is destructed properly, and the UI
refreshed.

There seem to be more issues with converting the runtime current file library to
a on-disk current file library, but these can be addressed after the crashes and
hangs are fixed, see report.

Pull Request: https://projects.blender.org/blender/blender/pulls/133341
2025-02-05 18:40:04 +01:00
Hans Goudey
4e873487dc Fix: Potential crash in curves attribute set operator
Similar to #134108.
Caused by 0089a90625dd425803e8921a6573e17719b4bf9f..
2025-02-05 11:50:53 -05:00
Harley Acheson
a7178e69f4 Fix: Stop View3D FPS Overlay from Jiggling
If "Playback Frame Rate" is enabled (Preferences / ViewPort / Display)
and showing the "Text Info" viewport overlay, then "fps" is shown in
the place of the View Name while the animation is played. Every time
this starts there is a jiggle where the Object Info line is drawn at
the first line instead. This is because the FPS can early exit and not
update the vertical line position. This PR fixes that.

Pull Request: https://projects.blender.org/blender/blender/pulls/134074
2025-02-05 17:30:17 +01:00
Philipp Oeser
b7ce997574 Fix #134104: Curves: handles miss recalc after snapping/randomize/warp
actually mentioned in !133548 already but forgot to include

Pull Request: https://projects.blender.org/blender/blender/pulls/134105
2025-02-05 15:14:13 +01:00
Philipp Oeser
eecf5787c1 Fix #119932: Weight paint loop selection fails when bones are rotated
Previous approach was using non-evaluated meshes to find the closest edge from a face index retrieved from the selection buffer.
This can fail though if the mesh is deformed or even altered to not have the same indices anymore (e.g. generating/masking modifiers).

In order to make this work, added `ED_mesh_pick_edge` which switches the selection context to edges directly
and picks from those. No need to map anything back and forth between original and evaluated, the selection buffer contains the original indices already.

Further logic (following the face loop) is untouched (and happens on the original geometry which is fine)

Should go into 4.2 LTS as well

Pull Request: https://projects.blender.org/blender/blender/pulls/132803
2025-02-05 15:13:48 +01:00
Clément Foucault
7a98a459ef Fix #134011: Overlay: Loose wires object color in selection not visible
The changes from 29356e2bf7
fixed a readability issue with loose wire not being as prominent as
regular surface wireframe.

But also added a regression where the object color wireframe mode
made the object color imperceivable when the object is selected.

This commit fixes the issue by setting the facing factor to 0.5 for
loose wires. This way, both the theme color and object color wireframe
more are blended enough to be distinguishable and still retain the
object color hint.
2025-02-05 14:25:46 +01:00
Hans Goudey
b5e5d4b335 Fix #134108: Set attribute operator crash with multiple objects
Caused by 0089a90625.
2025-02-05 08:19:01 -05:00
Jacques Lucke
4fd236dc32 Fix #134111: sockets are incorrectly grayed out after random node
The issue was that the code did not handle input sockets that are fields
implicitly correctly. It just retrieved a single from them, instead of
treating them as having an unknown value.
2025-02-05 14:09:48 +01:00
Weizhen Huang
d2db9927ed Fix #86648: reduce ray differentials size for bump mapping
Use sub-pixel differentials for bump mapping helps with reducing
artifacts when objects are moving or when textures have high frequency
details.

Currently we scale it by 0.1 because it seems to work good in practice,
we can adjust the value in the future if it turns out to be impractical.

Ref: #122892

Pull Request: https://projects.blender.org/blender/blender/pulls/133991
2025-02-05 13:39:27 +01:00
Julian Eisel
2d90ab9eca Fix: Deadlock when generating asset catalog tree after file-load
Partial fix for #130007.

The catalog tree mutex would be set in `catalog_tree()` and
`invalidate_catalog_tree()`. The former could end up adding catalogs and thus
calling `invalidate_catalog_tree()`, which would attempt to set a mutex that the
caller set already. This seems like a good use-case for `std::recursive_mutex`.

would make sure there's a catalog for each catalog path by calling
`create_missing_catalogs()`
2025-02-05 12:50:09 +01:00
Campbell Barton
613e34b559 Docs: cross reference progress enum for GHOST/WM API's
Note that these enums need to be kept in sync.
2025-02-05 21:53:52 +11:00
Thomas Dinges
8a6e3a0bd7 Release: Bump branch to 4.4 Beta.
Splash screen by Flow.
2025-02-05 11:24:33 +01:00
Omar Emara
96f56da030 Fix #134073: Compositor crash with viewer inside muted group
The compositor crashes when the user goes into a muted group that has a
viewer node while the backdrop is enabled. The compositor should not
schedule viewer nodes inside muted contexts, so we need to add checks to
prevent this.

Pull Request: https://projects.blender.org/blender/blender/pulls/134093
2025-02-05 10:41:46 +01:00
Pratik Borhade
b545f8d223 Fix #133927: Image editor not syncing with active image node
When active node is clicked again, the image editor does not update and
keeps showing the old image. Always run `ED_space_image_sync`, when
clicked node is image texture node to resolve this issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/133956
2025-02-05 10:39:02 +01:00
Pratik Borhade
90ae533aa1 Fix #101612: Viewport switched to perspective mode from camera view
When camera view is active, regardless of camera view type, view changes
to perspsective mode in local view. Now fixed with extra case of camera
view type.

Pull Request: https://projects.blender.org/blender/blender/pulls/132103
2025-02-05 09:48:00 +01:00
Pratik Borhade
12b426d87e Fix #66367: Refresh view setting when exiting camera view
Send notifiers to redraw side panel when view exits from camera (similar
to smooth view)

Pull Request: https://projects.blender.org/blender/blender/pulls/132980
2025-02-05 09:38:55 +01:00
Pratik Borhade
b2a2aae237 Fix #133751: Render pass warning with GPU device
`compositor_is_in_use` sets `used_by_compositor` true when GPU device is
selected. This draws render pass warning even when viewport
compositor is disabled. Remove the condition to fix the unintentional
warning. Following function is just used in node drawing, seems safe to
remove then.

Pull Request: https://projects.blender.org/blender/blender/pulls/133753
2025-02-05 09:34:12 +01:00
Philipp Oeser
a44b12dd6b Fix #134031: Set Parent menu lists unsupported armature options
What is (or isnt) supported here depends on object types (but we were
getting most of the options for all object types):

| **obtype** | **supports Armature modifier**  | **supports vertex groups** | **supports envelopes** | **supports automatic weights** |
| -- | -- | -- | -- | -- |
| OB_MESH | yes | yes | yes | yes |
| OB_CURVES_LEGACY | yes | no | yes | no |
| OB_CURVES | no | no | no | no |
| OB_SURF | yes | no | yes | no |
| OB_MBALL | no | no | no | no |
| OB_FONT | yes | no | yes | no |
| OB_VOLUME | no | no | no | no |
| OB_GREASE_PENCIL | yes | yes | yes | yes |
| OB_LATTICE | yes | yes (broken though) | yes | no |
| OB_EMPTY | no | no | no | no |
| OB_SPEAKER | no | no | no | no |
| OB_LIGHTPROBE | no | no | no | no |
| OB_LAMP | no | no | no | no |
| OB_ARMATURE | no | no | no | no |
| OB_POINTCLOUD | no | no | no | no |

This PR does two things:
- tidy up the popup menu we get for parenting (removing non-funtional
options)
- enable "With Empty Groups" for lattices (no reason why this should not
work)

What this PR does not touch:
- the poll function for parenting (since this acts on selected objects,
checking all of them can be a costly operation which should not be part
of a poll function)

Pull Request: https://projects.blender.org/blender/blender/pulls/134037
2025-02-05 09:14:21 +01:00
Campbell Barton
3952c58183 Fix buffer overflow from an one error accessing environment variables 2025-02-05 19:08:58 +11:00
Campbell Barton
256f3cd52f Fix missing call to va_end(..)
Own regression in [0] replacing BLI_dynstr with BLI_vsprintfN.

[0]: 6fbe467021
2025-02-05 19:00:05 +11:00
Campbell Barton
4083b9ce62 Cleanup: use a more specific name for NDOF's guide
Prepare for having a second guide (!129594).
2025-02-05 15:19:35 +11:00
Campbell Barton
c3a80b5b19 Fix driver "Update Dependencies" doing nothing
Regression in [0] which disabled the functionality for an unrelated
change.

[0]: ba3f26fac5
2025-02-05 14:45:57 +11:00
Campbell Barton
8f80e373a0 Cleanup: pass std::string arguments by reference instead of value 2025-02-05 14:38:56 +11:00
Campbell Barton
4ed5776990 Cleanup: avoid double precision loss when converting to/from floats 2025-02-05 14:38:56 +11:00
Campbell Barton
5add20a131 Cleanup: remove redundant checks 2025-02-05 14:38:56 +11:00
Campbell Barton
df3d1bf506 Cleanup: use const arguments & variables where appropriate 2025-02-05 14:38:56 +11:00
Campbell Barton
378e49059e Fix invalid null checks (caught by cppcheck)
Resolve two instances where values were null checked
after use.
2025-02-05 14:38:56 +11:00
Campbell Barton
77fca5b15a Fix 3D viewport depth calculation for comparison
Replace ED_view3d_calc_zfac with a matrix multiply because the "zfac"
is never negative and near zero values are set to 1.0.

This makes sense for tools & viewport logic that use the value for
division and don't handle negative values but not for depth comparison.
2025-02-05 12:27:13 +11:00
Campbell Barton
b02bbbdb37 Cleanup: rename "GL" selection to "DEPTH"
The reference to OpenGL is no longer relevant.
2025-02-05 11:21:50 +11:00