Revert a change from [0]. There is no need to count items in the
collection/array as the property iterator can detect this.
[0]: a280e8a68c15ee3ec0978fb594b29d083fd2bcd6
Sometimes .blend files have compatibility issues between Blender versions,
because .blend files depended on the specific order of geometry elements
generated by some nodes/modifiers (#112746, #113018). While we make
guarantees about the order in some places, that is relatively rare, because it
makes future improvements much harder. The functionality in this patch
makes it easier for users to notice when they depend on things that are not
expected to be stable between Blender builds.
This is achieved by adding a new global flag which indicates whether some
algorithms should randomize their output. The functionality can be toggled
on or off by searching for `Set Geometry Randomization`. If there are no
differences (or acceptable minor ones) when the flag is on or off, one can
be reasonably sure that one does not on unspecified behavior (can't be 100%
sure though, because randomization might be missing in some places). If
there are big differences, one should consider fixing the file before it comes
to an actual breakage in the next Blender version.
Currently, the setting is only available when `Developer Extras` is turned on,
because the setting is in no menu.
With this patch, if we get bug reports with compatibility issues caused by
depending on indices, one of the following three cases should always apply:
* We actually accidentally broke something, which requires a fix commit.
* Turning on geometry randomization shows that the .blend file depends on
things it shouldn't depend on. In this case the user has to fix the file.
* We are missing geometry randomization somewhere, which requires a fix
commit.
Pull Request: https://projects.blender.org/blender/blender/pulls/113030
A lot of Capture Attribute nodes in sequence can create a huge number of attributes.
If these attributes are not used, they should be removed.
The speed of the Capture Attribute and Store Named Attribute nodes is now identical
(for the better). There are also no extra RAM usage now.
Pull Request: https://projects.blender.org/blender/blender/pulls/113053
Separate user configuration of subpixel antialiasing from the hinting
options. For example, this allows turning this on while hinting is
"None", or off when hinting is "Full".
Pull Request: https://projects.blender.org/blender/blender/pulls/113027
Subchannel (mesh, shapekey, lattice, speaker, ...) color could not be
changed from NLA Preferences, `ds_subchannel` was only initialized in
userdef_default_theme.c [making it more or less hardcoded].
Now expose this in Preferences.
Pull Request: https://projects.blender.org/blender/blender/pulls/113045
If an armature is present, but not active the group_select_mode defaults to WT_VGROUP_BONE_DEFORM, and throws an error because it can't find any active vertex groups. we're now checking to see if any bone is actively deforming before switching to WT_VGROUP_BONE_DEFORM (else defaulting to WT_VGROUP_ALL)
Pull Request: https://projects.blender.org/blender/blender/pulls/112648
Make the Ctrl+ACCENT_GRAVE hotkey call the 'show all bone collections'
operator (`armature.collection_show_all`), instead of 'show all armature
layers' (`armature.layers_show_all`).
This was the last reference to `armature.layers_show_all`, and the operator
has been removed.
Changes to the mouse cursor would only display when the main loop
was being handled, so blocking actions such as file load wouldn't
refresh the cursor.
Solve by flushing the display when the cursor changes.
Copy to selected & Alt-LMB dragging buttons didn't account for
custom properties, An IDProperty from one item was applies to other
items in the selection.
Now ID property paths are resolved up for every selected item.
Don't pass custom property names to RNA_struct_type_find_property
since this meant custom-property names could intentionally collide with
RNA property names.
In Interface text inputs, when double-clicking to select a word, set
the "initial selection position" to the beginning of the word. This way
you can continue to select forward by dragging before releasing mouse.
Pull Request: https://projects.blender.org/blender/blender/pulls/113037
The default theme of blender has no `icon_border_intensity` and
therefore only loads the regular icons. When newly loaded theme has the
`icon_border_intensity` set it needs to reload the icon textures so both
icon maps would be loaded.
Without reloading the icons a GPU texture is missing and would crash
blender at first use. Starting Blender the second time it would load the
correct icons and would work as expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/113016
When the tool settings or asset shelf header would draw with some
transparency, the separator line between regions would visibly overlap
the background behind buttons, which looked unpolished. Ensure there is
no overlap (but also no gap, which became visible after accounting for
the separator line in the background drawing).
Flickering caused by in-flight SSBO data
overwrites has been resolved by ensuring
data updates go into a new buffer while
existing data is in flight.
GPU_finish has also been removed from
SSBO read due to its frequent mid-frame use
limiting performance.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/113019
In the Armature properties, rename the 'Skeleton' panel to 'Pose'. This
panel used to house the armature layers, but they have been transformed
into bone collections, which have their own panel. Also the term 'skeleton'
is not used in Blender, so having that as title here felt out of place.
There are some ideas to introduce different 'poses', to disconnect the
mesh binding pose from the animation reference pose. This rename sets
things up for exposing such functionality.
The Outliner exposed its context to the header as well which makes some
operators available there. While technically this is all fine, it's a
bit odd to the user, since they don't expect data-editing operations
when right clicking on a header that itself doesn't list data. Instead
only expose the Outliner context in the main region.
Don't assume existence of GPU backend in (background) preview rendering.
Also add null pointer checks and rely on assert instead to detect
invalid usage of GPU_render_begin/end, so that potential future mistakes
don't cause crashes.
Pull Request: https://projects.blender.org/blender/blender/pulls/112971
Add an overview of those bone collections the active/pinned bone is
assigned to.
This overview was originally there, showing the armature layers and the
bone group. This is now replaced by a list of the bone's collections. The
only possible interaction is unassigning the bone & toggling visibility
of the bone collections.
Lattices would give the choice of going to weightpaint mode (which would
fail immediately because of `vwpaint::mode_toggle_poll_test`) because it
was marked as a compatible mode in `ED_object_mode_compat_test`.
I dont think this was ever supported properly, why this was marked as a
compatible mode is unknown (I stopped tracing git history at
deebf4f8f0d7).
Even if it was at some point, weightpaint mode nowadays is totally
depended on Mesh, so seems better to just remove it from Lattices.
Pull Request: https://projects.blender.org/blender/blender/pulls/112411
The grid was pointer was moved to the next element at every loop, which
made `vi.grid` and `vi.mask` disagree. Instead, iterate the grid before
accessing data, so the pointers agree. To avoid unrolling the first loop
iteration or adding a branch for the first iteration, start the grid at
a -1 offset.
Pull Request: https://projects.blender.org/blender/blender/pulls/113015
The array modifier used to output the start cap even if the
mesh is empty. This behavior was unintentionally changed in
8b2556e8d8. This patch brings back the old behavior.
The use case for this was to load an evaluated mesh of one
object into another object. So it was always kind of a hack, but
there is still no good reason to change the behavior.
Nowadays, one should just use the Object Info node in Geometry
Nodes to achieve the same result.
Move operators that act on the active bone collection to a 'specials'
context menu, just like other UILists.
The menu now contains:
- Solo the active bone collection (i.e. make it visible and hide others).
- Show all bone collections.
Avoid an error when drawing the Lattice properties panel. The code for
drawing mesh attributes warnings didn't account for the fact that lattices
also have vertex groups, and thus that particular code can be called
without an active mesh.
With armature layers it was possible to, with one click, show a single
layer and hide all the others. This is now possible with bone collections
as well.
For that I added a new operator `armature.bone_collection_solo_visibility`,
with a button next to the list of bone collections. The icon is
`SOLO_ON`, which is also used in the NLA.
MPoly -> offset indices refactor (7966cd16d6dc4) did not realize
that due to forced triangulation the mesh changes, so we need
to re-fetch the faces array after triangulating. Fixes#112011
For text objects, the CharInfo mat_nr material index used to start at 1
(not at zero like for meshes or nurbs).
Code was mostly considering this (but not in all places, so material
index handling (removing/moving) could still go wrong.
As an alternative to !109746 (where it was made sure all places would
make the right assumption about mat_nr starting at 1), this PR now
changes the mat_nr to be zero-based.
This is more in line with other places handling material indices.
Versioning code is in place to properly convert old files.
Fixes#109491
Pull Request: https://projects.blender.org/blender/blender/pulls/112954
Blender's "Copy to Selected" feature only copies single properties, while
bone colors consist of four properties (palette + 3 custom colors). These
can now be copied with a single click.