This separates a single `GeometryDataSetTreeViewItem` into separate tree view
items for the individual parts of the tree view. While requiring a bit more boilerplate
overall, this simplifies the code quite a bit and makes it more extensible.
Pull Request: https://projects.blender.org/blender/blender/pulls/125239
When erasing, sculpting or tinting, the previous key was not being
duplicated.
The `ed::greasepencil::ensure_active_keyframe` didn't have a good
mechanism to make this work. This adds a parameter to the
`ensure_active_keyframe` function so that the caller can decide
what should be done.
For the sculpting tools, eraser, and tint tool, this will now duplicate
the previous key, when auto-key is on.
Resolves#124082.
Pull Request: https://projects.blender.org/blender/blender/pulls/125224
When holding CTRL using the draw tool to erase, the size of the cursor
was using the size of the eraser brush. This is not the expected behavior
when using the eraser from the draw tool. It should respect the size
of the brush used by the draw tool instead.
This fixes the issue by computing the right size when the eraser operation
is invoked. The size is then stored in a runtime field, so that the cursor
rendering callback can use the cached size.
Pull Request: https://projects.blender.org/blender/blender/pulls/125225
Previous comments were rather vague and misleading even. For example it
is often expected that `PROP_HIDDEN` would hide properties in the keymap
editor, which it wouldn't. The term "ghost" value was not defined thus
useless as documentation. Explained the behavior instead.
Also the "Inherits #PROP_SKIP_PRESET" note added in 0d7282e69b was
confusing, what does it mean to inherit a property? Clarified that too.
Lastly the API description of `WM_operator_properties_reset()` was not
updated for 1058006e03. Fixed now.
Previously, 4e9e44ad made changes to allow GSpan and GMutableSpan to not
have a type when they are empty. This mirrors the same change in the
conversion from GArray to both span types and when converting to an
actual typed Span<> or MutableSpan<> via typed().
Fixes#125013
Pull Request: https://projects.blender.org/blender/blender/pulls/125018
VSE timeline widget drawing is done in "timeline space" (x: frames,
y: channels), but that can have precision issues at large frames,
when "pixel size features" (outlines, borders) need to get evaluated
inside a shader.
This can lead to inconsistent border sizes between neighboring strips,
e.g. sometimes it would be 2 pixels, but sometiems 3 pixels. I've seen
this mostly happen when frames get into 100'000+ range.
To address this, switch timeline widget drawing to be in window pixel
space. This avoids the issue since coordinates to draw the strip
widgets become "up to several thousand" range, not arbitrarily large.
Pull Request: https://projects.blender.org/blender/blender/pulls/125220
This adds two new nodes:
* `Grease Pencil to Curves`: Converts each grease pencil layer into an instance
that contains curves.
* `Curves to Grease Pencil`: Converts top-level curve instances into grease
pencil layers.
This opens up many new opportunities:
* Use grease pencil as input to other procedural systems that don't necessarily
output grease pencil.
* Generate grease pencil from scratch using geometry nodes.
* Temporarily convert grease pencil data to curves to use more powerful features
for curves processing.
Some data on layers are not attributes yet unfortunately, so there is some
special case handling for the `opacity` attribute. This was previously discussed
at the geometry nodes workshop:
https://devtalk.blender.org/t/2024-05-13-geometry-nodes-workshop-notes/34760#grease-pencil-14
Pull Request: https://projects.blender.org/blender/blender/pulls/124279
Crash was happening in this scenario:
- mouse was over a property in the dialog
- operator had a "check" callback that was accessing certain operator
stuff
In this case, the `UI_BUT_ACTIVE_DEFAULT` button was executed, operator
finished or canceled (but stuff was freed along the way), then code
kicked in to still handle ENTER over the property in the popup (e.g.
toggle a checkbox), the `uiAfterFunc` still had the `popup_op`, tried to
run `popup_check` again with the faulty data.
Simple way to fix this is to use `WM_UI_HANDLER_BREAK` to not handle
further buttons after executing the `UI_BUT_ACTIVE_DEFAULT`
Pull Request: https://projects.blender.org/blender/blender/pulls/125085
When 7afcfe1 removed the use of `startdisp` and `enddisp` for everything
but effect strips, not all of these variables were replaced in
`select_linked_time`, breaking the option. This option is used for the
select operator with the ctrl modifier in both LCS and RCS default
keymaps.
This patch fixes the bug, and also cleans up the old C code in the
function, replacing it with more robust logic.
- The new logic allows for the "linked time" option to be combined with
the "toggle" option -- old logic only propagated deselects if both
left and right handles were aligned.
- New logic makes sure that a selection is only propagated along the
side that you click by adding the selection handle as an argument.
(Before, you could align two strips on the left side only, "regular" select the
left handle of the top one, then "linked time" select the right
handle, and it would erroneously propagate the left handle selection
too).
This patch also fixes a bug where "both handle" selection would not work
if the linked time option was set, by making sure that if `seq2` is set
in `StripSelection`, then `select_linked_time` is run once more.
Pull Request: https://projects.blender.org/blender/blender/pulls/125039
Default easing values for pose bendy-bones should be 0.0f since it will
be added on top of edit mode values which defaults to 1.0f. This will
make sure that `Reset Default Value` gives expected result and be
consistent with `Clear Scale` operator.
Pull Request: https://projects.blender.org/blender/blender/pulls/125204
Docking allows dragging an area out of a window to empty space to make
a new window. And dragging back will close that window if empty.
However dragging an area that is alone in its window to empty space
does not close the source window so you get a duplicate. This PR just
closes that window (when empty) which feels much more natural.
Pull Request: https://projects.blender.org/blender/blender/pulls/125201
Regression from [0], drivers were tagged as being disabled with a flag
that was never cleared. Causing the label to be displayed for files
where the expressions were enabled and in use.
Resolve by clearing this flag on file load and when re-compiling
expressions - since an expressions block flag may be cleared if it
becomes a simple expression.
[0]: 1a8053939b
When docking an area into a portion of another area, the target area is
split. Currently the new section shows an icon that is bold and
outlined, while the remaining area shows a dimmed icon. This dimming
doesn't make a lot of sense since it is not closed, and it is easy
to tell the source from target with other clues. Conversely, dimming
the icon makes it harder to tell what is going on. This PR just makes
both icons show at the same opacity.
Pull Request: https://projects.blender.org/blender/blender/pulls/125199
Add fast image writing and reading variants for film shader passes.
These variants do not perform range checking on values
and should only be used in cases where the written texel is
guaranteed to be in range. This eliminates additional
branching and simplifies shader logic.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/121114
When path to export is in the form if "/some/folder/.stl", any
regular path functions (BLI_path_suffix, BLI_path_extension_replace
etc.) would not treat it as having ".stl" extension, but rather
as a hidden file called ".stl".
And so BLI_path_suffix would turn it into "/some/folder/.stlCube".
To prevent this, detect this exact case when the whole basename
is just ".stl", and remove the ".stl" part before using other path
functions.
Pull Request: https://projects.blender.org/blender/blender/pulls/125179
After ce9becae4c the "fake" initial retiming keys were not rendered
properly. Fix this by undoing the part of can_draw_retiming that
added check for SEQ_retiming_keys_count.
When attempting to replace `AttributeOwner` with `AttributeAccessor`, we ran into
the problem that the active attribute index is not stored on the `CurvesGeometry`.
The index can be moved between the two places without breaking forward- or backward-compatibility.
Pull Request: https://projects.blender.org/blender/blender/pulls/125059
The snapping checked use the wmWindowManager::winactive without a null
check. This is documented to be NULL at times.
Resolve by using the context's window which makes sense as all other
screen variables are already using the context.
Libdecor is also missing window activation on startup,
this will be fixed separately.
Ensure that both `makesdna` and `makesrna` can find the right runtime
binaries when they're executed during the build process.
This seems to have affected some combination of lite-debug builds.
Though full-release builds were probably affected as well if starting
from scratch.
Pull Request: https://projects.blender.org/blender/blender/pulls/125116
This continues the cmake modernization effort and introduces support for
allowing our optional dependencies to integrate properly. TBB is added
here as it's proven troublesome to maintain correctly.
Currently the only Blender project which uses the TBB headers directly
is `blenlib`. However, all downstream projects which require blenlib as
their dependency, and wish to properly make use of its threading
facilities, needed to define various TBB items in their CMake files. Not
only is this unnecessary and arcane, but several projects didn't do this
and ended up not using threading as well as producing ODR violations
along the way[1].
This PR makes TBB a modern dependency and exposes it PUBLIC'ly from
`blenlib`. All downstream projects which depend on blenlib will now
receive everything they require from TBB automatically. This includes
the `WITH_TBB` define, the headers, and the library itself.
[1] blender/blender@05241f47f5
Pull Request: https://projects.blender.org/blender/blender/pulls/124916
This PR removes the "Widget Label" text style, found in Preferences /
Themes / Text Style. This results in both labels and the text found in
input boxes sharing settings. This results in a slight loss of
customization but it isn't that useful to have these things separate
and results in code complication and errors.
Pull Request: https://projects.blender.org/blender/blender/pulls/122898
Toggling the smooth brush with Shift-LMB would directly modify the
overall paint mode, both performing the incorrect smooth function and
preventing setting the correct asset.
Pull Request: https://projects.blender.org/blender/blender/pulls/125027
The filter for grease pencil objects wasn't showing up.
The code was still checking for the legacy type.
Now, we're checking for the right object type and
are also looking at the `bpy.data.grease_pencils_v3`
list to make the checkbox show up in the UI.
The code has nullptr checks to make sure it doesn't try to use freed or unitiallized variables.
However the when freeing the data, the code doesn't assign the pointer to be null.
Now set them to be null
Pull Request: https://projects.blender.org/blender/blender/pulls/125090