Commit Graph

132032 Commits

Author SHA1 Message Date
Iliya Katueshenock
801e24379e Fix: Geometry Nodes: Wrong hash of Shortest Edge Path field
This could cause too many comparisons when deduplicating
field inputs for evaluation.

Pull Request: https://projects.blender.org/blender/blender/pulls/117391
2024-01-22 14:00:03 +01:00
Jacques Lucke
311ca3e6af Core: rename Session UUID to Session UID
`UUID` generally stands for "universally unique identifier". The session identifier that
we use is neither universally unique, nor does it follow the standard. Therefor, the term
"session uuid" is confusing and should be replaced.

In #116888 we briefly talked about a better name and ended up with "session uid".
The reason for "uid" instead of "id" is that the latter is a very overloaded term in Blender
already.

This patch changes all uses of "uuid" to "uid" where it's used in the context of a
"session uid". It's not always trivial to see whether a specific mention of "uuid" refers
to an actual uuid or something else. Therefore, I might have missed some renames.
I can't think of an automated way to differentiate the case.

BMesh also uses the term "uuid" sometimes in a the wrong context (e.g. `UUIDFaceStepItem`)
but there it also does not mean "session uid", so it's *not* changed by this patch.

Pull Request: https://projects.blender.org/blender/blender/pulls/117350
2024-01-22 13:47:13 +01:00
a7354fb2af Anim: add operator to remove unused bone collections
Add an operator to remove all unused bone collections. This is added to
the bone collections "specials" menu and the tree view context menu.

A bone collection is considered "unused" when it has no bones assigned,
and also no child collection that has bones assigned.
2024-01-22 13:34:25 +01:00
784ff4abc0 Anim: armature edit mode undo now also handles bone collection root count
Armature Edit mode has its own undo handling, which didn't store the
number of root bone collections in the armature. Now it does.

An alternative would be to not store this in the undo step, but rather
loop over all bone collections to find the minimum `child_index`. This
would be linear in the number of bone collections, though, so I chose to
use a few more bytes of memory to make the undo system a little faster.
2024-01-22 13:34:25 +01:00
Bastien Montagne
0365a23a30 I18N: Updated UI translations from git/weblate repo (fe7935fc8ede674). 2024-01-22 12:36:51 +01:00
Sergey Sharybin
29aaa2922d Fix performance issue when tagging relations for update
The relations update code does tagging needed to ensure that the
array of bases is updated when relations are updated. It was done
by tagging the Scene ID node, and potentially recursing into all
dependent depsgraph nodes. If there is a driver on a scene property
it was unnecessarily re-evaluated.

This solves the slow behavior of adding objects in the test file
from #117335.

Pull Request: https://projects.blender.org/blender/blender/pulls/117403
2024-01-22 12:27:55 +01:00
Lukas Tönne
1903f58eac Cleanup: Removed unused variable in grease pencil color modifier. 2024-01-22 11:37:31 +01:00
Omar Emara
0adf01e79e Fix: Compile errors in GPU shader builder stubs
IMB module is now C++, so adjust the linkage of the stubs.
2024-01-22 12:27:19 +02:00
Sergey Sharybin
7a2d04a5c4 Fix #117335: Slow selection in scene with drivers
Change parameters tagging from implicit based on the copy-on-write to
more explicit, allowing to ignore tagging of parameters component for
changes which do not affect drivers.

There is still implicit parameters tagging based on tags for geometry
or transform components to avoid making changes in too many places of
Blender.

Should be no functional changes, only expecting better performance.

Pull Request: https://projects.blender.org/blender/blender/pulls/117336
2024-01-22 11:23:19 +01:00
Sergey Sharybin
b2b6286366 Depsgraph: Avoid implicit tagging on hide_viewport changes
The update callback of this property does proper tagging.

Should be no functional changes, but allows the depsgraph to make
more optimal decision on avoiding unneeded recalculations.

In practice this should avoid unnecessary re-evaluation when
toggling this option on objects on outliner.

Ref #117335
2024-01-22 11:23:14 +01:00
Sergey Sharybin
85ff988f99 Depsgraph: Move scene evaluation node to own component
This node is needed to ensure evaluation order of scene and modifiers
which might access scene for custom data masks, or for the current
frame.

Move it to own component, so that evaluation of scene does not lead
to changes in the parameters component, hence does not trigger
driver evaluation.

Should be no functional changes.

Ref #117335
2024-01-22 11:23:14 +01:00
dfc220622c Anim: bone collection tree, show selected bones as hollow dot
In the Bone Collection tree, mark bone collections that contain any
selected bones with a hollow dot.

