Commit Graph

128212 Commits

Author SHA1 Message Date
Hans Goudey
b838c34afa Cleanup: Remove unused sculpt mask expand operator
The "mask expand" operator from 0083c96125926d4e7652 is not exposed in
the UI and is redundant with the addition of the more general "expand"
operator from 82e7032477283a9bf27. The latter commit even mentioned
that the first mask expand operator was made obsolete.

Pull Request: https://projects.blender.org/blender/blender/pulls/112726
2023-09-22 17:30:28 +02:00
Hans Goudey
c6380d772c Fix: Debug build error after recent cleanup
Caused by 8954b70d4943e892adfc65bd286767f4feecec04
2023-09-22 11:22:30 -04:00
Hans Goudey
5c9b628596 Fix: Extra period in menu descriptions 2023-09-22 11:20:15 -04:00
Leon Schittek
0edd60b4c7 Fix: UI: Don't show padding buttons in menus
Padding buttons are supposed to be invisible but were drawn like
regular menu items.

For the most part it doesn't make a difference, since most themes
use transparent menu items anyway.
But e.g. the "White" theme is using opaque menu items, which
would causes the padding button to overlap at the corner when
the roundness of the menu background is very high.

Pull Request: https://projects.blender.org/blender/blender/pulls/112731
2023-09-22 17:19:33 +02:00
Philipp Oeser
29dfb73eb7 Fix: bl_previews_render.py still using lamp.falloff_type
This was removed in 57d85b32a9aaa71b50c15d19f432462fa9fc4830.

Pull Request: https://projects.blender.org/blender/blender/pulls/112728
2023-09-22 17:17:05 +02:00
Ray Molenkamp
974bb38c51 CMake: Update platform_win32.cmake with webp 1.3 support
WebP 1.3 changed the library filenames to include a lib prefix and
added an additional library.
2023-09-22 08:59:03 -06:00
Lukas Tönne
354915cf3c Nodes: revert the inline (pass-through) socket feature
Inlined sockets in the same vertical space are no longer supported.
This removes `input_output` socket declarations, the inlining feature in
node drawing, and the `Both` option for node group interface sockets.

Versioning code splits existing node group sockets into individual
sockets again. Unfortunately some links may get lost in versioning files
using the feature, because of an unnoticed bug: Socket identifiers have
to be unique in the node group items list but inlined input/output
sockets have the same identifier. This still works for most situations
because uniqueness is only required within input/output lists. Creating
proper unique identifiers will discard any link from the previous output
socket. This cannot easily be fixed without `after_linking` versioning
code, which should be avoided.

Pull Request: https://projects.blender.org/blender/blender/pulls/112560
2023-09-22 16:56:59 +02:00
Ray Molenkamp
3735a4d104 deps_builder: Fix missing Webp support in OIIO build on windows
webp 1.3 changed the filenames on windows to include a `lib` prefix
(ie libwebp.lib rather than webp.lib) now this is a common thing
on linux and cmake has a `CMAKE_FIND_LIBRARY_PREFIXES` variable that
has a list of prefixes to look for during a `find_library` call.

`CMAKE_FIND_LIBRARY_PREFIXES` gets set during the call to the
`project` method in the main CMakeLists of a project. Now for windows
`lib` is *not* a common prefix by CMake, and it doesn't add "lib" to
CMAKE_FIND_LIBRARY_PREFIXES during that call.

so find library doesn't look for it, the libs are not found and an
unhappy time is had by all. Now the most obvious solution would be to
pass `-DCMAKE_FIND_LIBRARY_PREFIXES=lib` to CMake to sidestep this
however, the `project` call will set the variable overwriting
anything you passed through the CLI.

So the fix here is to have `find_library` counter-intuitively look
for both `libwebp` and `webp`
2023-09-22 08:47:23 -06:00
Ray Molenkamp
af9523d7c2 deps_builder: OIIO validate deps at configure time
The last webp update changed the filenames of the webp libraries
on windows causing oiio not to find them and oiio silently build
without webp support, which only came to light after all of
blender was build and a test failed.

This change makes the OIIO validate and error out if certain
dependencies are not found at configure time so these mistakes
are caught early.
2023-09-22 08:32:26 -06:00
Hans Goudey
2419acf756 Nodes: Move float values to "Value" node with link-drag-search
This was handled for other nodes in 9726e4a0adb30e452327, but the older
"Value" node stores its value differently, so that was left for later.

