"Strip" generally is a sequencer or animation strip, but in this
context it is a string manipulation action for file names. It is
defined as part of the Path Mode defined in the FBX and OBJ exporters.
Those exporters are defined in Python and C++, respectively. This
commit changes both exporters to use the "File browser" translation
context.
In addition, the tooltip for "Relative" from the FBX exporter was
changed to match its OBJ counterpart, and the "Strip Path" mode was
also matched to the other version which reads better as an enum item.
Reported by Ye Gui in #43295.
Commit 9ce0a2d1d5 added the ability to specify translation contexts to
node UI panels, but it failed to update the regex that extracts them.
This commit solves that by adding the proper `add_panel` function to
the extraction regex.
Reported by Satoshi Yamasaki in #43295.
Job names displayed in the status bar were not extracted or
translated. This commit adds a regex to the bl_i18n_utils settings to
detect `WM_jobs_get()`, and the `RPT_` translation macro to translate
the message in the UI.
About 30 new messages are translated.
Reported by Ye Gui in #43295.
Geometry Nodes' Add > Input > Import menu includes file format items
such as "Standford PLY (.ply)", "STL (.stl)", "Text (.txt)". The
latter needs to be translated because "Text" is a generic format.
These items are declared using a custom function
`node_add_menu.add_node_type`, with a `label` argument. This commit
adds the `label` argument to the function arguments that can be
extracted from specific node declaration functions, and specifies the
argument position for each:
"add_node_type", "add_node_type_with_outputs", "add_simulation_zone",
"add_repeat_zone", "add_foreach_geometry_element_zone",
"add_closure_zone".
There is currently no facility to specify a translation context but it
could be easily added if the need arises.
Most of these functions do not actually declare new, unique messages,
but it could happen in the future. In addition, two messages were
extracted using manual `iface_()` calls, which are no longer needed
after this change.
Reported by Ye Gui in #43295.
This PR makes it easier to add keyframes for strips in preview.
This works same way as in 3D viewport, using keying sets. Pressing I
key adds keyframe to default keying set, pressing K dhows menu with
available keying sets. For VSE, location, rotation and scale properties
are available for now. Other existing keying sets are not valid for
VSE.
Deleting keyframes and potentially adding more keying sets will be
handled in separate PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/140107
This new file can parse the file header (first few bytes) as well as the block
headers.
Right now, this is used by two places:
* `blendfile.py` which is used by `blend2json.py`
* `blend_render_info.py`
This new module is shipped with Blender because it's needed for
`blend_render_info.py` which is shipped with Blender too. This makes using it in
`blendfile.py` (which is not shipped with Blender) a bit more annoying. However,
this is already not ideal, because e.g. `blend2json` also has to add to
`sys.path` already to be able to import `blendfile.py`.
This new file could also be used by blender-asset-tracer (BAT).
The new `BlendFileHeader` and `BlockHeader` types may be subclassed by code
using it, because it wants to store additional derived data (`blendfile.py` and
BAT need this).
New tests have been added that check that the file and block header is parsed
correctly for different kinds of .blend files.
Pull Request: https://projects.blender.org/blender/blender/pulls/140341
Change the maximum data-block name from 64 to 256 bytes by increasing MAX_ID_NAME value.
Also increase a few related non-ID data name max size, essentially the action slots identifiers, as these are the primary key used to match an Action's slot to an ID by name.
Other sub-data (bones, modifiers, etc.) lengths are not modified here, as these can be made actual dynamic strings in the future, while keeping (a reasonable level of) forward compatibility, during the course of Blender 5 release cycles.
Implements #137608.
Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/137196
This is replaced by geometry nodes, where volumes can now be generated from
point clouds and meshes with more control, and more efficient rendering as a
sparse volume.
No backwareds compatibility is provided, as this would be complicated, and
probably this feature was not used much in the past few years.
This node was supported in Cycles only, not by EEVEE.
Pull Request: https://projects.blender.org/blender/blender/pulls/140292
Edit the language list to make it simpler to scan.
- Display languages in a form "Language (Variant)", such as
"English (US)" instead of "American English" and
"Portuguese (Brazil)" instead of "Brazilian Portuguese".
This allows alphabetical sorting by language first.
This does not apply to endonyms (languages in their own language).
- Use a dash instead of parentheses to separate the endonyms.
- Deduplicate languages (Automatic, American English, British
English), which all are in English and don't appear in another
language.
- Remove language categories as headers. They are replaced with
percentages in the language tooltips. The percentages are
generated in utils_languages_menu.py and stored in
locale/languages.
Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/140087
This allows to reduce the waiting time caused by
shader compilation on some GPU-driver combo.
A new settings in the User Preferences make it
possible to override the default amount of worker
threads and optionally use subprocesses.
We still use only one worker thread in cases where
there is no benefit with adding more workers
(like AMD pro driver and Intel windows).
It doesn't scale as much as subprocesses for material
shader compilation but that is for other reasons
explained in #139818.
Add some heuristic to avoid too much memory usage
and / or too many stalls.
Also add some heuristic to the default number of subprocess for
the platform that shows scalling.
Historically, multithreaded compilation was prevented by the
need of context per thread inside `DRWShader` module.
Also there was no good scaling at that time. But
nowadays numbers shows different results with
good scaling with reasonable amount of threads on many
platforms.
Even if we are going for vulkan in the next release
most of the legacy hardware will still use OpenGL for
a few other releases. So it is relevant to make this
easy improvement.
See pull request for measurements.
Pull Request: https://projects.blender.org/blender/blender/pulls/139821
Removes various image filtering/mipmapping leftovers from
pre-2.80 days.
Code: removes all mipmap handling from ImBuf (which is about half of
ImBuf struct size), removes now unused "sample procedural texture
with mipmaps" code, now-unused FELINE filter, etc. The osatex
parameter to various CPU texture sampling functions is never
actually used, which means none of the mipmap code was ever executing.
User visible part: there were settings on the legacy Texture data
block (as used by Brushes etc.), under Sampling section: "MIP Map",
"Gaussian Filter", "Filter Type", "Eccentricity", "Minimum Size" --
they had no effect anywhere, so they are gone, and what remains is
only "Interpolation" and "Size".
RNA / Python API part: removes the ImageTexture RNA properties
corresponding to the above: filter_type, use_mipmap, use_mipmap_gauss,
filter_lightprobes, filter_eccentricity, use_filter_size_min.
Pull Request: https://projects.blender.org/blender/blender/pulls/139978
e.g. stands for "exempli gratia" in Latin which means "for example".
The best way to make sure it makes sense when writing is to just expand
it to "for example". In these cases where the text was "for e.g.", that
leaves us with "for for example" which makes no sense. This commit fixes
all 110 cases, mostly just just replacing the words with "for example",
but also restructuring the text a bit more in a few cases, mostly by
moving "e.g." to the beginning of a list in parentheses.
Pull Request: https://projects.blender.org/blender/blender/pulls/139596
In the Python API, helper function `gpu_extras.presets.draw_texture_2d`
still used batch type `TRI_FAN`, which is deprecated since Blender 3.2.
In this patch the batch type is changed to `TRIS`.
Pull Request: https://projects.blender.org/blender/blender/pulls/139300
When landing #134860 we didn't yet have documentation for the Path
Templates feature. Now that we do, we can refer users to it.
This PR adds a reference to the docs in the type info of properties that
are marked as supporting Path Templates.
Pull Request: https://projects.blender.org/blender/blender/pulls/139099
Rework internals of how VSE caching is done. Primarily to make all the
caching logic more understandable from development point of view, but
also has several user visible implications (more details in the PR):
- Simpler and fewer caching UI options,
- Disk cache is gone (primary reason: proxies are kinda the same thing),
- VSE cache size set in preferences is actual size used for VSE caches
now (previously caching stopped as soon as whole Blender used that
much memory, even if some memory usage was not about VSE at all),
- Certain scenarios of cache invalidation are faster now.
Pull Request: https://projects.blender.org/blender/blender/pulls/137926
This adds basic templating support to render output paths. By putting
"{variable_name}" in the path string, it will be replaced by the named
variable's value when generating the actual output path. This is similar
to how "//" is already substituted with the path to the blend file's
current directory.
This templating system is implemented for both the primary render output
path as well as the File Output node in the compositing nodes. Support
for using templates in other places can be implemented in future PRs.
In addition to the "{variable_name}" syntax, some additional syntax is
also supported:
- Since "{" and "}" now have special meaning, "{{" and "}}" are now
escape sequences for literal "{" and "}".
- "{variable_name:format_specifier}", where "format_specifier" is a
special syntax using "#", which allows the user to specify how numeric
variables should be formatted:
- "{variable_name:###}" will format the number as an integer with at
least 3 characters (padding with zeros as needed).
- "{variable_name:.##}" will format the number as a float with
precisely 2 fractional digits.
- "{variable_name:###.##}" will format the number as a float with at
least 3 characters for the integer part and precisely 2 for the
fractional part.
For the primary render output path: if there is a template syntax error,
a variable doesn't exist, or a format specifier isn't valid (e.g. trying
to format a string with "##"), the render that needs to write to the
output path fails with a descriptive error message.
For both the primary and File Output node paths: if there are template
syntax errors the field is highlighted in red in the UI, and a tooltip
describes the offending syntax errors. Note that these do *not* yet
reflect errors due to missing variables. That will be for a follow-up
PR.
In addition to the general system, this PR also implements a limited set
of variables for use in templates, but more can be implemented in future
PRs. The variables added in this PR are:
- `blend_name`: the name of the current blend file without the file
extension.
- `fps`: the frames per second of the current scene.
- `resolution_x` and `resolution_y`: the render output resolution.
Pull Request: https://projects.blender.org/blender/blender/pulls/134860
Exposes bézier handle data through a new `GreasePencilStrokePointHandle`
class on each point, which provides `position`, `type`, and `select` for both
`point.handle_left` and `point.handle_right`.
Also removes the old separate point attributes:
* `handle_left_type`, `handle_right_type`
* `select_handle_left`, `select_handle_right`
Pull Request: https://projects.blender.org/blender/blender/pulls/137780
When a keymap operator is not found, color the label and input field
in red. This can help identify issues when migrating preferences and
some operators no longer exist.
Screenshots in the pull request.
Pull Request: https://projects.blender.org/blender/blender/pulls/130675
This adds two new python properties to `GreasePencilStrokePoint`
* `select_handle_left`: The selection of the left handle of this point
* `select_handle_right`: The selection of the right handle of this point
These could already be written to using `drawing.attributes[".selection_handle_left"]`
and `drawing.attributes[".selection_handle_right"]`, but this makes it
easier to work on individual points from the higher-level
python API.
Resolves#137639.
Pull Request: https://projects.blender.org/blender/blender/pulls/137730