Commit Graph

109934 Commits

Author SHA1 Message Date
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
Christoph Lendenfeld
5069d41b18 Fix: GPU issue because of bound depth buffer
This fixes an issue reported when launching Blender with
`--debug-gpu`. The newly added "thick wires" feature for
bone shapes caused that problem.
The issue was that the shader definitions used
the depth tex as a sampler and at the same time wrote to it.

The fix is to remove the code that uses the depth texture.
This is just the simplest solution for now, and it doesn't change
the visual appearance of the bone shapes.

------

Note: the code I copied from was `overlay_edit_mesh_frag.glsl`.
So I assume the depth sampler is needed, but the pipeline
for bone shapes isn't set up to handle that.

Pull Request: https://projects.blender.org/blender/blender/pulls/122558
2024-06-03 14:02:18 +02:00
Jeroen Bakker
6ec64cb039 Vulkan: Fix sample count when uploading layered textures
When uploading layered textures it was assumed that the data uploaded
had the data for all layers and ignored the given extent.
2024-06-03 13:51:11 +02:00
Jeroen Bakker
8077411d59 Vulkan: Disable barriers when using render graph
Barriers should be automatically extracted from the render graph.
GPU_issue_barrier will become a no-op.
2024-06-03 13:48:56 +02:00
Jeroen Bakker
049d84d36d Vulkan: Texture view clearing
EEVEE-Next requires clearing texture views. This PR adds that.

Pull Request: https://projects.blender.org/blender/blender/pulls/122650
2024-06-03 13:47:15 +02:00
Bastien Montagne
f33159b380 Fix: Make data_blocks collection in modifiers' bake data non-overridable.
The current code does not support overriding this data, and it is
generated at runtime anyway.

This may have to be revisited later, but for the time being, be
consistent and do not try to generate override data for this.

Pull Request: https://projects.blender.org/blender/blender/pulls/122554
2024-06-03 13:45:07 +02:00
Bastien Montagne
e2f83dd267 LibOverride: Improve handling of invalid collection/pointer editing.
In most common cases, an Pointer or Collection rna property needs a
custom liboverride 'apply' callback, if it supports modifying or adding
data in liboverrides.

The main change in this commit is that diffing code won't generate
anymore operations that are not supported on such properties.