Pull Request: https://projects.blender.org/blender/blender/pulls/112722
2023-09-22 15:45:05 +02:00
Hans Goudey
8954b70d49 Cleanup: Small changes in node interface item addition
- Use `StringRef` over `StringRefNull`, since it handles `nullptr` in
  its constructor and gives more flexibility about the string's source.
- Change `const char *` to `StringRef` as well, for improved ergonomics
  and efficiency.
- Move `add_interface_socket_from_node` to a .cc file. It's not small
  or performance sensitive enough to be inlined.
- Avoid allocating empty strings for item descriptions.
- Allocate with `BLI_strdupn` to avoid unnecessary `strlen` calls.
- Move a bit more code into a proper namespace.

Pull Request: https://projects.blender.org/blender/blender/pulls/112721
2023-09-22 15:43:59 +02:00
Philipp Oeser
1b7d257ce5 Fix #112664: Expand face sets freeze when cursor is on mesh boundaries
Mistake/typo in f4505e7b0ac (not actually setting the bit).

Pull Request: https://projects.blender.org/blender/blender/pulls/112706
2023-09-22 14:52:07 +02:00
Hans Goudey
7b597c2bef Cleanup: Add nodiscard to BitSpan and BitVector lookup methods
To avoid situations where `operator[]` is used but one forgets to type
`.set(...);`, like #112706.
2023-09-22 08:13:17 -04:00
Hans Goudey
8a9dad1f2c Cleanup: Remove unnecessary struct keyword from newly C++ headers
Also remove `void` in `(void)`.
2023-09-22 08:08:19 -04:00
Pratik Borhade
bb39f4fa41 Fix #112441: Restore Key Map Item does not restore the active property
`Restore item` button is not resetting `active` property when keyitem is registered
as `inctive` by default. To fix this, clear `inactive` flag then use default keyitem's
flag to correctly restore the keyitem.

Pull Request: https://projects.blender.org/blender/blender/pulls/112497
2023-09-22 12:58:02 +02:00
Lukas Tönne
0d708cd68a Fix incorrect item position returned for items in the root panel
Sockets in the layout would always have position 0, which breaks
operators relying on the position for moving items.

Pull Request: https://projects.blender.org/blender/blender/pulls/112714
2023-09-22 12:18:14 +02:00
Philipp Oeser
8094309474 Fix: Changing theme color for recent additions doesn't save
affected were:
- VSE Transition color
- Enum Highlighting color

which missed version bumps from 5f0a8759b004 / a7ad0ad8fb73.

Similar to 179c41911529b7bcb7c01936a473df8db67e5a43.

Pull Request: https://projects.blender.org/blender/blender/pulls/112615
2023-09-22 12:13:32 +02:00
Alexander Gavrilov
be7e2d01a8 Python: support the step and precision arguments in rna_idprop_ui_create.
Support the property settings that were implemented some time ago.

As an aside, change the defaults for min and max to integers: integer
values can be implicitly cast to float, but the reverse results in an
error. Also, pointer properties don't support a default value.

Pull Request: https://projects.blender.org/blender/blender/pulls/112712
2023-09-22 12:07:26 +02:00
Brecht Van Lommel
70ac1e5df1 Fix #112645: switching view transform unnecessarily resets look
AgX and Filmic have different looks in the configuration, but the looks
share the same UI name and purpose. So we can switch to the
corresponding look when switching view transforms.

Thanks to Yiming Wu for helping track down the problem.

Pull Request: https://projects.blender.org/blender/blender/pulls/112686
2023-09-22 12:05:55 +02:00
Jason Fielder
c9f44a2f9d EEVEE Next: Add info count for shader optimization jobs in progress
Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/112533
2023-09-22 11:38:06 +02:00
Jacques Lucke
dacb768cb6 Geometry Nodes: use lazy evaluation in repeat zone
The goal is to make the evaluation of repeat zones more efficient by making
use of the lazy-function evaluation system. Performance is improved in two ways:
* Unnecessary nodes are not evaluated anymore. E.g. if a repeat zone outputs two
  geometries but only one of those is actually used, the other one will not be
  computed anymore.
* Support evaluating different iteration indices at the same time on different threads.

It is possible that some uses of repeat zones become slower with this refactor,
especially when each iteration does very little work and there are a lot of iterations.
The old implementation was not optimized for this use case either but now there
is a bit more overhead constant overhead per iteration than before.

