Commit Graph

134459 Commits

Author SHA1 Message Date
Hans Goudey
8b514bccd1 Cleanup: Move remaining GPU headers to C++
Pull Request: https://projects.blender.org/blender/blender/pulls/119807
2024-03-23 01:24:18 +01:00
Harley Acheson
f235990009 UI: Updated Interface Font to Inter Version 4.0
Upgrade Inter font from 3.019 (0a5106e0b) to 4.000 (a52131595)

Pull Request: https://projects.blender.org/blender/blender/pulls/119720
2024-03-22 21:32:34 +01:00
Harley Acheson
9eb275e6eb UI: Correction to Weight of 3D Viewport Overlay Text
Currently the overlay text, like stats for example, are drawing with
the widget_label font style size but using widget's weight. This is
just because UI_fontstyle_set is not called. Without this call we can
get a jiggling of the overlay text if these two styles differ in
weight. This PR also makes an (unnoticeable) correction to the font id
used in fontstyle_set_ex. uiFontStyle's uifont_id is not always the
same id as regular font ids, but here they are confused.

Pull Request: https://projects.blender.org/blender/blender/pulls/119808
2024-03-22 21:28:55 +01:00
Brecht Van Lommel
704e62d9d7 Merge branch 'blender-v4.1-release' 2024-03-22 21:08:15 +01:00
Brecht Van Lommel
64bfe49164 Fix: RNA warning regarding description ending in period
Ref #109157
2024-03-22 20:59:15 +01:00
Brecht Van Lommel
b0b0510dbf Refactor: Access paint brush through accessor function
This will be used for brush assets in the future.

Ref #119801
2024-03-22 20:54:09 +01:00
Richard Antalik
bee70e0c03 Fix #119465: Incorrect color when changing VSE colorspace
Cached strip images were not invalidated, which caused, that these
images were kept in memory in incorrect colorspace.

Code readability was improved a bit and clarifying comments were added
to avoid confusion about what is the code supposed to do.

Pull Request: https://projects.blender.org/blender/blender/pulls/119475
2024-03-22 20:11:51 +01:00
Richard Antalik
3f4d924298 Fix #118633: View limiting does not work if VSE is uninitialized
This happened, because function returned early if `Editing` was nullptr.
However it is needed only for timeline boundbox, which is already initialized
for case where there are no strips.

Pull Request: https://projects.blender.org/blender/blender/pulls/118864
2024-03-22 20:10:53 +01:00
Hans Goudey
561dfb4022 Cleanup: Simplify naming in curves draw cache, other simplifications
- Avoid unnecessary redundancy in function and variable names
- Use more consistent variable names in some places
- Avoid duplicate null checks and incorrect "ensure" naming
- Use const in a few places
- Pass more specific arguments besides just the curves
- Remove unnecessary namespace specification
2024-03-22 14:52:22 -04:00
Miguel Pozo
def5f86cae Fix: EEVEE-Next: Material compilation
Move pcg functions to eevee_sampling_lib.
Including gpu_shader_common libs in engine code results in double  includes.
2024-03-22 18:58:12 +01:00
Harley Acheson
cfce96dafe Changes needed because of removal of a1, a1 from uibut 2024-03-22 10:31:02 -07:00
Harley Acheson
5d136692e6 Merge branch 'blender-v4.1-release' 2024-03-22 10:27:38 -07:00
Harley Acheson
986e4a8b7f Fix #119384: Outliner Edit Mode Toggle When Data is Shared
This report includes a file that demonstrates a crash when ctrl-
clicking the "dot" icon to add to the objects in edit mode. This is
because the object has a mesh shared with another object that is
already in edit mode. This PR allows editing only one object at a
time between objects that share data.

Pull Request: https://projects.blender.org/blender/blender/pulls/119704
2024-03-22 18:26:29 +01:00
Hans Goudey
00e1b2256b Merge branch 'blender-v4.1-release' 2024-03-22 12:28:51 -04:00
Hans Goudey
ed2cdc6583 Cleanup: Remove unused curves eval cache variable 2024-03-22 12:25:24 -04:00
Hans Goudey
7f4a4fa605 Fix #119787: Curves viewport attribute drawing crash
Caused by 1cca960677.

