This patch stores a reference to the entire context in the Result class,
as opposed to just the texture pool. This is in preparation for adding
CPU side texture to the result, such that allocations can automatically
allocate CPU or GPU textures based on context.
The RNA path that is generated for Editor properties were mostly
incomplete (e.g. the viewport overlay settings).
- in python tooltips
- from the `Copy (Full) Data Path` operator
- python methods `path_from_id`, `path_resolve` returned incomplete paths
Since a space (editor) is ultimately owned by the screen, we now add the
missing "areas[x].spaces[x]" subpath to any editor.
Nested structs (like the viewport overlay) also need to include this
subpath.
Some editor related structs are not tied to a single space though (and
these cases are therefor not resolved yet):
- Dopesheet is referenced from SpaceGraph, SpaceAction and SpaceNla
- View3DShading is referenced from SpaceView3D but render engines as
well
- FileSelectParams / FileAssetSelectParams / FileAssetSelectIDFilter
need more investigation
NOTE: in case of the VSE, to make this work this also changes the
overlays to be tied to SpaceSeq (the only editor using them)
NOTE: since the above is now in place, adding VSE overlay props to Quick
favourites is now made possible as well (was a leftover from !116604)
Fixes#124527, #113489
Pull Request: https://projects.blender.org/blender/blender/pulls/125365
Instead of requiring `GreasePencilStrokeParams` to have a
`DrawingPlacement`, pass it to the `foreach_editable_drawing`
callback.
This makes it possible to have a variant of `foreach_editable_drawing`
that doesn't use a `DrawingPlacement`.
The `Smooth`, `Thickness`, and `Strength` sculpt
brushes don't need this for example.
Also in preparation of using `GreasePencilStrokeOperationCommon`
in more places like vertex painting and weight painting.
Pull Request: https://projects.blender.org/blender/blender/pulls/125903
This adds the `layer.current_frame()` function which will get the frame
at the current scene time on this layer.
In the lagacy API this was the property `layer.active_frame`. Since we don't cache the visible
frame anymore, we use the current context to get the current scene time.
Pull Request: https://projects.blender.org/blender/blender/pulls/125892
This was caused by the primitive expansion code path
modifying the `DrawGroup` source input. Upon resubmission
it would take the initial vertex count and expand it again.
The fix is to isalate the description of the draw
from the resolved vertex range.
Fix#125879
The specialized code for converting grease pencil layer attributes to
instance attributes was accessing the instance component without check.
This _should_ work because the component is explicitly created, but
still fails for empty grease pencil data, because the
`get_component_ptr` function checks if the component is "empty" as well
(zero instances).
Pull Request: https://projects.blender.org/blender/blender/pulls/125887
Refactor of how "event icons" are created, using custom SVG icons for
key outlines and some complex keys. Allows multiple key widths so that
"Ctrl", "Insert", etc can be readable. Strings are automatically sized
rather than hardcoded. Also allows these strings to be translated.
Supports the UI icon alpha preference. Also supports local aspect in
case we ever want to allow 2D zooming there.
Pull Request: https://projects.blender.org/blender/blender/pulls/125591
Apply `const` to variables, arguments, and methods. Also includes a few
variable shadowing changes that were noticed along the way.
All changes should have no user visible effects.
Pull Request: https://projects.blender.org/blender/blender/pulls/125873
Factor calculation was not being used to scale the final translation.
Also removes a seemingly mistakenly added texture calculation for the
grids PBVH type.
Pull Request: https://projects.blender.org/blender/blender/pulls/125849
Part of #118145.
Parallelize the creation of the initial limit positions for the filter,
also using the API function to evaluate more than one vertex at a time,
and removing the old sculpt API function as well.
It is the responsibility of the caller to make sure this is only called
for base mesh sculpting. The expand tool (the only caller of the
geodesic functions) already does this.
Support the USD `color4f` (and related) types during import and use this
type when writing out Blender's color attributes.
This roundtrips Blender data correctly and will properly load data from
many more USD files as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/125839
Slightly improved sub-pixel centering of icons within their bounds. This
also adds a minimum (negative) for the offsets for the future case of
icons that require a design that overflows the design grid. Not just
that that have non-square proportions but that also need to be maximum
height or width of the design grid. These should not center themselves
but be anchored at the specified location.
Pull Request: https://projects.blender.org/blender/blender/pulls/125844
I'm not sure how another definition of `LocalData` becomes visible in
this translation unit, but de60594cfc which added another
Vector to this struct exposed a crash with sculpt color painting
because the wrong struct definition was used somewhere.
Together with changes from upstream audaspace, this should fix the
issue. The change slightly increases the duration of the scrubbing
sound to ensure that the audio buffer size gets played back at least
before it stops playback.
This PR introduces the concept of primitive expansion draws.
This allows to create a drawcall that will generate N amount of new
primitive for an original primitive in a `gpu::Batch`. The intent is to
phase out the use of geometry shader for this purpose.
This adds a new `Frequency::GEOMETRY` only available for SSBOs.
The resources using this will be fed the current `gpu::Batch` VBOs
using name matching.
A dedicated slot is reserved for the index buffer, which has its own
internal lib to decode the index buffer content.
A new attribute lib is added to ease the loading of unaligned attribute.
This should be revisited and made obsolete once more refactor
lands.
It is similar to the Metal backend SSBO vertex fetch path but it is
defined on a different level. The main difference is that this PR is
backend independant and modify the draw module instead of the GPU
module. However, it doesn't cover all possible attribute conversion
cases. This will only be added if needed.
This system is less automatic than the Metal backend one and needs
more care to make sure the data matches what the shader expects.
The Metal system will be removed once all its usage have been
converted.
This PR only shows example usage for workbench shadows. Cleanup PRs
will follow this one.
Rel #105221
Pull Request: https://projects.blender.org/blender/blender/pulls/125782
The issue happens due to `out_phase_img` returning wrong values in `eevee_surf_volume_frag.glsl`.
The only workaround I've been able to find is using the same format as the other property textures.
Pull Request: https://projects.blender.org/blender/blender/pulls/125715
The File Output node doesn't provide an option to save byte formats like
PNG in a space that is not sRGB. This is problematic for data images
like normal maps, which need to be saved as non-color.
This patch adds a Color Space option to the File Output node to allows
users to override the assumed color space. This also adds a new global
Save As Render option that is used if Use Node Format is enabled.
Pull Request: https://projects.blender.org/blender/blender/pulls/124238
Directly calculate the transformation matrix by multiplying and
inverting the Domain matrices. This removes a double-invert and
decomposition of the matrices so it should be more accurate, and I think
makes the math a lot easier to figure out.
This also moves the "bias" for Nearest to be done in the input space
rather than output. This should make it select the same pixels from the
input even if the image is rotated 180 degrees.
Co-authored-by: Bill Spitzak <bills@sidefx.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/125543
Classes Speaker, Lattice, Metaball, Prepass refactored to contain one pass.
Stereo camera's connecting line fixed to always be dashed.
Metaball selection fixed in object and edit modes.
Pull Request: https://projects.blender.org/blender/blender/pulls/125684
Align Cycles SVM and EEVEE's rendering of the vector math node
in reflect mode with OSL when the normal vector is 0,0,0.
This is done by using safe_normalize rather than normalize on the
normal vector. Which also fixes a NaN in the reflect mode in this
specific configuration.
Pull Request: https://projects.blender.org/blender/blender/pulls/125688
Code was using the `struct_index` instead of the `type_index` to set the
alignement value for this struct, effectively setting that alignement
value for another struct/type than `mat4fx4f`.
Found while working on naming cleanups of maksdna code.
Pull Request: https://projects.blender.org/blender/blender/pulls/125777