Commit Graph

150077 Commits

Author SHA1 Message Date
Lukas Tönne
7c903f9b83 Revert "update"
This reverts commit c4f99bcb6c.
2024-07-22 09:54:02 +02:00
Lukas Tönne
c4f99bcb6c update 2024-07-22 09:52:19 +02:00
John Kiril Swenson
de443e038c VSE: Fix linked time option for sequencer select
When 7afcfe1 removed the use of `startdisp` and `enddisp` for everything
but effect strips, not all of these variables were replaced in
`select_linked_time`, breaking the option. This option is used for the
select operator with the ctrl modifier in both LCS and RCS default
keymaps.

This patch fixes the bug, and also cleans up the old C code in the
function, replacing it with more robust logic.
- The new logic allows for the "linked time" option to be combined with
  the "toggle" option -- old logic only propagated deselects if both
  left and right handles were aligned.
- New logic makes sure that a selection is only propagated along the
  side that you click by adding the selection handle as an argument.
  (Before, you could align two strips on the left side only, "regular" select the
  left handle of the top one, then "linked time" select the right
  handle, and it would erroneously propagate the left handle selection
  too).

This patch also fixes a bug where "both handle" selection would not work
if the linked time option was set, by making sure that if `seq2` is set
in `StripSelection`, then `select_linked_time` is run once more.

Pull Request: https://projects.blender.org/blender/blender/pulls/125039
2024-07-22 08:57:35 +02:00
Campbell Barton
68c2c9cb26 Fix #125142: Legacy add-ons don't install when "bl_info" is first
When "bl_info" was on the first line, the legacy add-on would not
install. Correct the check which would also incorrectly detect legacy
add-ons when "bl_info" wasn't found at all.
2024-07-22 13:03:36 +10:00
Campbell Barton
d40c2705a1 Fix #125202: Manpage fails to generate
Support CMake's `DESTDIR` environment variable,
used by some build scripts.
2024-07-22 12:52:41 +10:00
Campbell Barton
9a568f2227 Fix #124769: Startup notification error with multiple remote repos
Regression in [0] caused extensions checks used the same directory & URL
for all remote repositories when checking for updates on startup.

[0]: d2049f0aa7
2024-07-22 12:07:05 +10:00
YimingWu
d4aecd93e7 Fix #125023: Use default easing of 0.0f for pose bendy-bones
Default easing values for pose bendy-bones should be 0.0f since it will
be added on top of edit mode values which defaults to 1.0f. This will
make sure that `Reset Default Value` gives expected result and be
consistent with `Clear Scale` operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/125204
2024-07-22 03:39:52 +02:00
Harley Acheson
f238b44dee UI: Close Source Window When Docking Singleton to Empty Space
Docking allows dragging an area out of a window to empty space to make
a new window. And dragging back will close that window if empty.
However dragging an area that is alone in its window to empty space
does not close the source window so you get a duplicate. This PR just
closes that window (when empty) which feels much more natural.

Pull Request: https://projects.blender.org/blender/blender/pulls/125201
2024-07-22 03:23:42 +02:00
Campbell Barton
e2bc41598d Fix drivers showing "Python restricted for security" when they weren't
Regression from [0], drivers were tagged as being disabled with a flag
that was never cleared. Causing the label to be displayed for files
where the expressions were enabled and in use.

Resolve by clearing this flag on file load and when re-compiling
expressions - since an expressions block flag may be cleared if it
becomes a simple expression.

[0]: 1a8053939b
2024-07-22 10:39:50 +10:00
Harley Acheson
1404a95dde UI: Don't Dim Docking Remainders
When docking an area into a portion of another area, the target area is
split. Currently the new section shows an icon that is bold and
outlined, while the remaining area shows a dimmed icon. This dimming
doesn't make a lot of sense since it is not closed, and it is easy
to tell the source from target with other clues. Conversely, dimming
the icon makes it harder to tell what is going on. This PR just makes
both icons show at the same opacity.

Pull Request: https://projects.blender.org/blender/blender/pulls/125199
2024-07-22 02:35:47 +02:00
Campbell Barton
f1e5263423 Cleanup: spelling in comments 2024-07-22 10:16:55 +10:00
Campbell Barton
5794913fb8 Cleanup: CMake file indentation, wrap long lines 2024-07-22 09:58:45 +10:00
Campbell Barton
d3fbc56021 Cleanup: various cppcheck warnings
Avoid shadowing, use const args & match function & declaration args.
2024-07-22 09:58:43 +10:00
Campbell Barton
f85c29dc5c Cleanup: move Wayland's private window member into GWL_Window
Keep private options in one place: GWL_Window.
2024-07-22 09:58:41 +10:00
Jason Fielder
9059d4f020 EEVEE Next: Add imageStore/LoadFast ops to Film Shader
Add fast image writing and reading variants for film shader passes.
These variants do not perform range checking on values
and should only be used in cases where the written texel is
guaranteed to be in range. This eliminates additional
branching and simplifies shader logic.

Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/121114
2024-07-21 17:13:07 +02:00
Miguel Pozo
db286bbb7f Cleanup: Remove unused DRW_shader functions
These are not used anymore after removal of EEVEE-Legacy

