Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Remove BLI_str_utf8_as_unicode_and_size and
BLI_str_utf8_as_unicode_and_size_safe.
Use BLI_str_utf8_as_unicode_step instead since it takes
a buffer bounds argument to prevent buffer over-reading.
|
|
There were multiple utf8 functions which treated
errors slightly differently.
Split BLI_str_utf8_as_unicode_step into two functions.
- BLI_str_utf8_as_unicode_step_or_error returns error value
when decoding fails and doesn't step.
- BLI_str_utf8_as_unicode_step always steps forward at least one
returning the byte value without decoding
(needed to display some latin1 file-paths).
Font drawing uses BLI_str_utf8_as_unicode_step and no longer
check for error values.
|
|
|
|
Fix mesh freeing call for obi->original_me so the address is correct.
|
|
Instead of passing separate booleans for whether to store the locations
and distances, check if the spans are empty. And instead of passing a
separate boolean for whether there is valid tree data, pass a pointer
to the data.
|
|
The comment for data_eval mentions that it should contain a mesh for
curve objects, however with geometry nodes, objects can evaluate to
curves as well (though they are only containers for the `CurveEval`.
That is a larger issue, but with the upcoming geometry instancing patch
the situation changes, so this commit does not correct that. I also hope
to remove this code in favor of the new curve to mesh code soon.
Instead, just check the evaluated data type in this case, which prevents
the crash, though it is hacky.
|
|
|
|
- New operator property to toggle edge panning in the keymap:
This is disabled by default to avoid edge-panning in cases where it
gets distracting, such as adding a new node. Only the explicit
translate operator(s) (GKEY or drag) have this enabled now.
- Restore the initial view rect on edge pan cancel:
The initial view rect is now stored in the edge pan operator data.
When an operator with edge panning is cancelled it can now call the
`UI_view2d_edge_pan_cancel` function to restore the original View2D
rect.
- Less delay in node editor scrolling:
Delay is useful when scrolling through long lists, such as in the
outliner, but makes node scrolling feel sluggish and unresponsive.
The lower scroll speed here makes a faster response the better option.
- Zoom influence feature:
Somewhat slower scrolling in UI-space when zoomed out. With the 0.5
zoom influence factor nodes behave as if zoom factor is halved,
otherwise it gets too fast when zoomed out. Previously scrolling would
always be constant-speed in UI space, now it's half-way between UI
space and node (view) space.
|
|
Before this patch attempting to remove a particle modifier programmatically
through Python would fail, because it deleted the modifier associated with
the currently active particle system instead of the one passed as an argument
to `bpy.types.ObjectModifiers.remove()`.
This fix adds an additional argument for the particle system to
`object_remove_particle_system`. This allows to specify which particle system
and its associated modifier shall be removed. In case of
`particle_system_remove_exec` it will remain the currently active particle
system, whereas `object_remove_particle_system` passes the particle system
of the modifier. Hence, the correct modifier will be removed.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D12234
|
|
`BKE_lib_id_clear_library_data`.
This static internal `_ex` function was not doing anything extra, just
move back whole code to public API `BKE_lib_id_clear_library_data`.
|
|
Not sure why this one was still there, probably just escaped a previous
cleanup somehow.
|
|
|
|
The idea is to only allocate pixel storage only when there is an actual
data to be written to them.
This moves the code forward a better support of high-res rendering when
pixel storage is not allocated until render engine is ready to provide
pixel data.
Is expected to be no functional changes for neither users no external
engines. The only difference is that the motion and depth passes will
be displayed as transparent for until render engine provides any tile
result (at which point the pixels will be allocated and initialized to
infinite depth).
Differential Revision: https://developer.blender.org/D12195
|
|
FFMPEG_USE_DURATION_WORKAROUND
|
|
This overlay was intended to identify the active objects in modes
like Sculpt Mode, where you don't have any extra visual indication
of what is the current and target object when switching directly
between them.
After having flash on mode transfer on the transfer mode operator,
the visual information this overlays provides is redundant. It is
still available in case some users want to use it like a way of
focusing on the active object.
Reviewed By: JulienKaspar, JacquesLucke
Differential Revision: https://developer.blender.org/D12303
|
|
We need to separate the flag telling duplicate code to not handle
remapping to new IDs etc., from the one telling the code that we are
currently duplicating a 'root' ID (i.e. not a dependency of another
duplicated ID).
This whole duplicate code/logic is still fairly unsatisfying, think it
will need further refactor, or maybe even re-design, at some point...
|
|
Mistake in a30a8179331d689c9e599fb9a530c0b6b155f689.
|
|
There is no reason running a Python file should require an active area.
|
|
Reading paths over 512 bytes would cause a buffer overrun.
|
|
Error in f3e26c847b6ba0924cfd02641345164c54234425
|
|
Add a string length argument to BLI_str_utf8_as_unicode_step to prevent
reading past the buffer bounds or the intended range since some callers
of this function take a string length to operate on part of the string.
Font drawing for example didn't respect the length argument,
potentially causing a buffer over-read with multi-byte characters
that could read past the end of the string.
The following command would read 5 bytes past the end of the input.
`BLF_draw(font_id, (char[]){252}, 1);`
In practice strings are typically null terminated so this didn't crash
reading past buffer bounds.
Nevertheless, this wasn't correct and could cause bugs in the future.
Clamping by the length now has the same behavior as a null byte.
Add test to ensure this is working as intended.
|
|
|
|
|
|
This function can be used to find metastrip parent of nested strip.
Reviewed By: ISS
Differential Revision: https://developer.blender.org/D11985
|
|
Simplify logic of speed effect frame calculation by using discrete math
where possible. Only `SEQ_SPEED_MULTIPLY` mode with animation requires
frame map to be built. Frame map building was simplified by removing
unused branches.
Functional change: Animating strip in negative range will reverse playback.
I assume this was limitation of previous system, where each frame map item
was limited to be within correct frame range. Now frame map can contain
values that point beyond usable range and they are limited by
`seq_speed_effect_target_frame_get`. This way it is possible to control
playback rate in both directions.
Mostly fixes T89120 apart from offset handling.
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D11939
|
|
Prefetch needs to avoid rendering scene strips, because
- Rendering in background needs own dependency graph, which fails to
initialize from evaluated data.
- This locks UI and can make it unresponsive for long time periods.
In T88237 prefetch failed to avoid scene strip, because of effect strip
was attached to scene strip.
Ensure, that no effect that is attached to scene strip either directly
or indirectly would be rendered.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D11247
|
|
When splitting strips, first they are duplicated and then offsets
adjusted. This can fail on cross transitions, because some strips don't
overlap with split frame.
All strips, that relate to each other must be duplicated to ensure
correct relations after splitting, so solution is to delete non
overlapping strips from left or right side respectively.
Since cross transition don't have to overlap with source strips,
splitting such strips would lead to effect being deleted, which
could cause crash when iterating over strips in python. Therefore
splitting of such strips is now forbidden and will generate error.
Splitting of transition will also generate error solely because such
operation is illogical.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D12121
|
|
When all strips are selected and overlap is caused, this causes VSE to
hang in infinite loop, because such situation should never happen.
To prevent infinite loop, ensure, that strip overlap is not tested
against single overlapping strip itself.
Prevent overlap that can not be handled because of issue described above
by moving overlapping strip between channels.
Reviewed By: campbellbarton
Differential Revision: D12209
|
|
`CurveMapping.evaluate` function expectes `CurveMapping` to be
initialized, while this wasn't documented.
I don't see any reason for not initializing `CurveMapping` on demand.
Initialization was added in rBf16047c2df1e8be56bf76524f9eb1fa5ecde2176
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D12145
|
|
Changes the threshold comparison from absolute to relative.
Removes threshold for MLoopCol comparison.
Adds a compare relative threshold function.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D12273
|
|
The cache is used to fill the buffer list.
|
|
This allows for a simplification of macros and combines with
`MeshBufferList`.
|
|
Matches the existing `MeshBatchCache`.
|
|
`MeshBufferList` is more specific and can avoid confusion with
`MeshBufferExtractionCache`.
|
|
`MeshBufferCache` is a struct representing a list of buffers.
As such, `GPUIndexBuf **tris_per_mat` is out of place as it does not
represent one of the buffers in the list.
In fact this member should be close to `GPUBatch **surface_per_mat` as
they are related.
The code for dependencies between buffer and batch had to be reworked
as it relies on the member's position.
Differential Revision: https://developer.blender.org/D12227
|
|
When using a Cryptomatte node and selecting 2 views in Multi-View,
its output values are doubled. When selecting 3 tripled and so on.
This causes incorrect compositing results for all the views.
The node creates an input operation for each rendered cryptomatte
pass. In Multi-View, passes are rendered for each view but compositor
is executed per view and should only create operations for those
corresponding to the current view being executed. Otherwise duplicated
operations add up later in cryptomatte operation.
Reviewed By: jbakker
Maniphest Tasks: T89998
Differential Revision: https://developer.blender.org/D12216
|
|
Full frame doesn't support this option as all operations are already
buffered. UI option will be removed in the future.
|
|
Row stride and the area x coordinate offset were not taken into
account.
|
|
Adds full frame implementation to Channel Key, Chroma Key, Color Key,
Color Spill, Cryptomatte, Difference Key, Distance Key, Keying,
Keying Screen and Luminance Key nodes. The other nodes
in "Matte" sub-menu are submitted separately.
No functional changes.
Part of T88150.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D12220
|
|
Adds full frame implementation to these nodes operations.
When enabling "extend bounds" node option, tiled implementation
result is slightly different because it's using `TranslateOperation`
with bilinear sampling for centering.
Full frame always uses nearest to don't lose image quality.
It has the disadvantage of causing image jiggling on backdrop
when switching size values as it's not pixel perfect.
This is fixed by rounding to even.
No functional changes.
Part of T88150.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D12167
|
|
Adds full frame implementation to "Displace", "Crop", "Flip",
"Plane Track Deform", "Corner Pin", "Movie Distortion",
"Lens Distortion" and "Map UV" nodes.
The other nodes in "Distort" sub-menu are implemented
separately in other commits.
No functional changes.
Part of T88150.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D12166
|
|
Adds full frame implementation to "Rotate", "Transform" and
"Stabilize2D" nodes.
To avoid sampling twice when concatenating scale and rotate
operations, a `TransformOperation` is implemented with all
the functionality.
The nodes have no functional changes.
Part of T88150.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D12165
|
|
Current sampling methods have off by one issues on full frame:
- Bilinear sampling do not fully sample bottom and left image border,
creating edges.
- Single elem buffers are not sampled at all when they should be
at least on the borders to smooth edges.
- EWA filtering is partially implemented on `ReadBufferOperation`, it
needs to be moved to `MemoryBuffer` on full frame.
In order to not affect tiled implementation, this commit creates
specific sampling methods for full frame needs.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D12164
|
|
Adds full frame implementation to all nodes in "Converter" sub-menu
except "ID Mask" which is implemented separately.
No functional changes.
Part of T88150.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D12095
|
|
Differential Revision: https://developer.blender.org/D11198
|
|
`inv_unit_scale` is not descriptive.
|
|
Y coordinate was not being constrained.
Caused by {rBb0d9e6797fb866e7a58876c7977c98a190070310}
|