Commit Graph

120055 Commits

Author SHA1 Message Date
Campbell Barton
4c67c78452 PyAPI: correct unregister/register mix up in exception message
Use a shared prefix for messages to avoid copy-paste errors.

Also include class name in the exception if the class can't be
unregistered.
2025-02-13 11:59:57 +11:00
Campbell Barton
754fa4b02f Merge branch 'blender-v4.4-release' 2025-02-13 11:41:14 +11:00
Campbell Barton
09cabadcfb PyAPI: prevent built-in RNA types being unregistered
`bpy.utils.unregister_class(bpy.types.Menu)` would remove `bl_rna`
type information from the menu (also Panels & other built-int types).

Prevent unregistering built-in types since this will only cause problems.
2025-02-13 11:39:17 +11:00
Campbell Barton
61b2bf4953 Merge branch 'blender-v4.4-release' 2025-02-13 11:23:45 +11:00
Campbell Barton
e2fc2d96f8 Cleanup: wrap Python lines exceeding 120 2025-02-13 10:01:03 +11:00
Brecht Van Lommel
e2e1984e60 Refactor: Convert remainder of blenlib to C++
A few headers like BLI_math_constants.h and BLI_utildefines.h keep working
for C code, for remaining makesdna and userdef defaults code in C.

Pull Request: https://projects.blender.org/blender/blender/pulls/134406
2025-02-12 23:01:08 +01:00
Brecht Van Lommel
c7a33a62a2 Cleanup: Directly include DNA_userdef_types.h and BLI_listbase.h
Instead of relying on them being included indirectly.

Pull Request: https://projects.blender.org/blender/blender/pulls/134406
2025-02-12 23:01:08 +01:00
Brecht Van Lommel
28c3476b3b Refactor: Add math.h include and DEG2RAD to BLI_math_constants
So it can be used in C code while other BLI code is converted to C++, and so
DNA headers can include it without pulling in full BLI_math_rotation.h.

Pull Request: https://projects.blender.org/blender/blender/pulls/134406
2025-02-12 23:01:08 +01:00
Harley Acheson
a0e492be8b Merge branch 'blender-v4.4-release' 2025-02-12 13:10:04 -08:00
Harley Acheson
bbe4bb38a0 Fix #134068: Show VSE Select Mode Variations
For many selection variations we alter the operator's displayed name to
reflect this. For example "Select (Extend)", "Select (Deselect)", and
"Select (Toggle)". This PR does similar for VSE select modes, returning
"Select (Unconnected)", "Select (Linked Time)",
"Select (Linked Handle)", and "Select (Side of Frame)". These are shown
if you press Alt or Ctrl while hovering in the VSE Editor.

Pull Request: https://projects.blender.org/blender/blender/pulls/134195
2025-02-12 22:09:01 +01:00
Harley Acheson
ac764ea5a0 Merge branch 'blender-v4.4-release' 2025-02-12 12:36:23 -08:00
Harley Acheson
16a4956ce8 UI: Status Bar During Text and Numerical Entry
While entering text into input buttons, show on Status Bar "Cancel",
"Confirm", "Select All", "Copy", "Paste". While dragging your mouse on
an a numeric input or slider show "Cancel", "Snap", "Precision".

Pull Request: https://projects.blender.org/blender/blender/pulls/133790
2025-02-12 21:33:42 +01:00
Harley Acheson
5956752eb7 UI: Themeable RedAlert, Error, Warning, Info Colors
The "Red Alert" color is currently hard-coded, which causes problems in
themes.  It also has an Enum value of 0, which precludes using this
value as "unset". We also use Error, Warning, and Info colors that are
part of the Info Editor.  This PR moves these out of the Info Editor
and into the "State" part of the theme. And then makes TH_REDALERT use
the TH_ERROR color.

Pull Request: https://projects.blender.org/blender/blender/pulls/131127
2025-02-12 20:59:47 +01:00
Pratik Borhade
0a7b765eb0 Fix #134362: Grease Pencil canvas settings don't do anything
This is due to hardcoded color and subdivision value. Also scale and
offset properties stored in overlay stuct was not considered. Now
multiply the transform matrix with `grid_mat` to make use of these
properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/134382
2025-02-12 18:51:03 +01:00
Harley Acheson
497f2884e8 UI: Decrease Alert Dialog Icon Size
Decrease the size of the icons shown on the large dialogs and
confirmations from 64 pixels (at 1X resolution scale) to 40.