As before, collections containing the active bone are still hown with a
filled dot.
2024-01-22 11:13:00 +01:00
Pratik Borhade
a68b0957ed GPv3: Broken color modifier UI
Opacity modifier properties/ui was resued for color modifier

Pull Request: https://projects.blender.org/blender/blender/pulls/117376
2024-01-22 10:47:42 +01:00
6b8c64fc69 Anim: create new bone collections as next sibling of active one
Bone collections created via the `bpy.ops.armature.collection_new`
operator now always become the next sibling of the active bone
collection. If there is no active one, the new one is added at the end
of the list as root.

This removes the `.parent_index` property of the operator, as it is now
always created relative to the active bone collection.
2024-01-22 10:34:30 +01:00
f6fc417fec Black: skip string normalisation
Black (the Python formatter) shouldn't be used on Blender. However, it
is still the default formatter for some people's IDE (like mine). If
it's accidentally used, its default behaviour is to normalise strings so
they use double quotes.

This string normalisation can be tedious to recover from. This PR
configures Black so that it doesn't do that any more. This makes such a
mistake easier to recover.

An additional comment explains that Black shouldn't be used, and that
the configuration is there just to make it less annoying in case of
mistakes.

For the same reasons, this commit also includes the config option
`line_length = 120`. It just makes Black change less of our code when
it's accidentally used.
2024-01-22 10:09:33 +01:00
Sergey Sharybin
c368a2c345 Cleanup: Strict compiler warning
A static function is only used from asserts, generating unused
warning for release builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/117398
2024-01-22 10:01:05 +01:00
Campbell Barton
a1761b7c8c UI: adjust the add-ons interface when extensions repositories enabled
- Group Extensions with Add-ons in preferences.
- No more official/community/testing, install and refresh.
- No more showing category on the headers
  (there are no categories for extensions).

Changes proposed in #117285.
2024-01-22 17:47:33 +11:00
Campbell Barton
af160e1613 Cleanup: avoid many allocations recursive filesystem ops on Linux/Unix
Replace string duplication with a buffer that grows as needed and
reuses the existing buffer in nested functions.
2024-01-22 14:42:59 +11:00
Campbell Barton
5b59be81ba Cleanup: spelling in comments 2024-01-22 12:44:56 +11:00
Campbell Barton
c866c93b06 Cleanup: import UIList, following the convention for other UI classes 2024-01-22 12:44:56 +11:00
Campbell Barton
829d08ca42 Cleanup: move addon_category_name into an internal class method 2024-01-22 12:44:54 +11:00
Campbell Barton
f0357220c0 Cleanup: don't pass UI text through iface_ twice 2024-01-22 12:44:53 +11:00
Guillermo Venegas
d7aa1988d1 UI: Replace list of workspace add-ons with a UIList
The list of add-ons could be long without the ability to search or
scroll the list. Using a UI-list.

Resolves #111272

Ref !112684
2024-01-22 12:44:37 +11:00
Campbell Barton
ff333ef397 Cleanup: format 2024-01-22 12:01:45 +11:00
Campbell Barton
d43988e014 Unbreak build from missing include 2024-01-22 11:54:10 +11:00
Bastien Montagne
3df7939eec Cleanup: Move BKE_blender_undo.h to full Cpp header BKE_blender_undo.hh. 2024-01-21 19:49:58 +01:00
Bastien Montagne
d8d44a62f7 Cleanup: Move BKE_appdir.h to full Cpp header BKE_appdir.hh. 2024-01-21 19:42:13 +01:00
Bastien Montagne
6a9d2212e4 Cleanup: Move BKE_blender_copybuffer.h to full Cpp header BKE_blender_copybuffer.hh. 2024-01-21 19:34:20 +01:00
Bastien Montagne
6fcb92fd93 Cleanup: Move BKE_blender_user_menu.h to full Cpp BKE_blender_user_menu.hh. 2024-01-21 19:26:31 +01:00
Bastien Montagne
bfe2e5a069 Cleanup: Move BKE_autoexec.h to full Cpp header BKE_autoexec.hh. 2024-01-21 19:13:46 +01:00
Jacques Lucke
b92443e1d9 Geometry Nodes: optimize single value access in NodeSocketValue
The goal is to get rid of some constant overhead to avoid the small regression mentioned in https://projects.blender.org/blender/blender/pulls/116231#issuecomment-1086124.

Now it is possible to get more direct access to single values stored in `NodeSocketValue`.

Benchmark using the `many_math_nodes` file:
```
version          3.3      3.6      4.0      patch    main
many_math_nodes  0.5352s  0.0606s  0.0293s  0.0292s  0.0304s
```

