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
Remove long-deprecated constraints that will likely never be
implemented in this form.
- Rigid Body Joint Constraint was removed in 2.80, but some references
remained in the code. Versioning code was written that tried to
remove them on load, but since constraint initialization code sets
the type to CONSTRAINT_TYPE_NULL before versioning gets a chance,
the versioning code ended up never running. This has all been
removed.
- Python/Script Constraint never worked since 2.50 and showed an error
message in the UI panel.
These constraints now load as 'null' constraint, as seems to be
(looking at the code) the way that Blender currently deals with
removed constraint types. These still show up in the outliner and
python API, but have no UI panel. Removing such constraints completely
will be left for another time, as it is beyond the scope of removing
these two specific constraint types.
Pull Request: https://projects.blender.org/blender/blender/pulls/136672
Some paths in Blender support the `//` prefix for blend-file relative
paths however this is not communicated anywhere.
Support declaring this with a new flag which can be applied to filepath
& dirpath typed properties.
This is used to:
- Show red-alert when "//" are used in paths which don't support a relative prefix.
- Show a warning in the tooltip that the relative suffix is used when unsupported.
- Python warns if this prefix is ever used in an assignment or
function argument.
Resolves#133456.
Ref !137060
Make the 'Available' keying set look at the F-Curves for the assigned
slot, instead of the backward-compatible API (which only sees the F-Curves
for the first slot).
Pull Request: https://projects.blender.org/blender/blender/pulls/137131
Previously when an action was baked, the slot name was not retained.
This causes problems when switching between actions because the slot
will not automatically be assigned.
This is now fixed by ensuring that the name of the last assigned slot
is used to create the new slot.
Pull Request: https://projects.blender.org/blender/blender/pulls/136814
In Geometry Nodes a geometry is represented by a `GeometrySet`. This is a
container that can contain one geometry of each of the supported types (mesh,
curves, volume, grease pencil, pointcloud, instances). It's possible for a
`GeometrySet` to contain e.g. a mesh and a point cloud.
This patch creates a Python wrapper for the built-in `GeometrySet`. For now,
it's main purpose is to consume the complete evaluated geometry of an object
without having to go through complex hoops via `depsgraph.object_instances`. It
also also allows retrieving instances that have been created with legacy
instancing systems such as dupli-verts or particles.
In the future, the `GeometrySet` API could also be used for more kinds of
geometry processing from Python, similar to how we use `GeometrySet` internally
as generic geometry storage.
Since we can't really have constness guarantees in Python currently, it's
enforced that the `GeometrySet` wrapper always has its own copy of each geometry
type (so e.g. it does not share a `Mesh` data-block pointer with any other place
in Blender). Without the copy, changes to the mesh in the geometry set would
also affect the evaluated geometry that Blender sees. The copy has a small cost,
but typically the overhead should be low, because attributes and other run-time
data can still be shared. This should be entirely thread-safe, assuming that no
code modifies implicitly shared data, which is forbidden. For historic reasons
there are still cases like #132423 where this assumption does not hold in all
cases. Those cases should be fixed. To my knowledge, this patch does not
introduce any new such issues or makes existing issues worse.
Pull Request: https://projects.blender.org/blender/blender/pulls/135318
Add support for a 5th modifier key called "hyper",
this is a modifier supported on Wayland & X11 although
other platforms could support an additional modifier too.
Both GNOME and KDE can map CapsLock to Hyper.
Other compositors can use the XKB_DEFAULT_OPTIONS environment variable.
This allows users to have an additional modifier for their own use
that doesn't conflict with other keys.
Ref !136340
Rename to be more consistent with other Blender keymaps, as well as the
naming convention used in "View Type."
- "SequencerCommon" -> "Video Sequence Editor"
- "SequencerPreview" -> "Preview"
- "Sequencer Timeline Tool" -> "Sequencer Tool"
- "Sequencer Preview Tool" -> "Preview Tool"
There is versioning in place to make sure custom keyconfigs keep working.
Once #131102 goes through, if we would like to rename the "Sequencer"
view type to "Timeline" or "Sequencer Timeline," then we can make the
necessary changes here too.
Pull Request: https://projects.blender.org/blender/blender/pulls/136217
Previously when an addon is expanded on the UI, the "Maintainer" string
would be cut short until a `<` character, to prevent showing e-mail on the
UI, however there could be more than one person/email entries in there
so to prevent cutting short the string, now we use regex to take out the
email part only, so full maintainer string is displayed.
Pull Request: https://projects.blender.org/blender/blender/pulls/136031
Fix a few small mistakes in the action baking code:
- Assigning an action slot should only happen after the action itself has
been assigned.
- `_ensure_channelbag_exists()` didn't actually ensure the channelbag
always exists; now it also creates the layer & strip if necessary.
Pull Request: https://projects.blender.org/blender/blender/pulls/135853
Some wheels don't use "Purelib", meaning the directory layout of the
wheel needs to be manipulated on installation.
Add partial support for Python's "Binary distribution format" when
Purelib is false, since paths such as `includes` & `scripts` are not
remapped into user accessible locations - they will remain in the
wheels "*.data" directory, these could be supported if it's needed
although it seems like a fairly niche use case.
Ref !135709
When baking custom properties that were named exactly the same
as a property already in Blender (in this case `scale`), it would fail.
The issue was introduced with eee32726c7 where the goal was
to not key addon defined properties.
The problem with that approach was that `obj.bpy_rna.properties`
not only contains addon defined properties but also all that are native to Blender.
So the rna path would be created to be identical as for e.g. transform properties.
The fix is to test the property for `is_runtime` which is true for addon
defined properties but false for blender internal properties
I tested with the test file of #121349 to confirm that doing so
doesn't bring that original bug back.
Pull Request: https://projects.blender.org/blender/blender/pulls/135297