After coming back to this file after a few months I myself did not remember where to edit it.
Adding the "Introduction and formatting" bullet item and update others for brevity.
Some non-functional changes:
* Use the C++ variant of `BLI_uniquename_cb`.
* Use `StringRef` when passing strings as parameters.
* Don't pass default name as parameter. Expect name in
`unique_node_name` to not be empty.
The region type isn't set yet when polling regions just after file read. As a
result, the polling state cannot be evaluated correctly, and `init()` may end
up being called without the previous required call to `on_poll_success()`.
Ensure the region type is set earlier, right at the beginning of screen
initialization after file read. This way all further area/region
referesh/re-init (confusingly called "init") logic can assume it's set.
Pull Request: https://projects.blender.org/blender/blender/pulls/131050
When "sound scrubbing" was turned on, it would stop audio playback if
you managed to start the timeline before the "sound scrubbing" audio
preview had finished.
This was trying to smooth out the playback but could instead lead to
worse frame pacing. It was also masking some bugs in the PulseAudio
backend that has been fixed.
Previously changing audio devices or settings while Blender was playing
back could lead to crashes or the playback state between Blender and
Audaspace de-syncing.
The order of curves in a Grease Pencil drawing defines the
order in wich they are rendered, so it's important to be
able to change the order. Currently, there is not easy way
to do this from python.
This adds a new `reorder_curves` and `reorder_strokes`
function to reorder the curves in the curves geometry.
The function takes in an array of indices that are the
new indices for the curves (e.g. an index map).
`reorder_curves(new_indices=[...])`
Pull Request: https://projects.blender.org/blender/blender/pulls/130331
The `Action::last_slot_handle` field is set to a high-ish value, to
disambiguate slot handles from array indices.
Slot handles are opaque integers, and are just used to find a slot
with that particular handle. Its exact value is irrelevant; Blender
only ensures that slot handles are never reused within the same
Action.
This particular value was obtained by taking the 31 most significant
bits of the TentHash value (Nathan's hash function) for the string
"Quercus&Laksa" (Sybren's cats).
Pull Request: https://projects.blender.org/blender/blender/pulls/131310
There seems to be an issue inside Intel OpenGL driver of legacy
platforms that fails to link `gpu_shader_sequencer_strips`.
Uniform locations are used to fix an specialization constants issue.
This PR only adds the uniform location when the shader can be
specialized. It is unclear what is actually failing inside the driver
but there are other issues with the driver.
Pull Request: https://projects.blender.org/blender/blender/pulls/131293
The BLI wrapmode variant of nearest interpolation for border boundary is
wrong for coordinates between [-1, 0]. That's because the negative
comparison in wrap_coord is done on the integer rounded coordinates,
which will be zero in this case, so the condition will not fail. To fix
this, do the comparison on the original coordinates instead.
Pull Request: https://projects.blender.org/blender/blender/pulls/131306
I'm not quite sure what was wrong about the old implementation, but it was confusing
because it also depended on the user counts of drawings and other more high level
functions like `duplicate_layer`.
This fix just reimplements the functionality using the grease pencil API that we use in
more places in geometry nodes.
Pull Request: https://projects.blender.org/blender/blender/pulls/131291
When importing a BVH file with a parent node that has more than one
child that have offsets within `0.001 * global_scale` of the parent
node, the length of the parent node is considered to be zero.
For example: A parent node with `OFFSET 0 -0.1077 0`, two children with
`OFFSET 0 -0.1074 0`, and a global scale of `1.0`, the parent node's
length would be considered zero, therefore adding `global_scale / 10`
(`0.1` in this case) to the y component of the offset. The resulting
tail offset would then be `OFFSET 0 -0.0077 0`.
Ref !105492
Adds support of NURBS weights or "rat bspline" in OBJ terms.
Tries to guess Blender knot mode better:
- Detects and closes loops. This decision is based on geometry only. No metadata is provided in OBJ for this, so importer has checkbox to disable this feature.
- Bezier knot mode allows to import circles and circular arcs.
Pull Request: https://projects.blender.org/blender/blender/pulls/131169
When copying from/to depth stencil images the aspect of the image was
set incorrectly. It pointed to only one aspect of the full image when
building resource links, which could lead to incorrect decisions in the
driver.
Found when researching #131269
Pull Request: https://projects.blender.org/blender/blender/pulls/131298
This applies the fix from 98334b8f7d to the c++ implementation.
Two notes:
* We need to work towards unifying these implementations which would have avoided this bug.
* In the C++ implementation, one can't use `math::dot` and `math::normalize` for quaternions
where this function is implemented, because of include dependency order.
Both these things should be resolved, but right now correctness has priority for me.
Pull Request: https://projects.blender.org/blender/blender/pulls/131296
This adds a `unit_test_compare` function to `Curves`.
Compares the curves. Curves are the same if:
* The number of points matches.
* The number of curves matches.
* The attribute names are the same and have the same type.
* The point attribute values are within the `threshold`.
* The curve topology matches (e.g. the curve sizes are the same).
* The curve attribute values are within the `threshold`.
* The indices of the points and curves are the same (can be ignored if this should be treated as the same).
The implementation reuses the same functions as the existing
comparison function for meshes.
Pull Request: https://projects.blender.org/blender/blender/pulls/131164
This adds tooltip descriptions for five items in the Principled BSDF
that currently have no descriptions at all. Sheen Weight: "Intensity
of the sheen layer, which simulates very small fibers on the surface".
Sheen Roughness: "Roughness of the sheen layer. Low and high roughness
values produce fuzzy or dusty appearance, respectively". Tint Color:
"Color of the sheen reflection". Thin Film Thickness: "Thickness of the
film in nanometers". Thin Film IOR: "Index of refraction (IOR) of the
thin film".
Pull Request: https://projects.blender.org/blender/blender/pulls/126735
Suppress unused warnings using the "vulture" utility.
- Include public definitions in the modules `__all__`.
- Mark arguments & variables as unused with a "_" prefix.
Restore overlay depth drawing which was removed in [0].
For viewport navigation this is useful. Disable overlays
for other operations such as painting & object placement.
Also disable color drawing in the overlay_next engine drawing
when drawing depth, since it caused the viewport to show a
checkered backdrop.
Details:
A boolean argument has been added to ED_view3d_depth_override instead
of new enums in eV3DDepthOverrideMode since mixing object-filtering
and draw-type in the one enum gets verbose & awkward, where most
existing enums would have needed to include NO_OVERLAY in their name.
V3D_DEPTH_NO_OVERLAYS has been renamed to V3D_DEPTH_ALL,
the caller must pass in use_overlay as false.
[0]: 5fea1eda36
Some popups are positioned centered in the window, like "Splash",
"About", and the large confirmations. But when you drag these to
a different location they will snap back when there is any window
interaction. This PR allows you to move these popups and they will
stay in the new location.
Pull Request: https://projects.blender.org/blender/blender/pulls/129125