Use the asset icon for the "Mark Asset" operator in menus.
Using icons is not only good for accessibility, but also to create
a connection with the Asset Browser and the icon shown in the
data-block template once marked as asset.
Pull Request: https://projects.blender.org/blender/blender/pulls/112111
Regression [0] which merged index assignment into an earlier loop.
This caused the indices to be overwritten by p_chart_abf_solve
causing unwrap to fail.
[0]: 8ace65e3c6
Node Group icon have a ID-counter widget and can not be drawn
sequentially with other icons without extra offset. To fix icon
overlapping and add more consistency, icon, specific for such node,
should be first in its header.
Pull Request: https://projects.blender.org/blender/blender/pulls/112142
Breaking change since the operator name changes.
Users have been confused about this for a long time.
The term "bake" in the context of animation usually means
to add keys at a given interval without changing the shape of the curve.
The fact that the curve isn't editable after baking was the main issue.
In order to stop the confusion the operator is renamed to "Keys to Samples"
to indicate that there is a conversion happening and that there are no keys afterwards.
The Un-Bake operator has also been changed to "Samples to Keys"
The operator description has been updated to mention that after the conversion
the data is no longer editable.
The "Bake Sound to F-Curves" has been renamed to "Create Samples from Sound"
Pull Request: https://projects.blender.org/blender/blender/pulls/111049
Expose to RNA the bones that are assigned to a collection, as
`bcoll.bones`.
This will return an empty list when in armature edit mode, as only after
exiting edit mode the changes are flushed to the armature.
This patch has been originally authored by Ares Deveaux #106526
Scale the selected key segments to their average
Unlike just scaling using the transform tools, this scales to the average of each individual F-Curve segment.
Co-authored-by: Ares Deveaux <aresdevo@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/111744
There are no more bone groups, and the colors have been moved to the
bones themselves (042c5347f4). Now the
armature property that controls whether they're shown or not also refers
to 'bone colors' instead of 'group colors'.
This was introduced with #109015
The issue manifested in two ways.
* snapping did not work with rotate and scale
* the scale and rotate value would increment in steps instead of fluidly
This was caused because the snapping code would force the
mode to `SCE_SNAP_TO_INCREMENT` if the snapping
wasn't enabled for the given transform mode.
This snapping mode is not supported in the Animation Editors though,
causing the snapping `switch` to fall back to `default` which is to do no snapping.
My assumption is that this mode also causes the increments in the transform.
It would be good to support that in the future,
but for now this is just a fix to get the 3.6 behavior back.
Pull Request: https://projects.blender.org/blender/blender/pulls/112088
The drawing code of the keyframe handles had the same issue
as the curve drawing itself, namely that it drew everything even things out of view.
This patch uses the same logic introduced in #110301 to get the
bounding indices of the curve in the viewport and only draw those.
This does NOT improve the performance when fully zoomed out on large data.
Test setup: 6000f of dense key data on 62bones
I ran my test on a zoom level that had the Graph Editor display about 500 frames.
The numbers are per curve and ONLY the handle drawing functions.
| Before | After |
| - | - |
| ~300μs | ~53μs |
Pull Request: https://projects.blender.org/blender/blender/pulls/112126
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.
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.
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>
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>
"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.
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.
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`.
#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: https://projects.blender.org/blender/blender/pulls/112074
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: https://projects.blender.org/blender/blender/pulls/111995
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: https://projects.blender.org/blender/blender/pulls/112072
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