Commit Graph

164 Commits

Author SHA1 Message Date
Germano Cavalcante
14c2f6856a Suppress warnings by removing unused properties from keymaps
Between Blender versions, properties of some operators may be removed.

When this happens, when importing the keymap from the previous version,
a series of warnings may appear in the console. For example:
```
Warning: property 'alt_navigation' not found in item 'TRANSFORM_OT_translate'
Warning: property 'alt_navigation' not found in item 'TRANSFORM_OT_rotate'
Warning: property 'alt_navigation' not found in item 'TRANSFORM_OT_resize'
Warning: property 'alt_navigation' not found in item 'VIEW3D_OT_edit_mesh_extrude_move_normal'
...
```

Therefore, it seems to be convenient to edit these properties when
versioning.

This commit implements a `remove_properties` utility that makes this
removal simpler.

Pull Request: https://projects.blender.org/blender/blender/pulls/114936
2023-11-30 12:22:47 +01:00
Damien Picard
3f5fd74953 Fix #95045: UI: keymap header in preferences truncated when filtering
Show untruncated headers in keymap editor while filtering.

Pull Request: https://projects.blender.org/blender/blender/pulls/114012
2023-11-29 22:36:05 +01:00
Bastien Montagne
a0aaee4caf I18N: UI Translatiion: Add Belarusian language entries.
Skipped for now, until we have actual translations available.
2023-11-28 11:17:39 +01:00
Hans Goudey
f2bcd73bd2 Mesh: Move sculpt mask to a generic attribute
Store paint masks as generic float attributes, with the name
`".sculpt_mask"`. This is similar to 060a534141, which made
the same change for face sets. The benefits are general
consistency, nicer code, and more support in newer areas
that deal with attributes like geometry nodes.

The RNA API is replaced with one created in Python. The new
API only presents a single layer as an attribute class, so it
should be simpler to use in general:
- Before: `object.data.vertex_paint_masks[0].data[0].value`
- After: `object.data.vertex_paint_mask.data[0].value`

Pull Request: https://projects.blender.org/blender/blender/pulls/115119
2023-11-20 17:42:01 +01:00
Bastien Montagne
7ce745a76b UI messages fixes/cleanups. 2023-11-20 12:20:58 +01:00
Nate Rupsis
661e7e451a Anim: Rename NLA "Channels" to "Tracks"
Updating "NLA Channel"  to "NLA Tracks" across board, since the terminology "Tracks" is the most prevalent in operators, code, etc.
2023-11-16 17:59:18 +01:00
Harley Acheson
3f5654b491 Fix #114080: Add Khmer Font
Add Noto Sans Khmer (variable) font, needed for new translation.
2023-11-13 17:38:03 +01:00
Thomas Dinges
3cac5c83ec Merge branch 'blender-v4.0-release' 2023-11-13 16:32:30 +01:00
Thomas Dinges
905c0b84f2 Release: Update manual references for 4.0. 2023-11-13 16:31:41 +01:00
Germano Cavalcante
c6db3f98bb Fix modal key assignment for "Rotate Normals" in keymap versioning
Error in 78943edc5d

The key was not included in the appropriate condition block, leading to
an error.
2023-11-13 09:47:10 -03:00
Germano Cavalcante
78943edc5d Transform: Custom modifier to navigate while transforming
Discussed in #114646.

This commit transforms the "alt_navigation" option of the transform
operators into a new modal key item. "PASSTHROUGH_NAVIGATE"

In addition to cleaning up a lot of the code, it allows you to
customize the key chosen to navigate while transforming.
2023-11-09 21:33:34 -03:00
Campbell Barton
8eb5223663 Cleanup: remove unused variables & imports in scripts/ 2023-11-10 10:06:41 +11:00
Damien Picard
772e99b4f7 I18n: extract node group asset sockets
Each node group asset exposes various properties through sockets.
Although they can generally be considered user-created data, for
built-in assets they are also part of the UI and should be
translated--especially since more modifiers should be migrated to
Geometry Nodes in the future.

This commit allows extraction of such socket names and descriptions.
Since the message extraction script already extracted names and
descriptions for each asset, this commit only adds the socket in the
same loop, so that they are extracted while the asset file is already
being read.

Properties from sockets are not yet translated in the modifier
properties editor, this will be enabled in a follow-up commit.
2023-11-07 18:08:28 +01:00
Julian Eisel
6dcc394104 Merge branch 'blender-v4.0-release' 2023-10-31 15:38:21 +01:00
Bastien Montagne
a49dd41290 Revert "I18N/UI: Work around #114080: Lack of Khmer script in built-in fonts."
Only temp solution for 4.0 release, proper fix is to add the Khmer
script to our embedded font.

