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
Rename ed_workspace_status_mouse_item to ed_workspace_status_icon_item
as this is not specific to mouse icons. Just a brain-fart because this
function has specific handling of mouse icons because of spacing
issues.
Pull Request: https://projects.blender.org/blender/blender/pulls/125790
PR #125332 made changes to the format of the version string displayed
on the title bar and in status bar. These changes included not showing
the patch level if zero. Unfortunately this also changes the version
as displayed on the command-line with "--version". This particular
change was approved quite hastily so this PR just reverses that, always
shows zero patch level and therefore shows the command-line version as
before. If we want to hide patch zero we can debate this specifically
later.
Pull Request: https://projects.blender.org/blender/blender/pulls/125788
Curve control points are shown quite small regardless of UI scale and
local zooming. This PR increases the minimum, regular, and maximum
sizes so that they are easier to see in all circumstances.
Pull Request: https://projects.blender.org/blender/blender/pulls/125786
Part of #118145.
Instead of storing a separately allocated array for each BVH node
for the temporary "color buffer" colors meant for mixing during a
stroke, just store an array the size of the whole mesh. Though this
is wasteful in terms of memory usage, plenty of other brushes store
mesh-sized arrays already, and it should make more sense as BVH
nodes get smaller too. After this commit, the BVH tree has no
specific code for color attributes anymore.
Pass a single span for both cloth brush init positions and the persistent
base array instead of switching between the two every time. Also only
retrieve the persistent base for base mesh sculpting since AFAIK that's
the only situation where it works properly anyway.
Use the same method for sharing code as elsewhere in the cloth brush:
translate the SubdivCCG and BMesh data structures to the equivalent
vertex indices used by meshes. This commit has to add some more code
for that because we only want to process visible vertices and there are
no factors being used for the typical filtering method used by brushes.
Use less or equal depth comparison for EEVEE and Overlay, since their
depths no longer match.
The main disadvantage of this approach is that material masked
transparency won't work anymore with overlays, so there's still another
(arguably not as bad) regression.
Pull Request: https://projects.blender.org/blender/blender/pulls/125722