Commit Graph

1061 Commits

Author SHA1 Message Date
YimingWu
56439d88f5 GPv3: Noise modifier
This ports the noise modifier to GPv3.
There should be no functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/117057
2024-01-29 16:49:16 +01:00
Sean Kim
c61d1bcb54 Sculpt: Add global automasking propagation steps
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
2024-01-29 15:39:34 +01:00
Brecht Van Lommel
cbb0a96443 Cleanup: make format 2024-01-28 11:59:10 +01:00
Hans Goudey
e8b7731d7c UI: Use icon for curves surface UV map property
Also just show the button inactive rather than disabling it,
as done elsewhere in the UI.
2024-01-26 19:06:32 -05:00
Falk David
73e5e975e2 Cleanup: GPv3: Add fixme comment to _defs_paint_grease_pencil 2024-01-26 15:24:00 +01:00
Falk David
cb9fef3841 Cleanup: GPv3: Default keymap definitions 2024-01-26 15:24:00 +01:00
Lukas Tönne
5ad49f4142 Geometry Nodes: Menu Switch Node
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
2024-01-26 12:40:01 +01:00
Sybren A. Stüvel
848f83e210 Anim: bone collections, add 'un-solo all' operator
Add an operator that clears the 'solo' flag from all bone collections.
2024-01-26 11:09:06 +01:00
Sybren A. Stüvel
f623c8f7bc Anim: remove 'Solo Visibility' bone collections operator
Remove the 'Solo Visibility' operator that singles out a bone collection.
It was a workaround for not having a true 'solo' flag, which is there
now.
2024-01-26 11:05:00 +01:00
Christoph Lendenfeld
d05d6f500b Fix: Consistency for appearing menu when applying keying sets
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
2024-01-25 16:18:05 +01:00
Christoph Lendenfeld
87fc8e8ddd Anim: Add hotkey for keying set operators
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
2024-01-25 14:46:04 +01:00
Campbell Barton
8841990764 Extensions: use the TOML manifest as a source for extensions bl_info 2024-01-25 14:36:20 +11:00
Campbell Barton
b686f2a536 UI: show the version as a string for extensions
Extensions use SEMVER, not a tuple of numbers.
2024-01-25 14:36:20 +11:00
Campbell Barton
f212be48ee Cleanup: reduce right shift in add-ons UI 2024-01-25 14:36:20 +11:00
Campbell Barton
4e3d24d7b5 Cleanup: assign variables for items in the add-ons UI 2024-01-25 14:36:20 +11:00
Campbell Barton
6aede44fb7 PyAPI: remove checks for add-ons pre 2.8x
This made sense when migrating from 2.7x, now 2.8x add-ons may also
have issues in 4.1 so this check isn't so relevant.
2024-01-25 13:00:48 +11:00
Campbell Barton
b8b1189bc4 Cleanup: assign a variable for the extension module with a trailing "."
This is used in enough places to simplify checks.
2024-01-25 13:00:48 +11:00
Campbell Barton
0ea0573349 PyDoc: remove unnecessary newlines which caused invalid syntax
Resolves all warnings building Python docs.
2024-01-25 10:22:15 +11:00
Sun Kim
d8fbf38808 UI: Show user-oriented tooltip for extra options panel
Show "Extra options" as tooltip for the Tool Settings Extra Options item.

