The "All" library didn't exist internally when this code was first
written. The "skip_local" check that complicated this isn't necessary
because we don't add local node groups that aren't assets anyway.
We currently have a single minimum width value for confirmation
dialogs, but we need to set this based on which of the two sizes it
is. Otherwise the larger confirmations with icon look too squished
when the content is shorter.
Pull Request: https://projects.blender.org/blender/blender/pulls/119978
How to reproduce:
- Have image editor and GPU compositor backdrop enabled and showing the same image
- In image editor, apply operator flip horizontally
- Notice how image editor gets updated but compositor backdrop doesn't
Fixes backdrop for GPU compositor for the following operations:
- image -> transform -> Flip horizontally
- image -> transform -> Flip vertically
- image -> transform -> Rotate 90° clockwise
- image -> transform -> Rotate 90° counter-clockwise
- image -> transform -> Rotate 180°
Pull Request: https://projects.blender.org/blender/blender/pulls/119819
How to reproduce:
- Have image editor and GPU compositor backdrop enabled and showing the same image
- In image editor, apply inver image colors operator
- Notice how image editor gets updated but compositor backdrop doesn't
Fixes backdrop updates for GPU compositor for the following operators:
- Image -> Invert -> Invert image colors
- Image -> Invert -> Invert red channel
- Image -> Invert -> Invert green channel
- Image -> Invert -> Invert blue channel
- Image -> Invert -> Invert alpha channel
Pull Request: https://projects.blender.org/blender/blender/pulls/119820
Larger, more informative confirmation when reverting the current file
to saved version. Title of "Revert to the Saved File", content of
"Any unsaved changes will be lost." and button text of "Revert".
Pull Request: https://projects.blender.org/blender/blender/pulls/119758
Also fix the poll to properly check for the remaining unsupported types.
Don't add back Quaternion support, since that's arguably less useful,
and we might want different ways to set those values compared to
just entering WXYZ.
Store RNG on per thread data, instead of the effector itself which may
be used by multiple objects evaluated in different threads.
This has been causing the blendfile_versioning test to fail randomly.
Thanks Ray and Aras for helping track this down.
Pull Request: https://projects.blender.org/blender/blender/pulls/119967
Most likely caused by 6d491da0be
In that commit, `knife_pos_data_clear` started to clear (set `-1`) the
value of the current object (which is expected).
However, `knife_snap_angle_relative` relies on the current object to
transform the face normal to global space.
This is weak and error prone since the face is obtained from the
function itself.
The code could be optimized and reuse the face identified in
`knife_snap_curr`, but for now just identify the face object.
Caused by 0cdd429b44c.
Steps to reproduce:
- Add a custom property to the default Cube object
- Open property editor
- Change type to Boolean
- Apply the changes
Observe that the property is still Int.
On a code side the issue is caused by the change in the idp_from_PyBool()
which used to return property of type IDP_BOOLEAN before the change, but
IDP_INT after the change.
Pull Request: https://projects.blender.org/blender/blender/pulls/119962
Addresses two improvements to `Snap to Grid` as suggested in #73993:
- Make 'Absolute Grid Snapping' a new Snap Mode
- Snap to Grid in Non-Side View performed at ground level
Implementation details:
- Snap to Grid has no cursor symbol, unless we are in `Set Snap Base`
mode. Similar to the previous 'Absolute Grid Snap' behavior.
- In Non-Side view, Snap to Grid is performed at ground level.
- If `Snap Base` is `Closest`, Snap to Grid uses the transform pivot
point instead. Similar to the previous 'Absolute Grid Snap' behavior.
- The "Absolute Grid Snap" option has been removed.
Pull Request: https://projects.blender.org/blender/blender/pulls/116109
The Sun Beams node is off by half a pixel. That's because we add a half
pixel offset to the initial coordinates, but then sample the texture
with the half pixel. To fix thus, use the texture_bilinear_extend
utility to sample the image, which takes care of the half pixel offset.
Regression since 7a2d04a5c43.
Mask evaluation is part of parameters component, and there is no explicit
tags other than copy-on-eval for masks in a lot of cases.
Restore the previous graph topology for the link from copy-on-eval to the
parameters components of mask ID.
Potential candidate for 4.1.1.
Pull Request: https://projects.blender.org/blender/blender/pulls/119956
The GPU compositor Chroma Key node differs from the reference
implementation. This is caused by a typo, where the acceptance angle was
halved after computing tangent instead of before computing it.
The Lens Distortion node is off by half a pixel because their normalized
coordinates were at the pixel corners as opposed to their centers, where
this patch changes the behavior to the latter.
The Plane Track and Corner Pin nodes are off by half a pixel because
their mask is computed at the pixel corners as opposed to their center,
where this patch changes the behavior to the latter.
The Directional Blur node is off by half a pixel because it transforms
the pixels at their corner as opposed to their center, where this patch
changes the behavior to the latter.
The Movie Distort node is off by half a pixel because it evaluates the
distortion at the corner of pixels as opposed to their center, where
this patch changes the behavior to the latter.
Since v2.5 Blenders viewport view has been tilted by around ~0.8
degrees to the right, resolve this using a lookup table to update
the the defaults.
Ref !113751
The active window in the context may not match the window where GHOST
events are generated. Notifiers for new windows would always be ignored
with the context's window set to null for example.
Noticed while investigating #119871.
Keep each function's declaration in the header file associated with its
module. Arguably mode switching should be more organized, but for now
it's better to just declare functions in more predictable places.
These functions were declared in the editors/mesh module but
defined in the editors/object module. This commit moves them to
a separate header associated with the object editors module.
Previously retrieving a collection from the context like "selected_ids"
would give a linked list of allocated items. Now it returns a vector of
RNA pointers. Though the number of items is typically fairly small,
using contiguous memory and avoiding many small allocations are
typical performance improvements that could still be beneficial
when there are many items. Iteration also becomes much simpler.
Pull Request: https://projects.blender.org/blender/blender/pulls/119939
These functions appear to have been unused for the last 15 years.
They are quite complex with the var_args handling, and may get in
the way of some other cleanups in the area.
There are still a few places that are more complicated where the replacement
to `IDP_New` isn't obvious, but this commit replaces most uses of the ugly
`IDPropertyTemplate` usage.
This limits the number of tilemaps per LOD that can be fed to avoid the
easy to hit "Too many shadow updates" (#119757).
This allows for a max 64 tilemaps to be updated at once at their lowest
requested LOD (so ~10.6667 point lights if every faces of the punctual
shadow map is needed, but likely more in practice).
Unfortunately this is still quite low and will surely be hit quite soon
with directional shadow added to it. One idea to workaround this would
be to time slice the update of some lights, but this opens a whole can
of worms that I'm not ready to open for now so I created #119890 for
future reference.
Some notes, most lights seems to request around 3 LODs. It might help
to allow requesting at least 2 LODs if we are rendering since volumes
might want lower LOD available for volumes.
I added a very simplistic heuristic that also lowers the max tilemaps
when transforming, animation playback or navigating the 3D view to
improve the responsiveness of the engine. Note that this doesn't
only lowers the resolution to the minimum requested one. So it should
be good enough in most cases.
Pull Request: https://projects.blender.org/blender/blender/pulls/119889
Use File Handlers to handle file drag-n-drop in the View 3d. Drop-boxes
still remain since they handle Texture ID drag-n-drop.
This will add-ons to handle drag-n-drop for images and movies while
still providing access to Blender's native support since File Handlers
let users choose which to invoke if there's multiple configured.
Pull Request: https://projects.blender.org/blender/blender/pulls/117728
This PR removes the modal callback for `PAINT_OT_visibility_invert`.
It does not use the provided data, nor is the `modal` function
invoked by a corresponding `invoke`.
Pull Request: https://projects.blender.org/blender/blender/pulls/119930