Pull Request: https://projects.blender.org/blender/blender/pulls/125099
2024-07-21 16:59:51 +02:00
Aras Pranckevicius
fe1bf4897d Fix #120253: Batch export of STL files incorrectly handles .stl suffix
When path to export is in the form if "/some/folder/.stl", any
regular path functions (BLI_path_suffix, BLI_path_extension_replace
etc.) would not treat it as having ".stl" extension, but rather
as a hidden file called ".stl".

And so BLI_path_suffix would turn it into "/some/folder/.stlCube".
To prevent this, detect this exact case when the whole basename
is just ".stl", and remove the ".stl" part before using other path
functions.

Pull Request: https://projects.blender.org/blender/blender/pulls/125179
2024-07-21 16:24:45 +02:00
Aras Pranckevicius
686e22bfe5 Fix: VSE initial "fake" retiming keys not displayed
After ce9becae4c the "fake" initial retiming keys were not rendered
properly. Fix this by undoing the part of can_draw_retiming that
added check for SEQ_retiming_keys_count.
2024-07-21 13:54:01 +03:00
Jacques Lucke
a0068f2b3b Curves: store active attribute index on curves geometry
When attempting to replace `AttributeOwner` with `AttributeAccessor`, we ran into
the problem that the active attribute index is not stored on the `CurvesGeometry`.

The index can be moved between the two places without breaking forward- or backward-compatibility.

Pull Request: https://projects.blender.org/blender/blender/pulls/125059
2024-07-21 09:35:37 +02:00
Andrej730
627bd7e51c Fix: API docs: bpy.app.timers function argument types
Fixed the "function" argument types of `is_registered` and `unregistered`
to be consistent with the correct typing from `bpy.app.timers.register`

Pull Request: https://projects.blender.org/blender/blender/pulls/125052
2024-07-20 14:52:37 +02:00
casey bianco-davis
0e442c2090 GPv3: Edit mode overlay curve lines and bézier handles.
In edit mode this display lines with curves, i.e this can show bézier curves and bézier handles.

Pull Request: https://projects.blender.org/blender/blender/pulls/122966
2024-07-20 13:30:27 +02:00
Campbell Barton
f5ec03698c License headers: add SPDX headers 2024-07-20 13:55:45 +10:00
Campbell Barton
a616799607 Fix window activation on startup with Wayland & libdecor
Libdecor would attempt to activate the window before it was
known to the window manager, causing the GHOST_kEventWindowActivate
event not to be sent.

Resolve by skipping window manager activation when the window has
not yet been initialized.
2024-07-20 13:55:43 +10:00
Campbell Barton
cb4aa93480 Fix #120465: Crash using the snap tool with Wayland & Libdecor
The snapping checked use the wmWindowManager::winactive without a null
check. This is documented to be NULL at times.

Resolve by using the context's window which makes sense as all other
screen variables are already using the context.

Libdecor is also missing window activation on startup,
this will be fixed separately.
2024-07-20 13:55:41 +10:00
Campbell Barton
518a83104c Cleanup: resolve missing declaration warning 2024-07-20 13:55:39 +10:00
Sean Kim
3a22f3e391 Fix: Linux build error in previous commit
Faulty commit is 9c79acf9b

Pull Request: https://projects.blender.org/blender/blender/pulls/125119
2024-07-20 03:44:49 +02:00
Jesse Yurkovich
cea81b4950 CMake: Fix some build trouble from recent TBB change
Ensure that both `makesdna` and `makesrna` can find the right runtime
binaries when they're executed during the build process.

This seems to have affected some combination of lite-debug builds.
Though full-release builds were probably affected as well if starting
from scratch.