That commit stated that creating the final subdivided attribute didn't
free the "proc" attribute buffer that contains the data from the Curves
control points. However that wasn't the case, given the call to
`GPU_VERTBUF_DISCARD_SAFE` in that function. That caused a crash when
the overlay engine and EEVEE both wanted to access the VBO and it was
discarded the second time. To fix that, only regenerate the
`proc_attributes_buf` when it doesn't already exist.

This matches the "ensure" behavior that already exists for the
`cache.final[subdiv].attributes_buf` buffer, so conceptually it
seems fine.

Pull Request: https://projects.blender.org/blender/blender/pulls/119795
2024-03-22 17:19:50 +01:00
Guillermo Venegas
7fabf0d896 Fix #119778: Crash in popovers that do not support refreshing
When creating popover with `UI_popover_begin` the popover block
is created just once without a region and since `UI_popover_begin` blocks
are not support refreshing, layout panels may not be compatible
in this kind of popover since open/close state cannot be refreshed either.

Only `UILayout.popover(...)` popovers are supported to have layout panels.

Pull Request: https://projects.blender.org/blender/blender/pulls/119796
2024-03-22 17:09:02 +01:00
Sybren A. Stüvel
aafe045fa0 Refactor: Anim, context function for active/editable/selectable actions
Just some simplification with early `return` / `continue` to reduce
indentation and cognitive complexity.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/119794
2024-03-22 16:49:12 +01:00
Jeroen Bakker
463856e6c6 GPU: Remove print statement when frame capturing
When frame capturing cannot be start an error is printed to the console.
Most of the time the issue is that you're not running from within a frame
capturing environment. For example not from your IDE/GPU debugger.

The print statement is often just not that useful. Especially when
running the `WITH_GPU_DRAW_TESTS` where it floods the console.

Pull Request: https://projects.blender.org/blender/blender/pulls/119783
2024-03-22 16:27:52 +01:00
Hans Goudey
3039ea02c6 Refactor: Simplify undo object list creation, use C++ Vector
Replace the use of the `LIB_TAG_DOIT` flag which cwas used to
only process each object data ID once with a Set. Return the objects
or bases in a Vector. Now we only iterate over the view layers bases
once instead of three times.

Pull Request: https://projects.blender.org/blender/blender/pulls/119788
2024-03-22 16:24:30 +01:00
Julian Eisel
b1db1702c6 Cleanup: Deduplicate UI list filtering checks
Followup to 303014bfac.
2024-03-22 16:04:03 +01:00
Sybren A. Stüvel
9f0cc7fe64 Anim: Bone subdivision, ensure bone names are sequential
Ensure that subdividing "Bone" results in a chain "Bone", "Bone.001",
"Bone.002", etc.

Before this commit the order would be "Bone", "Bone.004", "Bone.003",
etc.

This might break add-ons that assume to know the bone names before the
actual subdivision happens. This would always have been fragile, as
there may, for example, already have been a "Bone.001"; in that case
subdividing "Bone" would result in "Bone", "Bone.002", etc. Instead, the
parent-child chain should be followed.

Pull Request: https://projects.blender.org/blender/blender/pulls/119775
2024-03-22 15:26:22 +01:00
Sybren A. Stüvel
ce8a032ac2 Anim: fix bug in name uniqueness check for editbones
Fix the name uniqueness check for editbones. The function can receive a
"bone to ignore", which would not be properly ignored. If it was found
earlier in `armature->edbo` than another bone with the same name, the
name would incorrectly be marked as unique.

This issue only occurred when a "bone to ignore" was passed to the
uniqueness check. This never actually happens in the current code, but
that's going to change soon.
2024-03-22 15:21:36 +01:00
Christoph Lendenfeld
62f140e048 Anim: Add Sharpness to Ease operator
This PR extends the existing `Ease` operator with a sharpness property.

