The issue was that the code filtered for selected channels,
while the expectation was that it would only filter for selected keys.
This PR changes the behavior of the operator in the following way:
* when "Clean Channels" is **disabled**, it will clean only selected keyframes, regardless of the channel selection
* when "Clean Channels" is **enabled**, it will clean selected channels regardless of keyframe selection
The same logic was applied to the Graph Editor code.
It only makes a difference in the case when "Clean Channels" is enabled.
That is because channels were automatically selected when a key was selected.
In addition to that I moved the menu entry for "Clean Channels" to the channel menu
to reduce confusion.
Another solution would have been to make the Dope Sheet select channels
when keys are selected. This might still be done in the future, but I think the
only correct fix is to change the actual operator behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/113335
Unify the way the different state's of a cache are shown in the timeline:
* Baked: fully opaque
* Cached: slightly transparent
* Invalid cache: slightly transparent, dark diagonal stripes
This improves accessibility since patterns are easier to recognize
for colorblind or otherwise visually impaired people.
The slight transparency is done with an alpha of 0.7 and the diagonal
stripes use the cache's color at 50% value.
Implements #108196.
Pull Request: https://projects.blender.org/blender/blender/pulls/108481
Speckles and missing lights were experienced in scenes with Nishita Sky
Texture and a Sun Size smaller than 1.5°, such as in Lone Monk and Attic
scenes.
We previously worked around these by using a more precise
software implementation of cosine.
After recent changes in Cycles, it turns out this workaround isn't
currently needed.
This fails to differentiate between active buttons and disabled buttons
for some custom themes (and also in blender light theme)
Instead use text color with 0.5 alpha value for disabled item's text.
(Don't blend between text and inner color)
Pull Request: https://projects.blender.org/blender/blender/pulls/113082
Previously this was the double the CPU count because:
- Modern CPU's from AMD & Intel support SMT/hyper-threading which
present twice as many cores, doubling again has little to no benefit.
- Using 2x or 4x the number of physical cores number can use a lot of
memory on systems with many cores which are becoming more common.
Update the label of the "Bone Pose" theme setting to "Bone Pose Selected".
That is now consistent with the already-existing "Bone Pose Active"
label.
Also add tooltips that clarify what these theme colors are used for.
This PR implements an initial drawing tool that can already be used for testing.
While this is not fully feature complete (compared to the current grease pencil draw tool) the following is already implemented:
* Pressure support for radius and opacity.
* Material color and vertex color support.
* New active smoothing algorithm based on curve fitting.
* Simplify algorithm as a post-process step.
Some deliberate limitations include:
* The drawing plane is always the front plane. Drawing on surfaces is also not supported.
*
The current approach has not been optimized for performance yet. The goal was to have a straightforward implementation
first and then focus on performance later.
There are numerous parameters in the code that are hard-coded for now. These should be exposed at some point, potentially as user settings.
Pull Request: https://projects.blender.org/blender/blender/pulls/110093
AgX exhibited some banding-like artifacts that were due to being
approximated with a 3D LUT. This commit resolves that by increasing
the LUT resolution enough to mitigate the artifacts and make them
unnoticeable.
Additionally:
- The previous LUTs were written in a space-inefficient way, using
e.g. "0.000000" instead of "0". The new LUTs are written more
efficiently, avoiding quite as dramatic a file size increase as
usually accompanies 3D LUT resolution increases.
- The previous LUTs included output values greater than 1.0, which was
both incorrect for a tone mapper, and also pointless since Blender
immediately clips them anyway. The new LUTs clip to 1.0. This also
allows the more efficient writing to squeeze even more space savings
out of the LUTs.
- The previous inverse AgX LUT contained NaNs. Those have been
replaced with 0.0 in the new inverse LUT.
Note that due to discrepancies between the LUTs previously provided
to Blender and the AgX scripts that were later published, the color
transform in these LUTs are slightly different. But they are close, and
equivalently good.
Pull Request: https://projects.blender.org/blender/blender/pulls/113253
The window contents and the window boarders were noticeably out of sync
when resizing the window quickly.
Resolve by keeping the current size as-is, rely on deferred handling
of the pending window size to apply the new size along with the contents.
Any window state change (resizing for e.g.) triggered
activation/deactivation events. Resolve by only sending events on state
change. The activation caused cursor motion events from #107594.
Resizing a window in Wayland caused cursor motion events in the window
which could be seen as buttons flashing when the cursor was detected
as hovering over buttons.
This was caused by two bugs:
- Missing checks for failure to access the cursor location before
converting the coordinates from GHOST to screen-space meant the
wmWindow::eventstate location would move each time the location
was updated.
- Resizing the window wasn't detecting state changes and would
continuously send window activation events. Window activation set
wmWindpw::addmousemove which triggered the previous bug, making the
cursor flicker during resize.
This commit only addresses the first issue, where failure to access
the cursor location wasn't accounted for
(window activation will be fixed separately).
All GHOST_GetCursorPosition & wm_cursor_position_get calls now account
for failure, resolving uninitialized stack memory use in some cases.
This resolves similar issues for macOS, WIN32 & X11 although it seems
likely these platforms rarely fail to access the cursor location.
BGL is deprecated and will not work on Metal devices. Although the
inital plan was to remove it in Blender 4.0, We don't see any harm
to still have it in the code-base until OpenGL itself is deprecated.
Add-on developers are warned when using the BGL module that the
add-on/script will not work on all platforms.
There are still some limitations inside the GPU module that needs
a more friendly API. This API isn't clear at this time.
Pull Request: https://projects.blender.org/blender/blender/pulls/112579
When units were initially defined having each on their own line was
compact, since them more fields have been added, making the lines
overly long and the difference between each field non-obvious.
Further, the conversion from C to C++ [0], wrapped definitions onto the
same line (for some reason), resulting in lines over 700 wide.
Use clang-format & add struct ID's for clarity.
[0]: 129f78eee7
This replaces the older dynamic c arrays with blender::Vector as
appropriate. Many files required minimal changes and the before/after
are quite similar.
There's 3 remaining usages of the old machinery but those will require
more involved changes and design.
See #103343
Pull Request: https://projects.blender.org/blender/blender/pulls/110981
The solid angle computation for the sampling/PDF code was running into
cancellation issues for small solid angles.
Reformulating the terms using asin() instead avoids this.