Commit Graph

150077 Commits

Author SHA1 Message Date
Julien Duroure
90e09b93b5 glTF exporter: Fix crash with extra channel 2024-11-28 09:19:41 +01:00
Julien Duroure
14302f6af7 glTF exporter: Fix crash when 'remove armature object' + 'export only def bones'
This check is done before the filter of non deformation bone.
So when we want to get this list, as it's cached, we get the list with non deformation bones, so try to access a bone that is filtered

Additional bug when we want to export only DEF bones :
the check is done on all bones, not only deformation bones, if we want to get only def bones.
So having at root a DEF and a nonDEF bone => Check will failed and said we can't remove armature

Solution: When checking if we can remove armature, indicate that we don't want to cache the result
2024-11-28 09:16:26 +01:00
Alaska
31bfcff4ea Tests: Add Cycles tests for new volumetric scatter phase functions
Blender 4.3 added new volumetric scatter phase functions to Cycles.
This commit adds tests for each of the new phase functions.

Ref: blender/blender@0315eae536
Ref: blender/blender#123012
Ref: blender/blender-test-data!25

Pull Request: https://projects.blender.org/blender/blender/pulls/130894
2024-11-28 06:59:23 +01:00
Aaron Carlisle
7993020085 Docs: Update Sphinx & Website Theme
This now matches the versions used for the user manual.
2024-11-27 22:40:40 -05:00
Campbell Barton
1865de1c73 Fix #129926: Crash with Python 3.12 & Manta flow
Python 3.12 no longer supports calls to PyImport_AppendInittab
once initialized.

The call was redundant as Blender's `bpy_internal_modules` already
includes the "manta" module.

Resolve by disabling the call when Python's lifecycle isn't being
managed by manta-flow.
2024-11-28 12:04:45 +11:00
Campbell Barton
4c34b25f56 Cleanup: quiet undeclared function warnings 2024-11-28 10:27:24 +11:00
Campbell Barton
979ad4cc9c Cleanup: remove redundant function 2024-11-28 10:20:59 +11:00
Campbell Barton
7f26812523 Fix bone duplication failing to update it's sub-targets
Regression in [0] attempted to access EditBones from the Bone list,
causing bone constraints fail to reference the sub-targets when
the bone and its target were both duplicated.

[0]: f025ff81fc
2024-11-28 10:13:06 +11:00
Harley Acheson
0193579e90 UI: Win32 - Clipboard Image Paste from File Path
On the Windows platform allow pasting an image into the Image Editor
based on a filepath in the clipboard. For example, selecting "copy" on
the context menu in the file system. This checks for CF_HDROP format
and should work for all image formats we support.

Pull Request: https://projects.blender.org/blender/blender/pulls/127782
2024-11-27 23:55:18 +01:00
Sean Kim
1af839d419 Fix #130707: Weight paint gradient tool doesnt fill behind start point
See blender/blender-assets!15 for the actual asset file change.

As part of the brush asset project, various weight paint brushes had
their falloff curve changed. This had the unintended effect of changing
the behavior of the gradient tool, as it shares the currently active
brush's settings.

This behavior is unintuitive and not well documented, as an interim fix,
the bundled assets were reverted.

Pull Request: https://projects.blender.org/blender/blender/pulls/131058
2024-11-27 22:46:49 +01:00
Sean Kim
be62107fbd Assets: Update asset repository hash for essentials library updates
Includes blender/blender-assets@360e2172

Pull Request: https://projects.blender.org/blender/blender/pulls/131057
2024-11-27 22:18:03 +01:00
Aras Pranckevicius
3d7359a38f Fix #130969: OBJ import shading artifacts when file contains zero-area faces
When OBJ file contains vertex normals, this can in some cases confuse
the custom loop normals code inside Blender. Since it does not simply
just use custom normals, but rather projects them into "lnor space".
But that "lnor space" calculation can go haywire sometimes, when
degenerate faces are present in the input.

Mark zero-area faces as "sharp" before doing custom normals. This will
make them not try to share the "smooth fan" lnor space with other faces,
and things will look correct.

