Commit Graph

144020 Commits

Author SHA1 Message Date
Campbell Barton
8701ccc6d8 mypy: update checker to support specific files overlapping directories
This allows single files to use different settings to other files
in the same directory. Add check_unused_defines.py.
2024-11-29 15:57:30 +11:00
Campbell Barton
273f48cd53 Cleanup: use main functions to allow importing scripts
Support importing scripts without running their logic to
allow basic validation (see #130746).

Parts of !131037 were used.

Co-authored-by: Bastien Montagne <bastien@blender.org>
2024-11-29 15:54:58 +11:00
Campbell Barton
b295fc9a9c Extensions: use replace exists with lexists to check a path can be used
Without this, a broken symbolic-link wasn't removed, causing renaming
to fail.
2024-11-29 13:01:03 +11:00
Clément Foucault
c1bc1ef3ea GPU: C++ GLSL Stubs: Fix isinf / isnan 2024-11-29 00:37:45 +01:00
Campbell Barton
5fa0be491e Extensions: suppress noisy prints for extension wheel filtering
These messages could flood the output even when extension installation
succeeded. Only show them when Python debugging is enabled.
2024-11-29 10:27:03 +11:00
Campbell Barton
00255b9421 Correct error printing error in f03fba614d 2024-11-29 10:26:57 +11:00
Campbell Barton
f03fba614d Fix #130211: Unhandled error installing extensions when renaming fails
Add error handling for rare but possible failures on installation.

- Account for the destination extension directory being a file.
- Handle the exception if renaming the temporary directory fails.
2024-11-29 09:56:08 +11:00
Clément Foucault
b39843e7b0 GPU: Use extern for non static expressions and use non zero value for gl_WorkGroupSize
Pull Request: https://projects.blender.org/blender/blender/pulls/131064
2024-11-28 23:23:30 +01:00
Clément Foucault
dd480ab604 GPU: Refactor the GLSL C++ stub swizzle implementation
This removes support for nested swizzling but avoid
warning about static member accesses through class
instance.
2024-11-28 23:23:27 +01:00
Harley Acheson
47492c7aa6 Fix #130385: Use Only Advance When Measuring Mono Text
When measuring text strings we consider both the advance and the glyph
bounding box. But monospaced text should only use the advance because
many fonts allow some mono characters to slightly overflow. This just
removes bounding box from the calculation of width for mono text.

Pull Request: https://projects.blender.org/blender/blender/pulls/131114
2024-11-28 20:14:59 +01:00
Aaron Carlisle
d0d936b760 Revert "Docs: Python API: Fix theme dependency"
This reverts commit 4deecd97a9.
2024-11-28 14:12:06 -05:00
Clément Foucault
5982b5e75c Fix #130751: Overlay Next: Selected Outline highlight vanishes when face orientation enabled
Was caused by different drawing order. Use the legacy drawing order
until we find a better fix.

The better fix would be to render outline with depth.
2024-11-28 19:16:37 +01:00
Aaron Carlisle
4deecd97a9 Docs: Python API: Fix theme dependency
The upstream dependency was mistakenly changed in
2ce7e89cb7

PR to fix this here: https://github.com/pradyunsg/furo/pull/853
2024-11-28 12:53:57 -05:00
Clément Foucault
5e97b5adc2 Sequencer: Use uchar4 colors for drawing quad buffer again
This partially revert the changes from
909b74e91f
2024-11-28 18:30:28 +01:00
Clément Foucault
5954898edf GPU: Add back support for uchar4 color when using widelines
This is still pretty useful as the data savings is not negligeable.

Also supports it for python.
2024-11-28 18:28:08 +01:00
Clément Foucault
ec84fe5fdb Fix #131091: GL: Weird Lines appearing in Gizmo Overlays
This happened because NVidia GPUs require higher alignment
for SSBO binds than for vertex inputs.

This is related to	#131103 which fixed it for vulkan.

Add a common capability option for that.
2024-11-28 17:22:12 +01:00
YimingWu
8fb12839f2 Grease Pencil: Add all supported modes to simplify operator
The stroke simplify operator was implemented at the beginning of GPv3
migration, which means it lacked a few other modes. This fix reused the
same code as in the simplify modifier to provide more simplify modes
back to the modifier so it can work just like GPv2.

Resolves #130616.

Pull Request: https://projects.blender.org/blender/blender/pulls/131076
2024-11-28 17:00:05 +01:00
Lukas Tönne
d8182421fa Fix #130635: Fill tool stroke projection incorrect in ortho mode
There are two bugs here:

1. Projection of mouse cursor into "image space" for starting a flood fill was
first trying to convert region coordinate to image coordinate, which was broken
for ortho mode. This isn't actually needed since the only purpose of the image
coordinate is to convert to layer space immediately. We can simplify by
computing layer space mouse cursor, _before modifying the region matrices_.

2. Projection of boundary pixels from image space to stroke positions in layer
space also has an offset. This is a bug in `ED_view3d_win_to_3d` which uses the
`viewinv` translation vector instead of the `persinv` translation. This only
works when the rendered region is symmetric around the view direction. This is
not the case when rendering flood fill images, which are shifted to make better
use of available pixel space. The `persinv` translation contains the region
shift. A new function has been added, rather than changing `ED_view3d_win_to_3d`
because many operators rely on the broken behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/130918
2024-11-28 16:38:17 +01:00
Weizhen Huang
e2d7681fe6 Cleanup: Cycles: remove unused ccl_loop_no_unroll
Was added in 6121c28501 to ensure compiling
on OpenCL, now the definition is empty on all platforms

Pull Request: https://projects.blender.org/blender/blender/pulls/131100
2024-11-28 16:37:01 +01:00
Jeroen Bakker
8e4502258a Fix: Vulkan: Misalignment sub-buffers immediate drawing
Since recently we bind immediate sub buffers as storage buffers to
extend the geometry for line drawing. We didn't add alignment checks and
that raised warnings. This change will fix those warnings.

Pull Request: https://projects.blender.org/blender/blender/pulls/131103
2024-11-28 16:31:58 +01:00
Christoph Lendenfeld
e52cb5e24b Fix #131045: Wrong UI range for edit bone head and tail
The issues was simply that the UI range for the RNA
property was set to 0. Fixed by setting to `-FLT_MAX`.

Pull Request: https://projects.blender.org/blender/blender/pulls/131099
2024-11-28 16:20:02 +01:00
Jeroen Bakker
c69b107a28 Fix #130121: Vulkan: Lightbaking resources freed to early
When lighting baking is used in a background render the resources are
freed to early. The cause is that light baking does some initialization
within a context, that isn't send to the GPU. The first iteration of
light baking is expecting that it can free resources, what leads to GPU
resources to be deleted that are still used by commands that are
scheduled to be send to the GPU.

This PR fixes this by using multiple resource pools when background
rendering and ensure that contexts are send to the GPU when rendering
ends.

Pull Request: https://projects.blender.org/blender/blender/pulls/131094
2024-11-28 16:05:59 +01:00
Weizhen Huang
aa09169e0a Cleanup: Cycles: remove unused parameter skip_phase in volume
This logic is copied from surface shader, so that the sampled closure
does not need to be evaluated twice when summing all the closures, but
it is not used in volume.
2024-11-28 15:56:28 +01:00
Jeroen Bakker
deff994123 Vulkan: Add support for GPU_logic_op_xor_set
Add support for Logic op XOR. This is used in image editors and tracking
editor. Logic ops is required on Linux and Windows, however for macOS it
will be disabled when using MoltenVK. MoltenVK has can be compiled with
support for logic ops, but that isn't the default as it relies on
private APIs.

When the workaround is enabled it will create artifacts when used.

Ref: #130347

Pull Request: https://projects.blender.org/blender/blender/pulls/131089
2024-11-28 15:12:13 +01:00
Richard Antalik
cffaa681c5 Fix #130944: VSE box select not working with industry compatible keymap
Commit d5d81c5078 did not update industry compatible keymap data script.

Pull Request: https://projects.blender.org/blender/blender/pulls/131033
2024-11-28 14:56:16 +01:00
Thomas Dinges
79220f5728 Release: Update copyright.txt pointing to new license.md 2024-11-28 12:43:47 +01:00
Clément Foucault
909b74e91f Fix: GPU: Assert due to new GPU requirements regarding wide lines
The formats was not using the correct attribute type.

Fixes assert in graph drawing and potential assert in cursor drawing
Fixes assert in sequencer and file browser
2024-11-28 12:42:17 +01:00
Raphael Langerhorst
f662caf722 Add RISCV CPU architecture support to build config
Remove assert statement from make_update.py, making it ready for any
architecture.

Add riscv 32, 64 and 128 bit cpu architecture with little/big endian
to Blender's BLI_build_config.h and Libmv's build_config.h

Tested (to compile) on riscv64 little endian machine.

Pull Request: https://projects.blender.org/blender/blender/pulls/130920
2024-11-28 12:37:26 +01:00
Falk David
9e28809695 Fix #130309: Grease Pencil: Smooth doesn't use correct smooth settings
The issue was that when the smooth operation is invoked using shift,
we create a smooth operation for the currently active brush (which
is probably not a smooth brush).

This fixes the issue by using the "Smooth" brush from the essentials
library when the smooth operations is invoked temporarily.

Pull Request: https://projects.blender.org/blender/blender/pulls/130963
2024-11-28 12:23:23 +01:00
Jeroen Bakker
faf2c6f0ca Vulkan: Add method to query debug group of node
When debugging render graph the debug group name can narrow down the
place where a node originates from. This PR adds a function to retrieve
the full debug group name of a specific node.

Pull Request: https://projects.blender.org/blender/blender/pulls/131081
2024-11-28 12:00:21 +01:00
Clément Foucault
601de8bfcb Fix: GPU: Assert due to new GPU requirements regarding wide lines
The formats was not using the correct attribute type.
2024-11-28 11:56:49 +01:00
Falk David
8b233f36db Fix: Grease Pencil: Crash in curves_merge_by_distance for cyclic curves
The issue was that the size of `distances_along_curve` was wrong for
cyclic curves. The fix increases the size by one for cyclic curves to
account for the last segment length.
2024-11-28 11:42:09 +01:00
Campbell Barton
76f9a08963 Fix failure to reinstall an extension uninstalling the extension
When an extension could could be removed but it's directory could be
renamed, the install operation would fail anyway.

Resolve by completing the installation when the directory can be moved.

Report as part of #129884.
2024-11-28 21:28:30 +11:00
Thomas Dinges
b93aa51a6e Tools: Update names after module split
* Add Triaging and Development management modules as well
* Only print modules that have open bugs
2024-11-28 10:59:08 +01:00
Omar Emara
a9436b04b8 Fix: Compositor: Crash using Keying node in new CPU compositor
The Keying node crashes in the new CPU compositor because it was writing
to an output that shouldn't be computed and is thus unallocated.
2024-11-28 10:58:14 +02:00
Julien Duroure
373191ff2a glTF exporter: fix KHR_animation_pointer to use the right material when texCoord
We need to store the last version of the material, when all additional data are set
2024-11-28 09:41:35 +01:00
Julien Duroure
428ec6c1e3 glTF exporter: Fix crash when animation on not used material
(And when exporting using KHR_animation_pointer)
2024-11-28 09:38:28 +01:00
Julien Duroure
7ea11a4724 glTF exporter: Always bake scene animation
This way, we can handle drivers animation
2024-11-28 09:35:38 +01:00
Julien Duroure
f7a2d0095e glTF exporter: Fix debug logging
Set INFO level if user set debug to whatever value not used to set logging level
2024-11-28 09:33:22 +01:00
Julien Duroure
ba737a496c glTF exporter: Fix armature object keep channel option
When exporting bone animation, we also check animation on armature object itself
This check was not take into account what channel are really animated
2024-11-28 09:31:23 +01:00
Julien Duroure
5997886662 glTF importer: add option to not select created objects
So, when this operator is called by other scripts in mass, we avoid performance issue
2024-11-28 09:27:29 +01:00
Julien Duroure
f8766c5542 glTF exporter: UI fixes - disable option when not available
Some combination of options are not possible, so option should be grayed
2024-11-28 09:23:14 +01:00
Julien Duroure
dbb670c6d1 glTF importer: add option to import scene extras or not
As user may want to not overwritten them
2024-11-28 09:21:19 +01:00
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