Commit Graph

115619 Commits

Author SHA1 Message Date
Sybren A. Stüvel
ff0a2d6dbf Anim: set default 'last slot handle' when versioning legacy Actions
Initialise the Action's `last_slot_handle` field to its default value.
The DNA 'defaults' system doesn't do this automatically when versioning
legacy Actions, so now it's done explicitly in the versioning code.

It's fine to only apply this to the existing versioning code, and not as
a new versioning rule. Existing slotted Actions should just keep that
field to whatever it is now.

The default value was introduced in be921b8ddb

Pull Request: https://projects.blender.org/blender/blender/pulls/131498
2024-12-06 17:03:37 +01:00
Alaska
afcad646bf Bug reporting: Install the Cycles debug script
cf8d31d41c added a debug script for
Cycles on Windows but didn't actually install it into the
Blender folder.

This commit fixes that by installing the script into the
Blender folder.

Pull Request: https://projects.blender.org/blender/blender/pulls/131348
2024-12-06 16:55:36 +01:00
Hans Goudey
4de00c1544 Cleanup: Move more ARegion runtime data out of DNA 2024-12-06 09:44:31 -05:00
Jeroen Bakker
09fe07b572 Vulkan: Pre-phase for initial uploading resources
Reduces the number of times a graphic context needs to be paused/resumed.
The scheduler reorders the nodes to put these initial data transfer nodes
to the start of the nodes that are about to be submitted.

Pull Request: https://projects.blender.org/blender/blender/pulls/131502
2024-12-06 15:34:03 +01:00
Hans Goudey
d9c7c90e45 Fix #131494: Editor merging can crash Blender
Missing copied runtime data in 129a2aa0f4.
2024-12-06 09:23:35 -05:00
Jeroen Bakker
d49218440f Fix #131474: Incorrect framebuffer configuration image engine overlays
When the overlay engine is used to draw over the image engine it uses
incorrect framebuffer configurations. It can attach and sample both the
depth buffer at the same time.

This PR fixes this by separating the output framebuffer into two. One
with and one without a depth buffer. And bind the correct one when
needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/131489
2024-12-06 15:00:53 +01:00
Hans Goudey
4d3664fc43 Cleanup: Remove accidentally included debug print 2024-12-06 08:16:14 -05:00
Hans Goudey
21aef81714 Cleanup: Use StringRef and std::optional for UI string arguments
- Gives O(1) access to string length in more cases
- Convenient string manipulation functions
- Clarify difference between "no string" and "empty string"
- Avoid the need for raw pointers in the API
- Shows which API string arguments are optional

Pull Request: https://projects.blender.org/blender/blender/pulls/131473
2024-12-06 14:08:10 +01:00
Jeroen Bakker
28ea56b680 ImageEngine: Incorrect state when no image selected
When no image is selected the tile drawing state would be used of the
last known image. This can lead to drawing the checked background
everywhere.

Detected when researching #131474

Pull Request: https://projects.blender.org/blender/blender/pulls/131487
2024-12-06 12:40:45 +01:00
Pratik Borhade
210cef1c6c Fix #131367: Grease Pencil: Multiframe does not turn off in object mode
Add extra condition of object mode in boolean `do_multi_frame`, so
`hide_onion/skip_strokes` will be true in object mode, this will exclude
other curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/131416
2024-12-06 11:22:07 +01:00
YimingWu
db1613d5a9 Fix #131429: Grease Pencil: Allow moving strokes into hidden layers
Grease Pencil strokes should be able to move into hidden but not locked
layers. Use `get_drawings_at` instead of only `editable` one to achieve
this.

Pull Request: https://projects.blender.org/blender/blender/pulls/131435
2024-12-06 10:44:17 +01:00
Omar Emara
1732467bc6 Refactor: Move Blur Gamma Correction to its own algorithm
Move the Gamma Correction pass of blur nodes into its own algorithm to
avoid code duplication and optimize pixel access, since gamma is now
applied for each pixel in the filter window. Gives a 15% improvement.

Pull Request: https://projects.blender.org/blender/blender/pulls/131480
2024-12-06 08:14:26 +01:00
YimingWu
393c75cc39 Fix #131415: Grease Pencil: Bone transform when setting layer parent
When setting layer parent, if the parent is an armature object, then the
child bone matrix needs to be taken into account for doing inverse
transformations. This fix allows grease pencil layer to be parented to
a bone correctly.