Previously, OBJ importer was (wrongly) always setting all faces
as "sharp", which avoided this problem, but caused other issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/131041
2024-11-27 22:03:15 +01:00
Miguel Pozo
1105f2573e Fix #130846: Workbench: X-Ray incoming vector
Regression from
9396c8f388
2024-11-27 21:26:52 +01:00
Sean Kim
a820e2d393 Fix: Clone brush missing from image texture paint
Missed in 3798852071

Pull Request: https://projects.blender.org/blender/blender/pulls/131005
2024-11-27 21:25:21 +01:00
Sean Kim
4c1cb3be9d Fix: Filter Mesh crash when using operator panel
`CTX_data_ensure_evaluated_depsgraph` ultimately ends up freeing the PBVH
meaning that any associated data still held may be a use-after-free error.

Pull Request: https://projects.blender.org/blender/blender/pulls/131011
2024-11-27 20:57:23 +01:00
Miguel Pozo
a39bec7197 Fix: Overlay-Next: GP Points/Segments in edit modes
The previous code didn't support disabling them.
This is a copy of the Legacy behavior.
2024-11-27 20:52:49 +01:00
Sean Kim
b53a9a671d Fix #130783: Image editor tools do not set active brush
Missed in a38c96b92c

Pull Request: https://projects.blender.org/blender/blender/pulls/130946
2024-11-27 20:50:30 +01:00
Miguel Pozo
6e6b9abf55 Fix: Overlay-Next: GP Vertex paint points 2024-11-27 20:08:28 +01:00
Miguel Pozo
83dca75cdf Fix #130815: Overlay-Next: Disabled overlays still visible 2024-11-27 20:07:15 +01:00
Julian Eisel
a66a5a3f50 Fix #130882: Asset shelf filter by active tool option doesn't redraw 2024-11-27 18:53:05 +01:00
Clément Foucault
f08c2b8aa1 Fix: Overlay-Next: Wireframe display conflicting with edit cage 2024-11-27 18:45:31 +01:00
Omar Emara
292ad6b00e Compositor: Implement Keying node for new CPU compositor
Reference #125968.
2024-11-27 19:28:16 +02:00
Omar Emara
0efb0ce48e Compositor: Implement Dilate node for new CPU compositor
Reference #125968.
2024-11-27 19:28:16 +02:00
Omar Emara
b43c36e801 Compositor: Implement Morphological Distance Feather algorithm for CPU
Reference #125968.
2024-11-27 19:28:16 +02:00
Omar Emara
32186ca908 Compositor: Implement Morphological Distance algorithm for CPU
Reference #125968.
2024-11-27 19:28:16 +02:00
Omar Emara
939242b100 Compositor: Implement Morphological Distance Feather Weights to CPU
Reference #125968.
2024-11-27 19:28:16 +02:00
Omar Emara
8f77e0d7fe Fix: Zero division in Dilate node 2024-11-27 19:28:16 +02:00
Clément Foucault
00a8d006fe GPU: Move Polyline shader to primitive expansion
This port is not so straightforward.

This shader is used in different configurations and is
available to python bindings. So we need to keep
compatibility with different attributes configurations.

This is why attributes are loaded per component and a
uniform sets the length of the component.

Since this shader can be used from both the imm and batch
API, we need to inject some workarounds to bind the buffers
correctly.

The end result is still less versatile than the previous
metal workaround (i.e.: more attribute fetch mode supported),
but it is also way less code.

### Limitations:
The new shader has some limitation:
- Both `color` and `pos` attributes need to be `F32`.
- Each attribute needs to be 4byte aligned.
- Fetch type needs to be `GPU_FETCH_FLOAT`.
- Primitive type needs to be `GPU_PRIM_LINES`, `GPU_PRIM_LINE_STRIP` or `GPU_PRIM_LINE_LOOP`.
- If drawing using an index buffer, it must contain no primitive restart.

Rel #127493

