Commit Graph

120055 Commits

Author SHA1 Message Date
Hans Goudey
b5ef3f0b6a Cleanup: Sculpt: Move update flush tags and functions to namespace
Also conver the update flags to  a regular enum class.
Only a single type was used at the same time anyway.
2024-06-04 14:22:13 -04:00
Aras Pranckevicius
7fdfa47f23 VSE: Rounded corners for timeline strips
VSE timeline strips now have rounded corners. Strip corner rounding radius is
4, 6 or 8px depending on strip height (if strip is too narrow to fit
rounding, then rounding is turned off).

This is achieved with a dedicated GPU shader for drawing most of VSE
strip widget, that it could do proper rounded corner masking.

More details and images in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/122576
2024-06-04 20:05:35 +02:00
Jacques Lucke
1604eb9821 Geometry Nodes: expose instance transform field as default input for node groups 2024-06-04 19:02:02 +02:00
Jacques Lucke
820edb920d Geometry Nodes: use instance transform as default in Set Instance Transform node
With this, the node does not change the transforms of the instances by default.
Previously, all instances were always reset to the origin.
2024-06-04 18:42:42 +02:00
Jacques Lucke
a26962ee75 Fix: handle object transforms with skew more gracefully in Object Info node
This is similar to the changes done for `normalized_to_quaternion_safe`.
It's quite easy to get object matrices with skew by rotating an object and making
if a child of another non-uniformly scaled object.
2024-06-04 18:35:37 +02:00
Hans Goudey
aa81e2dd4a Fix #122455: Wireframe overlay can crash with loose geometry
The `nor` vertex buffer wasn't large enough for the indices in the lines
index buffer. This is undefined behavior at best AFAIK. On some drivers
it caused crashes when there was only loose geometry.

This commit makes the VBO large enough for all indices, filling the loose
geometry normals with (0,0,0,0), which the overlay wireframe shader
already checks for.

Pull Request: https://projects.blender.org/blender/blender/pulls/122720
2024-06-04 17:43:11 +02:00
Falk David
b5a4786064 GPv3: Draw Tool: Stabilize Stroke setting
This adds the "Stabilize Stroke" setting to GPv3.

It also makes it possible to hold "shift" to activate the stabilize option
temporarily like in GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/122556
2024-06-04 17:35:48 +02:00
Clément Foucault
57e92e9192 Fix: Overlay: Facing overlay is not transparent with zero alpha
The recent changes removed the blending when rendering
to the framebuffer. The blending was doing the
premultiplication.

Fix #122470
2024-06-04 17:19:22 +02:00
Clément Foucault
916d9d5beb Fix: EEVEE-Legacy: Forgot version bump
This was lost during a merge.
2024-06-04 17:10:05 +02:00
Jacques Lucke
be0d7522ea Geometry Nodes: support link drag search for capture attribute node
Now it's possible to use link-drag-search with the extend socket of the Capture Attribute node again.

Implementation wise, the main unexpected things I noticed are that
`update_and_connect_available_socket` did not update the node declaration and currently uses
socket names instead of identifiers. This works fine right now, but should eventually be changed
to use identifiers (separate from this commit though).

Pull Request: https://projects.blender.org/blender/blender/pulls/122716
2024-06-04 16:58:14 +02:00
Nathan Vegdahl
b9c7e5e766 Anim: add keyframing unit tests
Add unit tests for the two main keyframing API functions: `insert_key_rna()` and `insert_keyframe()`.

The tests are not exhaustive of every possible permutation of parameters, but the tests do try to hit each of the behaviors in at least one permutation.  In the future tests should also be added for the lower-level keying functions and behaviors as well, but I'm leaving that as future work since we aren't changing/refactoring those functions right now.