Pull Request: https://projects.blender.org/blender/blender/pulls/117309
2024-01-21 13:22:16 +01:00
Bastien Montagne
af5731ce03 Cleanup: Move BKE_idtype.h to Cpp header BKE_idtype.hh 2024-01-20 19:17:36 +01:00
Hans Goudey
bbaa4e9d26 Fix #117354: Crash loading file browser tooltips
Caused by 6abf43cef52a3186642959270bfbabe1ea3dc5f3
2024-01-20 10:26:29 -05:00
Pratik Borhade
33bb3d838f Fix #117224: Outliner recursive selection fails in reverse order
Call `do_outliner_select_recursive` for active tree-element
in range_select function to select children of active te.

Pull Request: https://projects.blender.org/blender/blender/pulls/117265
2024-01-19 21:21:27 +01:00
Aras Pranckevicius
d2e4da0f5b Cleanup: reduce C-isms in imbuf headers
Pull Request: https://projects.blender.org/blender/blender/pulls/117327
2024-01-19 20:29:43 +01:00
Aras Pranckevicius
a705259b4b Cleanup: move imbuf .h files to .hh 2024-01-19 20:29:38 +01:00
Brecht Van Lommel
487adcb992 Fix: build error when not using unity build 2024-01-19 20:12:45 +01:00
Harley Acheson
9de0dac46e Cleanup: Make format
Formatting changes resulting from Make Format
2024-01-19 11:10:00 -08:00
Hans Goudey
02342aee0c Cleanup: Sculpt: Store auto-masking cache in unique_ptr 2024-01-19 13:44:42 -05:00
Hans Goudey
0163a92cca Cleanup: Simplify local automasking function names
Remove redundancy with the file's namespace.
2024-01-19 13:27:03 -05:00
Brecht Van Lommel
2afd9e530a Fix: wrong name in bpy_extras.object_utils, causing API doc build failure 2024-01-19 19:03:33 +01:00
Aras Pranckevicius
0dc3ffb5af Fix: windows compile error
Another ambiguous conversion for msvc introduced in baeb4d775393e
2024-01-19 19:34:56 +02:00
Hans Goudey
21407901f8 Cleanup: Various clang tidy changes 2024-01-19 12:08:48 -05:00
Hans Goudey
7ca4dcac5a Cleanup: Use std::string for UI drop box tooltip return type
And use fmt for formatting strings.
2024-01-19 12:08:48 -05:00
Aras Pranckevicius
b2ef92361f Fix: windows compile error
Ambiguous conversions for msvc introduced in baeb4d775393e
2024-01-19 18:58:55 +02:00
Harley Acheson
a510bad81a UI: Change of File Save Icon
UI Module agreed to change of the Save icon to a version, also created
by Andrzej Ambroz, that resembles a traditional floppy-disc style.

Pull Request: https://projects.blender.org/blender/blender/pulls/117251
2024-01-19 17:54:29 +01:00
Omar Emara
4bf08198a7 Compositor: Do not flip bounds of Crop node
The Crop node currently flips its bounds if the lower bound is larger
than the higher bound, which is not a good design. Instead, clamp the
bounds.
2024-01-19 18:42:45 +02:00
Sergey Sharybin
73d9271701 Fix Keying Screen node on Metal GPU
The "Keying Screen" texture is written by the compositor_keying_screen
shader and is not read by the shader. Use appropriate usage flag which
matches the shader behavior.

Note that the texture is read by a node down the road, so both flags are
needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/117340
2024-01-19 17:20:07 +01:00
Lukas Tönne
baeb4d7753 GPv3: Tint and Color modifiers
Implements the Tint and Color (aka. "Hue/Saturation") modifiers.

Pull Request: https://projects.blender.org/blender/blender/pulls/117297
2024-01-19 16:59:39 +01:00
Christoph Lendenfeld
5e28601d69 Anim: Separate keying flags
Splits the flag `..._FLAG_INSERTNEEDED` between autokey and
manual keying. The fact that this flag was shared between the two
systems has been the cause of issues in the past. It wouldn't
let you insert a keyframe even though you explicitly used an operator
to do so.

In order to be clearer what options are used where, the user preferences
have been reordered.

By default "Only Insert Needed" will be enabled for auto-keying, but not for manual keying.
The versioning code will enable both if it was enabled previously.

# Code side changes

The keying system has flags that define the behavior
when keys are inserted. Some of those flags were shared
between keying and auto-keying. Some were only used for
auto-keying.
To clarify that, prefix flags that used exclusively in one or the other
system with `AUTOKEY`/`MANUALKEY`

Also the flag name on the user preferences and the tool settings was renamed.
Previously it was called `autokey_flag`. To indicated that it is not only used
for autokeying, rename it `keying_flag`.

Fixes: #73773

Pull Request: https://projects.blender.org/blender/blender/pulls/115525
2024-01-19 16:26:10 +01:00