After reviewing the locations where `GPU_flush()` are used it doesn't seem
to be harmfull to include these for the Vulkan backend as well. Hopefully
will save some lag that can happen when submitting one huge render graph.
Improved playback of rain_restaurant.blend where frames could be dropped
resulting into UI lag.
Pull Request: https://projects.blender.org/blender/blender/pulls/136654
In light of recent changes by Jeroen, #124515 seems to have been resolved properly, rather then using this workaround.
This also sidesteps the issue seen in #136633 which only happens when GPU sibdiv is disabled.
Pull Request: https://projects.blender.org/blender/blender/pulls/136678
Part of incoming refactors in interface layout c++ code, this enables
forward declaring this enum type. Enum is renamed as `EmbossType` and
moved to `blender::ui` namespace. No user visible changes expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/136725
Calling `merge all` operation in an empty list triggers the crash. Check
node size before further evaluation to prevent the crash
- Add GP object
- Remove all layers
- Execute `Merge All` operation
Pull Request: https://projects.blender.org/blender/blender/pulls/136652
uv_select_all_perform had split the UV_SYNC_SELECTION
case into a separate block which complicated changes in this area.
Now each UV select function handles the sync-select case.
Also make UV's const when only used for comparison.
Caused by 6c05859b12
OpenVDB does not handle transformations with determinants smaller than
3e-15 and throws an `ArithmeticError` when a `Transform` is created
with invalid values.
To avoid abrupt crashes on the user side, this commit catches the error
and displays a warning message.
Pull Request: https://projects.blender.org/blender/blender/pulls/136690
This adds a new Camera Info node to Geometry Nodes. It provides information
about the passed in camera like its projection matrix and focus distance.
This can be used for camera culling which was must more complex before.
It also allows building other view-dependent effects.
Pull Request: https://projects.blender.org/blender/blender/pulls/135311
Found this while reviewing #136021. It's somewhat surprising that this didn't cause issues before.
This patch also adds some unit tests for `BLI_str_endswith` and `BLI_str_startswith`.
Pull Request: https://projects.blender.org/blender/blender/pulls/136679
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
Adds a new argument for the class constructor as well as a new macro to
support printing the rolling average of a number of samples intead of
the total average.
This can be useful for getting a sample of an average durations in
functions that are continually running, e.g. the main event loop.
Pull Request: https://projects.blender.org/blender/blender/pulls/136530
The selection and lengths for the resampling of the outline were based
on the original curves rather than the generated outline curves causing
out of bounds access.
---
#### Problem
Exporting grease pencil objects and setting the "Sampling" option
to higher than 0.0 will cause a crash during export.
In a debug build the following assert is triggert:
```
BLI_assert failed: C:\Users\leons\dev\blender-git\blender\source\blender\blenlib\BLI_virtual_array.hh:625, operator [](), at 'index < this->size()'
```
##### Steps to reproduce the issue
1. Open the attached .blend file: [gp-export-resample-crash.blend](/attachments/3be6839f-3376-4d75-ad54-077f1eeab472)
2. Select the "Monkey" grease pencil object and export it as PDF or SVG
3. In the export dialog set the "Sampling" to something other than `0.0` e.g. `0.2`
4. Confirm.
5. Blender should crash.
Pull Request: https://projects.blender.org/blender/blender/pulls/136585
When mouse is moved from one area to other of same spacetype, previous
region is not redrawn. This results in tooltip being stuck at the edge of
previous area. In such case, send a redraw call to that region.
Pull Request: https://projects.blender.org/blender/blender/pulls/136168
The Blender config.ocio does not have any rules, but custom ones can.
The default file rule is ignored if default_byte or default_float roles
exist. These roles are Blender specific, so would not be found in a typical
OCIO config. But when they are set appropriately, they help provide better
default guesses than what is possible with standard OCIO rules.
Pull Request: https://projects.blender.org/blender/blender/pulls/136516
The file formats now fill in ImColorSpaceInfo with the metadata colorspace
and a boolean saying if the pixels have HDR colors. And then the actual
colorspace is decided in imb_handle_colorspace_and_alpha.
This centralizes the logic in one place to make it possible to add
OpenColorIO file rules.
Pull Request: https://projects.blender.org/blender/blender/pulls/136516
Function `strip_effect_get_new_inputs` contained selection parsing and
error handling. It also returned values by setting 3 pointer addresses.
Split function to selection parsing which returns strips in container
and validation function, which returns error string if selection is not
valid. If selection is valid, empty string is returned
Pull Request: https://projects.blender.org/blender/blender/pulls/136474
This should ideally be used more in Geometry Nodes to avoid realizing subdiv
on the cpu if it's not really necessary. However, fully supporting it require more changes
in places that actually need the final subdivided mesh.
This also extends the "to string" conversion for `GeometrySet` to include information
about the subdivision level.