Our IME input system relied on passing around pointers to global variables.
However this will not work as the Wayland input handling is multithreaded so the content of the global variable would change while the event loop were reading the data.
Pull Request: https://projects.blender.org/blender/blender/pulls/138871
This adds support for the extension and always
set the clip state value to 0..1 to align with vulkan
and metal. Moreover this is needed for the Reverse Z
implementation.
Note that this is a OpenGL 4.5 feature and is not
required to start Blender. So there must still be
a fallback path for now.
Rel #138898
Pull Request: https://projects.blender.org/blender/blender/pulls/138941
No functional changes intended.
This adds `typedef`s for the enums used by Shape Keys.
Doing so makes it clear what kind of values are stored
under the `flag` and `type` fields.
Also adding/cleaning-up comments that various functions
in `key.cc` can be changed to a `switch/case`.
In preparation for #136838
Pull Request: https://projects.blender.org/blender/blender/pulls/138595
First time a swap chain is created an incorrect resolution can be
reported back by the driver as the window is still initializing. We
stretch the swap chain to cover to reduce a black line rendering in top
of the window (due to content flipping). Any subsequent frame will not
do stretching to reduce artifacts when resizing the window.
Pull Request: https://projects.blender.org/blender/blender/pulls/138964
At this point, with pen tilt functionality having received the following
changes recently:
* Consistency between platforms for what pen tilt values represent
* Inactive cursor visualization
* Invertable per-brush strength
The majority of the work that remains is wider testing and addressing
per-device issues, thus it makes sense to make this option available in
release builds.
By default, no brushes packaged with Blender have a non-zero Tilt
Strength, making this option opt-in by default.
The following brushes support this option:
* Draw
* Draw Sharp
* Flatten
* Fill
* Scrape
* Plane
* Clay Strips
With a non-zero Tilt Strength value on the brush, the normal of the
brush plane is tilted in the same direction as the user's pen, where a
perpendicular orientation for the pen matches the behavior with a Tilt
Strength of 0.
Resolves#82877
Pull Request: https://projects.blender.org/blender/blender/pulls/137574
* Shift call to the Draw Face Set brush implementation as it is
irrelevant for other brushes.
* Instead of checking for the first brush step, check to see if the
value is still `SCULPT_FACE_SET_NONE`.
Pull Request: https://projects.blender.org/blender/blender/pulls/138949
The drawing of the background of panel categories is out by one pixel,
but was covered by the area borders until recently. This PR just draws
one pixel more to the edge.
Pull Request: https://projects.blender.org/blender/blender/pulls/138956
This converts the public `uiItemMenuF` and `uiItemMenuFN`
functions to an object oriented API (an `uiLayout::menu_fn`
and `uiLayout::menu_fn_argN_free` respectively), following
recent uiLayout changes.
Part of: #117604
Pull Request: https://projects.blender.org/blender/blender/pulls/138902
Currently, there was a lot of boilerplate to compute the compute context hash.
Now, the complexity is abstracted away to make it a simple function call.
Furthermore, this makes the compute context hash generation lazy. The goal here
is to make it very cheap to construct the compute context hash in the first,
while making it a little bit more expensive (still quite cheap overall) to
access the hash when any data has to be logged. This trade-off makes sense when
we want to pass the compute context to more lower-level places in order to be
able to create better error messages with more contextual information. For
example, we'd want to create error messages during multi-function evaluation
which happens during field evaluation within a node.
Pull Request: https://projects.blender.org/blender/blender/pulls/138912
The previous value was incorrectly assuming this is 2^exposure, but it
is a simple multiplier.
Specifying large film exposure values is useful as it affects the raw data and
thus results in the same color values available in EXR, Viewer, and
Compositor, whereas using Color Management exposure is not reflected in EXR
exports, resulting in unusably low values. Using film exposure remedies that.
Pull Request: https://projects.blender.org/blender/blender/pulls/138850
This implements a new operator that automatically fits the width of a column to
its content. It's triggered by double-clicking on the column edge in the header
row. This is common functionality in other spreadsheet software.
Pull Request: https://projects.blender.org/blender/blender/pulls/138924
Previously, one had to search for "Time" to get the Scene Time node which
provides access to the current frame and second. Intuitively I often start
searching for "frame" or "seconds" instead and only later remember what I
actually have to search for.
This patch improves the UX by allowing to create a Scene Time node by searching
for "frame" or "seconds" directly. This works in Geometry Nodes and the
compositor.
Pull Request: https://projects.blender.org/blender/blender/pulls/138927
Currently, removing a node frame a frame is rather annoying. The `alt+P`
shortcut is hard to reach and probably not very intuitive. Furthermore, often
one only notices that one wants to remove a node from a frame after starting to
move the node. So one would have to put the node back down, detach it from the
frame and then start moving again.
This patch simplifies this entire process by adding a new shortcut that can be
used while dragging nodes. When `F` is pressed, the selected nodes are detached
from their parents. Alternatively, if the nodes are detached already, they may
be attached to the frame under the cursor.
Pull Request: https://projects.blender.org/blender/blender/pulls/138650
Currently, the steps required to add a named frame in the node editor are quite
cumbersome:
* Press ctrl+J, which is hard to reach.
* Press F2, to rename.
This is bad, because frames are a key part of making node trees understandable.
Therefore, we should lower the barrier to adding them as much as possible.
Additionally, named frames help significantly more with readability. Therefore,
it's good to lower the barrier to adding those even more. Of course it's still
possible to click in empty space to avoid having to give a frame a name.
This patch adds a new operator to join nodes in a named frame. When triggered,
it adds the frame and automatically opens the rename menu to set the name.
Keymap changes:
* Remove `ctrl+J` which was creating a frame without label.
* Move existing functionality of `F` key to `J` key
(including `shift+F -> shift+J`).
* Use `F` for this new operator to create a named frame.
Pull Request: https://projects.blender.org/blender/blender/pulls/138390
Replace `DRW_Attributes` with a VectorSet of std::string. The max number of
attributes is still the same. The inline buffer size is 4, and std::string's inline
buffer is smaller than the previous char array size of 64, but it seems
reasonable to save those optimizations for shorter attribute names and
fewer attributes. In return we significantly decrease the size of the batch
caches, simplify the code, and remove the attribute name length limit.
I observed roughly an 8% increase in the 30k cube objects file, a change from
12 to 13 FPS. I'm guessing this is mostly because `VectorSet<std::string>` is
smaller than `DRW_Attributes`.
Pull Request: https://projects.blender.org/blender/blender/pulls/138946
Regression caused by #138433
Somehow the lazy nature of the is_linear and is_srgb got lost in
the refactor and the fields were greedily initialized on startup
and it is not a cheap operation.
Pull Request: https://projects.blender.org/blender/blender/pulls/138945
Caused by 33bef53c3e
The change to return an empty IndexMask early from the clay strips brush
breaks some previous assumptions about data flow. To fix this, and
improve the overall resilance of related code to such changes, avoid
checking for a specific stroke step when initializing this data and
delay it in processing until needed.
Pull Request: https://projects.blender.org/blender/blender/pulls/138921
This avoid stalling the viewport when a preview job is running.
This is because both were fighting for the same GPU context.
This doesn't remove the blocking but allows to remove it using #136991.
Pull Request: https://projects.blender.org/blender/blender/pulls/138882
As evidenced by #138868, checking all colorspaces to see if they are sRGB
can be very slow, due to loading all LUTs into memory. Instead use a simpler
check by a list of names only, which is still better than the hardcoded
single name used in Blender 4.4.
Ideally recent configs will use the ColorInterop Forum alias so we can
find the sRGB colorspace reliably.
Switch from Standard Surface to OpenPBR as the exported MaterialX surface,
since this is the new standard more renderers are adopting and it more closely
matches the Principled BSDF implementation.
Anisotropy support is improved though still not quite the same, as formulas
are different. Nodes are generated to apply anisotropic rotation to the
tangent vector, as there is no corresponding parameter in OpenPBR.
Fixes#138164
Authored by Apple: Lee Kerley
Pull Request: https://projects.blender.org/blender/blender/pulls/138165
Broken by PR#134221
- Couple of missing deps
- Windows is not happy with -J when building python deps
as multiple processes will try to write to the same .pdb
- Wrong .lib file name for the zstandard python module.
The F-Curve RNA path function assumed that the F-Curve would be owned by
an Action, which is not the case for drivers, NLA control curves, and
potentially other "free-floating" F-Curves.
This is now checked for, and if the owner is not an Action, the function
refuses to produce a data path. In the future this could be extended to
search through the aforementioned places as well.
Users almost always need a viewer node, so add one to the default node
tree.
Note that the backdrop is already enabled by default, so the backdrop
image will be visible as soon as a render is available (no need to
manually add viewer node or click `cltr+shift+LMB` to show a backdrop
image.
Pull Request: https://projects.blender.org/blender/blender/pulls/138890
This commit finishes removing the uses of the integer to float
vertex buffer fetch mode. Previous commits noted below already started
that process. The last usage was geometry attributes. Now integers are
converted to floats as part of the existing upload process.
The change makes the Vulkan vertex buffer type conversion unused, so
it's removed. That's nice because Vulkan vertex buffers go from 1040 to
568 bytes in size and have significantly less overhead on creation.
Related:
- 153abc372e
- 1e1ac2bb9b
- 617858e453
Pull Request: https://projects.blender.org/blender/blender/pulls/138873
This commit makes it so CUDA 11 is used to compile the compute_75
PTX CUDA kernels.
This is being done because PTX kernels have much stricter minimum
driver requirements than standard kernels, so using the latest CUDA
toolkit to compile PTX kernels can result in the PTX kernels being
inaccessible to users with drivers that are only a few months old.
This is important because in some situations, it's either impossible
(E.g. Renting certain cloud services), or difficult to update the GPU
drivers on some machines. And we want to make sure the PTX kernels
are usable by as many people as possible
Original Author: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/138879
The available mix modes on the Action Constraint only allowed
*combining* the Action's transforms with the input transforms, but
unlike most other constraints lacked a way to completely
override/replace those transforms.
This PR adds a "Replace" mix mode to the Action Constraint, bringing it
in line with most of the other constraints already in Blender.

----
Test file: [action_constraint_replace_mode.blend](/attachments/fc3417a8-b60a-4212-9840-5b59191e9ed9)
- The small bone at the top is the action constraint target (translating it right-left triggers the action constraint).
- Both two-bone chains are set up with action constraints. The base bones of each chain additionally have a copy location constraint to the small sideways bone, placed before the action constraint in their constraint stack.
- The chain on the left has the default mix mode, which allows you to manipulate the bones on top of what the action constraint does, and allows the copy location constraint on the base bone to work.
- The bones on the right have the new "Replace" mix mode, and therefore manipulating them does not affect the final constrained transformation, and the copy location on the base bone is overridden by the action constraint.
Pull Request: https://projects.blender.org/blender/blender/pulls/138316
The goal is to make the viewer node jump less often because each unnecessary
jump feels annoying. Previously, we already had a heuristic that would disable
the jumping if the new viewer location was further away than the old one. Now
the viewer never jumps when it's still visible in the node editor and already to
the right of the node-to-view.
As a byproduct this also fixes an issue where the initial viewer position does
not work properly, because the node does not have known draw-bounds yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/138744
- Reduce artifacts during resizing to also recreate the swapchain
when acquire image is suboptimal
- Do not stretch when backbuffer and swapchain have a different size
Pull Request: https://projects.blender.org/blender/blender/pulls/138925
Always discard the context discard pile even when not submitted
When rendering animation it is not guaranteed that the submission
flag will ever be set.
This patch avoid clamping HSVA colors after being combined using a
Combine HSVA node in the GPU compositor. This is consistent with the CPU
compositor and other node editors.