tmp-brush-assets #1

Closed
Dalai Felinto wants to merge 354 commits from tmp-brush-assets into tmp-brush-assets

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
First-time contributor

I rebased the branch with main and solved a merge conflict. This is supposed to be a force push so I doubt this will work.

That said, I'm curious to see what gitea will make out of it.

I rebased the branch with main and solved a merge conflict. This is supposed to be a force push so I doubt this will work. That said, I'm curious to see what gitea will make out of it.
Dalai Felinto added 354 commits 2023-09-08 11:54:14 +02:00
The asset shelf type would be removed, but there may still be an active
asset shelf (or previously active shelves) in memory that reference this
type. Now unset this reference so the shelf is not considered for
display anymore. This way the shelves storage is preserved (and saved to
files) and settings like the visible catalogs will be kept for when the
type becomes available again.
Sanity check to make sure no asset shelf points to an invalid (not
registered) asset shelf type.
Regression from c3dfe1e204.

Above commit put a dummy dragable button over the filename (well, to
allow dragging). Enabling drag ripples down to the button ending up in
the `BUTTON_STATE_HIGHLIGHT` state [which is still good of course].
However, `ui_do_but_EXIT` will then return `WM_UI_HANDLER_BREAK` which
then results in the filebrowser operator being skipped.

`ui_do_but_EXIT` already had a special case for file-browser drag button
[which would return `WM_UI_HANDLER_CONTINUE` instead]. Formerly this was
just the icon, now it is the icon and filename label. So in order to fix
this, remove the explicit check for the `but->imb` which will then
include the dragable label button in the exception for returning
`WM_UI_HANDLER_CONTINUE`.

Fixes #111645.

Pull Request: blender/blender#111693
Was printing the following warning:
  Warning: 'MyAssetShelf' does not contain '_AST_' with prefix and suffix

I followed some other template for the naming, apparently the "Ui Tool
Simple" one, but that doesn't print the warning.
Usually use_property_split is matched with false use_property_decorate
when the settings in the panel aren't animateable, which is the case
here. This matches the panel from before the node panels commit.
Accidentally used CMake instead of environment variable.

Pull Request: blender/blender#111234
Allocate with `MEM_new`, free with `MEM_delete`, and provide
explicit defaults to guarantee values after initialization.
Pull Request: blender/blender#111690
Previously we'd just allocate extra space for additional data for the
deferred loading, and then do pointer arithmetic to access that data.
This is cryptic and not type safe.

Instead, use an internal type deriving from `PreviewImage`, and manage
that internally. This ensures type safety, while keeping this as
implementation detail (not visible outside of the preview image API) and
keeping internals easy to understand.

Some code did shallow copies of preview images, making ownership
unclear. That made things a bit tricky, but I've made support for
shallow copies explicit now and noted this in comments.
Draw status text in the Tool Settings bar if visible, rather than
Header.

Pull Request: blender/blender#111676
The wrong function was called (function called itself in fact). Mistake
in eefee47a8a.
Mistake in eefee47a8a.
The loop was ignoring ` nu->pntsv` in this case, resulting in only the
first point of each row being used for snapping.

This commit also simplifies the code by removing the no-snap limitation
when the curve only has 1 point.

This limitation existed because the curve is not visible in this case.

But this is contradictory for when the curve has loose points (which
are also not visible).
Apply auto-offset animation in relative steps to avoid issues, when
the parent space of the currently offset node changes.

Pull Request: blender/blender#111637
Mistakenly removed in e071288ab2
The sound equalizer is using the Audaspace FFT Convolver.
The blender part creates an array of descriptions of power per "band"
and orders the creation of Equalizer (ISound) in the Audaspace.

Modifier can be created on sound strips. It lets you define
amplification or attenuation over frequency range from 30Hz to 20 kHz.
The power is limited to -30 db - 30 db. This is done using curve
mapping widget.

Co-authored-by: menda <alguien@aqui.es>
Co-authored-by: Richard Antalik <richardantalik@gmail.com>
Pull Request: blender/blender#105613
Add three cached topology maps to `Mesh`, to avoid computations when
mesh data isn't changed. Choosing the right maps to cache is a bit
arbitrary, but generally we have to start somewhere. The limiting
factor is memory usage (all the new caches combined have a
comparable footprint to a UV map).

For now, the caches added are:
- Vertex to face corner
- Vertex to face
- Face corner to face

These caches are used in quite a few places already;
- Face corner normal calculation
- UV value merging
- Setting sharp edges from face angles
- Data transfer modifier
- Voxel remesh attribute remapping
- Sculpt mode painting
- Sculpt mode normal calculation
- Vertex paint mode
- Split edges geometry node
- Mesh topology geometry nodes

Caching topology maps means they don't have to be rebuilt every time
they're used. Meshes copied but without topology changes can share
the cache, further reducing re-computations. For example, FPS with a
large mesh using the "Corners of Vertex" node went from 1.8 to 2.3.
Entering sculpt mode is slightly faster too.

There is some obvious work for future commits:
- Use caches in attribute domain interpolation
- More multithreading of second phase of map building
- Update/build caches eagerly in some geometry nodes

Pull Request: blender/blender#107816
The logic for telling when there are no loose edges or vertices was
incorrect.
Slightly increase the number of times ramps/curves are sampled to better
align with the results produced by Eevee.

Pull Request: blender/blender#111082
Use less ambiguous naming where new(..) always returns new data.
Also correct the notifier in edit-mode.
101.4644 has been released 2023-08-15 and fixes the Windows specific
issue #109282.
Cycles oneAPI kernel library was compiled using -ffast-math. The current
version of Clang makes it link to crtfastmath.o in that case, bringing a
static constructor that does set the FTZ/DAZ bits in MXCSR for the whole
program, leading to unwanted behavior with other components.
Instead of -ffast-math, we switch to a safer subset of compile flags.

Pull Request: blender/blender#111708
To follow the style guide, these functions should use snake case. See
https://wiki.blender.org/wiki/Style_Guide/C_Cpp#Naming.
Except of the ID base element type, all element types are ported to have
the new polymorphic tree element object now. So this design is the rule
now with just one exception, so simplify the sanity check logic to
reflect this.
As __FAST_MATH__ isn't defined anymore since
09df1f4caf, sycl::cos uses the precise
implementation, no need to call __spirv_ocl_cos anymore.
This way items like Menu, Menu Item, Menu Back, are together.
And overall easier to find what we are looking for.

Also renames "Menu Back" to "Menu Background".
It's not immediately clear for new users that editing the
"File Browser" colors will also adjust the "Asset Browser".

Similar to how it's already the case for UV/Image Editor,
mention in the name of the panel other editors that share
the same color settings.

* Dope Sheet > Dope Sheet/Timeline
* File Browser > File/Asset Browser
* Graph Editor > Graph Editor/Drivers

The only exception is Node Editor because eventually it
will get too long.
Only the ID base tree element type doesn't yet use the polymorphic
tree element design yet, and this case is handled in an earlier branch
excluding this `else` block. So this would be dead code.

Add assert to protect from future changes breaking this assumption.
Having a `0` condition can be a bit confusing, rather have the proper
condition there so it will also get printed like this to the console.
When the Lacunarity input is driven by e.g. a Texture discontinuities can
arise because the `for` loop breaks prematurely.

Pull Request: blender/blender#111395
Two issues fixed here:
1. Mixup of "in" and "out" flags.
2. Missing node tree update tag to ensure group input nodes all have
   the new socket so it can be hidden.

Pull Request: blender/blender#111707
This was just giving the shortcut to toggle, but not giving the actual
status ("ON"/"OFF").

This was especially confusing in the following scenario:
- Alt-drag a node (to detach links)
- try to drop on a link (with Alt still held down) was not working
because the modal keymap would have actually toggled auto-attach to OFF

Pull Request: blender/blender#111739
* Align similar settings in the same column.
* Remove redundant words from similar setting labels.
* Use two-column flow for Collection and Strip colors.
* In Bone Color Sets:
  * align column for a more compact layout
  * Rename "Select" label to "Selected", likely a typo.
Since #109976 was merged, one would run into the following when opening
Bone Relations panel in Properties:

```
/build_linux/bin/4.0/scripts/startup/bl_ui/properties_data_bone.py:228
rna_uiItemR: property not found: Bone.layers
```

So now remove the UI code there (since Bone.layers are no more...)