This reverts commit e070ff45c4.
2023-10-31 15:16:10 +01:00
Bastien Montagne
7300609966 I18N/UI: Work around #114080: Lack of Khmer script in built-in fonts.
Khmer was added for this release and is barely translated yet (about
1%), so it's not too bad. We will ensure that the Khmer script is added
to our default font for 4.1, but this is too late for 4.0.
2023-10-31 15:16:10 +01:00
Bastien Montagne
e070ff45c4 I18N/UI: Work around #114080: Lack of Khmer script in built-in fonts.
Khmer was added for this release and is barely translated yet (about
1%), so it's not too bad. We will ensure that the Khmer script is added
to our default font for 4.1, but this is too late for 4.0.
2023-10-31 15:13:43 +01:00
Brecht Van Lommel
39107b3133 Revert changes from main commits that were merged into blender-v4.0-release
The last good commit was 8474716abb.

After this commits from main were pushed to blender-v4.0-release. These are
being reverted.

Commits a4880576dc from to b26f176d1a that happend afterwards were meant for
4.0, and their contents is preserved.
2023-10-30 21:40:35 +01:00
Campbell Barton
d31c61edee Cleanup: spelling in comments 2023-10-27 12:13:48 +11:00
Brecht Van Lommel
68e06704a6 Merge branch 'blender-v4.0-release' into main 2023-10-23 19:09:12 +02:00
Douglas Paul
f35ecfdac7 Fix documentation link for Points to Curves node
The Online Manual action in the context menu for the new Points to Curves
geometry node was going to the documentation for the Points node instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/113727
2023-10-23 17:20:53 +02:00
Bastien Montagne
764ce8ce86 Merge branch 'blender-v4.0-release' 2023-10-16 11:36:47 +02:00
Bastien Montagne
ba3e9b3526 I18N: Add (enable) Khmer and Swahili languages. 2023-10-16 11:07:47 +02:00
Jacques Lucke
d76263de96 Merge branch 'blender-v4.0-release' 2023-10-15 20:50:12 +02:00
Damien Picard
fa5bb53f5c Fix: Python node_utils.connect_sockets broken after API change
After the recent introduction of node panels, the utility that
allowed scripters to connect sockets to or from a virtual socket was
broken. This happens when creating an interface before connecting
sockets. Sockets can have a subtype, while interfaces cannot.

For instance, the `NodeSocketFloatFactor` type cannot be used
directly, it has to be converted to `NodeSocketFloat`.

This commit chooses an appropriate type for the new interface before
creating it, based on the socket's `type` property.

Pull Request: https://projects.blender.org/blender/blender/pulls/113630
2023-10-15 20:38:43 +02:00
Campbell Barton
08e5f94a70 Fix #113309: Broken key-map after "Reload Scripts"
Regression caused by [0]. Resolve by adding a 'keep_properties' argument
to KeyConfig.update so the key-map items can be restored after the
operators have been reloaded.

[0]: 88a875ec3a
2023-10-13 14:37:48 +11:00
Campbell Barton
63586d0f6b Fix #113309: Broken key-map after "Reload Scripts"
Regression caused by [0]. Resolve by adding a 'keep_properties' argument
to KeyConfig.update so the key-map items can be restored after the
operators have been reloaded.

[0]: 88a875ec3a
2023-10-13 14:37:07 +11:00
Harley Acheson
3c4f84e0fc UI: Input Placeholders
Optional inline hint describing the expected value of an input field.

Pull Request: #112104
2023-10-12 11:44:08 -07:00
Bastien Montagne
86fb43d57a Merge commit '2d703e9200985122b4b953be67b452f7679bf113'
Conflicts:
	source/blender/nodes/NOD_node_declaration.hh
2023-10-12 18:56:12 +02:00
Damien Picard
2d703e9200 I18n: add label declaration to node sockets so they can be shortened
In !112591, nodes got the ability to group sockets into panels. The
labels for these sockets are automatically shortened if they begin
with the same text as their parent labels. For instance, "Transmission
Weight" will be shortened to just "Weight" because it is under the
"Transmission" panel.

While this is a good heuristic for English, it breaks down in
languages which do not have the same word order.

This commit adds a `.short_label()` callback to socket declarations so
that a shortened label can be explicitly declared.

It also adds two regexps to the translation script so that these new
fields can be extracted to the .po translation files. One extracts the
label with a translation context, the other without. Only the one
without context is currently in use.

The current automatic shortening logic is kept and will be used only
if a shortened label is not manually provided.

Fixes #112970: Node socket labels under panels are not shortened when
translated.

