Commit Graph

127433 Commits

Author SHA1 Message Date
Campbell Barton
8032ee9df2 Revert "Cleanup: Replace IO orientation enum with blenlib type"
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.
2023-09-01 10:35:14 +10:00
Germano Cavalcante
14a9c2b1aa Fix #111715: VSE: "Bounding Box Center" pivot point is the same as "Median Point"
The logic to calculate the bounds was missing.

Also add a notifier with `NC_SPACE | ND_SPACE_SEQUENCER` to update the
space.
2023-08-31 15:41:29 -03:00
Germano Cavalcante
d81a32dcaa UV: Deduplicate code that traverses each UV
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.
2023-08-31 15:31:05 -03:00
Germano Cavalcante
91210d8172 Cleanup: Remove unused UV functions
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.
2023-08-31 15:31:05 -03:00
Miguel Pozo
f70bb87dd1 Fix #111587: Enable SSBOs for Intel 4400/4600 GPUs 2023-08-31 20:27:55 +02:00
Harley Acheson
7833703603 UI: Reverse Order of Timeline Menu Items
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
2023-08-31 20:25:35 +02:00
Harley Acheson
b122faf705 UI: Consistent Menu/Block/Popup Content Ordering
All Content is shown in natural top-down order regardless of where it
is initiated.