Pull Request: https://projects.blender.org/blender/blender/pulls/134302
2025-02-12 18:30:52 +01:00
Hans Goudey
33db2d372f Mesh: Optimize vertex to edge attribute domain interpolation
Instead of using `DefaultMixer`, use the simpler `mix2` function.
This just decreases the overhead of computing each value.
In a simple test storing an attribute with the position of each
edge, I observed a 1.7x performance improvement: a change from
16 ms to ~9ms for an 8 million edge mesh.

Resolves #133196.
2025-02-12 11:50:14 -05:00
Hans Goudey
fd6df292f8 Fix #134448: Multi-object editing broken after recent fix
Caused by 638609752c.
Mistake in translation of C-style array management to Vector.
2025-02-12 11:34:36 -05:00
Clément Foucault
15437344ef Cleanup: DRW: Replace DRW_stats with GPU_debug
The former is not useful anymore and is being replaced
by the later.

Pull Request: https://projects.blender.org/blender/blender/pulls/134455
2025-02-12 17:14:48 +01:00
Philipp Oeser
c31f396d91 Merge branch 'blender-v4.4-release' 2025-02-12 17:12:50 +01:00
Philipp Oeser
01e5c6a595 Fix #134279: support boolean layers in bmesh API
Even though from an internal standpoint one could also just use INT
layers (if I understand correctly they are both handled as long?), we
can just support getting/setting bool layers in
the bmesh layer API as well (otherwise, it looks impossible to access
boolean attributes in bmesh).

Pull Request: https://projects.blender.org/blender/blender/pulls/134344
2025-02-12 17:12:24 +01:00
Hans Goudey
89b826b2fe Object: Prevent unnecessary depsgraph tags for no-op materials resize
When the object materials array is already the correct size these
functions don't do anything. Avoiding the depsgraph tags can avoid
unnecessary re-evaluations in cases like  sculpt mode where we
purposefully avoid adding tags elsewhere. Split from !133842.
2025-02-12 10:42:29 -05:00
Omar Emara
89e0472e49 Compositor: Use gpu::TexturePool instead of DRW pool
This patch removes the compositor texture pool implementation which
relies on the DRW texture pool, and replaces it with the new texture
pool implementation from the GPU module.

Since the GPU module texture pool does not rely on the global DST, we
can use it for both the viewport compositor engine and the GPU
compositor, so the virtual texture pool implementation is removed and
the GPU texture pool is used directly.

The viewport compositor engine does not need to reset the pool because
that is done by the draw manager. But the GPU compositor needs to reset
the pool every evaluation. The pool is deleted directly after rendering
using the render pipeline or through RE_FreeUnusedGPUResources for the
interactive compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/134437
2025-02-12 15:59:45 +01:00
Alaska
8ed69341d0 Shader: Expose light path "is volume scatter ray" in UI
This commit adds the "is volume scatter" output to the light path node
in the shader editor.

All the funcitonal code for this feature already exists in Cycles SVM
and OSL, but the output wasn't exposed on the node.

EEVEE does not support the feature, so it's output will
always be zero.

Pull Request: https://projects.blender.org/blender/blender/pulls/134343
2025-02-12 15:45:04 +01:00
Hans Goudey
d41e49933b Fix: Mismatched MEM_new/MEM_freeN after recent fix
638609752c
2025-02-12 09:31:02 -05:00
Bastien Montagne
8234484904 Merge branch 'blender-v4.4-release' 2025-02-12 14:43:06 +01:00
Bastien Montagne
5a8f0bbc03 Fix (unreported) more PointerRNA-embedding structs C-styled allocated. 2025-02-12 14:40:44 +01:00
Bastien Montagne
361fc5226e Merge branch 'blender-v4.4-release' 2025-02-12 14:09:46 +01:00
Bastien Montagne
551cb3c65b Fix (unreported) invalid calloc'ed data in fmodifier_ui.
This `panel->runtime->custom_data_ptr` is `MEM_delete`'d even, so that
was plainfully wrong allocation code.

Will crash in main/4.5 due to PointerRNA now requiring proper C++
construction/destruction.
2025-02-12 14:06:55 +01:00
Bastien Montagne
c898c5c575 Merge branch 'blender-v4.4-release' 2025-02-12 13:57:19 +01:00
Bastien Montagne
c46f19a6c2 BPY: Fix weak access to Main data from bpy.data API.
Use `self` parameter to retrieve the actual 'owner' Main.