This means it has two parameters:
* Curve Bend: Define which key to favor. At 0 it's exactly between the two keys.
* Sharpness: Higher values make the change more abrupt.

During modal operation it is possible to switch the slider between those two by pressing `TAB`.

Pull Request: https://projects.blender.org/blender/blender/pulls/117287
2024-03-22 13:22:35 +01:00
Christoph Lendenfeld
646f9bcebe Refactor: Remove bAction argument from insert_keyframe
No functional changes intended.

The `insert_keyframe` function had a `bAction` argument that could be
a `nullptr`. If it was a `nullptr` it would be queried from the `ID`.

However in all cases where it is passed it is also gotten from the `ID`, making
the argument redundant.

This PR removes the argument to simplify the function.

Pull Request: https://projects.blender.org/blender/blender/pulls/119742
2024-03-22 13:18:32 +01:00
Julian Eisel
d470b65f6d Merge branch 'blender-v4.1-release' 2024-03-22 12:28:46 +01:00
Julian Eisel
303014bfac Fix #108078: Crash when inverting results in pose library sidebar
a958ae36e8 introduced support for UI lists to reference items that would
never be shown, regardless of filter settings. This was to skip assets
in the asset view template that were not of the requested type. UI list
sorting code wasn't updated to account for such items that should be
entirely ignored.

Pull Request: https://projects.blender.org/blender/blender/pulls/109157
2024-03-22 12:25:39 +01:00
Aras Pranckevicius
480f2f5bdd Cleanup: Remove unused AviCodecData
Non-ffmpeg movie support was removed in #118409, but I did not
notice that AviCodecData is now not needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/119777
2024-03-22 12:17:49 +01:00
Christoph Lendenfeld
24b4461be3 Anim: restrict keylist creation for NLA drawing code
When previewing an action in the NLA, the drawing code would
calculate the Keylist for the whole action regardless of what is shown.
This patch limits the keylist creation to only do it for the viewport range
increasing performance in the case when less than the whole action is visible.

whole F-Curve visible
* Before 60ms
* After 60ms

zoomed in
* Before 60ms
* After 1.6ms

Pull Request: https://projects.blender.org/blender/blender/pulls/119470
2024-03-22 12:09:39 +01:00
Pablo Vazquez
703435680d UI: Use icon for View in Graph Editor menu item
Use the Graph Editor icon for the "View in Graph Editor" operators,
to make a connection with the entry in the list of editors and the
View menu in the Dope Sheet.

Only use icon on the first item of the section, according to the HIG.
2024-03-22 12:01:29 +01:00
Omar Emara
ba3f37ac6b Cleanup: Remove unused function 2024-03-22 12:43:09 +02:00
Campbell Barton
b057e7f36d Extensions: improve the default value for the extensions module
By default a URL would be used for the module name of new remote repos,
the '.' characters were removed, joining words together.

Even though this often isn't user visible, it is used for extension
directory names, command-line access & may show up in error messages.
2024-03-22 19:37:08 +11:00
Leon Schittek
3d867af642 Fix #115899: Prevent transparent gaps on nodes
Add some padding to the different shapes used to draw nodes to
prevent transparent gaps between them.
Also improve positoning of the node's outline.

Pull Request: https://projects.blender.org/blender/blender/pulls/119001
2024-03-22 09:15:00 +01:00
Campbell Barton
01f8e20681 Cleanup: remove return value from ED_object_add_generic_get_opts
This was never false, many callers already ignored the return value.
2024-03-22 19:12:27 +11:00
Campbell Barton
1d9ed41560 Cleanup: minor edits to code-comments 2024-03-22 19:12:27 +11:00
Leon Schittek
5acf2984d4 Node Editor: Improve padding around buttons and sockets
Make the padding that is added above and below buttons and sockets
more consistent across nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/118972
2024-03-22 09:09:47 +01:00
Omar Emara
ac7309f95e Compositor: Add Float2 data type
This patch adds the Float2 data type to the MemoryBuffer class.