Co-authored-by: Jeroen Bakker <jeroen@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/129315
2024-11-27 17:37:04 +01:00
Aras Pranckevicius
611940805e Fix #107493, #98480: video rotation metadata is not read
Videos files recorded on most phones were coming in sideways; files
recorded on some laptop cameras were coming in upside down. In both
cases the display_matrix metadata of the video stream was not applied.

This required changing internal container format of movie proxies to
be MP4 instead of AVI, since AVI does not support rotation metadata.
File extension kept at ".avi" to not disturb existing expectations.

It might be better to "bake" rotation into proxies while building them,
but right now we do not have a trivial way of doing that.

Note that this is a potential behavior change; if someone
already had manually rotated video strips, they would have
to undo that rotation now.

Pull Request: https://projects.blender.org/blender/blender/pulls/130455
2024-11-27 17:08:37 +01:00
Alaska
0ab0f41c1e Tests: Add render tests for shadow linking on point clouds and curves
Having a test like this was found to be useful during
blender/blender!125803

And a test like this will be useful in case of refactors or in the case
HIP-RT adds native point cloud support.

Ref: blender/blender-test-data!19
Ref: blender/blender-test-data!21
Ref: blender/blender#123012
Pull Request: https://projects.blender.org/blender/blender/pulls/130504
2024-11-27 16:13:33 +01:00
Philipp Oeser
5aa95941d1 Fix #130998: Crash changing Color Palette in Object/Edit/Pose modes
Caused by 7b0ea0f1b4

By default, Color Palettes are only drawn in the UI in the context of
**painting**. UI button code then tries to update an appropriate brush
from edits to the palette.

In the report though, a palette was created and displayed via python,
making changes in Object/Edit/Pose would then crash.

So a valid `Paint` and `Brush` were assumed. `Paint` was already checked
for in a324a19f1b, but since 7b0ea0f1b4, `Paint`(if we actually have
it, e.g.from `ImagePaintSettings` [see a324a19f1b]) only has its
`brush` set once we enter texturepaint once.

Solved by checking we have a valid Brush in corresponding UI code to
begin with.

Pull Request: https://projects.blender.org/blender/blender/pulls/131031
2024-11-27 15:41:26 +01:00
Hans Goudey
953c4f1599 Cleanup: Remove references to legacy Grease Pencil object
These are converted on startup to the new type. There are still
some references left, mostly where it looked like there still needs
to be changes to properly deal with the new object type.
2024-11-27 09:17:16 -05:00
Philipp Oeser
1448967287 Fix #130748: selection of bones in grease pencil weightpaint mode fails
Two places that were not ready for GPv3:
- armatures were not set to posemode when entering weightpaint
- armatures were not in the object list when OpenGL selecting (thus
their bones were missing)

Both of them because existing code only respected
`eModifierType_Armature` (and not `eModifierType_GreasePencilArmature`
as well).

This is now corrected.

Similar to bdfb3ea6e7

Pull Request: https://projects.blender.org/blender/blender/pulls/130908
2024-11-27 14:44:26 +01:00
Habib Gahbiche
4de34c8205 UI: Implement snapping for node resizing
When snap is active, resizing nodes now snaps the edge of the node to
grid. Holding `CTRL` inverts snapping.

Part of https://projects.blender.org/blender/blender/issues/128612

Pull Request: https://projects.blender.org/blender/blender/pulls/130379
2024-11-27 11:09:48 +01:00
Sergey Sharybin
e7067c68e9 Build: Make MSIX architecture a template variable
This allows the pack step to specify proper arch for WoA.

Pull Request: https://projects.blender.org/blender/blender/pulls/131030
2024-11-27 11:06:43 +01:00
Campbell Barton
8fba37cea7 Fix #129657: Broken pipe from a Python script closes Blender
Since [0] PyConfig_InitIsolatedConfig was used which disables
Python's signal handlers, re-enable them as they're needed for
Python's own error handling to work properly.

