- Deduplicate `scale_fit_methods` enum
- Reorder functions, polls, and code to locations that make sense
- Rename some functions to remove `seq` terminology in favor of `strip`
- Renames `len` in `LoadData` to `count` for images
- Add clarifying comments and improve descriptions
With the aim of removing `seqbasep` to remove the complicated logic for
repairing pointers within the `Strip` struct when loading files and undo
steps, this commit just moves access of the variable behind a function.
In the future the function will retrieve the list from a Strip pointer,
for now it just returns the existing pointer.
Overall motivation is that blend file pointer manipulation is incompatible
with the changes required for #127706.
Pull Request: https://projects.blender.org/blender/blender/pulls/144624
This makes the new parser code output correct errors.
Also simplify error logging.
Simplify a few things inside the parser interface.
Add debug string to the `Token` and `Scope`.
Pull Request: https://projects.blender.org/blender/blender/pulls/144708
VK_KHR_maintenance4 is enabled when available. VMA isn't aware that we
enabled it and could still use less optimized code-paths. This PR will
inform VMA that it can use the optimized code-paths.
The improvement is that we can decide in which memory area a specific
resource will be allocated, without the need of allocating the resource
header (VkImage/VkBuffer).
Pull Request: https://projects.blender.org/blender/blender/pulls/144552
Dragging a non-Blend file onto the Blender executable currently
silently fails with Blender just aborting. With this PR any files used
as file argument will load Blender and show a warning if the file does
not exist or is not a blend file. Blend files that cannot be read are
treated as they are now.
Pull Request: https://projects.blender.org/blender/blender/pulls/139128
We have a set of corners around some vertex. They have arbitrary
connectivity between each other and form a set of linked lists through
shared smooth edges. We have to linearly traverse each of these lists to
mix the normals. And as a way to iterate over all these lists mixed in
some index space we use a mask of already visited corners. So we take
the first non-checked corner by mask lookup. And this lookup starts from
the beginning every time even if we know there is no way to find any
elements before current one. In a synthetic example with 20k fan fill
of circle this gives a 8x speed up.
Pull Request: https://projects.blender.org/blender/blender/pulls/144649
The semantics of checking "has_value()" (etc.) are much better than
checking for an empty span when dealing with the result of an attribute
lookup. This mainly affects the Bezier curve handle position attributes
currently. Plenty of places assume those attributes exist now. In a
couple places the code is a bit safer now, otherwise it's just a bit
more obvious.
Pull Request: https://projects.blender.org/blender/blender/pulls/144506
There are many accumulated unused properties in theme. Generally, it's a mess,
lot of copy-paste errors and leftovers between editors, shared functions with no
actual use, etc. Some were just added and never used, like Pattern and Layout nodes,
which were meant to be used with Texture Nodes I believe, but it never happened.
Overall 19 properties removed:
- 3D Viewport: Edge UV Face Select
- 3D Viewport: Last Selected Point
- Dope Sheet/Timeline: Value Sliders
- Dope Sheet/Timeline: View Sliders
- Nonlinear Animation: View Sliders
- Video Sequencer: Window Sliders
- Graph Editor/Drivers: Window Sliders
- Graph Editor/Drivers: Vertex Bevel
- Graph Editor/Drivers: Vertex Group Unreferenced
- Image/UV Editor: Vertex Bevel
- Image/UV Editor: Vertex Group Unreferenced
- Image/UV Editor: Freestyle Face Mask
- Image/UV Editor: Face Retopology
- Image/UV Editor: Face Orientation Front
- Image/UV Editor: Face Orientation Back
- Node Editors: Selected Text
- Node Editors: Pattern Node
- Node Editors: Layout Node
- Video Sequencer: Draw Action
---
Details:
- Made Vertex Bevel and Vertex Group Unreferenced colors in `rna_def_userdef_theme_spaces_vertex`
optional, so that they don't appear in Graph Editor and UV Editor theme properties, where they're unused.
- Same thing in `rna_def_userdef_theme_spaces_face` for face attributes (Freestyle Mark, Retopology),
so that they don't appear in UV Editor, where they're unused. Also did same for face orientation colors,
but used different argument for them, since they could be used in future (remember seeing PR for this).
Pull Request: https://projects.blender.org/blender/blender/pulls/143782
This PR adds a "Mirror" menu to the Strip menu within the VSE preview.
This menu is similar to the "Mirror" menu in the view3d "Object" menu.
It allows the user to access the mirror operator through a menu, rather
than via a shortcut.
Pull Request: https://projects.blender.org/blender/blender/pulls/142506
This PR just updates the error message shown when the selected backend
is Vulcan but that fails and uses OpenGL instead. This currently uses a
bespoke popup alert block, but this PR replaces that with new UI_alert
function with the same wording.
Pull Request: https://projects.blender.org/blender/blender/pulls/144676
Its generally preferable to use `edge_other_vert` if you have a set of
2 ints and know some of them and want to select other. This is
preferable since it will make a check that assumption is met and at
least one of the ints is the same as the known one. This function itself
is also made to work with topological indices so has invariant for
positive ints and can work without branches and even test instructions.
Pull Request: https://projects.blender.org/blender/blender/pulls/144631
Reported on chat, confirmed with the python docs which lists
cursor_position as "float array of 3 items in [1.17549e-38, inf]"
Root cause is a fun fact about floats, FLT_MIN is the smallest positive
value possible, not the largest negative value (like INT_MIN)
Pull Request: https://projects.blender.org/blender/blender/pulls/144657
Tree view elements can be deleted by the remove operator located on the
right side with `-` icon. But these operators are different for every
type. Now introduced `UI_OT_view_item_delete`. With that it is possible
to delete elements with X key when mouse is over tree view. In future
maybe we could remove type specific operators (for example: `GREASE_PENCIL_OT_layer_remove`).
See video in PR description
Pull Request: https://projects.blender.org/blender/blender/pulls/144045
This PR adds an optional block alert level, defaulting to none. Then
for error-level alerts only it adds a red line and a color icon.
Dialogs with other alert types do not change at all. This also adds
a UI_alert function to create such dialogs.
Pull Request: https://projects.blender.org/blender/blender/pulls/134084
Right after #143858 this refactor aim to fix issue with bezier
curve handle segments location in index buffer object.
Before there were a lot of unused segments.
Now there is no any unused bit of memory.
Pull Request: https://projects.blender.org/blender/blender/pulls/143966
Continuing #140360, after 39c066ee53
Moving curve handle colors & size from space editors into common theme properties.
They are now shared by 3D Viewport, Image Editor, Graph Editor, and Movie Clip Editor,
instead of each of them having their own properties.
(Video in PR)
---
Details:
- NURB U/V lines, active spline, and last selected point colors were defined
in `rna_def_userdef_theme_spaces_curves` but were optional and only called by
3D viewport. Since no other editor calls that function anymore, I removed it and
moved those properties directly inside `rna_def_userdef_theme_space_view3d`.
- In Image Editor & Movie Clip Editor (Mask mode), curves don't ever show
selection colors, and Vector handles are generally never visible, that is
bug/missing in Blender in general, not a result of this PR.
- Handle vertex size were included in Dope Sheet and NLA, where handles don't
exist. Now as a side effect they're removed as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/143762
This adds the `Pen` tool to Grease Pencil Edit Mode.
With the pen tool you can:
- Extrude points by `Left Click`.
- Move the handles by dragging the mouse.
- Snap handles to 45 degree increments with `Shift`.
- Cycle through the handle types by `Double Clicking`.
- Add new point on segments by `Ctrl Clicking`.
- Remove existing point by `Ctrl Clicking`.
- Close a curve by clicking on one end while having the other selected.
- Move existing segment by clicking and dragging on the edge.
- Move points by clicking and dragging the mouse.
Some changes have been made compared to the legacy
curve object's pen tool:
- `Angle locking` with `Alt` was replaced with `Angle Snapping`
using `Shift`. This was done to match the behavior of Grease Pencil
primitive tools.
- `Move Entire Point` was changed from the `Space` key to `Alt`. This
was done because some laptops can't move the mouse while
`Space` is held.
- `Link Handles` and `Free Align Toggle` were not implemented.
- `Toggle Vector` and `Close Spline Method` were removed.
- `Close Spline` was removed and set to always be true.
- `Extrude Handle` type was removed as a option and was replaced
by the `shift` modifier key when clicking.
- Newly created points are placed on the drawing plane, instead of
the view plane.
When a new curve is created, the material will be the active material
and the radius will be set from the `radius` property.
Note: This tool is added to edit mode because it uses handle selection
and bézier overlays which currently don't exist in draw mode.
A future PR will implement a draw mode version.
Pull Request: https://projects.blender.org/blender/blender/pulls/142646
The default size of the Preferences window is often not wide enough
to fit some strings under System, Keymap, and others.
Make Preferences window slightly wider, but still a conservative width
so it doesn't cover up much of the screen at the smallest recommended
screen size (1920x1080).
See PR for details and screenshots.
Pull Request: https://projects.blender.org/blender/blender/pulls/144497
IMB_colormanagement_setup_glsl_draw_to_scene_linear (only used by
VSE preview rendering) inside GPUShaderBinder::to_scene_linear_bind
was trying to cache the created OCIO GPU shader, but failed to actually
do it: it was querying scene_linear_cache, but putting the shader
into display_cache.
This lack of caching was costing around 1ms on each VSE preview draw.
Pull Request: https://projects.blender.org/blender/blender/pulls/144617
Use the lately introduced parser for that.
This allows to use preprocessor directive inside them.
By extension, it alows having resource accessors inside
templates.
Also error report is less confusing on most shader compilers.
The counterpart is that the shader files that are shipped
with blender are inflated.
Pull Request: https://projects.blender.org/blender/blender/pulls/144588
When enabled (default), exported OBJ files have the object transform
applied to their vertices. This is the previous default behaviour.
When disabled, exported vertices use their local object coordinates.
Pull Request: https://projects.blender.org/blender/blender/pulls/139436
Not a common scenario, but if you had very few source images (e.g.
long image strips with one frame) and many final frames cached,
the full cache eviction policy was not handling that well, since it
was always removing at least one source image for each final frame.
Resulting in effectively the cache only being full of final frames.
Change that so:
1) evict_caches_if_full has a loop that tries to evict until the caches
are not full (i.e. not necessarily just one image), and
2) only evict source image per final frame, if there are more source
images cached.
Pull Request: https://projects.blender.org/blender/blender/pulls/144612
The problem was that the `Subdivide Modifier` would not apply catmull clark
smoothing to the first and last points when a curve was cyclical.
This also fixes a mistake were the smoothing would read from the same data
as writing, leading to the shape to be skewed.
Pull Request: https://projects.blender.org/blender/blender/pulls/144529
The depth of field shader create info contained a resource that wasn't
used in the shader or fulfilled. In the Vulkan backend the shader resource
list is used in the outer loop to find out which resources needs to be
requested. As this resource didn't exist it asserted in the Vulkan backend
for incorrect usage.
Pull Request: https://projects.blender.org/blender/blender/pulls/144606
Text drawing can be improved. At this moment a vertex buffer is
allocated for 2048 chars. When drawing a string the vertex buffer is
filled from the beginning with the string to draw. The next string will
replace the chars of the previous string. This locks up GPUs as the data
can only be overwritten when the buffer isn't used anymore.
Vulkan backend had an issue that uploading the new data would always
send over 2048 chars even when some chars were only used. By fixing this
the scene in the report went from 0.6 fps to 2.6 fps. OpenGL is 6 fps as
vulkan has to manage a rendergraph with 100.000 of nodes.
Text drawing performance can be improved by continue using the space of
the vertex buffers. In this case more drawing calls can be done, before
the vertex buffer needs to be updated.
Pull Request: https://projects.blender.org/blender/blender/pulls/144604
We plan on using this for online assets (see blender/blender!130543), to
send status updates with a URL to identify the online library remote.
In future this can be expanded for multiple kinds of messages with
differing data, like progress reports, sub-resource download messages
(e.g. individual assets), etc.
While this will only be used for online assets for the start, I imagine
we'd want these same kind of status messages for other remote
resources. Hence the name `WM_MSG_TYPE_REMOTE_IO`.
Pull Request: https://projects.blender.org/blender/blender/pulls/144567
Blender had some support for using MoltenVK. However there are some key
issues why MotlenVK cannot be used. Bugs have been reported up-stream.
As it doesn't work and holds back regular developments it will be removed
from the main branch.
Any efforts on making Vulkan run on Apple (including KosmicKrisp)
is considered a community effort and can be done in a development
branch.
Pull Request: https://projects.blender.org/blender/blender/pulls/144602
This PR makes it easier to clear keyframes from strips in preview.
It is the similar to the feature in 3D viewport. Just navigate to
"Strip" -> "Animation" -> "Clear Keyframes...". This then deletes
all keyframes form the selected strips.
Pull Request: https://projects.blender.org/blender/blender/pulls/141106
`render_give_ibuf_direct()` just called `seq_render_strip()`, which
tried to get image from intra frame cache. This always succeeded,
because the intra frame cache does not accept timeline frame argument.
Using intra frame cache here is incorrect. Source cache must be used.
If source cache lookup fails, intra frame cache must be invalidated
before calling `seq_render_strip()`.
Pull Request: https://projects.blender.org/blender/blender/pulls/144396
These fields are always reset at runtime. Writing zeros should be easier
to compress since a lot of other data is zeroed, and it also makes it
easier for developers to filter out noise when looking at data buffers.
Pull Request: https://projects.blender.org/blender/blender/pulls/144582
AFAIR, originally the decorator widget was supposed to be also usable to
control overrides.
However, this was never finished (even design wise, not sure how this would
have worked and not conflicted with the animation part of it).
So for now, apply the same behavior as with driven properties: when a
property is liboverridden (but not animated), do not allow to define or
remove keyframes.
This commit also refactors the handling of decorator action, to
deduplicate the logic deciding whether a decorators is 'active' and can
control keyframes, or not.
Pull Request: https://projects.blender.org/blender/blender/pulls/140872
The various operations of liboverride have never been effectively
exposed, remove them from the UI code at least.
Also rename related operator and UI messages to use the typical `Add`
naming (`Add Override` etc.).