Needed by #119414.

Pull Request: https://projects.blender.org/blender/blender/pulls/119738
2024-03-22 08:51:24 +01:00
Campbell Barton
6198fac37e Cleanup: use UILayout.panel in extensions repo popover
Replace workaround that's no longer needed since popovers now support
collapsible sections.
2024-03-22 17:46:57 +11:00
Campbell Barton
02681bd44d UI: support layout panels in popovers
Make use of UI_popup_dummy_panel_set so layout panels can be used.
2024-03-22 17:36:45 +11:00
Campbell Barton
44defbd2c7 Extensions: add BLENDER_USER_EXTENSIONS user directory
Replace: `{BLENDER_RESOURCE_PATH_USER}/extensions`
With:    `{BLENDER_USER_EXTENSIONS}`

This follows BLENDER_USER_CONFIG & BLENDER_USER_SCRIPTS conventions.
Reading the environment variable and accessible via
`bpy.utils.user_resource('SCRIPTS')`
2024-03-22 16:08:25 +11:00
Campbell Barton
6bfc8612bf Cleanup: remove BLENDER_USER_AUTOSAVE
This was only used on WIN32 when the temporary directory didn't exist.
When the check was added [0] this made some sense because it relied on
`U.tempdir` existing, since then additional checks have been added to
ensure a temporary directory can be used. Further, this fall-back
location isn't documented in the user manual.

[0]: 615db01b01
2024-03-22 16:08:25 +11:00
Campbell Barton
e4b7f4d884 Suppress noisy color-management prints when using --command 2024-03-22 16:08:25 +11:00
Aaron Carlisle
02578117cd Merge branch 'blender-v4.1-release' 2024-03-21 23:48:14 -04:00
Aaron Carlisle
365f5f8823 Docs: Update rna manual references 2024-03-21 23:47:15 -04:00
Aaron Carlisle
476e16a999 Docs: Python API: Fixes for mobile browsers
- Collapse field list on mobile browsers
- Allow horizontal lists to collapse when they do not have enough space
- Break long code reference links
2024-03-21 23:37:44 -04:00
Hans Goudey
c61ecf1f40 Cleanup: Move Mesh edit_mesh pointer to runtime data
The edit mesh is never saved to files, so it should be in the runtime struct.

Pull Request: https://projects.blender.org/blender/blender/pulls/119766
2024-03-21 23:18:49 +01:00
Hans Goudey
b9ef66693a Fix #119754: Edit mode modifier deform data copy crash
Caused by ddcfc46ee6.

That commit assumed that the cage mesh always had the deformed
position and normal data. But that isn't true, as shown in the example
in the report. To fix the bug, simplify things, and make the goal clearer,
just copy the struct directly.

Pull Request: https://projects.blender.org/blender/blender/pulls/119755
2024-03-21 21:22:51 +01:00
Hans Goudey
575a5c0502 Fix #119744: Regression: Geometry Nodes: Default input not working
Caused by 25a10c211f.

The socket_type field for socket declarations wasn't set for declarations
created from the node group interface DNA tree structure. Arguably the
socket types should be set by the constructors, but setting it in one more
place isn't bad either, and is a simple fix for now.
2024-03-21 13:18:43 -04:00
Hans Goudey
040ff38fcd Fix: ID namemap assert in auto smooth versioning code
When "moving" the new node group to the same library as the object, its
original name has to be cleared from the name-map as well. That's
because there is a separate name-map for each library. I had this in
the original PR, but incorrectly removed this because I thought it was
unnecessary.

Pull Request: https://projects.blender.org/blender/blender/pulls/119747
2024-03-21 17:26:45 +01:00
Omar Emara
d8a89aa972 Compositor: Add MemoryBuffer constructor from size
This patch adds a new MemoryBuffer constructor from width and heights.
Useful for temporary allocations where we don't care about the area.
2024-03-21 17:35:19 +02:00