16 Commits

Author SHA1 Message Date
Campbell Barton
be0c9174aa Cleanup: argument wrapping for Python scripts
- Wrap the closing parenthesis onto it's own line
  which makes assignments to the return value
  read better.
- Reduce right-shift with multi-line function calls.
2025-01-14 12:53:32 +11:00
Brecht Van Lommel
a926f5b67d Refactor: Replace ID_IS_LINKED by !ID_IS_EDITABLE
Add new ID_IS_EDITABLE macro that checks if the ID can be edited in the
user interface. Replace usage of ID_IS_LINKED where it is used with this
meaning.

Also add a corresponding ID.is_editable property for Python.

This prepares for the ability to edit some linked datablocks for brush
assets.

Pull Request: https://projects.blender.org/blender/blender/pulls/121838
2024-05-16 14:53:09 +02:00
Campbell Barton
56388dc8fe Cleanup: reduce right-shift in startup scripts
Also un-wrap lines that fit in the column width.
2024-04-30 12:46:05 +10:00
Campbell Barton
0e3b594edb Refactor: scripts under scripts/startup/ to use str.format
Part of modernizing scripts in Blender, where the previous convention
was to use percentage formatting which has become the "old" way to
format strings in Python.

See proposal for details #120453.

Ref !120552
2024-04-27 16:02:36 +10:00
Campbell Barton
d07d6f1c10 Cleanup: un-wrap lines that fit within 120 width for Python scripts 2024-03-15 10:04:03 +11:00
Damien Picard
3bd41cf9bc I18n: Go over TIP_ and IFACE_ usages, change to RPT_ when relevant
The previous commit introduced a new `RPT_()` macro to translate
strings which are not tooltips or regular interface elements, but
longer reports or statuses.

This commit uses the new macro to translate many strings all over the
UI.

Most of it is a simple replace from `TIP_()` or `IFACE_()` to
`RPT_()`, but there are some additional changes:
- A few translations inside `BKE_report()` are removed altogether
  because they are already handled by the translation system.
- Messages inside `UI_but_disable()` are no longer translated
  manually, but they are handled by a new regex in the translation
  system.

Pull Request: https://projects.blender.org/blender/blender/pulls/116804

Pull Request: https://projects.blender.org/blender/blender/pulls/116804
2024-01-12 13:37:32 +01:00
ariva00
d7b7938706 Fix #92287: focal legth not correctly computed when tracking vertial videos
The motion tracking always operates with horizontal sensor mapping, but
conversion code form tracking camera to Blender camera was not setting
the sensor fitting to Horizontal (Python code was leaving sensor fitting
unchanged, C code was setting it to Auto).

Additionally, the Python code was not handling camera shift, making it
so non-centered optical center was not handled correctly.

The reason why the code is written in two places is because C code is
used when conversion from tracking camera to Blender happens after solving
the motion, and the Python code is used for the "Setup Tracking Scene".
It is possible to unify some code, but it is not that much of an importance
at this time.

Pull Request: https://projects.blender.org/blender/blender/pulls/114253
2023-11-15 10:53:30 +01:00
Campbell Barton
790fea431f Cleanup: use since quotes for enum values, wrap multi-line brackets 2023-09-29 14:41:48 +10:00
Campbell Barton
e8c812a307 Cleanup: spelling in comments, update dictionary 2023-09-03 21:35:07 +10: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
Jeroen Bakker
fa4def46c8 Cleanup: Remove Unused use_ambient_occusion Property
`use_ambient_occlusion` is a legacy property and not
connected to anything. The clip editor still write
to it for enabling the ambient occlusion renderpass.

This change will remove the legaccy option and
won't enable ambient occlusion pass anymore due
to visual and performance impact.

Pull Request: https://projects.blender.org/blender/blender/pulls/109783
2023-07-10 11:18:22 +02:00
Campbell Barton
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Campbell Barton
14905cd1d5 Cleanup: quiet pylint's inconsistent-return-statements warning
No functional changes as the return value either relied on None
evaluating to False or wasn't used.
2023-04-13 13:14:06 +10:00
Campbell Barton
6482f9fffe Cleanup: quiet various pylint warnings 2023-04-13 13:14:05 +10:00
Hans Goudey
c31434a570 Cleanup: Remove setting polygon loop total from Python
This property is not editable after 7966cd16d6dc4e66d01f,
though doing so didn't seem to give an error. It doesn't have
to be set anymore, since the data is redundant with the
"loop_start" anyway.
2023-04-12 08:38:32 -04: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