Pull Request: https://projects.blender.org/blender/blender/pulls/122553
2024-06-04 16:03:52 +02:00
Falk David
8a1b239f5c Cleanup: GPv3: Use constexpr for compile time constant 2024-06-04 15:52:25 +02:00
Falk David
fabc274089 Fix: GPv3: Draw Tool: Spacing not working properly
The "Spacing" option had a few issues:
* If the radius unit of the brush was "Scene", the spacing wasn't correctly
  calculated based on the size of the brush in view space.
* The maximum spacing could get very small, leading to extremly dense
  strokes.

This makes sure we correctly calculate the brush radius in pixels and
then clamps the spacing so we don't subdivide too much.
It's hardcoded to a maximum of 4 points per pixel, which should be plenty.
2024-06-04 15:52:25 +02:00
Sergey Sharybin
44ce0e01cd Fix #122669: Compositor: Corrupted output and occasional crash
This change fixes:
- Constant folder uses rect of size INT_MIN .. INT_MAX, which overflows integer
  when calculating size.
- Calculation of an offset inside of input can lead to integer overflow for big
  resolutions.
- texture_bilinear_extend() and texture_nearest_extend() do not seem to handle
  single element buffers correctly.
- Kuwahara has division of zero when the input size is 0.

Pull Request: https://projects.blender.org/blender/blender/pulls/122674
2024-06-04 15:48:48 +02:00
Jacques Lucke
78c1c1a170 Geometry Nodes: support matrix socket in accumulate field node
This adds support for transform matrices in the accumulate field node. This is quite
useful to evaluate chains of parent matrices (although branching is not easily possible
with this approach).

The main tricky thing here is that matrices are generally accumulated using
multiplication and the order of multiplication matters. For other data types we
currently always use addition. I don't have use cases for other ways to accumulate
matrices right now, so maybe it's fine not to add additional options here for now.
It should be fairly straight forward to version this to support more accumulation
modes in the future. Additionally, I hope we get a more general solution for custom
accumulations at some point.

Pull Request: https://projects.blender.org/blender/blender/pulls/121326
2024-06-04 15:21:59 +02:00
Jeroen Bakker
6a71a91b83 EEVEE-Next: Light Probe RNA
Split `bpy.types.LightProbe` into specialized subclasses.
- Rename all grid_* to remove the prefix in the RNA and limit access to
  volume probe.
- Parallax and other sphere probe only properties should be limited to
  sphere probe.
- `visibility` properties are deprecated (to be removed in a future
  Blender version)

Ref #113976

Pull Request: https://projects.blender.org/blender/blender/pulls/122353
2024-06-04 15:05:22 +02:00
Guillermo Venegas
19572321f1 UI: Rename Import SVG to Import SVG as Grease Pencil
Since the operator name is used in the confirmation dialog on
drag-and-drop, this makes it clear what action is being performed.

Pull Request: https://projects.blender.org/blender/blender/pulls/121172
2024-06-04 15:00:01 +02:00
Jeroen Bakker
c7807a425a EEVEE: Alias/remove legacy RNA material attributes
- `bpy.types.Material.blend_method` aliases `bpy.types.Material.surface_render_method`.
  'Opaque' and 'Alpha Clip' maps to deferred.
- Renamed `show_transparent_back` to `use_transparency_overlap`
- Renamed `use_screen_refraction` to `use_raytrace_refraction`
- Deprecate `use_sss_translucency` and `use_sss_translucency`

Related to: #113976

**NOTE**
The light probe changes will be done in a different patch.
Both patches should land just before we remove EEVEE Legacy
from the code-base.

Pull Request: https://projects.blender.org/blender/blender/pulls/122297
2024-06-04 14:48:40 +02:00
Clément Foucault
cc0d12dd20 EEVEE: Remove EEVEE-Legacy
This handles the transition to EEVEE-Next (now EEVEE).

This removes some things that make no sense to keep
even for compatibility.
- Scene.eevee.light_cache_data
- Scene Light cache operators
- Scene Light cache RNA properties