Pull Request: https://projects.blender.org/blender/blender/pulls/113070
2023-10-12 17:51:37 +02:00
Harley Acheson
e00bd55576 Merge branch 'blender-v4.0-release' 2023-10-11 08:26:58 -07:00
Harley Acheson
aa88d9a8e3 Revert "UI: Input Placeholders"
This reverts commit b0515e34f9.
Unintentionally added to 4.0
2023-10-11 08:01:24 -07:00
Harley Acheson
61dc86b0eb Merge branch 'blender-v4.0-release' 2023-10-10 15:48:29 -07:00
Harley Acheson
b0515e34f9 UI: Input Placeholders
Optional inline hint describing the expected value of an input field.

Pull Request: https://projects.blender.org/blender/blender/pulls/112104
2023-10-11 00:47:13 +02:00
Campbell Barton
ed7b7c2cde Merge branch 'blender-v4.0-release' 2023-10-05 13:16:23 +11:00
Campbell Barton
9d4dc5376c Fix #112377: Edit Source missing info in the status bar
Reports from the internal operator weren't forwarded to the Python
operator, they were printed in the console instead.

Resolve by moving the operator to C++, use a utility function
to launch the external editor instead of an operator.
2023-10-05 13:09:47 +11:00
Campbell Barton
44ec73e24e Merge branch 'blender-v4.0-release' 2023-10-04 16:22:32 +11:00
Campbell Barton
9a75c29bf8 Fix #113206: add-on unregister() not called on exit
Own regression in [0] caused add-ons not to run the unregister function
on exit.

[0]: e1b72e569d
2023-10-04 16:09:30 +11:00
Harley Acheson
e1a868df1d Merge branch 'blender-v4.0-release' 2023-10-03 09:46:24 -07:00
Damien Picard
b05db089af I18n: translate node panel titles
Nodes recently gained the ability to group inputs into collapsible
panels. These were untranslated, so this commit:
- Adds the appropriate regex to extract node panels defined with
  the `add_panel()` callback.
- Adds the `IFACE()` translation macro to the drawing code for the
  nodes, as well as the properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/112968
2023-10-03 18:24:19 +02:00
Bastien Montagne
10ce3988e2 Merge branch 'blender-v4.0-release' 2023-10-03 13:10:18 +02:00
Bastien Montagne
30aaf3b086 I18N: UI Translation: Add Tamil and enable Bulgarian, Greek and Nepali.
These four languages now have some translated strings, so time to show
them in Blender.

NOTE: effect will take place after next week's update in official
Blender builds.
2023-10-03 13:09:26 +02:00
Nate Rupsis
dd5b870d15 Anim: Add channel type options to the Bake Action operator
Currently, we're limited to the type of Bake Data, without any control over the channels that get baked.

With this change, the user now has a fine degree of control as to which types of f-curve data will be written to the baked action (i.e., location, rotation, scale & b-bone channels).

Co-author  @cmbasnett

Pull Request: https://projects.blender.org/blender/blender/pulls/111997
2023-09-29 15:38:24 +02:00
Campbell Barton
9c021ae6d5 Merge branch 'blender-v4.0-release' 2023-09-29 14:56:21 +10:00
Campbell Barton
790fea431f Cleanup: use since quotes for enum values, wrap multi-line brackets 2023-09-29 14:41:48 +10:00
Nate Rupsis
5024c0ef97 Refactor: Move NLA anim bake paremeters into dataclass
The `bake_action` (and subsequent methods) for NLA action baking have a long parameter lists. Refactoring to move the bake options into a data class.

Pull Request: https://projects.blender.org/blender/blender/pulls/112865
2023-09-28 16:17:27 +02:00
Damien Picard
9bd89c67d2 Fix node socket connection util after changes to the interface API
The `connect_sockets()` node util function is used to connect sockets
even when inside node groups, when only a "virtual socket" is
available. It takes care of creating the interface in the group, so
that a socket is available in the Input or Output node.

This feature was broken after the change of API, replacing
`tree.inputs` and `tree.outputs` with a unified `tree.interface`.

This commit updates the util to account for this change.

Fixes an exception in the Node Wrangler add-on, when connecting a
socket of a type not yet available in an Input or Output node.

More info here:
https://wiki.blender.org/wiki/Reference/Release_Notes/4.0/Python_API#Node_Groups

Pull Request: https://projects.blender.org/blender/blender/pulls/112960
2023-09-27 16:45:56 +02:00
Hans Goudey
2e6b81f151 Cleanup: Make format 2023-09-26 17:05:36 -04:00
Brecht Van Lommel
05a4609583 Python API: add specular tint texture support to node_shader_utils 2023-09-26 19:46:38 +02:00
Brecht Van Lommel
3d38b51435 Shaders: add "Weight" to Transmission/Subsurface/Coat/Sheen socket names
Ref #99447
Ref #112848
2023-09-25 19:51:27 +02:00