22 Commits

Author SHA1 Message Date
Damien Picard
d1fdc7a0ce I18n: Do not translate Python template menu entries 2025-10-15 16:26:46 +02:00
Pablo Vazquez
a7923de9e3 UI: Add missing icons for Undo/Redo in Edit menu
These are pretty universal and could be used as icon-only buttons,
so it's good to use them to create a visual connection.
2025-10-05 23:06:33 +02:00
Damien Picard
50d7c4917b I18n: Disambiguate "Line"
"Line" can mean several things, but in this cases it means a line of
text.

Reported by Ye Gui in #43295.

Pull Request: https://projects.blender.org/blender/blender/pulls/141147
2025-06-30 11:07:40 +02:00
Lukas Stockner
bf412ed9dd Cycles: Support for custom OSL cameras
This allows users to implement arbitrary camera models using OSL by writing
shaders that take an image position as input and compute ray origin and
direction.

The obvious applications for this are e.g. panorama modes, lens distortion
models and realistic lens simulation, but the possibilities are endless.

Currently, this is only supported on devices with OSL support, so CPU and
OptiX. However, it is independent from the shading model used, so custom
cameras can be used without getting the performance hit of OSL shading.

A few samples are provided as Text Editor templates.

One notable current limitation (in addition to the limited device support)
is that inverse mapping is not supported, so Window texture coordinates and
the Vector pass will not work with custom cameras.

Pull Request: https://projects.blender.org/blender/blender/pulls/129495
2025-04-25 19:27:30 +02:00
Damien Picard
ecb4984d65 I18n: Do not disambiguate some messages
- "Match Case" and "Wrap Around" were renamed but they do not need a
  translation context anymore.
- Spreadsheet tooltips with unneeded translation of format
  strings like `fmt::format(TIP_("{}"))`.
2025-01-13 12:40:45 +01:00
Pablo Vazquez
d254a12be9 UI: Text Editor: Use column for find settings
Replace the aligned row of three unrelated toggles with more descriptive
check-boxes in a column.

It's not like we are short of space in that sidebar either.

Ref: !127530
2024-09-13 16:30:45 +10:00
Dalai Felinto
7b8640896e Templates: Blender Manifest template
Pull Request: https://projects.blender.org/blender/blender/pulls/125668
2024-08-01 10:15:01 +02:00
Campbell Barton
949dfbfaa8 Cleanup: Python script formatting
- Double quotes for strings.
- Trailing commas when wrapped lines.
2024-06-06 11:26:28 +10: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
0c4d3754f1 Cleanup: replace {!s} with {:s} when used with strings
When passing strings to str.format(..) use `{:s}` format specifier
which only takes strings and wont run `.__str__()` on non-strings.

While `{!s}` is an equivalent to `%s`, for the most part `%s` was
used for strings, so using `{:s}` is clearer and more specific.
2024-04-27 16:02:37 +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
Julian Eisel
7bb693581f UI: Move asset shelf out of experimental
This makes the asset shelf available as a standard, non-experimental
feature. Currently no script makes use of it, so it will still not be
available. However the pose library will be updated to use this for its
UI instead.

Initially the asset shelf was committed as experimental feature, even
though it seemed ready for non-experimental. After double checking with
some people (Dalai and Brecht) we decided to go ahead with this.

There are still some futher changes planned, see #107881.
2023-08-23 12:15:33 +02: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
Julian Eisel
6764e69491 UI: Add asset shelf Python UI template
Adds a new "Ui Asset Shelf" template to the script editor, demonstrating
how scripts can register own asset shelves. The asset shelf is designed
as a new standard UI element that add-ons, application templates and the
like can use, so this is useful. It's also useful as a quick way to test
and customize the asset shelf.

The script is only available in the UI if the "Asset Shelf" experimental
feature is enabled in the Preferences.
2023-08-03 17:16:10 +02:00
Campbell Barton
02b8bde4b3 Cleanup: use the term "props" for operator properties
Differentiate operators from their properties.
2023-06-22 12:35:49 +10:00
Campbell Barton
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
guishe
e16ec95a16 UI: Add a custom text editor preference
Add a user preference to set up a custom text editor for editing text
files with the "Edit Source" action in the UI context menu.

- An operator TEXT_OT_jump_to_file_at_point has been added.
- A custom editor can be set in the user preferences.
- A preset has been included for "Visual Studio Code".
- When the editor is not set, use Blender's internal editor.

Ref !108299.
2023-06-07 14:09:19 +10:00
RedMser
240a1edfa1 UI: add text editor zoom in/out to view menu
Ref !108430.
2023-06-02 15:24:00 +10:00
Damien Picard
3f4f975228 I18n: fix footer in the text editor when loading an external file
When loading an external file in the text editor, the footer text
stating "File: <file>" or "File: <file> (unsaved)" was not translated,
because the translation happened after string formatting, and the
message was thus not found in the po files.

Pull Request: https://projects.blender.org/blender/blender/pulls/106716
2023-04-12 12:19:00 +02:00
Damien Picard
a668e3b73a I18n: do not translate a message already translated using iface_()
This follows #105417, which allowed detection of this message.

Pull Request #105420
2023-03-07 12:32:00 +01: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