Our `node_shader_utils.py` module needs to be updated to account for API
changes made during the 4.0 release cycle [1].
Here we need to guard against accessing the "Location" node input if not
dealing with the appropriate type of Mapping node.
[1] e4ad58114b9d56fe838396a97fe09aff32c79c6a
Pull Request: https://projects.blender.org/blender/blender/pulls/119354
Add support for add-ons to define commands using the new argument
`-c` or `--command`.
Commands behave as follows:
- Passing in a command enables background mode without the need to pass
in `--background`.
- All arguments following the command are passed to the command
(without the need to use the `--` argument).
- Add-ons can define their own commands via
`bpy.utils.register_cli_command` (see examples in API docs).
- Passing in `--command help` lists all available commands.
Ref !119115
This patch adds the maximum number of supported image units to the GPU
capabilities module. Currently, the GPU module assume a maximum of 8
units, so the patch is not currently particularly useful, but we can
consider committing it for the future anyways.
Pull Request: https://projects.blender.org/blender/blender/pulls/119057
This fixes#116096 and is based on #115249 with some changes.
This patch contains three changes:
* `NodeSocket.links` in the Python API gives the links in the correct order.
* `NodeLink.multi_input_sort_id` gives read-only access to an id that's used
for sorting. Note that for historical reasons the highest id is the first link.
* `NodeLink.swap_multi_input_sort_id(other_link)` provides a safe way to
change the order of links connected to a multi-input socket.
Co-authored-by: Adrian Bibby Walther <adrianbibbywalther@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/118987
This allows it to be exposed in the user interface when the
custom-directory is disabled without having to use a label which can't
handle non UTF-8 characters which file-paths can contain.
The tiled compositor code is mainly still around, which is only
expected to be a short-lived period. Eventually it will also be
removed.
The OpenCL, Group Buffers, and Chunk size options are already removed.
Pull Request: https://projects.blender.org/blender/blender/pulls/118010
Baked armature properties are now placed in a single group "Armature
Custom Properties", instead of creating a new group "Group.nnn" for each
custom property.
This bug was not reported.
Pull Request: https://projects.blender.org/blender/blender/pulls/117993
When baking custom properties, avoid keeping references to custom
property values that are known to be impossible to animate anyway.
The crash was caused by custom properties containing collections of ID
properties. Keeping Python references around for too long and then
accessing them caused Blender to crash.
My solution is to only keep track of custom property values that might
be keyable. For some this is certain: floats, ints, bools are keyable,
whereas lists, dicts, etc. are not. However, strings can be the RNA
value for an enum property, which is keyed via its integer
representation. So, the new function `can_be_keyed()` can return `True`,
`False`, or `None`. By skipping those values where it returns `False`
the crash is already resolved, making it good enough for now.
Pull Request: https://projects.blender.org/blender/blender/pulls/117993
Account for the renamed key-map when loading older saved key-maps &
stored user preferences. [0] missed these changes.
[0]: 661e7e451a0eadd7955a6074a79d570ac4ce2927
When baking neither Object nor Pose data, the Bake Action operator could
raise a Python exception instead of handling the situation gracefully.
This is now resolved; the regular 'Nothing to Bake' message is shown
instead.
Extract:
- Operators' poll messages, including Python-defined ones.
- Use default translation context for the region toggle pie menu.
- Newly created F-Curve modifiers.
- Newly created video tracker track.
- Grease Pencil UV area status message
- Status messages in the graph slider operators.
- Status message "Text <text.py>" when opening .blend with
auto-executing Python file.
Disambiguate:
- Track: can mean NLA track, video tracking, a tracking marker, or
a track constraint.
- Tracking: can mean video tracking, or a track constraint.
Issue reported by Gabriel Gazzán.
Pull Request: https://projects.blender.org/blender/blender/pulls/117855
4 changes in this PR:
1) Fixed bug with saving translations to py files - saving sources and comments it didn't add `repr` for the saved strings which was producing unexpected special characters.
Then these special characters sometimes made `translations.py` invalid (e.g., it was failing to load with some `\u` combinations) or was producing invalid characters in .po files created from the `translations.py`.
2) `find_best_messages_matches` used to fail when current message context wasn't found in the .po file. E.g. there were no messages with context "View3D", "Operator", ... and you would try to edit translation for the element that uses that context. I've added a fallback to empty sets to make sure it won't fail and just return the valid result that there are no matches.
3) added minor typing hint for easier code navigation.
4) added print to make it clear what data is printed.
Pull Request: https://projects.blender.org/blender/blender/pulls/116934
- "can not" -> "cannot" in many places (ambiguous, also see
Writing Style guide).
- "Bezier" -> "Bézier": proper spelling of the eponym.
- Tool keymaps: make "Uv" all caps.
- "FFMPEG" -> "FFmpeg" (official spelling)
- Use MULTIPLICATION SIGN U+00D7 instead of MULTIPLICATION X U+2715.
- "LClick" -> "LMB", "RClick" -> "RMB": this convention is used
everywhere else.
- "Save rendered the image..." -> "Save the rendered image...": typo.
- "Preserve Current retiming": title case for property.
- Bend status message: punctuation.
- "... class used to define the panel" -> "header": copy-paste error.
- "... class used to define the menu" -> "asset": copy-paste error.
- "Lights user to display objects..." -> "Lights used...": typo.
- "-setaudio require one argument" -> "requires": typo.
Some issues reported by Joan Pujolar and Tamar Mebonia.
Pull Request: https://projects.blender.org/blender/blender/pulls/117856
We had inherited Danish translation file in the repository from over a
decade ago, but it was never since then an active translation, and
therefore was never added back to the current list of known languages.
Since the file exists now and is exposed in Weblate
(translate.blender.org), language entry should be created in our
settings, such that e.g. PO files do get updated with all the others!
Replace: {BLENDER_RESOURCE_PATH_USER}/scripts/extensions
With: {BLENDER_RESOURCE_PATH_USER}/extensions
This makes more sense as not all extensions are scripts.
- Adding new repositories now differentiates between "Online" & "Local"
where adding a local repository doesn't prompt for a URL.
- Support removing repositories and their files (uses confirmation
defaulting to "Cancel" to avoid accidents).
- Show an error icon next to repositories that have invalid settings,
these repositories are now ignored until the settings are corrected,
required fields are highlighted red when they're unset & required.
- Rename "directory" to "custom_directory" since an automatic path is
used when not set - created in the users scripts directory.
- Use toggles for custom-directory & remote URL instead of relying on
the value to be left an empty string for alternative behavior.
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.
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