This allows using a shortcut from the file browser to edit the directory
path. The shortcut Ctrl + L is quite standard and used in multiple
GNU/Linux desktop desktop environments, Windows, as well as most web
browsers. Safari on macOS uses Cmd + L.
Reviewed by: Jacques Lucke, Julian Eisel
Differential Revision: https://developer.blender.org/D15196
Part of T98560.
See https://wiki.blender.org/wiki/Source/Interface/Views
Adds all the basic functionality needed for grid views. They display
items in a grid of rows and columns, typically with a preview image and
a label underneath. Think of the main region in the Asset Browser.
Current features:
- Active item
- Notifier listening (also added this to the tree view)
- Performance: Skip adding buttons that are not scrolled into view
(solves performance problems for big asset libraries, for example).
- Custom item size
- Preview items (items that draw a preview with a label underneath)
- Margins between items scale so the entire region width is filled with
column, rather than leaving a big empty block at the right if there's
not enough space for another column (like the File and current Asset
Browser does it).
- "Data-View Item" theme colors. Not shown in the UI yet.
No user visible changes expected since the grid views aren't used for
anything yet.
This was developed as part of a rewrite of the Asset Browser UI
(`asset-browser-grid-view` branch), see T95653. There's no reason to
keep this part in a branch, continuing development in master makes
things easier.
Grid and tree views have a lot of very similar code, so I'm planning to
unify them to a degree. I kept things separate for the start to first
find out how much and what exactly makes sense to override.
The call to `get_component_for_write` would sometimes copy the mesh
even when the mesh is replaced with itself. The `replace_mesh` method
handles that case already, so just use that instead.
Use more descriptive names for some of the two character variables.
Reviewed By: Sebastian Parborg (zeddb)
Differential Revision: https://developer.blender.org/D15192
There were two problems here:
1) Console warnings due to brush was None.
2) It was impossible to recreate a brush.
This patch fixes both issues and it is now possible to recreate any brush.
Differential Revision: https://developer.blender.org/D15213
Reviewed by: @dflelinto
Add a RNA update function for output video codec setting to update
properties that are incompatible with defaults.
Previously video output bitrate settings were omitted because of the
Constant Rate Factor (CRF) default. CRF setting for video codec is only
available for H264, MPEG4 and WEBM/VP9 outputs, so for the others
changing encoder quality mode to constant bitrate (CBR) as CRF is not
supported.
Reviewed By: ISS, mano-wii
Differential Revision: https://developer.blender.org/D15201
This commit:
* Removes the popup to choose the root collection when called with a
linked object selected (in typical cases there is only one valid
option, if more then the operator fails and report to the user).
* Ensures that the linked reference of newly overridden collections are
also removed from the ViewLayer (i.e. their local parent collections).
This also renames Hair Curves to Curves. Meaning that until we get
rid of the old curve type we will have both of those entires there:
* Curve
* Curves
This rna enum is used among other things in the driver UI to pick
which data-block you want the property from.
Regression in [0] unintentionally renamed COORDINATES.
There was a naming discrepancy when two (nearly) identical arrays,
de-duplicating them caused the error.
[0]: 94444aaadf238ab2de4226d6b1b66284d479a931
- Avoid ambiguity which caused these values to be confused, use `mval`
for region relative mouse coordinates, otherwise `event_xy`.
- Pass region relative coordinates to sample_detail_dyntopo &
sample_detail_voxel as there is no reason to use screen-space values.
- Rename invalid use of mval for screen-space coordinates.
Wayland doesn't support accessing the position making functionality that
would map events to other windows fail, sometimes considering windows
overlapping when they weren't (as all window positions were zeroed).
Disable dragging between windows when accessing the window the position
isn't supported.
Finding the output with the largest scale now checks fractional scaling.
While this is only a minor difference in most cases, it makes the scale
deterministic instead of depending on the order outputs are added.
Some I/O code paths (Collada, OBJ) were using mat3_from_axis_conversion
followed by transpose_m3, instead of swapping the axis arguments
which achieves exactly the same result.
Reviewed By: Aras Pranckevicius
Differential Revision: https://developer.blender.org/D15158
Error in a4a7af47326.
To allow deleting tree elements while iterating, the new iterators would
get needed data out of the tree element before calling the iterator
callback. This included the info if the element is open or collapsed. So
if the callback would open or collapse elements, the iterator wouldn't
respect that change. Luckily the way the open/collapsed state is stored,
we can still query it after the callback is executed, without having to
access the (possibly freed) tree element.
OBJ vertex color related tests were not producing identical results
across various platforms, primarily due to sRGB<->Linear color space
conversions.
While D15193 has just made the color space conversion accuracy match
much closer between platforms, it's still not 100% the same.
This change reduces the amount of decimal places used for exporting
vertex colors, to 4 digits (down from 6). Vertex normals were
already always printed with 4 digits, and colors are conceptually
similar (usually 0..1 range etc.).
This makes the vertex color tests pass again, so re-enable them
after adjusting to 4 decimals expectations.
srgb_to_linearrgb_v3_v3 is using an approximation of powf that is
SIMD. However, while the accuracy of it is ok, a larger issue is that
it produces different results on Intel compared to ARM architectures.
On ARM (e.g. AppleSilicon), the result of the SIMD code path is much
closer to the reference implementation. This seems to be because of
_mm_rsqrt_ps usage in _bli_math_fastpow512. The ARM/NEON code path
emulates inverse square root with a combination of vrsqrteq_f32
followed by two Newton-Raphson iterations, because blender uses the
SSE2NEON_PRECISE_SQRT define.
This commit adds similar NR iterations to the "actual SSE" code path
as well.
Max error of srgb->linear->srgb conversion roundtrip goes from
0.000211 down to about 0.000062.
Reviewed By: Sergey Sharybin
Differential Revision: https://developer.blender.org/D15193
I'm using the tool icons for the brush themselves.
Note: This includes a few brushes that are only defined in D15134.
Those are simply the icons rendered with a world background of #282828.
This commit is intended to be reverted within a few minutes.
commit 39ffb045a52d16994c1c87ccf3249ff3222a8fca
Author: Bastien Montagne <bastien@blender.org>
Date: Wed Jun 15 15:43:13 2022 +0200
Py API Doc: add runtime changelog generation to `sphinx_doc_gen.py`.
Optionally use `sphinx_changelog_gen.py` to dump current version of the
API in a JSON file, and use closest previous one listed in given index
file to create a changelog RST page for Sphinx.
commit fbe354d3fcfa2ad1ed430c3c27e19b99a0266dda
Author: Bastien Montagne <bastien@blender.org>
Date: Wed Jun 15 15:36:19 2022 +0200
Py API Doc: refactor changelog generation script.
Main change is to make it use JSON format for its dump files, instead of
some Python code.
It also introduces an index for those API dump files, mapping a blender
version to the relevant file path.
This is then used to automatically the most recent (version-number wise)
previous API dump to compare against current one, when generating the
change log RST file.
There is a check to be sure no system python is in the path
on windows to be sure deps do not accidentally build against it.
The problem arises on certain versions of windows that ship a
python.exe that just opens up the MS store to download their
python version. The check takes this to be a real python
installation and refuses to build.
This change fixes the issue by looking for pythonw.exe which a
real python install would have, but the MS store opening one that
windows ships (as of now) would not.
Whats happening is that the modifier keeps adding new frames to the evaluated object resulting in an exponential increase. This is because when preparing the data for the modifiers we only copy visible strokes to the eval object. But the modifiers do not consider visibility and will generate the mirrored strokes even for layers that are hidden. Because those layers have not been copied (only their structure) we run into this issue.
The solution is always copy the active frame of all layers (even if the layer is hidden).
While dragging assets over a catalog, we would show both the name and
the full catalog path in the drag tooltip. For catalogs at the root
level (catalogs without parents) the name and the full path are the
same, so it would just display the name twice. This is more confusing
than helpful. Now skip displaying the full path in that case.
Reviewed by: Julian Eisel
Addresses T92855
Differential Revision: https://developer.blender.org/D15190
Re-organize de-selection so that there is less conflict between tracking
and masking operators.
Still not fully ideal: the LMB selection does not de-select everything
now since the `mask.select` with `deselect_all` is only added to the
keymap when the RMB is the select mouse. While this is sub-optimal, this
seems to be how mask selection behaved in the Image Editor in 3.1.
Not sure it worth looking into a more complete fix, as it will likely be
too big to be safe for a corrective release.
Differential Revision: https://developer.blender.org/D15183