On the bright side, this change can result in some very significant speedups when
some computations can be skipped. See #112421 for some example setups.

There is one todo comment for adding back-links for socket usages. Properly linking
those up can result in better (shorter) life-times for anonymous attributes. Even without
that, performance is already better than before.

The implementation reuses the existing lazy-function graph system for the repeat
zone, by building a dynamically sized graph based on the number of iterations.

Building a lazy-function graph makes it possible to use the lazyness and multi-threading
features of the lazy-function graph executor. This is much easier than reimplementing
this behavior for repeat zones specifically (hence there was only single-threaded eager
execution before).

Pull Request: https://projects.blender.org/blender/blender/pulls/112421
2023-09-22 08:58:16 +02:00
Jeroen Bakker
7b379eb657 Cleanup: Make format 2023-09-22 08:32:03 +02:00
Campbell Barton
94a8dafab0 BLI_string_cursor_utf8: assert the cursor isn't negative 2023-09-22 14:51:53 +10:00
Campbell Barton
7a4aa60d4e Fix word selection in the console failing past line end
Selecting a word when the cursor was past the line end wasn't working.
2023-09-22 14:40:44 +10:00
Campbell Barton
25179efb51 Fix word selection at the beginning & end of the string
Double-clicking on a works for 3D text & the Python console failed
when the cursor was at the very beginning or end of the string.
2023-09-22 14:30:48 +10:00
Campbell Barton
a5cd497543 Console: add support for displaying tab-stops
Without this it was necessary to convert pasted text into spaces
for them to display properly.

Since tabs are a valid part of a string, it's incorrect to assume
tabs can always be expanded to spaces.

Pasted text and console output now display tabs properly,
the tab still uses spaces for indenting though.
2023-09-22 13:43:12 +10:00
Harley Acheson
18e07098ef UI: Support additional console text operations
Adds the ability to set text cursor position in the Console editor
by clicking with the mouse and many other expected operations such as
cut, select all & deselect on text entry.

Ref !108626
2023-09-22 13:36:29 +10:00
Campbell Barton
f13f61df98 GHOST/Wayland: follow SDL's method of XDG window initialization
Using SDL's initialization logic, this is mainly a change for XDG
as LIBDECOR already required a configure event before accessing
the underlying XDG window.