Pull Request: blender/blender#111730
Wrong default value was passed to `BLI_uniquename`.
This default value is used when string is empty after renaming.
the element.

How to reproduce:
- Add bone collection
- double click to rename
- Clear all characters, hit enter (you'll either notice bone collection
  without name or just a suffix)

Pull Request: blender/blender#111723
This avoids accidental copies/moves which are never really intentional.

Pull Request: blender/blender#110168
Pull Request: blender/blender#111196
The factor property of the "Blend to Ease" operator
in the Graph Editor had the same name and description as the "Ease" operator.
This patch fixes it and makes the description more accurate

Pull Request: blender/blender#111745
Bone collection added by default along with the armature is not marked
as active. Visually this looks active but actually it's not (hover over the
properties like remove/move)

Also, when a new collection is added, mark that collection active.

Pull Request: blender/blender#111733
Goals of the refactor:
* Internal support for baking individual simulation zones (not exposed in the UI yet).
* More well-defined access to simulation data in geometry nodes. Especially, it
  should be more obvious where data is modified. A similar approach should also
  work for the Bake node.

Previously, there were a bunch of simulation specific properties in `GeoNodesModifierData`
and then the simulation input and output nodes would have to figure out what to do with that
data. Now, there is a new `GeoNodesSimulationParams` which controls the behavior of
simulation zones. Contrary to before, different simulation zones can now be handled
independently, even if that is not really used yet. `GeoNodesSimulationParams` has to be
subclassed by a user of the geometry nodes API. The subclass controls what each simulation
input and output node does. This some of the logic that was part of the node before, into
the modifier.

The way we store simulation data is "transposed". Previously, we stored zone data per
frame, but now we store frame data per zone. This allows different zones to be more
independent. Consequently, the way the simulation cache is accessed changed. I kept
things simpler for now, avoiding many of the methods we had before, and directly
accessing the data more often which is often simple enough. This change also makes
it theoretically possible to store baked data for separate zones independently.
A downside of this is, that existing baked data can't be read anymore. We don't really
have compatibility guarantees for this format yet, so it's ok. Users will have to bake again.
The bake folder for the modifier now contains an extra subfolder for every zone.

Drawing the cached/baked frames in the timeline is less straight forward now. Currently,
it just draws the state of one of the zones, which usually is identical to that of all other
zones. This will change in the future though, and then the timeline drawing also needs
some new UI work.

Pull Request: blender/blender#111623
Improve discoverability of items and consistency with other editors.

Split menu into groups, divided by separators, sorting alphabetically
within each group of items. Following how it is done in Geometry Nodes.

Pull Request: blender/blender#111481
Essentially calls `BKE_lib_override_library_resync`, with either to
current ID as resync root for a partial resync, or the actual hierarchy
root for a complete resync of the whole hierarchy.
This is a combination of two PRs from Ares Deveaux: #106521 and #106522

This adds a new operator that allows shearing keys
based on the position of the segment ends.
By pressing `D` while the operator is in modal you can
switch if the operator takes the left or the right segment end as a reference.