Pull Request: https://projects.blender.org/blender/blender/pulls/125116
2024-07-20 03:06:36 +02:00
Sean Kim
9c79acf9b8 Cleanup: Specialize vert_is_boundary
Pull Request: https://projects.blender.org/blender/blender/pulls/125118
2024-07-20 02:14:08 +02:00
Sean Kim
9e1364fc04 Cleanup: Specialize vert_all_faces_visible_get
Pull Request: https://projects.blender.org/blender/blender/pulls/125117
2024-07-20 01:47:59 +02:00
Sean Kim
4d1dda0721 Cleanup: Move Sculpt boundary functions into a namespace
Pull Request: https://projects.blender.org/blender/blender/pulls/125108
2024-07-20 00:41:58 +02:00
Jesse Yurkovich
ec4fc2d34a CMake: Modernize the optional TBB dependency
This continues the cmake modernization effort and introduces support for
allowing our optional dependencies to integrate properly. TBB is added
here as it's proven troublesome to maintain correctly.

Currently the only Blender project which uses the TBB headers directly
is `blenlib`.  However, all downstream projects which require blenlib as
their dependency, and wish to properly make use of its threading
facilities, needed to define various TBB items in their CMake files. Not
only is this unnecessary and arcane, but several projects didn't do this
and ended up not using threading as well as producing ODR violations
along the way[1].

This PR makes TBB a modern dependency and exposes it PUBLIC'ly from
`blenlib`.  All downstream projects which depend on blenlib will now
receive everything they require from TBB automatically. This includes
the `WITH_TBB` define, the headers, and the library itself.

[1] blender/blender@05241f47f5

Pull Request: https://projects.blender.org/blender/blender/pulls/124916
2024-07-19 23:30:56 +02:00
Harley Acheson
108b71047a UI: Remove "Widget Label" Text Style
This PR removes the "Widget Label" text style, found in Preferences /
Themes / Text Style. This results in both labels and the text found in
input boxes sharing settings. This results in a slight loss of
customization but it isn't that useful to have these things separate
and results in code complication and errors.

Pull Request: https://projects.blender.org/blender/blender/pulls/122898
2024-07-19 21:57:49 +02:00
Sean Kim
cdf66f5711 Cleanup: Add detail to sculpt boundary methods
Pull Request: https://projects.blender.org/blender/blender/pulls/125106
2024-07-19 21:16:19 +02:00
Jacques Lucke
23eb662cb8 Cleanup: extract functions for evaluating function on single values or fields 2024-07-19 20:32:12 +02:00
Ben-7
be6d82a485 Cmake: Improve finding openmp with clang-cl compiler on windows
When having several clang versions installed cmake would default
to the last llvm directory in the registry when finding the openmp
libraries. Two problems with that are :

1- The registry entry may not exist
2- Even if it exists it may not point to the right folder for the
   Current compiler.

This PR changes the behaviour to look relative to the clang binary
to find the openmp libraries.

Pull Request: https://projects.blender.org/blender/blender/pulls/125101
2024-07-19 20:03:47 +02:00
Sean Kim
727007c57b Fix #124853: Unable to change vertex paint brush after shift-LMB
Toggling the smooth brush with Shift-LMB would directly modify the
overall paint mode, both performing the incorrect smooth function and
preventing setting the correct asset.

Pull Request: https://projects.blender.org/blender/blender/pulls/125027
2024-07-19 19:52:58 +02:00
Falk David
5864e9372d Fix: Dopesheet Filter checks for legacy Grease Pencil type
Since `bpy.data.grease_pencils` is now legacy, we need to
look at `bpy.data.grease_pencils_v3` instead.
2024-07-19 18:01:47 +02:00
Falk David
79744ef360 Fix: 2D Animation Template: Update Factory Startup
The function was iterating over the legacy ID type.
Use `bpy.data.grease_pencils_v3` instead.
2024-07-19 18:01:47 +02:00
Falk David
a5c4218b02 Fix: Outliner: Grease Pencil object filter
The filter for grease pencil objects wasn't showing up.
The code was still checking for the legacy type.
Now, we're checking for the right object type and
are also looking at the `bpy.data.grease_pencils_v3`
list to make the checkbox show up in the UI.
2024-07-19 18:01:47 +02:00
Sebastian Parborg
c09ed8a04f Fix: GPU resourses were not set to nullptr after deleting, resulting in heap-use-after-free
The code has nullptr checks to make sure it doesn't try to use freed or unitiallized variables.
However the when freeing the data, the code doesn't assign the pointer to be null.
Now set them to be null

Pull Request: https://projects.blender.org/blender/blender/pulls/125090
2024-07-19 17:44:22 +02:00
Richard Antalik
fc8660999a Cleanup: Make format 2024-07-19 17:17:56 +02:00
Nathan Vegdahl
9f944fe53c Fix: key insertion sometimes treats layered actions as legacy actions
When the Baklava experimental flag was disabled, attempting to insert
a key on a layered action would erroneously use the legacy action key
insertion code path. This was simply due to the condition for which
code path to use being incorrect.

This commit fixes that condition.

