Commit Graph

138226 Commits

Author SHA1 Message Date
Julien Duroure 383b780b97 glTF exporter: Fix debug logging
Set INFO level if user set debug to whatever value not used to set logging level
2024-12-10 13:48:03 +01:00
Julien Duroure a8714eaa3d glTF exporter: Fix crash with extra channel 2024-12-10 13:35:11 +01:00
Bartosz Kosiorek 3ae501d8be Fix #130244: Improved Calculation of Node Name Width
Improve the positioning of node titles so that they don't overflow
icons on the right and truncate incorrectly.

Pull Request: https://projects.blender.org/blender/blender/pulls/130409
2024-12-10 13:12:28 +01:00
Campbell Barton 9991116bdd Fix #130561: incorrect Python compatibility checks for wheels
Regression in [0] caused wheels with an older Python version
that used CPython's stable ABI to be considered incompatible.

Resolve using the stable ABI for version checks.

[0]: cfc10b0232
2024-12-10 13:10:34 +01:00
Campbell Barton 68df34ecf0 Extensions: fix building packages containing macos universal wheels 2024-12-10 13:09:46 +01:00
Campbell Barton bdc8d6963e Tests: correct hard coded version string in extensions test 2024-12-10 13:08:04 +01:00
Iliya Katueshenock 06dcaf6a93 Fix #130967: hidden sockets are made visible when dragging nodes
Never unhide a sockets as side effect. This was introduced as feature to automate
something in 3dead22c73.

Today this is just a source of confusion and annoying.

Pull Request: https://projects.blender.org/blender/blender/pulls/130984
2024-12-10 13:07:10 +01:00
Harley Acheson 3f332faf9a UI: Show File Name on Recent Item Tooltip
When the recent files list is shown on the Splash screen, the
horizontal size is constrained and so longer items will have their
names truncated. This PR adds the file name as the first item in the
popup tooltip.

Pull Request: https://projects.blender.org/blender/blender/pulls/130875
2024-12-10 13:01:14 +01:00
Philipp Oeser b5349e475a Fix: Crash renaming modifier in Outliner and then toggling a property
If a modifier gets renamed elsewhere (through the UI in the Properties
Editor, python, ...) this ends up calling `rna_Modifier_name_update` --
which went fine because it does the neccessary depsgraph relations
update.

Doing the same from the Outliner missed that which then lead to crashes
in depsgraph modifier evaluation.

To resolve, add a case for `TSE_MODIFIER` in the Outliners
`namebutton_fn` that adds the required depsgraph relations update.

Also adds an appropriate notifier, so the name changes appear
immediately elsewhere in the UI.

Fixes #130536

Pull Request: https://projects.blender.org/blender/blender/pulls/130587
2024-12-10 13:00:16 +01:00
Germano Cavalcante c8d1d98428 Fix #116551: gpu.types.Buffer always returning 'FLOAT' type on MacOS
The issue involves using const on a variable that is later modified.
2024-12-10 12:55:35 +01:00
Miguel Pozo 9bd4bf3321 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-12-10 12:53:39 +01:00
Christoph Lendenfeld 3384ef3cab Fix #127949: able to pan keys out of view if channels are not shown
The issue was that with a96f1208cc the clamping
of the `View2D` happened in the drawing function
of the channel list. That of course won't work if the
channel list isn't drawn.

The fix is to ALSO clamp in the drawing function of
the main area. The reason this has to be in addition, is that
(I think) the channel box is drawn first. So if the clamping doesn't
happen there, the channels and their keys can lose their vertical
alignment.

Pull Request: https://projects.blender.org/blender/blender/pulls/129864
2024-12-10 12:48:21 +01:00
Bastien Montagne a554fdbdb0 Fix readfile linking code not protected against invalid BHeads.
Follow up to 6ba58a8303, apply similar checks to code loading
linked data from blendfile libraries.
2024-12-10 12:02:34 +01:00
Bastien Montagne 7a43565654 Fix (unreported) unclear potential invalid readfile behavior on unknown BHead type.
This was likely never an issue so far, as no ID type has ever been
removed (that was written in blendfiles at least), and no new BHead type
has been added since ages.