Pull Request: https://projects.blender.org/blender/blender/pulls/131432
2024-12-06 07:28:52 +01:00
YimingWu
e7c2c079c4 Refactor: Restructure object type conversion code
This patch restructures `object_convert_exec`, separated conversion
calls for different source/target object type combination for better
readability, keeping each route relatively simple and easy to navigate.

Resolves #130653.

-----------

NOTE:

- Grease Pencil part is still WIP, the Grease Pencil -> Curves -> Mesh two stage conversion is not included in this new code yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/130668
2024-12-06 07:21:09 +01:00
Hans Goudey
efb808bffd Cleanup: Remove unused function
Missing change from f7089519e0.
2024-12-05 21:47:28 -05:00
Hans Goudey
cec874fed2 Fix: Add missing translation for UI text 2024-12-05 21:31:26 -05:00
Hans Goudey
f7089519e0 Cleanup: Remove unused UI function declaration 2024-12-05 21:31:25 -05:00
Harley Acheson
7c3db55b29 Refactor: Simplify Block Re-centering
PR #129125 allowed the movement of centered dialogs, like About and
Splash, without them snapping back to their original positions. But
that change was more complex than necessary. This returns
interface_region_popup.cc to exactly as it was before any of this, and
interface.cc gets simpler too. In a nutshell recentering these dialogs
is a lot easier that seemed at first.

Pull Request: https://projects.blender.org/blender/blender/pulls/131464
2024-12-06 00:57:32 +01:00
Sean Kim
9b9da3e5af Fix: Mesh Filter undo panel not undoing previous change
The `exec` callback was missing a call to `undo::push_end`, meaning that
using the undo panel would not undo the prior step, causing an
accumulative effect.

Pull Request: https://projects.blender.org/blender/blender/pulls/131466
2024-12-06 00:45:21 +01:00
Clément Foucault
52463a5f0b GPU: Remove unused GPUDrawList API
This was only used by the legacy draw manager.
This one has already been removed.
2024-12-05 23:26:29 +01:00
Clément Foucault
3e9a2fbf23 Cleanup: Formating 2024-12-05 23:17:44 +01:00
Clément Foucault
994c43413a Metal: Remove SSBO Vertex Fetch
This API was used as a workaround to the lack of
geometry shader. It has been rendered redundant
since the introduction of #125782.
2024-12-05 22:58:52 +01:00
Sean Kim
8d9bf47ba6 Sculpt: Prevent entering mode when object is invisible
This is already prevented in the UI in both the top left mode selector
and the pie menu, this commit adds an actual check to avoid being put
into an invalid state by another operator or script.

Pull Request: https://projects.blender.org/blender/blender/pulls/130769
2024-12-05 22:48:20 +01:00
Clément Foucault
35c393acd6 Cleanup: DRW: Remove legacy resource handle
Pull Request: https://projects.blender.org/blender/blender/pulls/131456
2024-12-05 22:28:33 +01:00
Clément Foucault
db12edd825 Cleanu: DRW: Remove unused types 2024-12-05 22:27:38 +01:00
Clément Foucault
e2fb51b2e8 DRW: Remove legacy object data 2024-12-05 22:27:38 +01:00
Clément Foucault
897d24d193 DRW: Remove legacy view layer attribute support 2024-12-05 22:27:38 +01:00
Clément Foucault
35beef96fd DRW: Remove legacy DRWPass structures and storage 2024-12-05 22:27:38 +01:00
Clément Foucault
459c65f993 Cleanup: DRW: Remove legacy object attributes 2024-12-05 22:27:38 +01:00
Clément Foucault
04282ef91e DRW: Remove draw lists 2024-12-05 22:27:38 +01:00
Jacques Lucke
7bd120955b Nodes: use topology cache directly for is_linked property in Python
Not sure if this makes a practical difference currently. However, it's good
to avoid depending on `SOCK_IS_LINKED` which is phased out more and more.

