When using RMB selection and RMB-click-drag from a track border it
did not initiate translation of the track.
This i because the selection operator does not return PASSTHROUGH
for such selection. The code which was responsible for this has
been ported from the tools branch to minimize the code difference,
but it is not possible to detect condition under which the new
operator behavior is needed without modifying the keymap.
Simple solution: remove the code which was doing the wrong
assumption in the main branch.
Ref #119773
Pull Request: https://projects.blender.org/blender/blender/pulls/120940
The class `AnimDataConvertor` was implementing `operator bool`
to indicate "if this AnimDataConvertor is valid, i.e. can be used to process animation data from source ID".
The cleanup replaces this with a `is_vaild` function, making the
code easier to read and allowing to jump to the function definition
of `is_valid`.
Legacy GPv2 code seems to clamp the final computed radius to `0` (at
least in some cases, see e.g. line 3992 in
`gpencil_stroke_perimeter_ex`).
Add a clamping node to the generated geometry node used to mimmic the
legacy thickness adjustment in GPv3 converted data.
NOTE: There are still some artifacts in testfile used to investigate
this issue (`(Anim) 10 Picknick by Susanne Weise.blend`), that looks
like invalid radius handling on some curves ends... Clamping _may_ be
needed in other places maybe?
Pull Request: https://projects.blender.org/blender/blender/pulls/120840
When using world shaders with volume, older hardware could create
errors when the world background wasn't behind a surface. The reason
is that the world volume shader had a color attachment attached, but
none were defined by the shader interface. This lead to undefined
behavior.
This PR fixes this by attaching the occupancy frame buffer. This
framebuffer only contains a depth attachment.
Pull Request: https://projects.blender.org/blender/blender/pulls/120927
Fix linking & library-overriding with NLA Tweak Mode enabled. This is a
two-pronged approach:
- When linking an animated ID from a library file, and it happens to be
in NLA Tweak Mode, it is forced out of tweak mode. This ensures that
the correct Action is loaded, and that all the NLA flags are set
correctly to display the NLA animation (instead of only the tweaked
strip).
- For library overrides there is now a post-process step that runs after
all 'apply' functions have been run. This is necessary to ensure that
all the flags and pointers that NLA Tweak Mode depends on are actually
set correctly and consistently.
This also adds one utility function `BKE_nla_debug_print_flags()` that
is by now unused. It was very useful in debugging this, though, and I
think it'll be useful in the future as well.
Design task: #120573
Pull Request: https://projects.blender.org/blender/blender/pulls/120830
This is a regression caused by some previous refactor of the code,
which was preparing it for transition to a tool-based tracking
workflow. Some of the hot zones got tweaked, and a change in the
behavior was done so that when click happens far away from any
slidable marker "widget" all markers gets de-selected (which
matches behavior in 3D viewport).
The pixel tolerance did not apply UI scale factor, and applied
zoom level after squaring (which is wrong calculation of pixel
space in screen space).
Ref #119773
Pull Request: https://projects.blender.org/blender/blender/pulls/119971
Caused by addition of new code in 4e10aa6e71, which was not guarding
against negative frame values. The only other place that called
BKE_sound_set_scene_sound_pitch_constant_range guarded against negative
frames (added in 1fb692e896 + 49a0502f35), but generally it looks like
negative frames are a "no no" in audaspace, so just move the value
sanitization into BKE_sound_set_scene_sound_pitch_constant_range itself.
Pull Request: https://projects.blender.org/blender/blender/pulls/120891
This PR implements the Cutter Tool for GPv3. The Cutter tool deletes
points in between intersecting strokes. New points are created at the
exact intersection points, so as a result the cutted strokes will fit
perfectly.
For feature parity, the tool follows the GPv2 behavior:
- The cutter tool works on all editable layers.
- Intersections are only detected for curves on the same layer,
so intersection of curves on _seperate_ layers are not handled.
Technical notes
The implementation uses the `compute_topology_change` function
created for the Hard Eraser. So at intersection points, point
attributes will be interpolated.
Pull Request: https://projects.blender.org/blender/blender/pulls/113953
Compute shaders are required since 4.0. There was one occasion where
an older AMD driver failed and support was turned off. This driver
is now marked unsupported.
This PR includes:
- removing the check in viewport compositing
- remove properties from system info
- always construct draw manager.
- remove unused pass logic in draw hair/curves
- add deprecation warning when accessed from python
Pull Request: https://projects.blender.org/blender/blender/pulls/120909
When a slider operator has only a single 'slider property', disregard
Tab keyboard events.
This fixes an issue where the Tab key would make the slider operator
misbehave in a way that required cancelling the operator and re-starting
it.
Context: Depending on the specific operator, Tab can be used to toggle
between different parameters. The generic handler for modal slider
operators didn't take this into account, though, and passed through the
Tab key to the rest of Blender, when it wasn't handled by the specific
operator.
Pull Request: https://projects.blender.org/blender/blender/pulls/120922
This fails due to wrong/unnecessary invoke callback. Since this operator
does not have any property, `WM_menu_invoke` fails to call exec()
- - -
Steps to Reproduce:
- Add gpv3 stroke -> switch to edit mode
- Topbar -> Grease Pencil menu -> Delete -> Delete
Pull Request: https://projects.blender.org/blender/blender/pulls/120819
This commit implements Copy and Past Keyframes for GPv3.
The copy operator copies the selected GPv3 keyframes and the paste
operator paste the keyframes from the clipboard.
See #113110.
Pull Request: https://projects.blender.org/blender/blender/pulls/117388
All tools in Draw Mode, Sculpt Mode and Weight Paint Mode didn't work
correctly when the position of strokes was changed by modifiers.
In technical terms this was caused by
`get_evaluated_grease_pencil_drawing_deformation()`: when not in Edit
Mode, it effectively always returned the original position of stroke points
instead of the modified ones. In this PR there is a little fix for that.
Pull Request: https://projects.blender.org/blender/blender/pulls/120672
Adds the primitive tools in draw mode to GPv3.
This also adds rotation and scale sub-operators with `r` and `s` keybinds.
Also all control points are editable after extruding.
Pull Request: https://projects.blender.org/blender/blender/pulls/119039
Currently, `cache.eval_cache.final.attributes_buf[i] != nullptr` is used as
high level check to see if attributes need to be recomputed. However, this
buffer was not freed when a related buffer was freed that has to be
recomputed.
Test cases that uses compute shaders were exited when run on platforms
not supporting compute shaders. Since 4.0 Blender requires a platform
that supports compute shaders.
We should eventually phase out `GPU_compute_shader_support` as it
would always return true. Note that in OpenGL a platform is mentioned
that doesn't support compute shaders, but that is from an old driver
and should be save to remove as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/120907
There was a memory leak in the render graph where nodes where freed,
but not the data it could keep. Detected during adding support for
compute shaders and running the draw tests.
Pull Request: https://projects.blender.org/blender/blender/pulls/120906
MoltenVK includes are not found when compiling draw tests on certain
configurations. It has to do with the number of ways the VulkanSDK and
MoltenVK can be configured. Other executables the molten vk was included
to the system includes, except when compiling drawing tests.
This PR will equalize the includes how MoltenVK between the different
binaries
Pull Request: https://projects.blender.org/blender/blender/pulls/120888
The specialization constant default hash was implemented in gl_shader.hh
But the same implementation is needed for vulkan. This PR moves the
default hash to a common place where both backends can use it.
Pull Request: https://projects.blender.org/blender/blender/pulls/120889
When turning on VR mode, if no controllers are available,
a fallback model (a sphere) is rendered in the middle of the VR area.
This change uses the OpenXR API to check if the controllers are
available, sets new properties in `GHOST_XrPose` and `wmXrController`
that store if each controller is active or not, and uses
those properties to render the controllers in the VR view only
when they are active.
NOTE: in `wmXrController`, two state properties have been included,
but only `grip_active` is currently used. `aim_active` has been
included for consistency, but it could be removed.
Pull Request: https://projects.blender.org/blender/blender/pulls/119989
Since image vectorscope RGB mode addition (567455124d), changing
the opacity was causing the scope to get recalculated from scratch,
because opacity value was put into vecscope_rgb data directly.
Instead of that, make vecscope_rgb data only contain RGB, and fill in
the GPU vertex buffer alpha values when creating the GPU batch.
Now tweaking the scope opacity slider feels at about the same
performance as in 4.0.
Pull Request: https://projects.blender.org/blender/blender/pulls/120854
Add minimal support for the `Animation` data-block to the anim filtering
code. This means:
- F-Curves in the `Animation` data-block are shown in the Dope Sheet and
Graph Editor.
- The `Animation` is shown underneath each animated data-block, just
like an `Action` would be.
- Contrary to Actions, the expanded/collapsed state is stored on
`id->adt` and not on `Animation`. Because an `Animation` is intended
to be used by multiple data-blocks, they each should have their own
flag for this.
- In the filtering code, this PR adds the 'fillanim' channel type. This
is simply mimicking the name from the Action's 'fillact' type.
Limitations:
- Deleting of F-Curves is explicitly blocked, as that'll be introduced
in a later PR. The block prevents Blender from crashing.
- The Dope Sheet doesn't have an Animation mode yet, that'll be for a
later PR too.
Pull Request: https://projects.blender.org/blender/blender/pulls/120654
Clarify the code in `nla_draw_strip()` by extracting some flags into
booleans, and renaming some variables.
- `solo` is flipped in value, and renamed to `is_other_track_soloed`, as
this is what is actually modelled by the variable.
- The check for the `NLASTRIP_FLAG_INVALID_LOCATION` flag is stored in a
`const bool` to aid in debugging.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/120828
Part of !120397.
For non-id tree elements, call `element_should_draw_faded` and get the
fade status of their parent. For example, this will fix the fading of
modifier, actions, bones, etc. in outliner.
Pull Request: https://projects.blender.org/blender/blender/pulls/120813
The function `light_sphere_disk_radius` was misbehaved inside
the sphere. The LTC code has a early return but the shadow
code has not. In any cases, this patch avoids NaN issue.
A fully unset (i.e. null IDProperty storage pointer) dynamic RNA
property would not be properly handled by RNA copy code path. This led
to having a type mismatch (because dynamic RNA booleans are stored in
integer IDProperies) betwen source and destination RNA properties.
Since the fix in 6adf5adb7f, such type mismatch will abort the copying
process.
This is fixed by updating the `PropertyRNAOrID` internal struct to also
store whether the given property is actually a dynamic RNA one with
IDProperty storage.
NOTE: Potential side-effects: That kind of change is very difficult to
fully analyse, but no side-effects from this fix are expected. The only
code which behavior is changed is `rna_ensure_property_realdata`, which
is only used by `RNA_property_copy` currently.
This change to `PropertyRNAOrID`/`rna_property_rna_or_id_get` _may_ be
useful in the future though, e.g. in liboverride codepath...
Replace the C-class pattern function pointers with actual class methods.
Other than the obvious benefit of not requiring the "this" pointer to be
explicitly passed into every function call, this will make it much simpler
to remove the entire C-API class and replace it with its "impl" next.
For that next step we need to expose code to the implementation
of the topology refiner, so instead of defining stubs locally in the
opensubdiv intern class, we spread some WITH_OPENSUBDIV checks
in the blenkernel. As far as I know this is the only way to remove the
intermediate C-API and call opensubdiv functions directly from there.
Move most code to `blender::bke::subdiv`. That helps organization
and makes using C++ in subdiv code easier, which will be useful for
removing the unnecessary opensubdiv C-API wrapper.
This PR implements render graph for VKTexture. During the
implementation some tweaks to the render graph was done
to support depth and stencil textures.
The render graph will record the image aspect being used
for each node. This will then be used to generate barriers
for the correct aspect.
Also fixes an issue that uploading of array textures didn't
allocate a large enough staging buffer.
Pull Request: https://projects.blender.org/blender/blender/pulls/120821