However, current behavior of the main loop in the readfile code (in
`blo_read_file_internal`) is to consider any BHead type which is not
explicitely known and handled, to be an ID BHead, and directly try to
load it as such.

This commit addresses that potential issue by validating that a BHead
code actually matches a known ID type before trying to use it to read an
ID from the file.

Issue identified while working on designs for future 5.0 forward
compatibility breaking changes in blendfile format itself.

Pull Request: https://projects.blender.org/blender/blender/pulls/129693
2024-12-10 12:01:48 +01:00
Philipp Oeser 10648c64a2 Release: Bump to 4.2.5 candidate 2024-12-10 11:19:24 +01:00
Thomas Dinges 399a91510f Release: Update license.md 2024-12-04 15:46:29 +01:00
Dalai Felinto 0ec0ea3674 make license: mention Blender Foundation copyright for the bundle 2024-12-04 15:46:16 +01:00
Dalai Felinto 565593a764 make license: Tweak on generated comments
After coming back to this file after a few months I myself did not remember where to edit it.
Adding the "Introduction and formatting" bullet item and update others for brevity.
2024-12-04 15:46:08 +01:00
Philipp Oeser e41b0e807a Release: Bump to 4.2.4 release 2024-11-18 11:34:40 +01:00
Iliya Katueshenock 9e33bed52c Fix #128220: GP3 component is in socket tooltip
Add component types filter.

Pull Request: https://projects.blender.org/blender/blender/pulls/128327
2024-11-14 12:07:52 +01:00
Philipp Oeser 2c4470fad7 Cleanup: make format
Pull Request: https://projects.blender.org/blender/blender/pulls/130266
2024-11-14 12:04:37 +01:00
Xavier Hallade db685b154c Fix #129235: Cycles: out of bound read from Embree
6c03339e48 moved from
rtcSetNewGeometryBuffer to rtcSetSharedGeometryBuffer but kept the
additional padding of 1 element in the function call.

It was previously used for over-allocating, to allow 16-byte reads of
all accessed elements, as Embree requires.
With rtcSetSharedGeometryBuffer, this argument led to an out-of-bounds
read as memory was already allocated without padding.
float3 is already 16-bytes so there is no need for padding, hence we
remove it.

We can also note that now, even when using rtcSetSharedGeometryBuffer,
over-allocating is not needed as it's done and functional on Embree side
since v3.6.

Pull Request: https://projects.blender.org/blender/blender/pulls/129643
2024-11-14 11:28:04 +01:00
Omar Emara 52e47b41da Fix #130134: Double Edge Mask uses too much memory
The Double Edge Mask node uses too much memory when it is not connected
to anything in the Full-Frame compositor. That's because it tries to
allocate a buffer of size 131072x131072, which is due to the cumulation
of multiple issues.

1. The Full-Frame compositor evaluates nodes that are not connected to
   the output.
2. The constant folder assigns a bounds of +-65536 to its output memory
   buffers as a maximum possible value.
3. Then the MemoryBuffer::inflate method doesn't know about the constant
   folder special value, so it tries to allocate a buffer of that size.

The safest fix for now is to clear the output and return early if all
inputs are single value.

The problem is that this issue might happen for other nodes that also
satisfy the 3 issues above, that is, uses inflate and can be constant
folded. I manually checked for such nodes and there are no nodes that
satisfy all three, so hopefully this is isolated to the Double Edge Mask
node.

Pull Request: https://projects.blender.org/blender/blender/pulls/130163
2024-11-14 11:28:03 +01:00
Pratik Borhade 97f46556fb Fix #130059: Rigify Limb menu disppears for some rotation fields
Caused by 78b9218c98
Undefined `iface_` is used, this terminates execution of further UI panel draw
code. Fix this by importing iface_ from module.

Pull Request: https://projects.blender.org/blender/blender/pulls/130063
2024-11-14 11:28:03 +01:00
Richard Antalik 6d3e384025 Fix: VSE: use after free in for loop
Same fix as 2a32b26415 - initialize range before using it in for loop