The remaining legacy properties will be removed later
on to avoid python API breakage.

We keep the identifier of EEVEE-Next as `BLENDER_EEVEE_NEXT`
to avoid addons being incorrectly silently made compatible
with the EEVEE-Next where the Python API is different.
This renaming should be done in 5.0 release.

Thank you EEVEE-Legacy, you served us well.

Pull Request: https://projects.blender.org/blender/blender/pulls/122433
2024-06-04 14:17:58 +02:00
Nathan Vegdahl
76f4a4da6a Fix: use ENUM_OPERATORS macro correctly for eInsertKeyFlags enum
We were passing a sentinel maximum enum value to `ENUM_OPERATOR`,  which
is incorrect.  In particular, this caused the bitwise-not operator to
work incorrectly and produce invalid values.

Pull Request: https://projects.blender.org/blender/blender/pulls/122711
2024-06-04 14:08:06 +02:00
Jeroen Bakker
31efb29dc4 Workbench: Incorrect padding
The ExtrudedFrustum was incorrectly padded which made the GPU struct to
be larger then the CPU struct.

Pull Request: https://projects.blender.org/blender/blender/pulls/122703
2024-06-04 13:47:44 +02:00
Pratik Borhade
028484f531 Fix #122609: Child object dimmed in outliner when parent is hidden
Caused by eea73bffb4
Return visibility state of ID_OB instead of early exit from switch case.

Pull Request: https://projects.blender.org/blender/blender/pulls/122653
2024-06-04 13:41:03 +02:00
Jeroen Bakker
ade3470ccc EEVEE-Next: Crash when using sculpting template
The sculpting template was created in Blender 2.80 and never adjusted
since then. The alpha socket is added as after linking step of the
versioning.

The GPU material clipping was done before clipping and would crash when
sockets don't exist.

Pull Request: https://projects.blender.org/blender/blender/pulls/122706
2024-06-04 13:27:19 +02:00
Sergey Sharybin
8cba704dfd Fix #122654: GPU Compositor: Cryptomatte node crashes blender
The system context is expected to be bound prior to the Blender
can be properly initialized. Otherwise GHOST will be doing OpenGL
calls without system context bound.

This follows code from DRW_render_context_enable().

Pull Request: https://projects.blender.org/blender/blender/pulls/122708
2024-06-04 13:12:35 +02:00
Clément Foucault
6ce4e94eb9 Fix: EEVEE-Next: Shadow acnee during viewport transform
The issue would happened in any situation where the light
moves (update, animation, jitter) or have a lot of LOD
tagged by moving casters. In these cases, the actual
effective LOD min is bigger than the one from the UI which
results in shadow acnee artifacts (because the computed bias
is too small).

This patch saves the effective min LOD per tilemaps and
amend the `light.lod_min` to replace it by the min of
all tilemaps in used by one light.
2024-06-04 12:47:14 +02:00
Falk David
6a61cdbb5a GPv3: Draw Tool: Smooth post-process option
This adds the smooth post process option from GPv2 to the
GPv3 draw tool.
This now smoothes the positions, opacities and radii. In GPv2 the radii were not smoothed for some reason.
2024-06-04 11:54:54 +02:00
Falk David
8b0b6dd8b5 Refactor: GPv3: PaintOperation::on_stroke_done
There were some private methods in `PaintOperation` that
were only called in `PaintOperation::on_stroke_done`. These
don't need to be private methods and can just be static functions.