While I didn't notice functional changes with this change window
flickering on startup remains an issue with some compositors
(KDE & river). Debugging these issues is simpler when both windowing
decoration systems work in a similar way & window configuration
is guaranteed to have run before the window is returned.
(via #xdg_surface_ack_configure).
2023-09-22 12:43:22 +10:00
Campbell Barton
5fbcb4c27e Cleanup: remove spaces from commented arguments
Also use local enums for `MA_BM_*` in versioning code.
2023-09-22 12:21:18 +10:00
Hans Goudey
867f99c2af Cleanup: Move depsgraph headers to C++
Pull Request: https://projects.blender.org/blender/blender/pulls/110816
2023-09-22 03:18:17 +02:00
Campbell Barton
aba119e192 Cleanup: quiet CMake uninitialized variable warning, sort file lists 2023-09-22 11:04:25 +10:00
Campbell Barton
31aa6fa073 Cleanup: various non-functional C++ changes 2023-09-22 10:52:40 +10:00
Campbell Barton
fb624720eb Cleanup: remove 'apple' variable for key-map parameters
The OSKEY-Comma key-map item will be kept on macOS by the
bl_keymap_utils.platform_helpers utility function.
2023-09-22 10:37:23 +10:00
Campbell Barton
fd0d6b27bb Cleanup: remove unnecessary hasattr check 2023-09-22 10:16:13 +10:00
Campbell Barton
4e46803e04 Docs: add warning regarding WM_redraw_windows 2023-09-22 10:02:05 +10:00
Campbell Barton
6a8fc659ba Cleanup: spelling in comments 2023-09-22 10:02:05 +10:00
Pablo Vazquez
d0aa521ea8 UI: Minor layout and style adjustments in Preferences
Small style and layout tweaks of some tabs in Preferences.
Mainly inline styling for compact layouts, grouping labels and
adding icons where needed.

Purposely leaving aside complex areas such as Themes,
Add-ons, or Keymap. They require larger design decisions.

Pull Request: https://projects.blender.org/blender/blender/pulls/112393
2023-09-22 01:07:56 +02:00
Hans Goudey
ef5e57bbff Cleanup: Move softbody.c to C++
See #103343.

We had attempted to move the file to C++ twice before but found failing
tests each time. To find the code with changed behavior between C and
C++, I temporarily added a header declaring all the functions and moved
them one by one. The problem ended up being one function's use of `exp`
which used floats instead of doubles in C++.

Pull Request: https://projects.blender.org/blender/blender/pulls/112693
2023-09-22 00:34:17 +02:00
Harley Acheson
f58f6d0338 UI: Replace UI Font with Inter Regular v3.19
Replace default UI font DevaVuSans with Inter Regular v3.19

Pull Request: https://projects.blender.org/blender/blender/pulls/112603
2023-09-21 22:44:07 +02:00
Harley Acheson
a0b4ead737 BLF: Subpixel Positioning, Anti-aliasing, Hinting
Text output using subpixel positioning, subpixel anti-aliasing, and
typographically-correct hinting.

Pull Request: https://projects.blender.org/blender/blender/pulls/105441
2023-09-21 22:43:17 +02:00
Brecht Van Lommel
eadb4ad54d Cleanup: compiler warning 2023-09-21 20:10:01 +02:00
Hans Goudey
89422a7719 Fix: Crash drawing node with null panel name
Don't call `strlen` on a null pointer.
2023-09-21 14:02:22 -04:00
Hans Goudey
72a33623e6 Cleanup: Sculpt: Use C++ threading API
Also remove unnecessarily parallelized loop that was just setting a
flag for every PBVH node.
2023-09-21 13:42:13 -04:00
Jeroen Bakker
805c58d9ec Fix 112641: OpenGL Shader Draw Parameter Workaround Broken
The workaround for shader draw parameters isn't working for OpenGL. The
reason is that it isn't looking for the correct attribute to attach the
buffer to.

This fixes the issue that all objects where drawn using the unit matrix when
starting blender with `--debug-gpu-force-workarounds`.

![image](/attachments/f05b712e-e3f2-4ad5-b098-7e9d01bc4ca4)

Fixes #112641

Pull Request: https://projects.blender.org/blender/blender/pulls/112668
2023-09-21 19:34:07 +02:00
Harley Acheson
e7df63ca72 Revert "UI: File Loading Waiting Feedback"
This reverts commit 9173c142d6 as this can cause problems from scripts
and command-line.

Pull Request: https://projects.blender.org/blender/blender/pulls/112682
2023-09-21 18:48:07 +02:00
Brecht Van Lommel
3d15a07bde Revert "install_linux_packages: Raise LLVM default version to 15.0.7."
This reverts commit 607adbca47655833368c435dfde3b6449e120134.

The LLVM upgrade is being postponed to 4.1.

Ref #109244
2023-09-21 18:46:30 +02:00
Brecht Van Lommel
13fac109d3 UI: support drawing buttons inside node panels
With a callback to node panels similar to the one for nodes. Used in the
Principled BSDF to place enums in the relevant panels.

Longer term we want to make enums into sockets, but even then there are
still potentially some types of buttons we want to have in panels.

Pull Request: https://projects.blender.org/blender/blender/pulls/112591
2023-09-21 18:46:30 +02:00
Brecht Van Lommel
8e602d914b UI: draw node panels in material properties editor
The layout for this is not great but consistent with existing
collapse/expand functionality there. There are ideas to replace this
entire material properties drawing longer term, but for 4.0 it's
important to show the panels in some way.

Pull Request: https://projects.blender.org/blender/blender/pulls/112591
2023-09-21 18:46:30 +02:00
Brecht Van Lommel
a4a5ac545c UI: shorten node socket labels when they start with the panel name
Shortening names based on context is something we do in the user
interface throughout Blender. This is a simple automatic mechanism to do
it for node panels as well, which significantly improves the Principled
BSDF layout.

We want the properties and sockets to be identifiable outside of the
panel contextcontent, for example in the animation editor, API docs, or
when exposing a single socket as a group input. So making the actual
name shorter is not an option.

Pull Request: https://projects.blender.org/blender/blender/pulls/112591
2023-09-21 18:46:30 +02:00
Brecht Van Lommel
208323c087 Fix duplicate preference key shortcut on macOS, causing test failure
After recent changes in 86f659a.
2023-09-21 18:46:30 +02:00