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.
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: https://projects.blender.org/blender/blender/pulls/111758
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.
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: https://projects.blender.org/blender/blender/pulls/111481
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
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: https://projects.blender.org/blender/blender/pulls/111723
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: https://projects.blender.org/blender/blender/pulls/111730
* 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.
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: https://projects.blender.org/blender/blender/pulls/111739
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: https://projects.blender.org/blender/blender/pulls/111707
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.
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.
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".
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.
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: https://projects.blender.org/blender/blender/pulls/111708