Pull Request: https://projects.blender.org/blender/blender/pulls/117193
2024-01-24 17:25:39 +01:00
Lukas Tönne
7e87513368 GPv3: Offset modifier
Ported the Offset modifier from GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/117446
2024-01-24 16:57:58 +01:00
YimingWu
b6e5b02ede Cleanup: GPv3: Use consistent modifier RNA names
"GREASEPENCIL_" changed to "GREASE_PENCIL_".
2024-01-24 21:20:42 +08:00
Sean Kim
1e4f133950 Sculpt: Add brush settings for view & normal automasking values
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
2024-01-24 10:59:50 +01:00
Campbell Barton
56ccc9cdd9 Fix missing import in 9cc6ee75e7 2024-01-24 17:06:57 +11:00
Campbell Barton
9cc6ee75e7 Extensions: support using a default local user directory
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.
2024-01-24 16:50:32 +11:00
YimingWu
f54348edc9 GPv3: Smooth modifier
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
2024-01-24 04:36:36 +01:00
Campbell Barton
53a8570aec Extensions: enable the package management add-on when enabled
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.
2024-01-24 13:25:27 +11:00
Hans Goudey
0284715ab4 Cleanup: Make format 2024-01-23 07:56:49 -05:00
Nika Kutsniashvili
5a0b50e0a6 Anim: Reorganize items in 'View' menus in animation and video editors
View menu in animation and video editors are too
different from each other and unorganized.
Same operators appear in different places in different editors.
That makes navigating them harder, because for example
you expect framing operators at the bottom because they're
at the bottom in graph editor, but they're at the top in Sequencer
and 3D Viewport. It's important that ordering of operators
match as well as possible, so that users can expect certain
operators in certain places and dont spend time searching
for buttons in messy menus.

I tried to match ordering to 3D viewport menu
as much as possible, and also to use separators right,
so that grouping of items is logical and can be shareable between editors.

This grouping also looks better and makes navigation easier,
because it splits huge pile of toggles at the top of the menus
in smaller chunks and puts operators between them,
so they're esier to separate them in one glance.

Split off from #116492

Pull Request: https://projects.blender.org/blender/blender/pulls/117162
2024-01-23 12:11:22 +01:00
Campbell Barton
c80a6d5b0f UI: remove addons categories when extensions are enabled
Part of #117285.
2024-01-23 17:33:22 +11:00
Campbell Barton
25e15660ac UI: rename extension repositories panel and close by default
Ref #117285.
2024-01-23 15:22:55 +11:00
Campbell Barton
b4e869e2fc Cleanup: quiet warnings when reloading scripts
Some UI classes weren't unregistered which caused a warning when
reloading scripts (since [0]). Register/Unregister these classes along
with the classes of other sub-modules.

[0]: c5e2ec8a1a
2024-01-23 14:17:02 +11:00
Campbell Barton
8a9db8cfa7 Cleanup: remove redundant iface_ call 2024-01-23 14:06:41 +11:00
Campbell Barton
1fa896bb9a Cleanup: move bl_description to doc-strings
This is already done almost everywhere, prefer doc-strings unless
there is a reason for the tool-tip and Python doc-string to differ.
2024-01-23 13:59:15 +11:00
Sybren A. Stüvel
9e5cdf52f6 Cleanup: fix indent in anim.py 2024-01-22 16:45:29 +01:00
Sybren A. Stüvel
a7354fb2af Anim: add operator to remove unused bone collections
Add an operator to remove all unused bone collections. This is added to
the bone collections "specials" menu and the tree view context menu.

A bone collection is considered "unused" when it has no bones assigned,
and also no child collection that has bones assigned.
2024-01-22 13:34:25 +01:00
Sybren A. Stüvel
6b8c64fc69 Anim: create new bone collections as next sibling of active one
Bone collections created via the `bpy.ops.armature.collection_new`
operator now always become the next sibling of the active bone
collection. If there is no active one, the new one is added at the end
of the list as root.

This removes the `.parent_index` property of the operator, as it is now
always created relative to the active bone collection.
2024-01-22 10:34:30 +01:00
Campbell Barton
a1761b7c8c UI: adjust the add-ons interface when extensions repositories enabled
- Group Extensions with Add-ons in preferences.
- No more official/community/testing, install and refresh.
- No more showing category on the headers
  (there are no categories for extensions).