Pull Request: https://projects.blender.org/blender/blender/pulls/129835
2024-11-14 11:28:03 +01:00
Richard Antalik aa1d606984 Fix: VSE: Use after free in retiming
Caused by incorrectly initializing temporary range of `for` loop.

Pull Request: https://projects.blender.org/blender/blender/pulls/129659
2024-11-14 11:28:03 +01:00
Richard Antalik ee4676a6e5 Fix #127479: VSE produces blank scene offscreen renders
If conditions are not met for offscreen rendering, render job is used as
fallback. This can be skipped if there is possibility of race condition.
This was only considered for case where `context->for_render` was false,
since this indicates that call is invoked by the job itself.

If scene strip display is set to `OB_RENDER`, it needs to start the
render job. So variable `do_seq_gl` was renamed to `is_preview` and
reused in race avoidance connditon. This was done to convey clearer
meaning and match comments.

This change does make code less safe - race is avoided by UI not
allowing to run F12 render and opengl render at the same time. However,
I don't think, this could be easily resolved on VSE side without
suspending thread or being able to run multiple render jobs.

Pull Request: https://projects.blender.org/blender/blender/pulls/127926
2024-11-14 11:28:03 +01:00
Germano Cavalcante db0b1c54d2 Fix: error in previous commit 2024-11-14 11:28:03 +01:00
Germano Cavalcante d7172c9195 Fix: warning due to b4154c
No parentheses around comparison in operand of ‘==’ [-Wparentheses]
2024-11-14 11:28:03 +01:00
Germano Cavalcante 1f1264ef05 Fix #130078: Snap to Grid ignored if occluded in Add Object Tool
The snap cursor internally snaps to the Face to define the occlusion of
the Grid or to calculate the "Surface" orientation set by the tool.

Even though this is not the snap point enabled by the user, this
internal Snap to Face takes precedence over the Snap to Grid that is
enabled by the user.

To solve this, the solution is to do a second snap test but now only to
Grid and using the hit point as a reference for the closest grid.

Also fixes Absolute Increment Snap not being detected as Grid by the
tool.

Pull Request: https://projects.blender.org/blender/blender/pulls/130092
2024-11-14 11:28:03 +01:00
Clément Foucault 6312e94cec Fix #129019: Crash when switching from EEVEE to Cycles while rendering animation
When changing render engine, we discard the persistent data
that could be saved for all the current render instance that
exists. This is to save memory for the new renderer.

When doing so while rendering for F12, `engine_depsgraph_free`
is called after waiting for the render to finish. But this
can be called before the renderer destruction and on the main
thread.

Doing so on the main thread means that the `gpu_context` used
by the renderer cannot be bound for the sake of just receiving
the orphan buffers that the depsgraph holds. This is because
only the worker thread can make the gpu context active.

Binding the draw gpu context in this situation avoid all
possible conflict.

This is basically doing exactly what the
`DRW_render_context_enable/disable` function is doing internally
if the render engine gpu context is null.

Pull Request: https://projects.blender.org/blender/blender/pulls/129982
2024-11-14 11:28:03 +01:00
Campbell Barton 69b85ae972 Fix #130024: addon_utils.enable(..) doesn't setup extensions wheels
addon_utils.enable/disable now handle wheels so that the functions can
be used with extension add-ons.

A new argument `refresh_handled` supports scripts handing refresh
themselves which is needed to avoid refreshing many times in cases
when there are multiple calls to enable/disable.