Pull Request: https://projects.blender.org/blender/blender/pulls/109798
2023-08-31 20:24:53 +02:00
Hans Goudey
bb181fb8f1 Cleanup: Remove redundant asserts about dirty normals
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.
2023-08-31 14:22:22 -04:00
Hans Goudey
74bd927f7c Cleanup: Remove unnecessary/wrong solidify modifier normal recalculation
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.
2023-08-31 14:15:28 -04:00
Hans Goudey
d600a38e44 Cleanup: Fix warning from mistaken copying od node tree
Mistake in 1e81d35138.
2023-08-31 14:08:55 -04:00
Hans Goudey
b81a257059 Fix: Build error after previous commit
Somehow variable rename went missing in these two places.
2023-08-31 14:05:37 -04:00
Hans Goudey
2228006d5b Subdiv: Use index instead of pointer for grid to face map
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
2023-08-31 19:40:39 +02:00
Hans Goudey
074dbf08cd Cleanup: Replace IO orientation enum with blenlib type
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.
2023-08-31 13:29:52 -04:00
Jacques Lucke
41bf578182 UI: support context dependent menus (aka assets) in menu search
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
2023-08-31 18:56:57 +02:00
Lukas Tönne
2a94a99605 Fix #111713: Nodes crash when overriding due to item.parent nullptr
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
2023-08-31 18:52:56 +02:00
Hans Goudey
78dd7d91c4 Cleanup: Move IO headers to C++
See #103343
2023-08-31 12:52:04 -04:00
Jacques Lucke
eb3b55f2a7 UI: build menu search parent tree eagerly
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`.
2023-08-31 18:26:51 +02:00
Miguel Pozo
8ea2364e36 Fix: Workbench-Next: Image Render crash 2023-08-31 18:07:18 +02:00
Hans Goudey
ceb3d75c18 Cleanup: Use const for context store variables
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.
2023-08-31 12:00:04 -04:00
Hans Goudey
feb14a4d38 Cleanup: Simplify bContextStore API with C++ concepts
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.
2023-08-31 12:00:04 -04:00
Hans Goudey
1763a46cbf Cleanup: UI: Store uiBlock context stores in vector instead of list
Also fix an issue where contest stores were copied with the "used"
flag set after 7d7e90ca68.
2023-08-31 12:00:04 -04:00
Christoph Lendenfeld
9d0aed6589 Animation: Shear operator for Graph Editor
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
2023-08-31 17:09:01 +02:00
Bastien Montagne
d6ae841806 LibOVerride: Add resync callback to RNA (python) API of LibOverride data.
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.
2023-08-31 16:46:25 +02:00
Pablo Vazquez
75919610b4 Compositor: Re-organize Add menu
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
2023-08-31 16:32:49 +02:00
Jacques Lucke
e92c59bc9b Geometry Nodes: refactor simulation storage and how simulation nodes access it
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
2023-08-31 16:28:03 +02:00
Pratik Borhade
daa4c0f91e Fix: set default bone collection active
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
2023-08-31 16:26:57 +02:00
Christoph Lendenfeld
05f8d61ec6 Fix: Blend to Ease keyframes property name
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
2023-08-31 16:21:56 +02:00
Iliya Katueshenock
d4ae417b1e Geometry Nodes: simplify outputting a GField from a node
Pull Request: https://projects.blender.org/blender/blender/pulls/111196
2023-08-31 16:02:19 +02:00
Iliya Katueshenock
e951924b33 Cleanup: forbid implicit copy and move for multi function
This avoids accidental copies/moves which are never really intentional.

Pull Request: https://projects.blender.org/blender/blender/pulls/110168
2023-08-31 16:01:29 +02:00
Jacques Lucke
d3eb85294f Cleanup: use C++ containers in menu search 2023-08-31 15:59:39 +02:00
Pratik Borhade
c75d6ae0ed Fix: Bone collection renaming when empty string
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
2023-08-31 15:12:27 +02:00
Philipp Oeser
726ef2c873 Fix: remove UI code relating to bone layers
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
2023-08-31 15:02:07 +02:00
Pablo Vazquez
7ab67dafb3 UI: Theme Editor: Align relevant columns and simplify labels
* 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.
2023-08-31 14:59:53 +02:00
Philipp Oeser
e46b87f4b1 Node Editor: show auto-attach status while moving
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
2023-08-31 14:59:21 +02:00
Lukas Tönne
fde35b65d1 Fix: socket hidden in the link drag operator for group input nodes
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
2023-08-31 14:42:06 +02:00
Hoshinova
af54b16778 Nodes: fix Voronoi Noise discontinuities when Lacunarity is 0.0.
When the Lacunarity input is driven by e.g. a Texture discontinuities can
arise because the `for` loop breaks prematurely.

Pull Request: https://projects.blender.org/blender/blender/pulls/111395
2023-08-31 14:20:27 +02:00
Julian Eisel
ba44afae5e Cleanup: Simplify outliner tree element assert
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.
2023-08-31 13:16:01 +02:00
Julian Eisel
4a689ea7ee Cleanup: Remove dead outliner tree element code, replace with assert
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.
2023-08-31 13:13:56 +02:00
Pablo Vazquez
9ab3a8f840 UI: Theme Editor: Mention editors that share settings
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.
2023-08-31 13:11:48 +02:00
Pablo Vazquez
4649cf15b7 UI: Theme Editor: Sort widget colors alphabetically
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".
2023-08-31 13:11:48 +02:00
Xavier Hallade
40a39c2976 Cycles: oneAPI: cleanup: drop __spirv_ocl_cos workaround
As __FAST_MATH__ isn't defined anymore since
09df1f4caf, sycl::cos uses the precise
implementation, no need to call __spirv_ocl_cos anymore.
2023-08-31 13:10:29 +02:00
Julian Eisel
6a441482e6 Cleanup: Simplify sanity check for new outliner tree element design
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.
2023-08-31 13:00:52 +02:00
Julian Eisel
0699c9a2b3 Cleanup: make format changes in space_sequencer.py 2023-08-31 13:00:03 +02:00
Julian Eisel
c130b703c5 Cleanup: Use snake case for outliner functions
To follow the style guide, these functions should use snake case. See
https://wiki.blender.org/wiki/Style_Guide/C_Cpp#Naming.
2023-08-31 12:50:15 +02:00
Xavier Hallade
09df1f4caf Fix #111162: Overlay drawing issues due to shared library using fastmath
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
2023-08-31 10:43:27 +02:00
Xavier Hallade
6a301cf07f Cycles: oneAPI: increase windows min driver requirement to 101.4644
101.4644 has been released 2023-08-15 and fixes the Windows specific
issue #109282.
2023-08-31 10:22:51 +02:00
Campbell Barton
d478d0597a Fix bone collection selecting not flushing to the tip/root
Also correct the notifier in edit-mode.
2023-08-31 17:45:49 +10:00
Campbell Barton
54e2aaf9ad Cleanup: split WM_keyconfig_new into new/ensure functions
Use less ambiguous naming where new(..) always returns new data.
2023-08-31 17:45:39 +10:00
Jesse Yurkovich
9a1c66d503 Cycles: Match Eevee when processing ramp/camera curves
Slightly increase the number of times ramps/curves are sampled to better
align with the results produced by Eevee.

Pull Request: https://projects.blender.org/blender/blender/pulls/111082
2023-08-31 05:08:04 +02:00
Campbell Barton
88a875ec3a Fix #111702: Crash accessing KeyMapItem.properties on script reload 2023-08-31 12:04:30 +10:00