Using this flag from linked data is always a double-edge sword, in one
end some user have been relying on it to keep around data that is not
really used as ID (like e.g. text data-blocks, node trees, see
e.g. #103687, #105687). On the other end, it often causes over-keeping
of linked data reference in production files.
From now on, when an unused linked data is to be kept around, users
should create an ID property to reference it.
Implements #106321.
Pull Request: https://projects.blender.org/blender/blender/pulls/111042
Fixes NaN in Vector Displacement node caused by the normalization of
0, 0, 0 vectors.
This fixes both visual rendering issues and an "illegal address" error
on the GPU. The "illegal address" error came from the Light Tree
Sampling code not handling the NaN normals well, leading to weird code
paths being taken, eventually leading to a kernel_assert and a
user facing illegal address error.
Pull Request: https://projects.blender.org/blender/blender/pulls/111294
Customprops to IDs are supported since years through code, but were
never exposed directly in the UI of customporperties.
This commit mainly:
* Adds a new `DATA_BLOCK` type to UI customprops types.
* Exposes the existing `id_type` settings to python API.
Pull Request: https://projects.blender.org/blender/blender/pulls/110458
Mainly add more python-related suppressions.
Also suppressed some reports from `pxr` (usd) libraries.
Now most tests are passing again with ASAN/LSAN on on my machine,
besides modifiers and geometry nodes ones, which often fail on a
mysterious `libstdc++.so.6+0xb259a` leak.
This PR implements indirect drawing for the Vulkan backend. Indirect
drawing is a requirement for workbench-next.
NOTE: that this is one of multiple changes needed to get to the same
support level. With this patch only objects at the center of the world
are drawn correctly.
Pull Request: https://projects.blender.org/blender/blender/pulls/111334
- GHOST_SystemPathsCocoa::getUserSpecialDir
used `strncpy` without ensuring the string was null terminated.
- GHOST_SystemPathsCocoa::getBinaryDir
used `strcpy` without checking the destination buffer size.
This allows adding debug calls to library
sources and not trigger an error for
all shaders that reference the lib.
The particular shader that need to use
it can set `drw_debug_print_enable` and
`drw_debug_draw_enable` in their main file
and it will trigger the injection of the
debug functions.
Blender's C++ data structures have configurable inline buffers used to
avoid allocation when the needed size is small. Use them in multires
code instead of an uglier C solution.
Pull Request: https://projects.blender.org/blender/blender/pulls/111070
Recent refactors could cause movement of selection endpoints when
extending (holding shift). This ensures that only the cursor side moves
during selection extension.
Pull Request: https://projects.blender.org/blender/blender/pulls/111288
Tests must be enabled manually using the CMake flag `WITH_COMPOSITOR_REALTIME_TEST`. Reasons are F12 for realtime compositor is experimental and buildbots have no GPU. Failing tests are excluded.
Pull Request: https://projects.blender.org/blender/blender/pulls/109878
Add optional argument `STRIP_LEADING_C_COMMENTS` to CMake macros:
data_to_c_simple & data_to_c.
Strip leading C-style comments that don't bloat binary size.
Comments are replaced with blank lines so line numbers in error messages
match. Reduces Blender's binary size by ~70kb.
Show a percentage output as the numbers weren't especially meaningful.
Also use default arguments for credits generator so no arguments
are required to generate all-time credits.
Generating credits/authors would print warnings from commits
that renamed many files, increase the diff.renameLimit to account for
this and suppress the warning.
Had put my name here since the choice was between the foundation
and me personally, with the blender authors file now being in
place this can be cleaned up.
This changes the default linker options for debug builds to use
fastlinking, this causes the PDB only to be usable on the machine
it is being created on, however since debug builds cannot be
distributed to end users (wont run due to missing debug CRT on
their system) this isn't a problem.
This halves the time required for an incremental link on my system
from 7->3.5 seconds
This renames the WITH_WINDOWS_PDB and WITH_WINDOWS_STRIPPED_PDB cmake
options to WITH_WINDOWS_RELEASE_PDB WITH_WINDOWS_RELEASE_STRIPPED_PDB
The Stripped PDB isn't cost free to generate, and is only needed for
builds that are distributed to end users. There is no benefit in making
one for a debug build as the debugger locally will prefer to use the
bigger un-stripped PDB anyhow.
This also stops the copy/install of the PDB for anything but a release
build, this file is about 1.6G for a debug build, and there is really
no need to do this for local development, as the debugger will find/use
the PDB from its original location.
This brings down the time needed for an incremental link on a debug
build by about 30% (10->7 seconds on my local system)
The only acceptable case to handle internal data in 'lib_link' code is
when it depends on other IDs info. Otherwise, it should be done in
'read_data' code (and versioning if relevant).
When using a slider it is possible to enter numbers for an exact value
However that input was capped between 0 and 1,
which is no longer correct since the range can be arbitrary.
Additionally it was divided by 100 because the slider
operator system assumed we'd be working with percentages.
This fixes both of these issues.
Pull Request: https://projects.blender.org/blender/blender/pulls/111269
For speed and consistency with other areas in Blender like Outliner,
UILists, animation channels, etc.
This is additionally to F2 (Enter in Industry Compatible keymap),
that shortcut is still valid.
Pull Request: https://projects.blender.org/blender/blender/pulls/111264
Implements the paper [A Microfacet-based Hair Scattering
Model](https://onlinelibrary.wiley.com/doi/full/10.1111/cgf.14588) by
Weizhen Huang, Matthias B. Hullin and Johannes Hanika.
### Features:
- This is a far-field model, as opposed to the previous near-field
Principled Hair BSDF model. The hair is expected to be less noisy, but
lower roughness values takes longer to render due to numerical
integration along the hair width. The hair also appears to be flat when
viewed up-close.
- The longitudinal width of the scattering lobe differs along the
azimuth, providing a higher contrast compared to the evenly spread
scattering in the near-field Principled Hair BSDF model. For a more
detailed comparison, please refer to the original paper.
- Supports elliptical cross-sections, adding more realism as human hairs
are usually elliptical. The orientation of the cross-section is aligned
with the curve normal, which can be adjusted using geometry nodes.
Default is minimal twist. During sampling, light rays that hit outside
the hair width will continue propogating as if the material is
transparent.
- There is non-physical modulation factors for the first three
lobes (Reflection, Transmission, Secondary Reflection).
### Missing:
- A good default for cross-section orientation. There was an
attempt (9039f76928) to default the orientation to align with the curve
normal in the mathematical sense, but the stability (when animated) is
unclear and it would be a hassle to generalise to all curve types. After
the model is in main, we could experiment with the geometry nodes team
to see what works the best as a default.
Co-authored-by: Lukas Stockner <lukas.stockner@freenet.de>
Pull Request: https://projects.blender.org/blender/blender/pulls/105600
Partially reverts b14a0ee57e.
Instead of renaming the DNA field, use namespaces in C++ to resolve
name collisions (which is the reason this change was done
in the first place).