Changes proposed in #117285.
2024-01-22 17:47:33 +11:00
Campbell Barton
c866c93b06 Cleanup: import UIList, following the convention for other UI classes 2024-01-22 12:44:56 +11:00
Campbell Barton
829d08ca42 Cleanup: move addon_category_name into an internal class method 2024-01-22 12:44:54 +11:00
Campbell Barton
f0357220c0 Cleanup: don't pass UI text through iface_ twice 2024-01-22 12:44:53 +11:00
Guillermo Venegas
d7aa1988d1 UI: Replace list of workspace add-ons with a UIList
The list of add-ons could be long without the ability to search or
scroll the list. Using a UI-list.

Resolves #111272

Ref !112684
2024-01-22 12:44:37 +11:00
Brecht Van Lommel
2afd9e530a Fix: wrong name in bpy_extras.object_utils, causing API doc build failure 2024-01-19 19:03:33 +01:00
Lukas Tönne
baeb4d7753 GPv3: Tint and Color modifiers
Implements the Tint and Color (aka. "Hue/Saturation") modifiers.

Pull Request: https://projects.blender.org/blender/blender/pulls/117297
2024-01-19 16:59:39 +01:00
Christoph Lendenfeld
5e28601d69 Anim: Separate keying flags
Splits the flag `..._FLAG_INSERTNEEDED` between autokey and
manual keying. The fact that this flag was shared between the two
systems has been the cause of issues in the past. It wouldn't
let you insert a keyframe even though you explicitly used an operator
to do so.

In order to be clearer what options are used where, the user preferences
have been reordered.

By default "Only Insert Needed" will be enabled for auto-keying, but not for manual keying.
The versioning code will enable both if it was enabled previously.

# Code side changes

The keying system has flags that define the behavior
when keys are inserted. Some of those flags were shared
between keying and auto-keying. Some were only used for
auto-keying.
To clarify that, prefix flags that used exclusively in one or the other
system with `AUTOKEY`/`MANUALKEY`

Also the flag name on the user preferences and the tool settings was renamed.
Previously it was called `autokey_flag`. To indicated that it is not only used
for autokeying, rename it `keying_flag`.

Fixes: #73773

Pull Request: https://projects.blender.org/blender/blender/pulls/115525
2024-01-19 16:26:10 +01:00
Lukas Tönne
b157b80462 Grease Pencil: Use a "Color" modifier category for GP2 compatibility
This will be used for Opacity/Tint/Color modifiers which change color
attributes of grease pencil objects. The category is not shown for other
object types.
2024-01-19 11:35:26 +01:00
Campbell Barton
7daf900181 Cleanup: spelling in comments, remote debug print 2024-01-19 17:28:14 +11:00
Campbell Barton
665472a18b Extensions: changes to repositories are now accounted for by add-ons
Add-ons using the extension API now follow changes to their
repositories.

- Removing a repository disables and removes associated add-ons.
- Disabling a repository disables the add-on but keeps add-on &
  its preferences.
- Enabling a repository re-enables add-ons that use it.
- Renaming a repository updates the names of associated add-ons &
  it's preferences.
2024-01-19 17:19:09 +11:00
Campbell Barton
606562c12b Extensions: fix re-registered repos failing to include add-on modules
Enabling & disabling a repository removed it's module from sys.modules
but kept any sub-modules (in this case add-ons).

The problem with this is enabling the add-ons again could reuse the
cached modules which failed to include the add-on in the parent
modules name-space.

This meant `dir(bl_ext.repo_module)` couldn't be used to access
sub-modules.
2024-01-19 17:19:08 +11:00
Campbell Barton
3fe1097d24 Cleanup: lazily import bpy_extras.object_utils where possible 2024-01-19 11:52:08 +11:00
Harley Acheson
6d357dc60d UI: Dialog to Insert Unicode Characters for Text Objects
Dialog box that allows the entry of any Unicode character into a 3D
Text Object string by entering its hexadecimal codepoint value.

Pull Request: https://projects.blender.org/blender/blender/pulls/116966
2024-01-18 17:59:36 +01:00