This is mostly useful for internal operations.
2024-11-14 11:28:03 +01:00
Campbell Barton 567c061aaf Fix missing extensions refresh after the repository config changed
Enabling/disabling a repository was not refreshing its wheels or
compatibility data.
2024-11-14 11:28:02 +01:00
Campbell Barton a2e69961f2 Fix missing wheel refresh after updating extensions
Applying all available updates wasn't re-synchronizing wheels.
2024-11-14 11:28:02 +01:00
Campbell Barton fa4688451a Tests: add tests to ensure literal paths are properly handled
Add tests to ensure literal paths are handled properly
(created as part of the fix for #129724).
2024-11-14 11:28:02 +01:00
Campbell Barton b6f9d12510 Extensions: quote paths in error messages, improve missing file error 2024-11-14 11:28:02 +01:00
Campbell Barton 102f93faf2 Fix #129724: building extensions fails with non empty paths 2024-11-14 11:28:02 +01:00
Campbell Barton 5699f0ea32 Fix error installing extensions with wheels
Error in [0] caused versions not to match when enabling
extensions after installation or upgrade.

[0]: a3a3dda563
2024-11-14 11:28:02 +01:00
Campbell Barton cfc10b0232 Extensions: support for filtering based on Python versions
Support multiple extensions with different Python versions in a similar
way to how "platforms" are handled now.

This will be needed when Blender upgrades to a newer version of Python
so extensions which have a binary dependency on Python 3.11 don't
attempt to install in a Blender built with a newer Python version.

Details:

- Extensions from incompatible Python versions are not listed.
- Python versions are extracted from wheel names.
- An extension may include wheels for multiple Python versions,
  only the compatible wheels will be installed.
- Links may include a "python_versions" field which is checked
  when dropping into Blender.
- JSON generated by the "server-generate" command include the:
  "python_versions" field for extensions that include wheels.
- The "python_versions" field is optional, when omitted no version
  checks are performed.

Also correct watch_test make target.

Ref #128750.
2024-11-14 11:28:02 +01:00
Campbell Barton 02f36817d5 Extensions: exclude "wheels" from the static JSON package listing
While relatively harmless, it's unnecessary bloat.
2024-11-14 11:28:02 +01:00
Campbell Barton 002d66cd68 Fix #129607: Armature "Assign to Collection" crashes with defaults
Armature::collection_array was indexed with -1,
returning an invalid collection.

When the collection index isn't usable, create a new collection
with the default name.

Ref !129608
2024-11-14 11:28:02 +01:00
Campbell Barton 86aabbbace Fix BMeshElemSeq.sort(key=None) argument
Allow passing key=None to BMesh element sorting callback,
matching the doc-string & Python's list sort.
2024-11-14 11:28:02 +01:00
Campbell Barton e6b073b29e Fix memory leak in mathutils.geometry.box_pack_2d
The set macro doesn't handle the reference count for existing values.
2024-11-14 11:28:01 +01:00
Campbell Barton ad10bc3e05 Fix "Apply Modifier as Shape" ignoring Alt to apply to selected
The property was set & checked but the operator didn't define it.
2024-11-14 11:28:01 +01:00
Campbell Barton 22f13df448 Fix error in recent fix for Rotate Edges
k
Commit [0] accidentally removed a check for edges not to rotate.

[0]: a0491899f0
2024-11-14 11:28:01 +01:00
Campbell Barton da1cd9df11 Fix "Rotate Edges" iterating over freed edges
Rotating an edge deletes the edge and creates a new edge
however these edges were being iterated over and had their indices
checked.

In practice this wasn't causing use-after-free errors because the
edges are part of a BLI_mempool, nevertheless using freed elements of a
memory-pool should be avoided.
2024-11-14 11:28:01 +01:00
Campbell Barton e9f89f9af5 Fix memory leak in edit-font toggle style
FONT_OT_style_toggle returned `true` instead of the canceled flag
causing it to run as a modal operator which leak memory from it's
reports when called from Python.
2024-11-14 11:28:01 +01:00
Julien Duroure 47631908de glTF exporter: Fix Regression #128807 - avoid spaming stdout
error log will go to stderr, and others to stdout
A new parameter in operator to set the loglevel from command line bpy.ops.export_scene.gltf(loglevel=logging.INFO)
If not set from the ops, value is -1, and is set, as before, from the bpy.app.debug_value

Pull Request: https://projects.blender.org/blender/blender/pulls/130263
2024-11-14 10:44:11 +01:00
Julien Duroure 3b8365ae3b glTF export: Add logging level control for export
This was already the case at import
2024-11-14 10:44:08 +01:00
Campbell Barton 86a0cf9479 Fix memory leak in "External File Operation" on non WIN32 systems 2024-11-14 10:44:08 +01:00