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: https://projects.blender.org/blender/blender/pulls/111782
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: https://projects.blender.org/blender/blender/pulls/111785
`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`.
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: https://projects.blender.org/blender/blender/pulls/111687
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.
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.
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 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.
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.
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.
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: https://projects.blender.org/blender/blender/pulls/111078
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.
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: https://projects.blender.org/blender/blender/pulls/111752
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: https://projects.blender.org/blender/blender/pulls/111755
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`.
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.
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.
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: https://projects.blender.org/blender/blender/pulls/111735
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.
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: https://projects.blender.org/blender/blender/pulls/111623
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: https://projects.blender.org/blender/blender/pulls/111733
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: https://projects.blender.org/blender/blender/pulls/111745