There was also some code that changed the selection in the
function that was supposed to only trim the end points,
so that functionality is moved to it's own function instead.
2024-06-04 11:54:53 +02:00
Jacques Lucke
906fcfb675 Geometry Nodes: extract accumulation function in Accumulate Field node
This simplifies adding other ways to accumulate values besides just adding them.
2024-06-04 11:19:20 +02:00
Jacques Lucke
14f473b757 Cleanup: hide experimental points to sdf grid node 2024-06-04 11:12:50 +02:00
Sergey Sharybin
5401a69627 Fix: Compositor translate uses un-initialized delta
The issue is visible when adding an assert in the delta accessors of
the TranslateOperation operation (get_delta_x and get_delta_y), and
rendering compositor-nodes-desintegrate-wipe-01.blend (either command
line or F12, doesn't matter).

Seems that under certain circumstances the system might skip determining
the area of interest. For such cases ensure delta from the beginning of
the threaded code.

Pull Request: https://projects.blender.org/blender/blender/pulls/122686
2024-06-04 09:43:34 +02:00
Campbell Barton
b0bfa56db9 Cleanup: remove unused function 2024-06-04 10:49:10 +10:00
Campbell Barton
21e988a51c Fix error in fix for #87219, accidental assignment in conditional 2024-06-04 10:46:57 +10:00
Germano Cavalcante
4439e39530 Fix: assignment in a condition
Error in 042a1327ca
2024-06-03 19:35:31 -03:00
Richard Antalik
14c8f01d29 Fix: VSE handles can be moved if channel is locked
Check for locked strips in `ED_sequencer_can_select_handle()`
2024-06-03 23:40:30 +02:00
Richard Antalik
f98b01e492 VSE: Improved handle tweaking
This commit changes how users can interact with handles:

Unselected handles are not drawn anymore by default. Handles are bit
thinner. If handle can't be selected, because strip is too small,
it is not drawn.

When hovering over strip handle a cursor is changed to represent a
handle shape. It is possible to select 2 handles at once if strips are
adjoined.

When tweak event happens on unselected handle, handle selection is lost
ater tweaking.

This behavior can be disabled in preferences:
Editing > Video Sequencer > Tweak Handles.

Moving strips with G key works same way as before.

Pull Request: https://projects.blender.org/blender/blender/pulls/109522
2024-06-03 23:17:41 +02:00
Germano Cavalcante
042a1327ca Fix #87219: 'affect transform' not working for Pose Space
`affect transform` was never supported for Pose Space in Limit
constraints.

This commit implements this space in the transform code.

Pull Request: https://projects.blender.org/blender/blender/pulls/113363
2024-06-03 18:14:49 -03:00
Brecht Van Lommel
a331ebb324 Fix #122562: Auto scrolling issues with modal operators
Keep the UI and modal handlers order the same as before the priority
changes, these rely on being in a particular order.
2024-06-03 21:50:19 +02:00
Harley Acheson
3a2ea7828e Fix #122599: Windows Registration/Unregistration Endless Loop
With #120283 the Win32 codepath for registration creates an endless
loop. Command-line arguments are detected for registration that causes
another blender to launch with the same arguments, that repeats
forever. But the only time these arguments is used is when Blender has
already been specifically launched with the permissions needed to
register. So this means it should just do so and then exit.

Pull Request: https://projects.blender.org/blender/blender/pulls/122682
2024-06-03 19:59:31 +02:00
Charles Wardlaw
5e6760d554 Fix #122625: List of XForm ops needs to be stored at class level
The code review request to move the vector of xform ops from class to
function-local scope broke animation export. Moved xform ops vector back
into the class, and only create new xform ops on first xform write.

Co-authored-by: kiki <charles@skeletalstudios.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/122665
2024-06-03 19:56:17 +02:00
Jesse Yurkovich
a0360be760 Fix #122517: Ensure depsgraph is updated before disabling subdiv
Ensure depsgraph is updated both before and after disabling subdiv
modifiers during Alembic export.

Looks like this regressed from 1597e9386f.

Pull Request: https://projects.blender.org/blender/blender/pulls/122534
2024-06-03 19:55:28 +02:00
Pablo Vazquez
068e624ebc UI: Make sidebars slightly wider
The default width for sidebars was last updated for 2.80 when columns
didn't have headings and checkboxes were right-aligned.

Some strings no longer fit especially when using headings, and in
translations. Make it slightly wider while still being relatively out of
the way in a 1920 × 1080 setup.

Detailed images in the pull request description.

Pull Request: https://projects.blender.org/blender/blender/pulls/121795
2024-06-03 19:21:31 +02:00
Harley Acheson
10071caea8 UI: Show Passepartout When All Overlays Off
Bring back old behavior where passepartout is shown when all overlays
are disabled. Move the passepartout option to the sidebar.

Pull Request: https://projects.blender.org/blender/blender/pulls/122577
2024-06-03 19:17:21 +02:00
Pratik Borhade
4b6479bf9e Fix: GPv3: Wrong cursor for non brush tools
Brush cursor is being drawn even if the selected tool is non-brush in
GPv3 paint mode. To prevent this, use `ED_gpencil_brush_cursor_poll` for
`pc` poll function. Above poll function returns false if active tool is not
brush, this will avoid drawing of paint cursor in
`pc->draw`/`grease_pencil_brush_cursor_draw`.

Resolves #122541

Pull Request: https://projects.blender.org/blender/blender/pulls/122657
2024-06-03 19:13:49 +02:00
Leon Schittek
bbb7962b3c Fix: Node Editor: Always allow inserting reroute nodes
Since ebb61ef30f reroute nodes couldn't be inserted on links anymore,
when their socket's type is currently incompatible.

Because the sockets of reroute nodes change types dynamically
according to the sockets they are linked to, it should always be
allowed to insert reroutes onto links.

Pull Request: https://projects.blender.org/blender/blender/pulls/122637
2024-06-03 18:57:18 +02:00
Jacques Lucke
4fe672d7f5 Geometry Nodes: free old bake when starting new bake
Previously, the old bake was only overwritten file by file. This caused issues like
the one fixed in 7d77691a83. Also, it could result in invalid
bake data if some bake is canceled and the data on disk is a mix of an old and
new bake.
2024-06-03 18:56:24 +02:00
Clément Foucault
38e398b63e EEVEE-Next: Add versioning code for Material Blend mode
The material blend mode Clip and Opaque are not supported
in EEVEE-Next and need to be emulated using math nodes.

This PR makes it possible to automatically convert the
simplest cases. More complex cases need user interactions
to fix.

Rel #122489

Pull Request: https://projects.blender.org/blender/blender/pulls/122608
2024-06-03 18:54:02 +02:00
Jacques Lucke
7d77691a83 Fix: avoid trying to load bake while baking
This could cause issues when rebaking a simulation without freeing
the old bake first.
2024-06-03 18:46:41 +02:00
Omar Emara
20d62d3805 Fix: Crash when toggling compositor device
Blender crashes when toggling the compositor device from CPU to GPU.
This is because when submitting the compositor job, the device might be
set to CPU, so GPU related data are not initialized in the job, but
between the time the job is submitted and the time it gets executed, the
device might change to GPU, which then tries to accept the uninitialized
GPU data from the job.

To fix this, we use the evaluated scene from the depsgraph since it
captures the state of the scene used in the job initialization.

Pull Request: https://projects.blender.org/blender/blender/pulls/122661
2024-06-03 16:50:15 +02:00
Campbell Barton
a26031ed9b Fix #122652: Clicking offline status icon enabled online access
Oversight in [0] made clicking on the status bar icon enable online
access instead of opening the preferences.

[0]: c9a99c7eeb
2024-06-03 23:49:07 +10:00
Vitaljok
3f67abfe3c Fix: EEVEE-Next: Wrong Camera Viewport Render with enabled overscan
Fix for #122285

`Viewport Render Image` feature uses full parameters of the 3D view
to capture the scene.
Rendering `camera view` is a special case: viewport zoom/pan
parameters should be ignored in order to match render.

Pull Request: https://projects.blender.org/blender/blender/pulls/122467
2024-06-03 14:23:55 +02:00