This is meant as a replacement for the Rotate Euler node. Overall it
should be more performant, and the clarity given by the separate socket
type should help distinguish its purpose.
The Rotate Euler node is removed from search and the add menu by this
commit. In the future it can be versioned away. That isn't done now to
avoid a breaking API change and to make this commit less risky.
Pull Request: https://projects.blender.org/blender/blender/pulls/116106
This implements the `stroke_arrange` operator for grease pencil v3.
This behaves the same as `GPENCIL_OT_stroke_arrange` but renamed to `stroke_reorder`.
It should be more clear what the operator does.
Note: This also adds new key binds.
Co-authored-by: Falk David <filedescriptor@noreply.localhost>
Pull Request: https://projects.blender.org/blender/blender/pulls/116682
Add-ons "bl_info" was supported for add-ons which weren't registered,
however the real modules weren't handled causing module_bl_info()
to return dummy values when an extensions add-ons module was passed in.
This caused the minimum Blender version check after enabling an add-on
to do nothing.
Now the "bl_info" from extension modules is ignored and the bl_info
is created on demand from the manifest.
- Add a warning when an extensions meta-data is missing.
- Remove the time-stamps from message that time-stamps have changes
since knowing the exact times isn't helpful.
Appending then removing a draw function caused the is_extended()
method to return true afterwards, resolve by checking if there are
multiple draw functions.
- Rename info to bl_info, to avoid confusion with extensions manifest,
which should eventually be accessible in a similar way.
- Rename module_name to addon_module_name to avoid confusion with
extension repositories name-spaced modules.
- Clarify naming for TOML manifest.
Adds vertex groups and basic operator support to the `GreasePencil` data
block.
Vertex groups in the `GreasePencil` ID are used as the source of truth
for vertex groups names and ordering in the UI. Individual drawings also
have vertex group lists, but they should not be modified directly by
users or the API. The main purpose of storing vertex group names in in a
drawing's `CurveGeometry` is to make it self-contained, so that vertex
weights can be associated with names without requiring the
`GreasePencil` parent data.
Vertex group operators are implemented generically for some ID types.
Grease Pencil needs its own handling in these operators. After
manipulating `vertex_group_names` the `validate_drawing_vertex_groups`
utility function should be called to ensure that drawings only contain a
true subset of the `GreasePencil` data block.
Operators for assigning/removing/selecting/deselecting vertices are also
implemented here. To avoid putting grease pencil logic into the generic
`object_deform.cc` file a number of utility functions have been added in
`BKE_grease_pencil_vgroup.hh`.
Fixes#117337
Pull Request: https://projects.blender.org/blender/blender/pulls/117476
This is an optional parameter for int properties, which then show up as
enum properties.
Included fix: reset ID properties' enum items when the `items` parameter is `None`.
Example usage:
```python
import rna_prop_ui
# Add a regular int property.
rna_prop_ui.rna_idprop_ui_create(D.objects['Cube'], "test", default=123, min=-3, max=500)
# Change to an enum property with items (min/max are ignored).
rna_prop_ui.rna_idprop_ui_create(D.objects['Cube'], "test", default=0, min=-10, max=10, items=[("APPLES", "Apples", ""), ("ORANGES", "Oranges", "")])
# Switch back to regular int property.
rna_prop_ui.rna_idprop_ui_create(D.objects['Cube'], "test", default=1, min=0, max=10)
```
Pull Request: https://projects.blender.org/blender/blender/pulls/117289
One error that occurs when packaging a multi-file addon into a ZIP is
zipping the contents of the addon, instead of the addon directory.
When installing the ZIP using addon_install, the files that should be
inside a directory instead get extracted into the top-level of the
script directory. There was also no user feedback about what went wrong.
Detect this case and fail with an error.
Ref: !117664
Thickness modifier ported to Grease Pencil v3.
Note: Uniform thickness range and UI step changed to better
match new thickness of blender unit.