Pull Request: https://projects.blender.org/blender/blender/pulls/125055
2024-07-19 16:56:22 +02:00
Matthieu Carteron
3e12a6d622 Sound: Add channels and sample rate properties to mixdown operator
Previously, they were taken from the FFMPEG parameters, from the Output
panel, and this was not very convenient.

Co-authored-by: Matthieu Carteron <rubisetcie@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/124988
2024-07-19 16:33:54 +02:00
Clément Foucault
d2fdb22b93 GPU: Add support for in shader printf
This allows much easier debugging of shader programs.

Usage is as simple as adding `printf` calls inside shaders.
example: `printf("Formating %d\n", my_var);`

Contrary to the `drw_print`, this is not limited
to draw manager shader dispatch/draws. It is compatible
with any shader inside blender.
Most notably, this doesn't need a viewport to display.
So this can be used to debug render pipeline.

Data formating is currently limited to only `%x`, `%d`,
`%u` and `%f`. This could be easily extended if this is
really needed.

There is no type checking, so values are directly reinterpreted
as specified by the printf format.

The current approach for making this work is to bind a
storage buffer inside `GPU_shader_bind`, making it
available to any shader that needs it. The storage buffer
is downloaded back to CPU after a frame or a render
step and the content printed to the console.

This scheduling means that you cannot rely on these printfs
to detect crashes. We could add a mode to force flushing
at shader binding to avoid this limitation.

The values are written from the shaders in binary form and
only formated on the CPU. This avoid issues with manual
printing like with `drw_print`.

Pull Request: https://projects.blender.org/blender/blender/pulls/125071
2024-07-19 15:48:00 +02:00
Julian Eisel
fba6e050c2 Revert "Fix #120466: Crash when opening file with inactive asset browser"
Two issues:
- The `AS_asset_libraries_available()` function would always return
  true, because `AssetLibraryService::get()` would actually allocate the
  service if not available.
- The issue would still happen if another code path would call
  `AssetLibraryService::get()` after the service was destroyed, and
  before the UI data was destroyed. This was happening now, so the crash
  was back, see #124167.

I'm working on a new fix, for now, remove this broken one.
2024-07-19 15:03:50 +02:00
Richard Antalik
63db751cde Fix #124623: Strips are not deselected as expected
With 2.7x keymap, clicking on selected strips does not de-select others.

Seems to be caused by leftover code, when some selection functionality
was moved to `SEQUENCER_OT_select_handle`

Pull Request: https://projects.blender.org/blender/blender/pulls/124779
2024-07-19 13:13:32 +02:00
Philipp Oeser
71e1d795b3 Fix #124990: GP Draw mode always adds black color to a palette
Caused by fe0e2907b3

Prior to that commit, adding palette colors was only working because
`BKE_paintmode_get_active_from_context` was falling through to
`PaintMode::Texture2D` which then would do its thing in
`palette_color_add_exec`

To resolve, now respect `PaintMode::GPencil` as well there.

Pull Request: https://projects.blender.org/blender/blender/pulls/125062
2024-07-19 12:29:55 +02:00
Philipp Oeser
61b8397174 Modeling: remove unused Knife cut operator
This got superseeded by the "super knife" in 421823e34e 14 years ago
it seems, it cannot be executed atm. (and even if reactivated, it
crashes in multiple places).

Stumbled over this while checking on usages of
#BM_custom_loop_normals_to_vector_layer /
#BM_custom_loop_normals_from_vector_layer (to add this to more tools),
and apparently this outdated piece of code got an update in 93c8955a72
:) -- work on adding this to our "real" Knife is upcoming in another
PR...

Pull Request: https://projects.blender.org/blender/blender/pulls/124970
2024-07-19 11:42:30 +02:00
Jacques Lucke
8bf8542ffe Fix: missing node tree update after deleting library
Node trees have to be updated after remapping IDs in the node tree. This will,
among other things, create/delete sockets on group nodes. Furthermore, this also
tags the depsgraph so that objects that (indirectly) depend on the node group
output are reevaluated.

The tagging of node trees to update already happens in
`foreach_libblock_remap_callback_apply` for a while, the issue is that the
actual propagation of tagged changes does not happen currently.

I was checking this because Simon ran into some bug after deleting libraries. He
couldn't reproduce it anymore, but my best guess right now is that it is caused
by a missing update.

Pull Request: https://projects.blender.org/blender/blender/pulls/124980
2024-07-19 11:20:06 +02:00
Campbell Barton
fd4fb94751 PyAPI: Enable audaspace when building blender as a python module
Without audaspace, the sequence editor can't load audio files
which can be useful from Python.

Resolves #125007.
2024-07-19 14:37:49 +10:00