[0]: cd5dd6e454
2024-11-27 20:32:50 +11:00
YimingWu
ca78cae828 Fix #130992: Grease Pencil: Edit wire/vertex color usage fix
In legacy overlay the wire/vertex color used to draw grease pencil was
wrong, this means users can't effectively adjust grease pencil specific
wire colors. Currently this shader is used for both legacy and overlay
next, so this fix would be also beneficial down the line.

Pull Request: https://projects.blender.org/blender/blender/pulls/131023
2024-11-27 10:13:20 +01:00
Campbell Barton
d549436dfa Cleanup: minor tweaks to wheel_cleanup.py
- Use result of argparse parsing (was ignored).
- Replace comment with doc-string, used for `--help`.
- Add license header.
- Make executable.
2024-11-27 19:01:04 +11:00
Campbell Barton
f088bb1bc8 Cleanup: spelling in comments 2024-11-27 19:01:02 +11:00
Campbell Barton
b9f055459a Cleanup: ensure trailing space around comment blocks 2024-11-27 19:01:00 +11:00
Campbell Barton
d9891aa6ad 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]: cfc10b0232565642afbfdc5a867f027640ce8274
2024-11-27 15:44:58 +11:00
seanterelle
6e9d988018 Geometry Nodes: Add dynamic label to warning node
Implementation of auto-label for the warning node based on the type
(similar to the Math node).

Pull Request: https://projects.blender.org/blender/blender/pulls/131000
2024-11-27 01:41:49 +01:00
Marco Rotili
e6d941cdf4 Fix #129178: Opening the context menu on a numeric input shows the wrong cursor
Use non-modal setting of mouse cursor type so that the correct one is
shown for the numerical input context menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/129455
2024-11-27 00:58:38 +01:00
Lukas Stockner
0de1cea5c5 Cycles: Use fused OptiX OSL programs
Based on #123377 by @brecht, but Gitea doesn't like the rebase these
so here's a new PR.

The purpose here is to switch to fused OptiX programs for OSL execution
on CUDA. On the one hand, this makes the code easier since, but there's
also another advantage - how memory allocation is managed.

OSL shaders need memory to store intermediate values, but how much is
needed depends on the complexity of the shader. With the split program
approach, Cycles had to provide that memory, so we had to allocate a
certain amount (2 KiB, to be precise) statically and show an error if
the shader would need more. If the shader used less (which is the case
for the vast majority), the memory was just wasted.

By switching to fused kernels, OSL knows the required amount during JIT
codegen, so it can allocate only what's required, which avoids this
waste. One still needs to set a maximum, and in theory, OSL would also
support spilling over into a Cycles-provided alternative memory region.
However, we currently don't implement that - instead, we default to the
same 2048 limit as before and let advanced users override it via the
CYCLES_OSL_GROUPDATA_ALLOC environment variable if really needed.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/130149
2024-11-26 23:58:32 +01:00
Clément Foucault
112b3bae84 Fix: GPU: Asserts when building WITH_GPU_DRAW_TESTS but without WITH_GTEST 2024-11-26 22:39:13 +01:00
Clément Foucault
7faec42236 Fix #130867: Overlay-Next: Crash on startup on intel macs
Loading the matrix first to local variable fixes the
internal compiler error.
2024-11-26 22:21:40 +01:00
Clément Foucault
badedb204a Overlay-Next: Move wireframe depth buffer copy before rendering
This avoid renderpass splitting and make overlay follow
the overlay interface.

Also fix the infront wireframe not copying the correct depth
buffer.
2024-11-26 21:32:27 +01:00
Clément Foucault
ebcc3dbc41 Fix: UI: Broken Geometry node socket display on macOS
Fix various warnings (that were errors) referring to
variables used inside their own initialization.
2024-11-26 21:32:27 +01:00
Clément Foucault
76a19fd3c5 Cleanup: Overlay: Remove OB_GPENCIL_LEGACY support 2024-11-26 21:32:27 +01:00
Sean Kim
14ca9998eb Cleanup: Use SI_MODE_PAINT instead of string comparison
Pull Request: https://projects.blender.org/blender/blender/pulls/130947
2024-11-26 19:57:47 +01:00