Pull Request: https://projects.blender.org/blender/blender/pulls/117631
This pull request adds the ability for users to specify input samples
on a per brush basis. The existing field in the main `Paint` struct
forces all brushes of a particular tool type to use the same value.
A new field was added to the `Brush` struct to allow for this value
to be specified there instead, and a corresponding unified value in
`UnifiedPaintSettings` has been created to allow users to use the
same value across all brushes.
Addresses #108109
Pull Request: https://projects.blender.org/blender/blender/pulls/117080
Part of changes proposed in #117285.
Unfortunately layout panels aren't supported in popovers, so this has
been worked around using a kludge that stores the expanded state as a
class member, toggled via "wm.context_toggle".
This pull request adds the ability for the `propagation_steps` value
for certain automasking settings to be applied globally instead of
using the per-brush attribute.
Previously, while the flag settings were stored at the brush and global
level, the `propagation_steps` value would always change the brush
attribute even when using the global menu.
Addresses #102377
Pull Request: https://projects.blender.org/blender/blender/pulls/117316
This patch adds support for _Menu Switch_ nodes and enum definitions in
node trees more generally. The design is based on the outcome of the
[2022 Nodes Workshop](https://code.blender.org/2022/11/geometry-nodes-workshop-2022/#menu-switch).
The _Menu Switch_ node is an advanced version of the _Switch_ node which
has a customizable **menu input socket** instead of a simple boolean.
The _items_ of this menu are owned by the node itself. Each item has a
name and description and unique identifier that is used internally. A
menu _socket_ represents a concrete value out of the list of items.
To enable selection of an enum value for unconnected sockets the menu is
presented as a dropdown list like built-in enums. When the socket is
connected a shared pointer to the enum definition is propagated along
links and stored in socket default values. This allows node groups to
expose a menu from an internal menu switch as a parameter. The enum
definition is a runtime copy of the enum items in DNA that allows
sharing.
A menu socket can have multiple connections, which can lead to
ambiguity. If two or more different menu source nodes are connected to a
socket it gets marked as _undefined_. Any connection to an undefined
menu socket is invalid as a hint to users that there is a problem. A
warning/error is also shown on nodes with undefined menu sockets.
At runtime the value of a menu socket is the simple integer identifier.
This can also be a field in geometry nodes. The identifier is unique
within each enum definition, and it is persistent even when items are
added, removed, or changed. Changing the name of an item does not affect
the internal identifier, so users can rename enum items without breaking
existing input values. This also persists if, for example, a linked node
group is temporarily unavailable.
Pull Request: https://projects.blender.org/blender/blender/pulls/113445
The recently landed PR #115798has made it so the
hotkey `K` would call `anim.keyframe_insert_menu` with the property
`always_prompt` set to `True`.
This property still defaulted to `False` when called
from the menu leading to inconsistent
behavior when a keying set is active.
Fix it by setting `always_prompt` to `True` for the menu entries.
Pull Request: https://projects.blender.org/blender/blender/pulls/117511
This is in response to feedback to the changes from #113504
While it does simplify inserting keyframes,
sometimes artists want to insert keys only to e.g. Location.
This takes longer to do now, since the option is in a menu.
This PR changes the following:
* new `K` hotkey to bring up the "Keying Set" menu.
This will always show the menu, even if a keying set is active.
* `Shift + K` will open a menu to set the active keying set
* with "Pie Menu on Drag" enabled in the user preferences,
hitting `I` and moving the mouse will bring up a pie menu
to insert only specific transform channels
Conceptually this separates the keying set behavior from the
insert keyframe behavior.
`I` will always add keyframes.
While `K` always shows keying set options.
Pull Request: https://projects.blender.org/blender/blender/pulls/115798
This pull request adds the ability for the `Limit` and `Falloff` values for the View and Normal automask modes to be applied per-brush instead of modifying the global tool value.
Previously, while the flag settings were stored at the brush and global level, the values would always change the global value even when using the advanced tab of the brush menu.
## Testing
* `make test` results in 3 failures (49 - io_wavefront, 134 - compositor_distort_cpu, 323 - imbuf_save), but these tests appear to fail even prior to any changes being applied when running locally
* Manual testing with older version blend files to ensure that the value is defaulted correctly.
* Visual testing to verify that brush values are favored over global values.
Addresses #115174
Pull Request: https://projects.blender.org/blender/blender/pulls/117433
This is needed so extensions repositories can reference
user-script directories without them having hard-coded paths
which will be invalid when upgrading a Blender version.
Smooth modifier ported to Grease Pencil 3.0
Exposed `smooth_curve_attribute()` from `grease_pencil_edit.cc`
to achieve the smoothing effect. It will not be the exact same result
as the old algorithm.
Pull Request: https://projects.blender.org/blender/blender/pulls/116975
Package management has been moved into addons_contrib so the addon
can be enabled when enabling extension repositories.
This means users can test extension repositories without having to
install a separate add-on.
Additional work is still needed with the server before this is ready
for general testing though.
Part of #117286.