15 Commits

Author SHA1 Message Date
Jonas Holzman
0ee4ae89e4 UI: Capitalize default filenames from "untitled" to "Untitled"
Capitalize the default filename used for .blend files and other savable
and exportable file formats (like images, 3D formats, etc.) from
"untitled" to "Untitled".

Pull Request: https://projects.blender.org/blender/blender/pulls/132424
2025-01-13 20:06:27 +01:00
Campbell Barton
6ca1417103 Cleanup: suppress unused Python warnings
Suppress unused warnings using the "vulture" utility.

- Include public definitions in the modules `__all__`.
- Mark arguments & variables as unused with a "_" prefix.
2024-12-03 12:54:13 +11:00
Campbell Barton
f17379a5d0 Merge branch 'blender-v4.3-release' 2024-11-03 16:07:40 +11:00
Campbell Barton
3bcfb151c1 PyDoc: use Python's type annotation syntax for doc-strings
Replace plain-text type information with the type syntax used
for Python's type annotations as it's more concise, especially for
callbacks which often didn't include useful type information.

Note that this change only applies to inline doc-strings,
generated doc-strings from RNA need to be updated separately.

Details:

- Many minor corrections were made when "list" was incorrectly used
  instead of "sequence".
- Some type information wasn't defined in the doc-strings and has been
  added.
- Verbose type info would benefit from support for type aliases.
2024-11-03 15:44:35 +11:00
Campbell Barton
1a1e75c253 Cleanup: replace implicit BaseException with Exception
Exception is more appropriate as a general exception in these cases.
2024-10-08 09:41:51 +11:00
Campbell Barton
0afce08c20 Cleanup: use Python format specifiers 2024-10-01 10:14:48 +10:00
Damien Picard
b37d121e0a I18n: extract and disambiguate a few messages
Extract
- Add to Quick Favorites tooltip.
- "Mask", the name of a newly created mask (DATA_).
- "New" in the context of the new mask ID button.
- A few strings using BLI_STR_UTF8_ defines were not extracted.
  Take the special characters out of the translation macros.
- "External" menu items from the filebrowser's Files context
  menu (right-click on a file). These items were already extracted,
  but not translated.

Improve
- Separate formatted error message "%s is not compatible with
  ["the specified", "any"] 'refresh' options" into two messages.

Disambiguate
- Use Action context for new F-modifiers' names. This is already used
  for the "type" operator prop.
- Translate ImportHelper's default confirmation text using the
  Operator context, as it uses the operator name which is extracted
  with this context.
- "Scale" can be a noun, the scale of something, or a verb, to scale
  something. The latter mostly uses the Operator context, so apply
  this context to verbs, and the default contexts to nouns.
- "Scale Influence" can mean "Influence on Scale" (tracking
  stabilization) and "to Scale the Influence" (dynamic paint canvas).
- "Object Line Art" as type of Line Art to add, as opposed to the
  active object's Line Art settings.
- Float to Integer node: use NodeTree context for the node label, as
  this is already extracted and used for the enum.

Do not translate
- Sequencer labels containing only a string formatting field.

Some issues reported by Gabriel Gazzán and Ye Gui.

Pull Request: https://projects.blender.org/blender/blender/pulls/122283
2024-05-27 19:33:35 +02:00
Campbell Barton
5088b0154d Cleanup: replace %-formatting with str.format in scripts/modules/
The "bl_i18n_utils" module has been excluded I'm not sure how best
to run it with reasonable code coverage.
2024-04-27 16:06:51 +10:00
Hans Goudey
e6808cd558 Cleanup: Make format 2024-03-28 20:55:23 -04:00
Jesse Yurkovich
af7a34dee7 ImportHelper: Common methods for FileHandler drag and drop support
Provide common implementations for two operations that all Python
FileHandlers will typically use.

- `poll_file_object_drop` To be used inside the FileHandler `poll_drop`
   callback
- `invoke_popup` To be used inside the Operator `invoke` callback

The above code closely mirrors what is currently done inside the
existing Blender c++ FileHandlers.

Pull Request: https://projects.blender.org/blender/blender/pulls/119774
2024-03-29 01:22:51 +01:00
Campbell Barton
f347706ecd Cleanup: add "unreachable" message to "assert False" statements
Clarify that these blocks are unreachable so the intention is clear
if they're ever encountered.
2024-03-15 13:20:11 +11:00
Campbell Barton
e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Campbell Barton
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Campbell Barton
c4c1cc7cd3 Cleanup: double quotes for non-enum strings
Also use back-ticks for code-references in comments.
2023-04-18 10:51:32 +10:00
Sergey Sharybin
03806d0b67 Re-design of submodules used in blender.git
This commit implements described in the #104573.

The goal is to fix the confusion of the submodule hashes change, which are not
ideal for any of the supported git-module configuration (they are either always
visible causing confusion, or silently staged and committed, also causing
confusion).

This commit replaces submodules with a checkout of addons and addons_contrib,
covered by the .gitignore, and locale and developer tools are moved to the
main repository.

This also changes the paths:
- /release/scripts are moved to the /scripts
- /source/tools are moved to the /tools
- /release/datafiles/locale is moved to /locale

This is done to avoid conflicts when using bisect, and also allow buildbot to
automatically "recover" wgen building older or newer branches/patches.

Running `make update` will initialize the local checkout to the changed
repository configuration.

Another aspect of the change is that the make update will support Github style
of remote organization (origin remote pointing to thy fork, upstream remote
pointing to the upstream blender/blender.git).

Pull Request #104755
2023-02-21 16:39:58 +01:00