BLF font rendering isn't compatible with render graph as it
rewrites buffers that are not yet drawn. To work around this issue
the vertex buffers should always be created on device and not
directly altered by CPU code.
Pull Request: https://projects.blender.org/blender/blender/pulls/122648
Blender crashes when the interactive GPU compositor is running in a node
editor while rendering. This is because the GPU compositor is sharing
the same GPU context used for rendering, which is not allowed. To fix
this, we use a dedicated render list for interactive compositing, to use
its dedicated GPU context.
This is implemented by keeping another render list for the purpose of
compositing and similarly clearing its context when it is no longer
needed.
Pull Request: https://projects.blender.org/blender/blender/pulls/122472
Code was getting a direction (to grow in) from the last point in a curve
and another point in the middle of the curve.
On a curve with only two points, these points were the same, resulting
in a zero delta and thus doing nothing.
To resolve, take the root point instead in this scenario to get a valid
direction.
Pull Request: https://projects.blender.org/blender/blender/pulls/122644
A variety of non-functional style changes for the recently added
DomeLight code:
- Remove unused includes and forward decls
- Changed NULL -> nullptr
- Use `motionSampleTime` name consistently
- Moved the `r_value` out parameter to the last position per our coding
guidelines
Pull Request: https://projects.blender.org/blender/blender/pulls/122641
Reduce dependence on Blender headers as much as possible and move closer
to an include-what-you-use setup.
- Removes unnecessary includes
- Replaces some includes with more appropriate, narrower, substitutes
Pull Request: https://projects.blender.org/blender/blender/pulls/122619
- Don't show the "Mouse X" and "Mouse Y" properties in the redo panel
for all the modes that don't use them.
- Use the recently added dynamic version of the "depends on cursor"
setting to only wait for mouse click for the "cursor surface" mode.
Arguably these should be different operators anyway.
- Support passing in operator ID's using Python dot syntax.
- Support define operators that haven't yet been registered
matching Blender's own behavior.
Also add doc-string for bpy.types.Macro.define.
Checking for exact flags known to draw before the current item was
becoming overly complicated, more so now showing extension updates
depends on checking other settings.
Instead, keep track of the status info being populated or not.
- Add a report to explain why allocation fails and display
the current limit.
- Add heuristic to avoid out of memory issue.
- Remove the delay property that did not do anything
right now.
- Reduce default clip end by half.
Fix#121916
Pull Request: https://projects.blender.org/blender/blender/pulls/122572
This allows for exporting multiple versions of an asset's textures
without having to manually save or do manual edits from within the UI.
This is beneficial for game creators who might want to store the
original textures at full resolution, but then bake down at export time
for multiple different targets quality levels. It can also be good for
compressing textures for VR usage.
This only affects USDZ exports.
Default option: Keep textures at the same resolution. Choosing a
resolution will downsample any images that exceed that maximum
resolution while leaving the others.
A custom setting is provided to allow the user to manually enter their
desired size if the provided options aren't suitable.
Co-authored-by: Charles Wardlaw <cwardlaw@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/121237
By capturing multiple attributes with one node, the user can make sure that those
are evaluated together in the same context. This can be quite a bit more efficient
compared to capturing multiple fields separately (also because we don't optimize
grouping multiple capture nodes together yet).
The change is fully backward compatible. Forward compatibility has been added
for some cases. Especially, files created in older versions that are saved with this
newer version will still work in the older version.
Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/121665
Blender crashes when duplicating a node editor with an active
compositor session. That's because the runtime data of the editor is
nullptr upon duplication. This is a regression in 51a7961e09, where the
runtime data was set to nullptr upon duplication, while it should be
assigned a newly allocated structure or duplicate the existing
structure. To fix this, we do the former and allocate a new structure
because that's what the developer intended in the original patch.
The crash is rare and went unnoticed because the runtime data is
initialized in the init method as well, which typically gets called
quickly right after the area is duplicated.
Pull Request: https://projects.blender.org/blender/blender/pulls/122506
This ports the `lock_material` layer property to GPv3.
For this, the `layer_index` is also required in `retrieve_editable_points`
and `retrieve_editable_strokes` to choose strokes based on
the `lock_material` property.
In `retrieve_editable_elements` we now pass the `MutableDrawingInfo`
to get both the `drawing` and `layer_index`.
Pull Request: https://projects.blender.org/blender/blender/pulls/119913
How to reproduce it:
* Launch Blender
* Make sure there are updates available
* Disable "Allow Online Access"
The offline icon would not show on the status bar.
* Show offline icon when offline.
* Don't show the vertical split when there are no updates (since we
don't draw any information in this case.
Reviewed by Campbell Barton.
Ref !122548
Move extension update display from the splash screen to the status bar.
Based on !122413 with minor changes & removal of splash text.
Co-authored-by: Harley Acheson <harley.acheson@gmail.com>
Move the bounding box synchronization to the geometry evaluation component.
This way it is ensured that it is only done when the geometry is actually
evaluated, solving the problem of accessing stale data when object level
flags are modified.
Pull Request: https://projects.blender.org/blender/blender/pulls/122509
This check was added for 4.0 where we knew that some identifiers will change soon.
Now those identifiers have changed (mostly as part of 8149678d5e),
so it's ok to support identifier lookup now.
The old C-style `BLI_ASSERT_UNIT_V...` assert macros have a few issues:
* They are named `unit`, but also consider a zero-length vector as valid.
* They use a fairly high epsilon value, which was defined because
vertex normals used to be stored as shorts.
Fortunately, these are used only in one place in the modern BLI_math C++
code AFAICS, which is `math::rotate_direction_around_axis`.
This commit adds some utils to check for vectors being (almost) unit
or zero length, using more modern bases for epsilon values (from
`std::numeric_limits`).
* `is_zero` keeps its existing default arror of `0` (i.e. strictly null
vector by default). That way, current behavior is not changed, and in
most cases null vectors are explicitely created as exactly null.
* `is_unit` uses a default 10 times the type's epsilon, as a zero
epsilon would virtually never succeed here.
And it modifies `rotate_direction_around_axis` to:
* Assert that `axis` is a unit vector.
* Early-out in case given `direction` is a null vector, or rotating
angle is zero.
* Assert about `direction` being a unit vector otherwise.
Note that this will make `rotate_direction_around_axis` use much
stricter epsilon error factors. This does not seem to affect any of the
files that triggered asserts prior to recent fix in e18dd894b8 though.
Pull Request: https://projects.blender.org/blender/blender/pulls/122482
Lack of initialization of `vertex_color_` will cause garbled color to
show up in later interpolated points while drawing in material mode with
curves already have `vertex_color` attribute. Now fixed.
Pull Request: https://projects.blender.org/blender/blender/pulls/122528
Replace use of "bl_pkg" operator category with "extensions",
this naming was used while the functionality was experimental,
not intended to be used once extensions was moved out of experimental.