The topology cache should always be more up to date.
2024-12-05 20:49:55 +01:00
Hans Goudey
2a8f671070 Cleanup: Formatting 2024-12-05 14:47:59 -05:00
Jacques Lucke
680dbe70ae Fix: Nodes: use name as fallback for socket identifiers
This was probably accidentally broken in 7348e670b3.
2024-12-05 20:28:27 +01:00
Jacques Lucke
36b7cda4db Fix #89109: missing node tree update when NodeSocket.enabled is changed 2024-12-05 20:17:31 +01:00
Clément Foucault
568d45a90d Cleanup: Overlay: Remove global DST access through DRW_text_cache_ensure 2024-12-05 20:03:10 +01:00
Clément Foucault
9c7e18f515 DRW: Remove legacy state tracking
Fixes assert caused by uninitialized memory.
2024-12-05 20:03:10 +01:00
Clément Foucault
f9107c4f25 DRW: Remove legacy instance buffers
No functional change expected.
2024-12-05 20:03:10 +01:00
Clément Foucault
7271a6d7f9 DRW: Remove draw_manager_exec.cc
This moves the state reset to be done by
the `StateSet` command.
2024-12-05 20:03:10 +01:00
Clément Foucault
bcf297d971 Cleanup: DRW: Remove unused code 2024-12-05 20:03:10 +01:00
Clément Foucault
d8ca7dc743 DRW: Remove legacy DRWView
No functional change expected.
2024-12-05 20:03:10 +01:00
Clément Foucault
490cc5d011 DRW: Remove legacy clipping API
No functional change expected.
2024-12-05 20:03:10 +01:00
Clément Foucault
2a2c125301 DRW: Fix memory leak 2024-12-05 20:03:10 +01:00
Clément Foucault
ad770b0359 DRW: Remove more DRWView getters
No functional change expected.
2024-12-05 20:03:10 +01:00
Clément Foucault
1f9ecca872 DRW: Remove DRW_view_*mat_get
No functional change expected.
2024-12-05 20:03:10 +01:00
Clément Foucault
880d7170a2 DRW: Remove DRW_view_default_set/get and DRW_view_set/get_active
No functional change expected. But rendering is likely broken since
default view is not set the same way.
2024-12-05 20:03:10 +01:00
Clément Foucault
6e12cce8a6 DRW: Move offset data computation to View to use it with select_engine
This avoid code duplication.
2024-12-05 20:03:10 +01:00
Aras Pranckevicius
48c1157a41 Cleanup: compiler warning fix
size_t argument is %zu, not %zi
2024-12-05 20:31:15 +02:00
Falk David
949a7e6a60 Fix: Grease Pencil: Separate by Selection issues
Issues with the "Separate by selection" operator. Reported by the Blender studio.
There were multiple problems in this code.
1. When a new object is created, the parameters are not copied.
2. When a new layer in a new object is created, the parameters are not
   copied.
3. The code to transfer the layer attributes was not working correctly.

Fixed all the issues above. The layer attributes are now transfered once
after all layers have been added.

Pull Request: https://projects.blender.org/blender/blender/pulls/131449
2024-12-05 18:18:50 +01:00
Jacques Lucke
b36bf15e28 Geometry Nodes: improve detecting data-block dependencies
Previously, the data-block dependencies were always detected in
`update_depsgraph` in `MOD_nodes.cc`. This would only be called when something
called `DEG_relations_tag_update` before. We don't want to trigger a depsgraph
rebuild after each operation in the node editor, as that would be expensive.
However, that also meant that we often had to add data-block dependencies that
are not actually used, but might be used if the user changed e.g. a link. A
typical example for that is a object socket that has a default value, but the
socket is also linked.

Now, the dependencies referenced by the node tree are collected by the node tree
update code which runs after all changes. This way we can detect whether the
dependencies have changed. Only if they have changed, a depsgraph rebuild is
triggered. This now allows also taking into account the mute status of nodes and
whether an input is linked.

There are still more things that could be taken into account. Most obviously
whether a node is connected to an output. This can be done later. The most
tricky aspect here is probably that we also have to consider all viewer nodes as
output, because at the time the node runs, it's not known which viewer will
actually be used (which depends on other editors).

This also cleans up some special cases we had for e.g. the scene time node where
we always had to trigger a depsgraph rebuild when it was added/removed because
of its time dependence. This is now part of a more general system.

This fixes #109219.

Pull Request: https://projects.blender.org/blender/blender/pulls/131446
2024-12-05 18:02:14 +01:00
Harley Acheson
0e1313483a Fix #99157: Allow Shortcut on Auto Keyframe
If toggling the status of the Auto Keyframe button with a custom
keyboard shortcut it does not update and display the current status of
the button - it looks like nothing has changed.  This PR just updates
the button correctly when used this way. Just the addition of a
RNA_def_property_update.

Pull Request: https://projects.blender.org/blender/blender/pulls/131406
2024-12-05 17:27:18 +01:00