In addition, the check on such invalid operations at liboverride apply
time has been turned into a `CLOG_ERROR` message, instead of an assert.
This is both more visible (as it also prints in release builds), and
less critical (as it won't terminate blender execution).
2024-06-03 13:45:02 +02:00
Bastien Montagne
aa9599119a Cleanup: LibOverride: Do not assign default callbacks to RNA properties.
These default assignements have not actually been needed/useful since a
very long time already. It was likely a left-over from early stages of
the project. While not a problem so far, it makes it harder to
distinguish RNA properties whith a custom liboverride handling, from the
ones using the default code.

Keeping them to `nullptr` by default also makes these callbacks definition
behavior more in line with other RNA properties callbacks, which are
usually non-null only when a custom function is defined.

No behavioral changes are expected from this commit.
2024-06-03 13:45:02 +02:00
Sybren A. Stüvel
543521a952 Anim: use smaller margin for Timeline / Dope Sheet / Graph Editor
The 'Frame All', 'Frame Selected', and 'Frame Scene/Preview Range'
operators will now use a smaller margin. It will use the smallest of two
sizes:

- A fixed size in UI-scaled pixels, or
- 10% of the available editor width.

Previously Blender always used the latter. This was considered too
large, especially when the editor was wide.

This also unifies the margin calculations for the graph editor, dope
sheet, and timeline. Earlier versions used smaller margins for the graph
editor than for the other editors, but this is no longer necessary.

Pull Request: https://projects.blender.org/blender/blender/pulls/122320
2024-06-03 12:26:04 +02:00
Bartosz Kosiorek
e97d46e5b0 UI: Add tooltips to Physics and Subdivide modifiers
Pull Request: https://projects.blender.org/blender/blender/pulls/121346
2024-06-03 12:09:57 +02:00
Falk David
1334d64780 Refactor: GPv3: Move stroke operation construction to stroke_update_step
Previously, the stroke operations were created in the `stroke_test_start`
callback function. This causes a few issues:
* Each mode had it's own `test_start` function and it's own function
  to create the stroke operations.
* Only the mouse position was available for the start sample.

With this change, the `stroke_test_start` function now does nothing.
Instead, the operations are created in the common `stroke_update_step`
function using `get_stroke_operation` the first time it's called.
This also means that the start sample is populated with the correct
start pressure.

Pull Request: https://projects.blender.org/blender/blender/pulls/122555
2024-06-03 11:50:03 +02:00
Jeroen Bakker
ac4ab3a209 Vulkan: Debug name for staging buffer
Staging buffers didn't had a name this PR adds a name so they
are easier to track in debug tools.

Pull Request: https://projects.blender.org/blender/blender/pulls/122649
2024-06-03 11:14:27 +02:00
Jeroen Bakker
abcf55d15a Vulkan: Only support device vertex buffers
BLF font rendering isn't compatible with render graph as it
rewrites buffers that are not yet drawn. To work around this issue
the vertex buffers should always be created on device and not
directly altered by CPU code.

Pull Request: https://projects.blender.org/blender/blender/pulls/122648
2024-06-03 10:58:27 +02:00
Omar Emara
a162149cfa Fix #121761: Crash when compositing while rendering
Blender crashes when the interactive GPU compositor is running in a node
editor while rendering. This is because the GPU compositor is sharing
the same GPU context used for rendering, which is not allowed. To fix
this, we use a dedicated render list for interactive compositing, to use
its dedicated GPU context.

This is implemented by keeping another render list for the purpose of
compositing and similarly clearing its context when it is no longer
needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/122472
2024-06-03 09:56:58 +02:00
Philipp Oeser
ba3fac92af Fix #122598: Curves Grow brush broken on curves with only two points
Code was getting a direction (to grow in) from the last point in a curve
and another point in the middle of the curve.
On a curve with only two points, these points were the same, resulting
in a zero delta and thus doing nothing.

To resolve, take the root point instead in this scenario to get a valid
direction.

Pull Request: https://projects.blender.org/blender/blender/pulls/122644
2024-06-03 09:20:07 +02:00
Jesse Yurkovich
5bc71c8704 Cleanup: style changes for newly added USD DomeLight support code
A variety of non-functional style changes for the recently added
DomeLight code:

- Remove unused includes and forward decls
- Changed NULL -> nullptr
- Use `motionSampleTime` name consistently
- Moved the `r_value` out parameter to the last position per our coding
  guidelines

Pull Request: https://projects.blender.org/blender/blender/pulls/122641
2024-06-03 04:41:39 +02:00
Hans Goudey
e2402eb4a9 Cleanup: Use C++ types, references for CCGElem access 2024-06-02 20:36:33 -04:00
Hans Goudey
d374b5abf7 Cleanup: Miscellaneous changes in BKE_ccg.hh
- Remove unnecessary declarations for inline functions
- Remove typedef keyword
- Use C++ casting instead of C-style casts
2024-06-02 20:36:33 -04:00
Hans Goudey
49b52b35d5 Cleanup: Move BKE_ccg.h to C++ 2024-06-02 20:36:33 -04:00
Jesse Yurkovich
05f8d35652 Fix #122606: fully map Blender's INT8 type to USD's UChar
While USD does not have a signed, 8-bit, integer type we can use its
UChar type instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/122610
2024-06-02 22:26:12 +02:00
Iliya Katueshenock
81c5e42ec5 Cleanup: BLI: Support IndexMask as universe for mask complement
Pull Request: https://projects.blender.org/blender/blender/pulls/122616
2024-06-02 19:40:20 +02:00
Pratik Borhade
ab5f8d9f3a Fix #122491: DOF pick in context menu grayed out
Caused by 7f8d4df410
Changes in poll function had excluded the case of context menu button.
Fix this by returning true if operator identifier is `UI_OT_eyedropper_depth`

Pull Request: https://projects.blender.org/blender/blender/pulls/122532
2024-06-02 14:59:41 +02:00