To move this file on C++, a lot of changes have to be done.
To avoid adding a lot of long cast operator in loops, and make too
much changes, this usually replaced by using macros.
This is a non-trivial change and done as a separate cleanup.
See: #103343.
Pull Request: https://projects.blender.org/blender/blender/pulls/109801
The paint code doesn't invoke `stroke->redraw`
on `INBETWEEN_MOUSEMOVE` events. This causes
drawing lag on devices that tends to generate
more of them, like pen tablets.
The code no longer does this. It does still exclude
inbetween events for updating the paint cursor.
I checked, and only the two paint modes (3d texture paint and image paint) actually
use `stroke->redraw`. Both are implemented to only draw when necessary:
* `paint_2d_redraw` checks for `.need_redraw` flag on tiles.
* `paint_proj_redraw` checks `ProjStrokeHandle.need_redraw`.
I believe this may be the cause of #93796
Pull Request: https://projects.blender.org/blender/blender/pulls/110119
This removes the GL 3.3 fallback because default viewport engine
now require some features only present in GL 4.3.
Blender now also check for GL version 4.6 instead of 4.5 in some
cases.
Note that this does not remove the OpenGL support on Apple
hardware.
Pull Request: https://projects.blender.org/blender/blender/pulls/109390
The old code accidentally relied on the random number generator
always producing the same sequence. This was fixed by
22b98a1a55 but made the
underlying bugs more visible.
Finalize the hair & curves implementation for EEVEE Next.
- Ensure Hair particles have their own `ResourceHandle` and
`ObjectKey`, so Motion Blur works correctly.
(Note that the `ObjectHandle` and the `ObjectKey` are always created
"on the fly" instead of being stored as `DrawData`, since it's not
supported for particle system `ID`s).
- The (unused) `ObjectKey::use_particle_hair` has been replaced by an
integer `sub_key`, so multiple particle systems per object can be
supported.
- `VelocityModule::step_object_sync` now has 2 extra optional
parameters for syncing Hair particle systems.
- Update `DRW_curves_update` so it's safe to call it from "Next"
engines.
- Disable the `sampling.reset()` call from `step_object_sync`, since
`is_deform` is always true for objects with particle modifiers, and
this causes the renderer to get stuck at sample 1.
Pull Request: https://projects.blender.org/blender/blender/pulls/109833
Add support for point cloud rendering in EEVEE Next.
Update `point_cloud_sub_pass_setup` to retrieve texture based
attributes, since that's the way they're actually meant to be used.
Pull Request: https://projects.blender.org/blender/blender/pulls/109832
CustomData_bmesh_copy_data_exclude_by_type was excessively optimized.
It only worked if the ordering (by name) of the attributes in both
customdata sets were the same.
Note that a blender::Set is used (with 32 slots of static storage)
to keep track of uninitialized destination layers.
Alternatives include:
* Storing a bitflag in CustomDataLayer.flag
* Using a static bool vector instead.
I don't especially care how it's done, pick one.
Pull Request: https://projects.blender.org/blender/blender/pulls/108683
The grab tool could crash when applied to a Grease Pencil object with a
Subdivide modifier (or any other modifier that changes the number of
points in strokes). This patch prevents the grab tool from crashing.
- Removed a grab tool exception that was no longer necessary.
- Added a missing null check.
Pull Request: https://projects.blender.org/blender/blender/pulls/110078
This PR introduces baking reflective light from light probes. Light probes
are baked on the fly when the light probe data has changed. It doesn't update
directly when other scene data is changed in the viewport.
When doing image rendering the light probes are updated on each frame.
Currently the world probe and closest reflection probe are composited
together in shader. This allows different resolutions. We expect that we
eventually composite it before usage. This would improve the performance.
Unclear if we would support both compositing options eventually.
Pull Request: https://projects.blender.org/blender/blender/pulls/109909
The old Sculpt initialization code did double duty
as versioning code. This commit implements proper
versioning logic in versioning_400.cc; the existence
of the default fields are checked in DNA and if they
don't exist they're initialized. This is similar to
how the old code checked if the fields were zero.
This turns the embedded group into a pointer.
Note: Older files will not load the grease pencil v3 object properly after this.
The objects will not have any layers in them.
Pull Request: https://projects.blender.org/blender/blender/pulls/110007
The same issue for Smooth (Gaussian) which was reported in #109799 also affects the Butterworth filter.
When keys were not exactly on the frame, but offset even by minimal values the filter would introduce stepping.
Fix it by using `round()` instead of `(int)` when calculating the index to the filtered values array
Pull Request: https://projects.blender.org/blender/blender/pulls/110060
When keys were not perfectly on the frame, the index logic
would fail and duplicate data across 2 frames.
Using `round()` solves this. It does not add subframe support though.
Pull Request: https://projects.blender.org/blender/blender/pulls/110059
As an important optimization, grid views skip items that are not in
view, and instead add empty space to the layout still has the right
dimensions (for scrolling). Calculations were off though, leading to the
last row being dropped when it had too few items to fill it completely.
When property is changed in dopesheet, it is not reflected in
layer block, add notifier in `anim_channels_defines.cc` to fix this.
Also redraw the dopesheet region when layer is added or removed.
Pull Request: https://projects.blender.org/blender/blender/pulls/110055
Implements the Butterworth Filter
(https://en.wikipedia.org/wiki/Butterworth_filter) for smoothing FCurves.
This filter is ideal for smoothing dense data, like motion capture recordings.
It has the advantage of keeping the shape of the curve
intact while reducing minimal fluctuations.
The disadvantage is the impulse response has a twang,
meaning extreme spikes cause fluctuations to either side.
The implementation is based on the GPL code found here:
https://exstrom.com/journal/sigproc/dsigproc.html
In order to avoid phase shifting, the filter is run forward and backward,
effectively doubling the filter order.
The Redo panel offers the following options
* Frequency Cutoff: 0-n value, where 0 means it cuts everything
so the curve will become straight, the max value is the Nyquist frequency
and depends on the frame rate and the "Samples per Frame" option
* Filter Order: Higher values mean the frequency cutoff is steeper
* Samples per Frame: Before the filter is applied, the curve is resampled
at this interval to avoid errors when there are uneven spaces between frames.
If the keys are on subframes, e.g. a 60fps file in a 30fps scene, increase this value to 2
* Blend: 0-1 value to blend between the original curve and the filter result
* Blend In/Out: The number of frames at the start and end for which
to blend between the filtered and unfiltered curve.
This can help reduce any resulting jumps in the animation at the selection border
The operator can be called from the Key menu. (Key->Smooth->Butterworth Smooth)
Pull Request: https://projects.blender.org/blender/blender/pulls/106952
A TaskPool is used to execute tasks in the backghround.
Whenever a new sound strip needs their waveform to be computed, it's
added as a task to the TaskPool.
Once the PreviewJob has submitted all available tasks to the task pool,
it waits for all of them to finish before exiting.
The TaskPool is configured to start tasks as soon as they are pushed
onto the task queue.
Authored-by: Lucas Tadeu Teixeira <lucas@lucastadeu.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/108877