Co-authored-by: Ares Deveaux <aresdevo@gmail.com>
Pull Request: blender/blender#111735
Also fix an issue where contest stores were copied with the "used"
flag set after 7d7e90ca68.
Remove the need for `CTX_store_copy` and `CTX_store_free` by using
C++ copy constructors, unique pointers, and `std::optional`. A few types
are made non-trivial to support this.
Generally the context store is owned by `uiBlock`. Other pointers
to the store (in `bContext` and other operator data) shouldn't change
it, so those variables are now const. One exception is the pointer in
`uiLayout`, but that has a clearly short lifetime, so that's okay.
Previously, a separate map was build that maps menu types
to their drawing info. This worked fine, but is incompatible
with context dependent menus (#111752).

Now, the menu parent tree is build eagerly which avoids the
need for the additional map. This also makes it easier to integrate
menus that use `menu_create_func`.
See #103343
Library overrides crashed with on trying to access the interface root panel. The root panel should not be exposed through RNA, but also accessing its `position` property should be allowed.

Several fixes here:
- Fix `position` property getter when the item has no parent panel (i.e. the root panel).
- Avoid infinite loops in the greedy override comparison: exclude the loopback `parent` property.
- Don't return the root panel via the `parent` property in the first place, just return nullptr.

Pull Request: blender/blender#111755
The node add menu contains assets. The position of an asset in the menu
is determined by the catalog it's in. Submenus are generated automatically.
This works by having a context dependent menu (`NODE_MT_node_add_catalog_assets`).
The current catalog path is passed in as context. If the menu has submenus,
the sub-catalog paths are passed as context into those.

This generally works fine when using the menu. However, menu-search (F3)
does not support context dependent menus yet, so those menu entries are
just skipped. With this patch, the previously skipped context dependent menu
entries are also taken into account.

Note, when opening the search directly after opening Blender, the assets might
still be loading and therefor don't show up in the search.

Pull Request: blender/blender#111752
This helps to document standard behavior, improves type
safety, reduces code duplication, and gets us closer to being
able to remove some of the older C math API.
Switch from face pointers to indices, with the following benefits:
- Halve memory usage required for array (saves 16 MB with 1 million quads).
- Allow better code reuse with index-based utilities.
- Ease future replacement of `SubdivCCGFace` with mesh's face offsets.
- Allow future replacement of array with `Mesh::corner_to_face_map()`
- Potentially lower memory bandwidth required during multires evaluation
- Simplify retrieval of index in `BKE_subdiv_ccg_grid_to_face_index`.

For clarity, `gridfaces` was renamed to `grid_to_face_map`.

Pull Request: blender/blender#111078
Somehow variable rename went missing in these two places.
Mistake in 1e81d35138.
This modified the original normals cache, which is a more obvious error
now that the cache is shared between meshes. The goal of the code was
to reduce unnecessary calculation of normals in the result, but this is
not necessarily faster, and not worth the complexity, especially in an
already very complex area.
These asserts basically just reiterated the way things work-- there's no
no way for them to trigger with the current code. And even if they did,
that sort of change wouldn't happen by mistake, so it's not worth
an assert.
All Content is shown in natural top-down order regardless of where it
is initiated.

Pull Request: blender/blender#109798
Reverse the order of items in the Timeline "View" and "Marker" menus.
These menus assume reversed order since this editor is usually at the
bottom. This change will keep them as expected after #109798.

Pull Request: blender/blender#111758
The usages of `ED_uvedit_minmax` and `ED_uvedit_center_from_pivot` have
probably been replaced by `ED_uvedit_minmax_multi` and
`ED_uvedit_center_from_pivot_ex` in the process to support multi-object
editing and gizmo creation respectively.
The algorithm that traverses UV is a bit complex and is being iterated
a lot in different areas of the code.

This commit deduplicates this code by creating a foreach UV function.

At the moment only the `uvedit_ops.cc` file uses this function but
similar cleanups can also be done on many other files that use UVs.
The logic to calculate the bounds was missing.

Also add a notifier with `NC_SPACE | ND_SPACE_SEQUENCER` to update the
space.
This reverts commit 074dbf08cd.

This change caused PLY and OBJ tests not to compile,
even with the identifiers updated some OBJ tests fails
with different rotation values.
This reverts commit 2a94a99605.

This commit caused test `bl_node_group_interface` to fail.
Use the function name instead.
BLI_addtail doesn't require clearing links before adding
Remove experimental options & make them default:
- Tweak Select: Mouse Select & Move
- Tweak Tool: Left Mouse Select & Move

Changes:

- LMB press selects the element
  (unless it's already selected - in that case no selection takes place).
- LMB drag moves the selection.
- LMB click selects the element
  (deselecting all others).

Implications:

- This makes it possible to tweak more than one item at a time.
- It is no longer possible to set the 3D cursor with LMB when the tweak
  tool is active.

Details:

- Shift-LMB remains unchanged.
- RMB selection remains unchanged.
- Blender 2.7 key-map remains unchanged.

Addresses design task #96544.
Add an update function that ensures the key-configuration is reloaded.

Also prefer passing individual options instead of passing in
PreferencesExperimental to the key-map since it's no longer clear
which options impact shortcuts.
Zero width/height should be ignored, don't overwrite the window
size set by the client in this case.
These names weren't obviously related to libdecor.
changes include:
* Use microfacet normal instead of macronormal. Previously Cycles used
macronormal for Glass BSDF and Transmission component in Principeld
BSDF, leading to artefacts at grazing angles. This has been corrected
in 5f9b518a8b and 89218b66c2. Now change EEVEE to match this behaviour.
* GGX distribution is now darker due to the shadowing-masking term,
while Multiscatter GGX preserves energy. This now matches Cycles too.

Pull Request: blender/blender#111687
This introduces `BakeState` and `BakeStateRef` to replace
the use of `Map<int, BakeItem pointer>` in various places.
Ref: #99447

Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: blender/blender#111754
`BKE_simulation_state_serialize.hh` is not necessary anymore,
because the serialization is done at a lower level.
The functionality that lived there in the past is now part of
`BKE_bake_items_serialize.hh`.
For operators that allow overshoot it is important that the cursor wraps,
so the user is not limited by the bounds of the screen.
This was missed on a few of the latest additions.

Pull Request: blender/blender#111785
Library overrides crashed with on trying to access the interface root
panel. The root panel should not be exposed through RNA, but also
accessing its position property should be allowed.

Several fixes here:
- Fix position property getter when the item has no parent panel
  (i.e. the root panel).
- Avoid infinite loops in the greedy override comparison: exclude the
  loopback parent property.
- Don't return the root panel via the parent property in the first
  place, just return nullptr.

Second attempt at fix, first one in #111755 broke the
bl_node_group_interface test due to incorrect handling of the nullptr
parent case (reverted by 68440742)

Pull Request: blender/blender#111782
As discussed on #108314, oidn 2.0 needs an updated version of ocloc.
No need to bump the min required driver version as it's already
high enough on Windows (101.4644).

Pull Request: blender/blender#111729
Allow using the drw_debug API in any shader file.
Remove the drw_debug API from Release builds.

Pull Request: blender/blender#111710
Allow rendering multiple samples from a single draw callback.

Pull Request: blender/blender#111661
Also bump the recorded minimum 3.6 subversion for opening files, to
correspond to a fix in the 3.6 branch that prevents bones from seemingly
disappearing when opening files with 4.x bone collections.
7d54a756b9 did with only loose verties participating in the snap.
However, edges with a transformed vertices are ignored as well.
So some vertices may end up not participating in the snap.

Therefore, add then the vertices whose connected edge is being
transformed.
Add a set of symbols to improve visualization of different snap types.

- Circle: Represents snapping to a vertex.
- Two Aligned Lines: Represent snapping to an edge.
- Closed Aligned Square: Represents snapping to a specific part of an edge (center or perpendicular).
- Face-Aligned Circle with Midline: Represents snapping to a face.

Pull Request: blender/blender#109387
A small reduction in the vertical space used by the menu separating
rule. Also centers the line within its space. Looks more balanced when
used between titles and content.

Pull Request: blender/blender#111764
Fix render regions and make them work with overscan:
- Clarify and improve the naming used by the Film module.
- Convert Display texel coordinates to Film texel coordinates before
  calling `film_process_data`, and convert from Film texel coordinates to
  Render texel coordinates in `film_sample_get`.
- Returns the actual display extent (and not the film extent) in
 `Film::display_extent_get` so the overscan camera matrix is computed
  correctly when using render regions.

Regression caused by 567a2e5a6f.

Pull Request: blender/blender#111691
When entering sculpt mode, the normals cache is shared with the
evaluated mesh. `SharedCache::ensure()` un-shares the cache in order
to update it, so the pointers in the pbvh must be reset.
For private, internal code, there is no reason to pass a pointer of
pointer to the filedata.
Code would not keep filedata for read libraries long enough to be able
to pass along to the 'after_liblink' versioning code. Instead, it was
passing the main file data, leading to all kind of potential breakage in
versioning code, e.g. in case of checks on available DNA data.

Fix #111776.
Commit e071288ab2 do_version code was copying an allocated string from
old to new socket data, but not freeing it in the old data properly.

String can actually be moved directly from old to new data, instead of
duplicating it.
The outliner tree element creation function passed a `void *idv`
argument and did weird and hard to follow stuff with it (like casting it
to `ID *` even though it wouldn't point to an ID, and further overriding
it based on the element type). This change tries to untangle this, so
that it's easy to follow what's going on, and so that a bunch of casts
from non-ID data to ID pointers are removed.

Basically the void pointer is split into an ID pointer for the owning ID
(if any) and a void pointer for custom data for the element creation.
This can be made type safe still, but that's for another commit. It also
allows us to remove some wrapper structs. The element creation function
itself no longer needs to know what kind of data is passed via the void
pointer. So this change has a number of benefits in fact.
Also improves/adds related comments.

Was quite careful to not cause behavioral changes.
As concluded in discussion under #109439, the View Item widgets are
supposed to use List Item widget theme colors. This patch does that.

Co-authored-by: Harley Acheson <harley.acheson@gmail.com>
Pull Request: blender/blender#111584
Just changes resulting from Make format.
`move_to_parent` is called with a null parent by the Python code
that attempts to add new items to the active item if it's a panel.
Refactor the Add menu in Shading nodes, with manually created menus,
inspired by Geometry Nodes and more recently the Compositor.

Minor sorting adjustments by splitting categories in groups, with
separators in between groups, and sorted alphabetically. Shading
node group assets are also populated in the menus.

This is the first part of the re-organization of the Add menu,
part of #111746

Pull Request: blender/blender#111798
With this, display modes and tree elements can add an element through
the tree-display object used for building the tree for this display
mode. This means we no longer have to pass the `SpaceOutliner` object
around, and we avoid boilerplate. Further such simplifications to the
tree element creations are planned and are easier now.

Also note that this centralizes the use of `SpaceOutliner`, so we can
more easily make tree-display and tree-element objects independent from
it. This could be useful for unit testing, for example.
Mostly the issues were because drag and drop moving to a different
index in the parent didn't take into account the root panel. Also add
a null check for safety similar to b36367e663.
Panels could have parents if the parent was the root panel.
Anyway, the assert isn't really helpful here, better to keep that
just for higher level editing functions.
The runtime pointers are allocated when reading sockets,
they have to be freed when the legacy sockets are freed.
Highlight the currently-selected item in enum, and some other, lists.

Pull Request: blender/blender#111074
The hash tables and vector blenlib headers were pulling many more
headers than they actually need, including the C base math header,
our C string API header, and the StringRef header. All of this
potentially slows down compilation and polutes autocomplete
with unrelated information.

Also remove the `ListBase` constructor for `Vector`. It wasn't used
much, and making it easy to use `ListBase` isn't worth it for the
same reasons mentioned above.

It turns out a lot of files depended on indirect includes of
`BLI_string.h` and `BLI_listbase.h`, so those are fixed here.

Pull Request: blender/blender#111801
"Mix" node was twice since the recent refactor, one as Mix Color and
regular Mix (which belongs in the Converter category).
Also use lowercase for menu bl_idname, since there won't be any
conflict it's not needed.
Also use lowercase for menu bl_idname, since there won't be any
conflict it's not needed.
Fix of mistake from 226359ec48. `reverse_indices_in_groups` is
used in other one function (`build_vert_to_corner_indices`), so handling of
empty corners array should be moved into itself.

Pull Request: blender/blender#111815
Give a better error message when the user tries to register a node
having the same id as an internal one.
Before:
`RuntimeError: Error: Registering node class: 'NodeDummy', bl_idname 'NodeGroupInput' could not be unregistered`

After:
`RuntimeError: Error: Registering node class: 'NodeDummy', bl_idname 'NodeGroupInput' is an internal node`

This is a followup to #111615

Authored-By: @vitorboschi (Vitor Boschi)

Pull Request: blender/blender#111799
Show Enum titles if there is a non-blank label before on the same row.

Pull Request: blender/blender#111818
Minor reordering of items on the Edit and File Menus, and the addition
of "Release Notes" to the latter.

Pull Request: blender/blender#111814
- Use `this->` to access class methods.
- Follow style guide for class definition order.
- Avoid unnecessary namespace redefinition.
- Make data struct local to node interface file.
Similar to 32ca4caaac
Unused after:
- 577c0b4b46
- 9db4c0ca4b

See the geometry nodes commit for more background:
- 837144b457
Theme versioning to ListItem InnerSel required for highlighting
the selected Enum value from #111074.

Pull Request: blender/blender#111819
Update the filepath of an image when it already exists in the main
storage. This is useful when `relative_path` property is changed and we
attempt to open the same image file again.

Also remove `is_relative_path` parameter. Not required anymore because
`range->filepath` is correctly set to absolute/relative. This is also
passed in `BKE_image_load_exists_ex` to set path to non-exiting image.

Pull Request: blender/blender#109815
This was broken in 15f5dfd45d.
Since the switch from bone layers to bone collections in
998136f7a7, visibility could not be
overridden anymore. Moreso, layer visibility could also be toggled even in linked
state in 3.6 [those changes get lost on file reload, but it was still
useful and expected behavior].

Both are now restored.

Pull Request: blender/blender#111775
Folloup to bfdfde18e1, forgot to add this for the linking/appending code
path (similar change to what was done for the main blendfile readfile code).
`default_attribute_name` is an allocated string, unlike most other strings in `bNodeSocket`.

Pull Request: blender/blender#111823
This also now supports sockets that have been marked both input and
output.

Pull Request: blender/blender#111824
The file in question does not have the default (internal) root panel
flag for allowing child panels. This was probably saved before the flag
was added. A simple versioning snippet takes care of this case.

Pull Request: blender/blender#111828
The conditional `(selected ? 0 : bm->totvert)` should be evaluated first.
`relbase` is unsed after 1c0a1ae801
Blob stands for "binary large object" and is a known term. I used to use the term `bdata`
to mean "binary data", mainly because I didn't think of a better name. Blob is a much
better name as it captures the intend of those files much better.

This change breaks existing bakes, because I rename the folder from `bdata` to `blobs`.
I think that is ok, because I also just broke bakes two days ago in a larger refactor
(e92c59bc9b).

Pull Request: blender/blender#111822
- 'make check_spelling_shaders' now checks MSL & GLSL spelling.
- Add '--match' argument to 'check_spelling.py' for more configurable
  checks without relying on picking directories that only contain the
  desired file-type.
- Ignore spelling for scripts/addons & scripts/addons_contrib.
This is used for GLSL/Python sources too.
The main goal here is to rename things in a way that makes sense for
simulation baking, but also for the upcoming bake node.

This also removes some versioning code from 3.6 which initialized the
default bake path. Baked data from back then can't be loaded anymore
anyway, and the way the default path is generated is different now as well.

Pull Request: blender/blender#111845
This ports the LUT using compute shader.
All LUT are computed by the same compute shader
to avoid boiler plate code to add new LUTs.

As for the generation code itself it is mostly the
same except for the use of `hammersley_2d` instead of
regular grid sampling. Regular grid did not improve
anything and was a bit more cumbersome.

This also bumps the number of samples very high
for more precision.

The new utility class for computing the LUT has
methods to write the content to a PFM image file
or as C++ array header.
This avoid the generation code to become desync with
the precomputed tabled.

This is also a good way to test any changes to them.
Thanks goes to @weizhen for spotting the mistake.
Linking the armature ID directly, instead of the object containing the
armature, did not run the versioning code to create bone collections
from armature layers and bone groups.

Bone groups cannot be versioned into bone collections in this case, as
they only exist on the Object.

Bone layers are now properly versioned.
Dropbox poll function was not sufficiently checking compatibility, so we
could end up calling
`WM_drag_get_local_ID_or_import_from_asset`. The asset might not
actually be used because of further checks later (so it would end up as
an orphan which would go away after save/reload), but still the import
should be avoided.

This fixes the case for dropping a shader nodegroup to the Geometry
Nodes Editor by getting asset metadata (and checking if the nodetree
type matches editor) in the dropbox poll function.

Will check on other possible cases of drag-drop to incompatible editors
next.

Pull Request: blender/blender#111921
Blender File view was not listing the new group under "Node Groups"
after import (this is not covered by ED_node_tree_propagate_change() -
and probably shouldnt).

Added the dedicated notifier for this case in the operator.

Pull Request: blender/blender#111924
The f12e9f32b5 patch introduced a new improved method of blending
dual quaternion transformations to handle combined scale and rotation
better. However, the changes were not complete:

* The new math ignored crazyspace computations, which need to compute
  a complete transformation matrix. As an optimization, the new method
  avoided fully computing the scale component, so the matrix would
  have no scale or shear.
* The Armature constraint is supposed to behave identically to the
  modifier, and it was not updated. The constraint also requires
  computing a complete matrix.

This change extracts the new math into a utility function, change
the optimization to be controlled by a parameter, and use the new
function in the constraint.

Pull Request: blender/blender#111759
Resource IDs and tile shfits often meant buffers were
accessed outside of their valid range. Patch ensures
resource IDs are unpacked and shift ranges are
shifted into the positive range to avoid inconsistent
behaviour with negative modulo operations.

Authored by Apple: Michael Parkin-White

Pull Request: blender/blender#111808
Some shaders using gl_Layer/gpu_Layer were missing
the correct usage bit in the shader create info. Shaders
also need to inherit feature usage bits from included
additional_info.

Authored by Apple: Michael Parkin-White

Pull Request: blender/blender#111751
This patch is already in upstream, so this is temporary until we upgrade
to the latest OSL version.

Ref #110708
imageStoreFast provides a variant of imageStore which does
not perform any bounds checking, reducing shader divergence,
register pressure and increasing performance through fewer
instructions.

However, this should only be used for cases where the writing
coordinate is guaranteed to fall within the texture.

Authored by Apple: Michael Parkin-White

Pull Request: blender/blender#111750
Memoryless textures are only used as intermediate attachments
during rasterization, but do not have any backing storage. This is
particularly useful if a virutal framebuffer is needed, or, there is
a situation where a depth buffer is only needed within the pass
itself and the results are discarded once the pass completes.

Authored by Apple: Michael Parkin-White

Pull Request: blender/blender#111749
Removes old unused bind state parameters from
prior to the addition of explicit resource location support.

Patch also ensures compute state is reset between each
encoder and adds a debug option to dispatch each
compute command within its own encoder for debugging
synchronization issues.

Authored by Apple: Michael Parkin-White

Pull Request: blender/blender#111753
`extern "C"` did not actually have an effect here since it only impacts
name mangling of functions, not structs (or other class types). Now this
can get in the way when we add C++ blocks with functions , e.g.
templates are not allowed in code with C-linkage.

Most of these were added in ad4b7741db, even though it was known that
this doesn't have any impact. Reason was because developers thought they
would have to add that to all direct and indirect includes to be able to
use a header in C++ (a common misconception). Now with most files
compiled in C++, it's obvious that this isn't the case.

Pull Request: blender/blender#111926
These are not actually warnings, but merely info for the user.

NOTE: A good chunk of these messages are aguably useless actually,
saying 'you cannot rename this' does not add any info for the user...

Better/more informative wording (or removal) of some of these messages
is left for later.
This is more of a temp hack than a proper fix, proper solution would be
to make shapekeys actual embedded IDs (which they are, in all aspects
but actual implementation), and to address long-standing design tasks
about handling of unused data on file save (see #61209 and #87490).

But for now, simply do not write ShapeKeys IDs if they have no owner, or
their owner has no user (and is therefore also not written to disk).
This commit disambiguates the following messages:

- Sequencer effect strip types: use "Sequence" context in relevant
  places, as that is already extracted as part of the
  `sequencer_prop_effect_types` enum, and more specific.
- "Language" (a natural or programming language)
- "Flat" (gender)
- "Smooth" (action or amount -- very partial disambiguation for now
  because this is all over the place)

It also extracts these messages:

- Newly created Freestyle data
  - LineStyle
  - LineSet
  - Modifiers
- "Registering panel class:" error message from RNA registration
- "Node must be run as tool" error message from tool geometry nodes

Ref #43295

Pull Request: blender/blender#111146
Changes in 42713bf made it ignore the environment variable if there is a
defined but empty CMake variable. Also make similar changes for other
GPU compute APIs, to guard against future problems like this.

Pull Request: blender/blender#111928
Ref #104110

Pull Request: blender/blender#111414
The node-tree does not necessarily contain an output node, so it has to
be checked, as well as the existence of the socket.

Pull Request: blender/blender#111604
Previously, BKE level preview image code was in `BKE_icons.h` and `icons.hh`.
While these types are related, I always found this quite hard to navigate since
preview image stuff was just in the middle of icon functions. Plus, people
don't expect preview image functions in icon files, the relationship is not
obvious.

Instead, use focused files that make it easy to quickly navigate them
and see what they are dealing with.

Pull Request: blender/blender#111709
Enhance custom framebuffer binding state to allow
specification of clear color as part of the loadstore
state at framebuffer bind time.

This ensures all parameters controlling attachment
loading and storage behaviour can be explicitly
specified when binding a framebuffer.

This change enables optimizations which leverage
explicit framebuffer load store state to also specify
a clear color without prematurely triggering a
clear which may occur independently to
render work when using GPU_framebuffer_clear(..).

Authored by Apple: Michael Parkin-White.

Pull Request: blender/blender#111810
Enables performance optimizations and new rendering
features through allowing colour attachments to be
tagged with a rasterization order group. This means that
all accesses to the same pixel location are guaranteed
to happen in submission order.

This lays the ground work for tile-based architecture
optimizations, enabling additional features for
deferred rendering which allow subsequent passes
which operate on pixel data to occur in order, while
memory remains on-tile.

This patch allows fragment outputs to be tagged
with a raster order group and also adds a new
FragmentTileIn parameter to a shader, which allows
speciication of incoming parameters from a previous
draw.

Authored by Apple: Michael Parkin-White

Pull Request: blender/blender#111748
This was caused by the recent change in DNA headers
making all extern data C++.
Following current macOS guidelines.

Created by Francesco Siddi.

Pull Request: blender/blender#111232
It is not fully clear why the object's material accessor does return
'valid' value for out-of-bound indices. In theory, item getter should
return `false` in such case, and not pretend to give valid data. But
this seems to be expected behavior for materials, according to some
comments in BKE underlying code?

In anycase, valid material slot indices can still return empty ('null')
data, if there is no material assigned to the indexed slot.

So this liboverride-specific code does need extra validation of the item
data returned by index, before trying to access it for name matching.
This was because some features requiring OSX 11 were
not properly guarded by defines.

Pull Request: blender/blender#111940
This allows to clamp the lighting components
during the baking phase.

Also add back intensity option.

Pull Request: blender/blender#110858
This fixes #111767

`In Front` objects remain visible even if they are behind non
`In Front` objects.

It is to be expected then that the snap for them is not occluded as if
they were not `In Front`.
Use blender::Vector instead of std::vector.
When estimating widget sizes, ui_text_icon_width_ex() assumes that all
items are using the "widget" text style, which is incorrect for labels.
This PR uses widget_label style for uiItemL_ and the label portion of
ui_item_with_label.

Pull Request: blender/blender#111908
Properly show vert and face count while in Sculpt mode.

Pull Request: blender/blender#111945
Just changes resulting from Make Format. Just space_node.cc
Property should have been removed when retiming for sound strips  has
been implemented.
Loading add-ons after key-maps resolves a problem where add-ons would
setup shortcuts before Blender had created the key-maps.
Making add-ons have to declare the key-maps using region & window types
matching Blender's internal values.

This PR a pitfall pointed out in #110030.

Ref !110092
`BKE_pbvh_vert_coords_alloc` is unnecessary after 1af62cb3bf
since PBVH vertex positions are stored in a contiguous array.
The capital prefixes are meant for non-static functions in C code.
Instead of the less-type-safe and slower `GSet`.
Mistake in afdbb734cf
Mistake in 0a633a4e07
pointer address (ebone) was passed to `add_element()`

Pull Request: blender/blender#111954
Explicitly splint into groups of headers, so that clang-format
does not ruin the required order of headers.
Pull Request: blender/blender#111930
Part of #91973

Moving the snapping code for the
* Graph Editor
* Action Editor
* and NLA editor

into the common system that lives on the scene.
This includes the Magnet icon for turning
snapping on and off.

The old settings translate to the new in the following way:
* `Frame Step` -> `Frame`
* `Second Step` -> `Second`
* `Nearest Frame` -> `Frame` + `Absolute Time Snap`
* `Nearest Second` -> `Second` + `Absolute Time Snap`
* `Nearest Marker` -> `Nearest Marker`

Since this moves the location of the snapping settings
from the editor to the scene, it changes the behavior.
Previously each editor could have different snapping
settings, where now they are all synced.

Pull Request: blender/blender#109015
The "compact" flag was still missing, while the "hide" flag used the
socket flag variant (indistinguishable because of int DNA types).

Pull Request: blender/blender#111956
Recently shader::Type::SHORT/USHORT types have been added.
This will add them to the vulkan backend as well

Pull Request: blender/blender#111962
This PR adds several unit tests to construct and upload data for
different texture types (1d_array, 2d_array).

Pull Request: blender/blender#111338
Pull Request: blender/blender#111964
The order of the parameters was reversed.
This bug was caused by 4e94db97e2.
In 2.6 the old method of using bNodeSocket lists in bNodeTree directly
as group sockets was replaced with new group input/output nodes. This
required versioning to create those input/output nodes and then redirect
links to the new node sockets. Because creating nodes relies heavily on
node typeinfo this versioning was done in the `_after_linking` section
of the 2.6 versioning code, running after _all other versioning_
(including for much newer versions!) has already happended.

While typinfo is available at that point, doing such late versioning
causes severe problems when the data structure changes, as is the case
with the recent node panels patch (#111348). The new node group
interface also has versioning code for 4.0, but this runs _before_ the
`_after_linking` code for 2.6! Versioning for node panels expects
sockets in bNodeTree to not have any links pointing at them, but this is
not true for old 2.6 files which have not yet been fully versioned at
that point, because of the late versioning stage. Subsequently 2.6
`_after_linking` code crashes when trying to modify node links with
dangling pointers.

The solution here is to move the old versioning code out of the
`after_linking` stage to restore the expected versioning chain. This
requires creating nodes and node sockets without any typeinfo, but
luckily we only need to create simple known group input/output nodes
which don't have much complicated behavior.

Pull Request: blender/blender#111704
Also updates a bunch of missing entries recently added (uses default
colors from the dark theme).
`draw_handler_add` and `draw_handler_remove` method of bpy.types.SpaceXXX
should be class method not method. However, Python API document does not show
the classmethod.

This PR fixes the Python API document of them.

Pull Request: blender/blender#111107
No functional changes

`transform_convert_nla.cc` had a few `if`s within
for loops that could be inverted to remove the indentation.

In addition to that I extracted the snapping functionality
so the `if`s there can also be inverted and return.

Pull Request: blender/blender#111968
Items in the node group interface need to have unique identifiers.
Copying an item (socket or panel) was not doing this, so the node groups
end up having sockets with the same identifier. Linking sockets was
broken because copies could not be distinguished.

Pull Request: blender/blender#111972
No functional changes
The recent refactor patch introduced warnings on flag checks
When viewing a curve with a lot of keys totally zoomed out,
the keys might be closer to each other than a pixel.
The code would still draw a line between them,
costing time in the draw code.

This PR skips any keys that are too close to each other in screen space.

## Performance

The setup: 62 bones with 6000f of animation keyed on every frame.
No keys displayed, just the curves.

| - | before | after |
| - | - | - |
| zoomed in | 11μs | 17μs |
| zoomed out |  55μs | 30μs |

So a small performance penalty when zoomed in in exchange for a big gain when zoomed out.

There is a small change in visuals when zoomed out a lot.
Because this change averages keys that are too close together,
it results in a small loss of high frequency detail.

## The logic
If `prevbezt` and `bezt` are too close it will not draw,
but extend a bounding box with `prevbezt` and `bezt` including handles if needed.
Eventually the keys will be far enough apart to draw.
At this point, draw the center of the bounding box and reset it.
Now because there could be the case where `bezt` in the
current loop is super far out (e.g 5 keys with 1f spacing and the 6th key is at f1000)
we need to recalculate the bounding box again.
In case the keys are far away, just draw normally.
If it is close still, the same  process repeats.

Pull Request: blender/blender#110788
When curves were baked, the lock icon wasn't drawn, which resulted in
a misalignment of the other icons.
With this patch, the icons are kept in alignment.

Also removes the comments that are no longer valid.

Pull Request: blender/blender#108518
This simply loads a blend file and tests that the node group interface
as well as a node group instance have all the expected sockets and
default values.

Pull Request: blender/blender#111800
Implements part of #111538.

Change the modifier add button to create a menu with submenus.
Extend the submenus dynamically with geometry node group assets.
This makes it much simpler to share and use custom modifiers.

Node groups get a new "Is Modifier" property, which is controllable
in a popover in the node editor header when the group is an asset.

The built in modifier can be rearranged in different categories in
a next step. For now the existing organization is used, except for
the geometry nodes modifier, which is called "Empty Modifier" and
put in the root menu.

The changes in !110855 and !110828 will be important to improve
interaction speed with the new UI. Those are planned for 4.0 as well.

Pull Request: blender/blender#111717
No functional changes.
Change the versioning code so that all bone groups are converted to bone
collections, so also the ones that did not have any bones assigned.

As Demeter[1] put it: While bone groups with 0 bones assigned are
usually unintended, versioning should still preserve them I feel like,
just to be on the safe side. If there was an update to the vertex group
system, I would also expect empty vertex groups to survive, even though
they are strictly speaking pretty much pointless.

[1]: blender/blender#111711 (comment)
Newer interfaces can share the same address as the old one,
causing a deleted VAO to be bound.

Pull Request: blender/blender#111929
This fixes a specific crash that would happen to me sometimes when changing
between files (the files may have been saved in older versions of the Blender).
The fix is just to null-check the icon lookup.

Pull Request: blender/blender#111670
In the property editor "Modifier" tab, open the new modifier
from 6da4b87661 menu with the Shift-A shortcut.

A new operator is added that opens the menu because there
doesn't seem to be a way to make the shortcut dependent
on the property editor tab otherwise.

Pull Request: blender/blender#111982
The Metal backend combines all kernel sources into a single string
and passes it to the compiler. Doing so natively has a disadvantage
of making it hard to find sources of mistakes in code when working
on the kernel source as the source file name and line number info
is lost. For example, the error would look like:

```
program_source:187004:3: error: use of undeclared identifier 'metalrt_intersection_point_shadow_force_error'
  metalrt_intersection_point_shadow_force_error(launch_params_metal,
  ^
```

This patch makes it so the #line pragmas are inserted into the
combined source source code, so that the compiler errors are easier
to find immediately. For example the error from above becomes

```
source/kernel/device/metal/kernel.metal:809:3: error: use of undeclared identifier 'metalrt_intersection_point_shadow_force_error'
  metalrt_intersection_point_shadow_force_error(launch_params_metal,
  ^
```

The code is a slightly modified functionality from the source
processing used for OpenCL in Blender 2.80.

Pull Request: blender/blender#111959
Use the common BVH utilities header for this.

Added a special type qualifier ccl_ray_data which is defined to ccl_private
for all platforms but Metal. On Metal it is defined to ray_data.

The tricky part is that the BVH utilities are wrapped into the Metal context
class. In some of the BVH functions the context has been already constructed,
but it wasn't done in all the callbacks.

From a quick render tests of the Junkshop benchmark scene there is no render
time difference,

No functional changes are expected.

Pull Request: blender/blender#111967
thanks Christophe Hery for spotting and fixing the issue
Fallback to material color if there's no texture.
To reproduce build error, set `WITH_AUDASPACE` to `ON` in `blender_lite.cmake` and build using `make lite`.

The problem is that the function `AUD_Sound_equalize` is declared in `blender/extern/audaspace/bindings/C/AUD_Sound.h` within `WITH_CONVOLUTION` and not `WITH_AUDASPACE`.

Pull Request: blender/blender#111994
Refactor the Add menu in Texture Nodes, with manually created menus,
inspired by Geometry Nodes and more recently Shader and Compositor.

Minor sorting adjustments by splitting categories in groups, with
separators in between groups, and sorted alphabetically.

Unlike other node editors, this menu will not feature assets for the time
being. Doing so would add (more) burden of maintenance to a system
that is deemed end-of-life, and likely to be rewritten before long.

Part of #111746

Pull Request: blender/blender#111838
Color Ramp widget with themed outline, handling of line width changes,
padding fixes, scaling fixes, etc.

Pull Request: blender/blender#111903
There are a couple of functions that create rna pointers. For example
`RNA_main_pointer_create` and `RNA_pointer_create`. Currently, those
take an output parameter `r_ptr` as last argument. This patch changes
it so that the functions actually return a` PointerRNA` instead of using
the output parameters.

This has a few benefits:
* Output parameters should only be used when there is an actual benefit.
  Otherwise, one should default to returning the value.
* It's simpler to use the API in the large majority of cases (note that this
  patch reduces the number of lines of code).
* It allows the `PointerRNA` to be const on the call-site, if that is desired.

No performance regression has been measured in production files.
If one of these functions happened to be called in a hot loop where
there is a regression, the solution should be to use an inline function
there which allows the compiler to optimize it even better.

Pull Request: blender/blender#111976
The DJV installer does not add its executable to the PATH, but Blender
attempts to execute it using just "djv". This will not work.

Until DJV is able to address this we can fish out the full path from the
registry in the meantime.

Ref !111458
This issue specifically happend if sound playback is synchronized by
Audaspace. In this case render engine can't override current frame.
`BKE_sound_sync_scene()` should return NaN as when rendering is in
progress, however viewport render operator doesn't set `G.is_rendering`.

Pull Request: blender/blender#111946
Removing key-configs that also had direct pointer access
left them pointing to freed memory.
An error in the key-map could cause the default keymap to be removed
leaving Blender without a default keymap.

Prevent the crash, even though Blender wont be usable in this state.
Problem caused by [0], resolve by only printing error messages
when none of the GHOST back-ends are able to start.

[0]: f58d596c36
The back-end name is already included remove duplicate information.
This would cause Blender to exist, log the message & return instead.
No functional changes.

Makes it closer to other self-intersection checks, making it easier to
re-use functions from the HW RT kernels.

Pull Request: blender/blender#111971
Another flag is added in #110855.
Node group interfaces for 4.0 are written to blend files as legacy data
to enable forward compatibility. This data is meaningless in 4.0, so if
a blend file contains it, the data should be freed right away. The
code for freeing legacy data was incomplete.

Pull Request: blender/blender#111989
Caused by C++ conversion in f07a112cb5.

Above commit was casting directly from event (instead of the event
data).

Pull Request: blender/blender#112010
Node drawing was adding some extra padding for each socket even when it
isn't visible. This patch makes the padding conditional on whether the
socket is visible and only when there is preceding items that require a
spacer.

![Screenshot_20230905_162302](/attachments/da52983a-a053-44c8-9d5c-859f89a652a1)

Pull Request: blender/blender#111981
Schlick's approaximation used by EEVEE is not accurate near `IOR == 1`,
especially when IOR is exactly one, there is no specular reflection and
the material should appear diffuse.
Cycles bypass the issue by lerping between the f0 and f90 color using
the factor derived from real Fresnel curve. In EEVEE we can use the same
trick as in Glass BSDF to smooth the transition at `IOR == 1`.
Note that at `IOR < 1` there is still mismatch, because f0 is prebaked
in the BTDF look up table. In the future if we color f0 using
`specular_tint`, we can split the table and use the BTDF LUT for the
specular component too.
Node group sockets can be set to "both" for input/output, generating
two socket declarations in the same panel. Panel size was calculated
using only the items count, which is <= the actual declarations count.

This patch calculates actual declarations count as the panel size.
Panel size variable renamed to `num_child_decls` to distinguish from
`num_items`.

Pull Request: blender/blender#112013
The invisible button for the header covers the entire node width,
causing conflicts with the resize operator. Added a small margin to
ensure the button does not overlap with the node border.

Pull Request: blender/blender#112017
Include the `SOCK_PANEL_COLLAPSED` flag in the general `is_visible`
function used to determine if operators can see the socket.

Pull Request: blender/blender#112019
Mistake in e071288ab2
Mistake in fa34992def (reversed conditional).

Pull Request: blender/blender#112020
Mistake in 30e3caaf82 (which wasnt checking if an `edittree` actually
existed).

Pull Request: blender/blender#112023
Match naming of curve transform conversion to avoid confusion.
Replace use_handles with an enum that optionally uses handles
except when the vertex (knot) is selected in which case it behaves
as if both handles are selected.

Needed for nurb curves not to change handle type when only the
center point is selected (as is done in the graph editor).

No functional changes.
Selecting a gpencil bezier vertex and move it would change the handle
type when set to "Auto".

This happened because of a mismatch between transform flag use
and BKE_nurb_bezt_handle_test which would change the handle type
when only the vertex (knot) was selected.

Resolve by treating both handles as selected when the knot is selected.
The handle selection should be ignored when hidden.
Now set handle type considers all handles selected when handles
are hidden and the knot is selected.
Change the behavior of transform and set-handle-type to operate on both
handles when the knot is selected.

This was an oversight in [0] which changed selection to select the knot
without the handles.

This makes curve bezier handles picking & transform match the Graph
Editor & grease pencil bezier curves.

This fixes issues transforming a bezier knot:

- Auto handles would be converted to "Aligned".
- Vector handles would be converted to "Free"
  with the vector handles being left in-place.

Resolves #111840.

Details:

Selecting only the knot vertex was done because the tweak tool no longer
de-selects when picking an already selected vertex to allow tweak to be
used to transform the selection (instead of always de-selecting all
before tweaking). Without this change, dragging a single handle required
manually de-selecting the knot and the opposite handle (3 clicks to
select a handle before dragging). Selecting only the knot solves this
but means transform needs to support tweaking a vertex (& it's handles)
without it's handles selected.

See design #96544.

[0]: 618f39fca2
Since hiding symbols on Linux, in many cases only addresses are printed.
This utility can run run on the back-trace to replace addresses
with line & function information.

See: ./tools/utils/addr2line_backtrace.py --help for usage information.

Note that some examples online run addr2line directly and use the output
in the stack-trace, while convenient and acceptable in some cases, in my
tests addr2line can take over 20 seconds to complete for a single
address. Implement this as a post-process instead. Multi-processing to
prevent this taking too long (around ~23 seconds on my system).

Ref !111416.
Theses added checks are not working correctly and
are never true even on supported hardware with correct
target version.
Curve normal is not available in legacy particle hair system. Construct
a local coordinate system instead of using a fixed normal direction [1,
0, 0] to avoid black appearance.
Add the features missing from #107176

* Irradiance integration.
* Self-shadows.
* Receive shadows from shadow maps.

Shadow tagging works by iterating all the froxels in a
compute shader and tagging the exact same position
that will be sampled by the volume scatter shader.
Froxels that are fully transmissive, have no scattering,
or are behind opaque geometry, are skipped.

It also adds a LoD bias parameter for shadow tagging,
driven by the volumetric tile size.
This works for punctual shadows, but directional lights
would need a way to support re-direction between levels
at sampling time, which is out of the scope of this PR.

Pull Request: blender/blender#110809
This is in order to follow the vulkan terminology
like the rest of the module.

Other implementations (GL, VK) are not supposed to work yet.

Pull Request: blender/blender#112026
This helps distinguish it as a separate thing from the submenus below.
The shadow intersection kernels needs to perform extra checks
to see whether object is really considered a blocker.

Pull Request: blender/blender#112012
The line `oxr_binding.egl.getProcAddress = eglGetProcAddress` supposedly
needs a type casting for it to compile successfully under llvm16.

Pull Request: blender/blender#111915
Pull Request: blender/blender#111993
In paint modes, show a selector for the active canvas, similar
to how other editors (UV/Image, Nodes, Action) do it.

Available canvas in each mode:
* Weight Paint: Vertex Groups
* Vertex Paint: Color Attributes
* Texture Paint: Canvas (material, image)
* Sculpt Paint: Color Attributes, canvas in experimental sculpt paint)

Pull Request: blender/blender#111756
This is a nasty gathering of several issues, main one being that 'local
collections' of 3DViews are still updated immediately instead of the
deferred update used for all other viewlayer cases.

The change in a16bcb6576 led to internal references to the Scene's
master collection to become invalid, which is the expected behavior.
But this turns the Scene's view_layers into invalid state too.

Ideally, there should never be resync of viewlayers of a scene being
deleted anyways.

For now, take the (hopefully!) safe approach of explicitely forbidding
any viewlayer update during ID deletion process, and deferring it at the
end of the process.

Note that this change may also give some marginal gerformance
improvements in some rare edge cases (like deleting a very heavy scene
with many collections and 'local collection' 3DViews ?).
by doing the subtraction first and then take the dot product. This
offers higher precision than taking the dot product first and then
subtract the result, especially in the cases where the ray origin is
very far away from the sphere center.
Mistake/typo in 5e9ea9243b (mixing up very similarly named variables -
leading to heap buffer overflow).

Pull Request: blender/blender#112037
This function is rather big and it's not clear what state variables are
in without a bunch of scrolling around. Plus, having the declarations
close to the function calls that set them makes it more clear that these
functions use the variables as output parameters. So this change should
help understanding the function flow.
The function is quite confusing, this should clarify things a bit.
Change the existing "Is Shade Smooth" node to be named "Is Face Smooth"
and add a new "Is Edge Smooth" node. Also give the "Set Shade Smooth"
node the ability to set face or edge smoothness.

The fact that the nodes process "smooth" data reversed from the builtin
"sharp" attributes can be reversed with versioning in a separate commit.

While it's tempting to abstract the sharpness status into a single node,
face and edge smoothness are accessed separately in edit mode, and the
subtlety of interacting with data on different domains would make that
confusing. Instead, a separate "Is Shade Smooth" node group asset will
give all the sharp elements taking into account both builtin attributes.

The fact that sharpness is stored separately on two domains makes the
best design for simple operations non-obvious. For example, you should be
able to remove all sharpness or make everything flat with a single node.
The behavior depends on whether the two attributes exist and the
combination of values between the domains.

---

![image](/attachments/c3f053c4-2b0f-44ac-9227-62071065fe56)

![image](/attachments/fd489fb3-314b-42ff-a5a9-e79578cbdfe7)

Pull Request: blender/blender#112029
The `Library.tag` data is supposed to be runtime only, so needs to be
cleared when reading data from blendfile.

This fixes the 'need resync' status of a library staying around forever
once set, annoying visual warning in the Outliner.
Could be useful for automated update/sanitizer tools in a production
pipeline.

Note that this propoerty is left editable for now, on purpose (external
tools may want to clear the flag).
This confused me plenty of times. If there are two local variables I
assume they contain different things. In fact these two were equal
throughout the function.
While an editor is in "Maximize Area" mode, allow Window / New Window.

Pull Request: blender/blender#111999
Allows themes to have fully transparent widgets when the inner and
outline theme colors are set to 0.0f alpha.

Pull Request: blender/blender#111980
Remove need for adding UI_BUT_LIST_ITEM, and replace use
of UI_BUT_ACTIVE_DEFAULT with UI_SELECT_DRAW

Pull Request: blender/blender#111938
When data-block/asset previews were not stored in the thumbnail cache
yet (or were outdated), we'd read them from .blend files. This could
lead to random crashes (but quite reliable with a small number of
previews to be read).

Wasn't clearing runtime memory which could lead to the
`PRV_TAG_DEFFERED` bit being set. This meant we would try to free
deferred preview data since eefee47a8a, which was just garbage memory.
e071288ab2 changed the "make node group" operator for new interfaces,
and in the process added incorrect lines removing a link when a group
input exists already. This crashes when there are multiple sockets
in selected nodes linked to the same non-selected output.

The link should not be removed, this is just lazy-initialization of the
group sockets.

Pull Request: blender/blender#112027
The basic idea is very simple. Whenever a supported menu is open, one can just
start typing and this opens a search that contains all the (nested) menu entries.

The main downside is that this collides with accelerator keys. Those are the
underlined characters in each menu. For now, we just enable this new searching
behavior in a few selected menus: Node Add Menu, View3D Add Menu and
Modifier Add Menu.

This new functionality can be enabled for a menu by setting
`bl_options = {'SEARCH_ON_KEY_PRESS'}` to true in the menu type.

The status bar shows `Type to search...` when a menu is opened that supports search.

Pull Request: blender/blender#110855
Code would access invalid (null) `pchan->bone` pointers, presumably due
to the (linked) armature data being heavily modified compared to the
local Object's poses? At least that's the idea of what caused this
invalid state of pose data.

Unfortunately the issue was detected in a very complex case.
Essentially, opening an older snapshot (r3034) of a Pets production anim
file with assets from current repository r3055), which have been heavily
cleaned-up.
This triggers massive amount of missing linked data from the older anim
file, and extremely heavy resyncing process of liboverrides.

In any case, calling `BKE_pose_ensure` before accessing object's pose
data should never be a bad thing. ;)
Batch deletion of IDs could lead to deleting ObData ones while keeping
the related ShapeKeys.

Orphaned shape keys are not allowed anymore in Blender, they are checked
against in both file write and read code.

This would lead to assert (and crash) e.g. in the liboverride code.

This commit forcefully add shapekeys of deleted meshes, curves etc.,
when calling e.g. `BKE_id_multi_tagged_delete`.

Note that deleting the shapekey when deleting the obdata ID was already
implemented in single ID deletion (`BKE_id_delete` & co), in the
underlying private `id_free`. But this is skipped in `no main` case.
which is used by the batch deletion code for performance optimizations.
Operator Confirms get blue highlights since we use those like dialogs.

Pull Request: blender/blender#111949
"filepath" was misleading since this path could also point into a .blend
file. Further, the convention was to use "filepath" for such files, and
"file_path" for when only an actual file path was expected. This is
highly confusing and non-obvious. Plus a (newer?) function broke with
the convention.

Just be explicit about the type of path, even if a bit verbose. It's
good to always have the reminder that this may be more than just a file
path when passing it around.
Show Toolbar items with selected highlight and hover highlight.

Pull Request: blender/blender#111939
Follow-up to #111232.

- Fix 128x128px version, rendered poorly on non HiDPI displays
- Ensure all versions of the icon have the correct dimensions. In the
  previous version, one icon was off by 2px due to downsampling
- Remove unused large versions, makes file 10x smaller

Pull Request: blender/blender#112033
These asserts are helpful for development, but are too expensive and
strict to live permanently in debug builds.

Resolves #112035
Unnecessary since 7f9d51853c
Crash happened, when strip start frame has negative value.
Sound properties can not be animated in negative frames.
Accessing the span should be possible. `Span` already allows pointer
access itself.
In 1fb692e896 values were clamped, but not used.
Remove debug asserts that don't serve a clear purpose besides testing
something that's clear from the called code, and require accessing mesh
data just for asserts.
Store theme colors in variables for reuse.
Move color_add_v3_i to a public function,
useful for making minor color adjustments.
This functionality was lost in [0].

[0]: 694bc4d040
Resolve an issue where drawing the status-bar's report info could
assert on startup. This was probably caused by accessing theme colors
before drawing.

The reporter traced this back to [0] however I couldn't reproduce the
problem. Remove theme access from INFO_OT_reports_display_update as the
color has not been used since [1].

[0]: 6de294a191
[1]: 694bc4d040
For the label width the offset from the node width needs to be scaled by
`UI_SCALE_FAC`.

Pull Request: blender/blender#112047
Introduced with #110788
Because of the logic introduced there, the first key might not be drawn,
resulting in a wrong extrapolation line.

This fixes it by always adding the first point

Pull Request: blender/blender#112072
Add missing Keymap for cycling fallback tool in node editor
to maintain consistency.

Pull Request: blender/blender#112006
Error in [0] referenced two operators when a dynamic enum is used.

[0]: 1015bed2fd
When adding modifiers from assets in the new modifier menu, switching
the node group the modifier uses afterwards will not be common. The goal
is to replace the builtin modifier directly. In that case it's easier to
just add a new modifier. The "Empty Modifier" item makes it easy to
choose an arbitrary node group anyway.

Combined with hiding the two sub-panels when they are unnecessary,
many node-modifiers will look just as clean as their builtin counterparts.

The option to show the data-block selector is added to the menu
in the node header so it's still accessible though.

Pull Request: blender/blender#111995
#111972 made sure copied sockets have unique identifiers, but it didn't
cover the case of copying a panel and its children.

- Added an optional `uid_gen` argument to item copy functions which
  generates new unique identifiers for copied items. If not specified
  the items will retain the original identifiers (e.g. when copying an
  entire node tree).
- Removed the `copy_items` panel function from the API. Only used
  internally and requires a uid generator now.

Pull Request: blender/blender#112074
Panels are supposed to fill in the background.

Pull Request: blender/blender#112078
This keeps initial node groups using conventional outputs..inputs
layout.

Pull Request: blender/blender#112076
Add a 'Custom Properties' sub-panel to the Bone Collections panel.

Custom properties for bone collections were introduced in 9eee076a29,
this just adds the GUI.

Ref: #108941
Show the Bone Collections panel when the Armature is pinned in the
properties editor.
The official SDK was released, add correct paths for that version. The
old paths can be removed once the buildbot uses this SDK.

The SDK installer sets a HIP_PATH environment variable. This is used to
automatically detect the location when HIP_ROOT_DIR is not manually
specified.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: blender/blender#110519
The default options are now based on the active object type
and mode, and the new node group is named "Tool".

See #111523, #101778

Pull Request: blender/blender#111761
Added check for null active region

Pull Request: blender/blender#112099
In the charge splash screen demo file for Blender 3.4, the corrective
smooth modifier is called with a zero vertex mesh, which means it ends
up trying to free a null pointer is creates locally. Checking for null
resolves the crash. A future fix will remove the assumption that
`rest_coords` are allocated with the guarded allocator and can be
used as an argument to `MEM_dupallocN`.
Don't call `MEM_dupallocN` on unknown data. We don't know that this
pointer references a heap allocation, especially not an allocation made
by Blender's allocator. Even if that's the case currently, we don't want
to rely on that in the future as attribute data management gets more
flexible with implicit sharing.

Using `Array` is a simpler way to copy memory, though it does require
a bunch of boilerplate changes in the rest of the modifier.
Seems to have been a typo in the descriptions.

Pull Request: blender/blender#112109
"Apply as Shape Key" and "Save as Shape Key" shared the same icon, it
is good practice to not use the same icon for two consecutive items
in the same group in a menu.

Also add a separator to split Shape Key-related items from the rest.
Tool highlighting that targets RGN_TYPE_TOOLS only, moves
the highlighting to ui_block_func_POPUP

Pull Request: blender/blender#112113
When using a pointer offset that may be out-of-bounds the integer
must not truncate the offset.

Issue raised by !111193.

Co-authored-by: Loren Osborn <linux_dr>
Assert that the partial is part of the particle system before
creating an index. This is a hint to developers that the cast
is safe and using a pointer offset isn't going to cause problems.

Issue raised by !111193.

Co-authored-by: Loren Osborn <linux_dr>
Missed from [0] where handles should be considered selected when the
knot is selected.

[0]: 78b6ed19f3
Follow convention used elsewhere.
Extruded bezier copied the selection from the previous point
which didn't always make sense - the handle pointing in the opposite
direction from the extrusion could be selected for example.

Now a single handle is always selected.
Follow the convention now used for 3D curve selection.
This was needed while testing #96544, now all curve picking selects
bezier knots without handles - the option can be removed.

This is a functional change for the 2.7x keymap, however selecting
bezier points with handles isn't a useful difference to keep.
This commit mainly adds the low-level logic to link and create a runtime
override for brushes.

The biggest changes are in `setup_app_data` (post-loading of .blend
file), to add support to move over some data from old bmain to newly
loaded bmain. The logic is complex, and different depending on whether
it is an undo (aka memfile read) step, or an actual .blend file reading:
* On undo, we only port over brushes themselves, their dependencies are
  not handled. However, since memfile reading code already ported over
  linked IDs, these do not need to be swapped.
* On real .blend file loading, brushes from the old bmain are being
  reused, as long as they do not conflict (name/lib) with brushes from
  the new bmain. Their dependencies are also re-used if needed.
  Only exception: local assets from old bmain are never re-used.

There is also a new step added to the 'open file' process, which checks
if the to-be-opened file is a library of the currently opened one, and
if so, if there are local tweaked overrides of assets from the new file.
The option to save these tweaks in draft is currently an empty mockup,
but the rest is functional.

Brush now has a new `AssetWeakReference` pointer to keep track of the
last active brush asset, and restore it on fileread in case there is
currently no active brush asset for the given paint/sculpt mode.

Some parts of this commits are mockups/place-holders that are not
expected to be committed as-is, if at all:
* Some initial support for an asset-shelf (using code from
  `brush-asset-project` branch), very much WIP still.
* Definition of test brush library with semi-hard-coded path.
* There is also a drawing bug because the poll function of Brush
  panels return false initially (tool has no data-block ref).
  Very unclear what's hapening here.

NOTE: This branch is based on the `brush-asset-project` branch.

Ref. #101908.
Bastien Montagne approved these changes 2023-09-08 11:58:02 +02:00
Bastien Montagne left a comment
Owner

Thanks

Thanks
Author
First-time contributor

This is not appliable, closing it.

This is not appliable, closing it.
Dalai Felinto closed this pull request 2023-09-08 12:13:30 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mont29/blender#1
No description provided.