Previous code was using G_MAIN, which _should_ be fine in current usage
context, but would for sure break if these functions were to be used
from e.g. a temp Main.

Pull Request: https://projects.blender.org/blender/blender/pulls/134440
2025-02-12 13:56:06 +01:00
RedMser
495d6ed88f Docs: Fix TimelineMarkers.new description
Likely copy-paste mistake in the docs for timeline markers.

Pull Request: https://projects.blender.org/blender/blender/pulls/134415
2025-02-12 13:48:47 +01:00
Campbell Barton
b4b3696d01 Merge branch 'blender-v4.4-release' 2025-02-12 22:39:37 +11:00
Campbell Barton
5638977db2 Docs: clarify reference ownership in bpy_rna.cc 2025-02-12 22:35:39 +11:00
Campbell Barton
8ff9f2b036 Fix assert with debug builds on exit when built as a Python module 2025-02-12 22:17:13 +11:00
Bastien Montagne
7d8dbfcc7b Merge branch 'blender-v4.4-release' 2025-02-12 11:41:43 +01:00
Bastien Montagne
7901dc8216 Refactor: bpy.data.batch_remove: use set instead of ID tags.
Cleaner and more future-proof. Also refactored slightly the code to make
it more readable.

And removed the 'experimental' warning in docs, this should have been
removed a long time ago.
2025-02-12 11:39:05 +01:00
Omar Emara
df69e6ab50 Merge branch 'blender-v4.4-release' 2025-02-12 11:54:29 +02:00
Omar Emara
25c4dd53dd Fix: Keying Screen and anti-aliasing produce bad results
The Keying Screen and the Anti-Aliasing nodes produce bad results in the
viewport compositor. This is because their cached resources are
allocated from the GPU texture pool, so they might get overwritten.

To fix this, we make sure those are not allocated from the texture pool.
2025-02-12 11:50:44 +02:00
Campbell Barton
67af60460e Merge branch 'blender-v4.4-release' 2025-02-12 13:21:18 +11:00
Campbell Barton
e96acd433d Docs: add code-comments to clarify bad-level include & developer only UI 2025-02-12 13:21:07 +11:00
Campbell Barton
f1e8dd366b CMake: support using LIBDIR while building against an external Python
Support a standard Blender build referencing Python outside of LIBDIR,
useful to build against Python with debugging options enabled.
2025-02-12 13:17:04 +11:00
Harley Acheson
24fe1f2d5c UI: Disabled Message Before Python in Tooltips
As discussed in our UI Module meeting, tooltips should show disabled
message before python path. Better connects the reason to the thing
being disabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/134426
2025-02-12 01:47:12 +01:00
Campbell Barton
07340e1093 Docs: add code-comments to clarify bad-level include & developer only UI 2025-02-12 10:59:16 +11:00
Aaron Carlisle
fe5e712edc Merge branch 'blender-v4.4-release' 2025-02-11 18:47:28 -05:00
Aaron Carlisle
4906d8bf85 Fix: new/free mismatch
See 06be295946
2025-02-11 18:45:31 -05:00
Harley Acheson
c663b78bcb Refactor: Tooltip Calculation of Sizing and Spacing
Refactor how tooltips are sized, items placed, margins calculated, etc.
Current code has some mistakes that we use kludges to compensate for,
and it doesn't properly consider the font size in calculating margins.
The result shown to users in normal circumstances (changing resolution
scale only) with this PR applied should look identical to current.
Small changes when the text style size is changed. However, this is
mostly to allow later adjustments to padding, which currently _breaks_
when changed.

Pull Request: https://projects.blender.org/blender/blender/pulls/134205
2025-02-12 00:09:02 +01:00
Harley Acheson
9e1d038b1e Merge branch 'blender-v4.4-release' 2025-02-11 14:32:02 -08:00
Gilberto.R
b5b786b34f Fix: UI: Close pie menu on window focus loss
Close open pie menus on window loss of focus, to prevent waiting for
the pie key release if it was released outside of focus.

Pull Request: https://projects.blender.org/blender/blender/pulls/134215
2025-02-11 23:30:31 +01:00
Sean Kim
a2b75c87c8 Merge branch 'blender-v4.4-release' 2025-02-11 14:10:10 -08:00
Sean Kim
312579ce82 Fix #134366: object.closest_point_on_mesh always returns no result
Introduced in 024d7d12e2

Pull Request: https://projects.blender.org/blender/blender/pulls/134377
2025-02-11 23:09:20 +01:00