Code had variables `frame_start` and `start_frame` for different purpose
confusing. Variables were sorted and math simplified.
Fixes broken waveform to pixel grid alignment.
Caused by not applying the offset to start frame calculation.
Also fixes reverse offsetting of waveform when start offset was
negative - content start frame was used instead of handle frame.
When editing inside a meta strip, running the "Set Color Tag" operator
would set the color tag of the top-most meta strip, rather than that of
the intended strip.
Pull Request: https://projects.blender.org/blender/blender/pulls/115950
Continuation of fix for #115776. Removes attribute copy functions
that calculate the map inline, this is error prone as it's easy to
call these functions from a loop which may result in poor performance.
Fixes#115776
Create a minimal structure that contains the instructions necessary to
copy from one custom data format to another. This structure is similar
to the one used in dfacaf4f40. It should have been used in
9175d9b7c2, which instead introduced quadratic performance
relative to the number of layers when copying every element.
In this commit, copying the entire mesh and adding new custom data
are explicitly changed to use the new map to speed up copying many
elements at a time.
The non-map attribute copy functions are also changed to check for when
the source and result BMeshes are the same. In that case it's much
faster to call the "same format" function from 9175d9b7c2.
For numbers, the timings are arbitrarily influenced by how many layers
I add in my testing. With 50 or so layers, a 10x difference is easily
observable though.
Pull Request: https://projects.blender.org/blender/blender/pulls/115824
Adds initial support for File Handler registration with the python API
for design task #68935. File Handlers will allow developers to associate
additional UI behavior and capability to operators traditionally used
only within the file browser.
The initial commit should have no user visible changes, but will serve
as the foundation for providing file drag & drop capabilities to
operators that can manage files (#111242).
See the PR for an example of python usage.
See design task #68935 for remaining work to be explored in the future.
Pull Request: https://projects.blender.org/blender/blender/pulls/112466
These functions don't have to know about things like geometry
deformations. As far as they're concerned, they just use the positions
from the argument span instead of the positions stored in the curves.
These shouldn't be used when the lambda is non-trivial, it likely
generates too much code and bloats the binary size for no
observable performance gain in these cases.
Our glyph bounds clipping test will fail for the first character of a
string if that character has negative left-side bearing. This is not
usual but can happen in some designs for lowercase "j" to have the tail
hook under the preceding character.
Pull Request: https://projects.blender.org/blender/blender/pulls/115965
"mesh" reads much better than "me" since "me" is a different word.
There's no reason to avoid using two more characters here. Replacing
all of these at once is better than encountering it repeatedly and
doing the same change bit by bit.
And improve naming to remove the inconsistent "SCULPT" prefix in
many cases-- removing redundancy between the namespace name
and the function name. The specific names might need to evolve a bit
still, but it's much less annoying not having to type or read the
namespace all the time. I left out some areas with unclear design.
Due to changes in the build environment shader_builder wasn't able to
compile on macOs. This patch reverts several recent changes to CMake files.
* dbb2844ed9
* 94817f64b9
* 1b6cd937ff
The idea is that in the near future shader_builder will run on the buildbot as
part of any regular build to ensure that changes to the CMake doesn't break
shader_builder and we only detect it after a few days.
Pull Request: https://projects.blender.org/blender/blender/pulls/115929
When debugging the descriptor sets are unnamed. This PR sets the
active shader name. This helps when debugging so we don't need
to track down the shader it is complaining about.
```
the descriptor (VkDescriptorSet 0x66da6f0000001c58[workbench_prepass_mesh_opaque_studio_texture_no_clip_1022]
binding 7, index 0) is being used in draw but has never been updated via vkUpdateDescriptorSets() or a similar call.
```
This message direct directly to the shader including what part is
needed to be checked. No need to add break points and that sort
of things.
Pull Request: https://projects.blender.org/blender/blender/pulls/115944
No functional changes.
Before this PR the interpolation mode of a new keyframe
was read from the User Preference at the deepest level
where the keyframe is created.
In case where this shouldn't be done, the flag
`INSERTKEY_NO_USERPREF` was passed in.
In this case it would fall back to some default values.
In order to make these low level functions
more flexible, the keyframe settings are now passed in.
I've made a new struct `KeyframeSettings` that holds the
* interpolation
* key type
* handle type
and a function `get_keyframe_settings` that allows
you to quickly get this settings struct.
This is a first step that will allow to pass in the
interpolation mode from python in the future.
Part of #113278
Pull Request: https://projects.blender.org/blender/blender/pulls/115898
The reason for the artifacts was that the depth (`placement_loc_`) was
not initialized in surface draw mode, but used in case we didn't hit a
surface in the projection.
This fixes the issue by using a default depth defined by the object
origin. Also applies for the `NearestStroke` placement.
Node splitting seems to be broken and when triggered it crashes blender. The cause for
this is that SplitNodePair stores a full node and uses assign operators, that can free
unallocated space.
Although node splitting is important for performance point of view, we should reevaluate
how we want node splitting to work.
This PR only disables it, so it won't crash when used.
Pull Request: https://projects.blender.org/blender/blender/pulls/115928
When using any of the operators in `graph_slider_ops.cc` and cancelling the operation,
the location of the object in the 3D viewport might get stuck in the state prior to cancelling.
To fix this, explicitly update the depsgraph when cancelling.
I've only done that in case of cancelling, since that's where the issue came from.
For fear of introducing performance regressions I'm not tagging the depsgraph
for an update at any other point. (It might already do that at some other part of
the operator code though)
Pull Request: https://projects.blender.org/blender/blender/pulls/115810
This PR makes it so that locked materials as well as hidden materials will not have their edit points and edit lines visible.
Note: Previously in grease pencil, strokes with hidden materials would still display the edit lines. This behavior is now fixed in GPv3.
Pull Request: https://projects.blender.org/blender/blender/pulls/115740
Subtle regression in [0] caused context override to fail when
passing in the current context when a temporary screen was used.
While passing in a temporary screen as an override isn't supported,
this shouldn't raise an exception if the argument matches the current
context.
Also added sanity check that the window passed in exists
and code comments to give an explanation of the current behavior.
[0]: 6af92e1360
The ID to draw should start at one, in order to not draw the "1"
face set which displays as white by default. There is still an issue
with dynamic topology drawing, but that's likely unrelated.
This allows for parallel processing of refraction.
Also fix a limitation of using AO node in
refraction materials.
This is needed for the grouping of raytracing
passes.
This increases VRAM consumption a bit (8MB for fullHD
frame) but has no impact on performance.
This include a needed fix to the `draw::Texture::swap`.
### Later work
- Limit the memory overhead to the cases where it is needed.
Pull Request: https://projects.blender.org/blender/blender/pulls/115912