Commit Graph

117289 Commits

Author SHA1 Message Date
Harley Acheson
7c68ac258f UI: File Browser Offline and Alias State Icon Position
#125625 moved the File Browser Thumbnail type icon location from the
bottom-left of the thumbnail extent to the bottom-left of the item
bounds. This does the same for the indication of offline and for
shortcut. This adds a new icon for shortcut instead of current use of
ICON_LOOP_FORWARDS, which doesn't look right. The new icon looks like
the Mac Alias arrow, but this also works fine for other platforms.

Pull Request: https://projects.blender.org/blender/blender/pulls/126469
2024-08-18 22:11:53 +02:00
Hans Goudey
b2368b7eb0 Revert "Refactor: Sculpt: Move original position restore to brush deform step"
This reverts commit 93054f9a0e.

I had forgotten the reason for this separate "restore" step before the brush
deform evaluation was because multiple symmetry steps can be processed in the
same BVH node, in which case we can't just overwrite the values from the last
symmetry step.
Fixes #126445.
2024-08-18 15:09:58 -04:00
Clément FOUCAULT
b919887682 DRW: Add assertions for unsupported values
The `draw::Pass` types have different capabilities.
Custom ID and primitive expansion count are now
checked before command recording.
2024-08-18 15:39:06 +02:00
Clément FOUCAULT
7de383ffc6 Fix: Overlay-Next: Volume outline crashing
Caused by using the wrong pass to create the drawcall.
2024-08-17 13:50:53 +02:00
Jacques Lucke
20bc346cf0 Fix: remove unnecessary manual user count
`tree_sharing_info_` is automatically user-counted now.
2024-08-17 11:21:55 +02:00
Jonas Holzman
6e72f00d4e Fix: UI: Wrong single editor window titles due to unset area sub-spacetype
This PR moves new area space subtype update to ED_area_newspace so that
it is applied right after a new space is initialized. This is currently
done in rna_Area_ui_type_update, but after rna_Area_type_update.
Without the subtype set this can result in an incorrect titling of
single-area windows.

Pull Request: https://projects.blender.org/blender/blender/pulls/126224
2024-08-17 01:35:52 +02:00
Jacques Lucke
e0b5654655 Cleanup: improve check for whether object has geometry set instances
This speeds up the file from #126391 from 3.2fps to 3.3fps.
2024-08-17 00:58:37 +02:00
Jacques Lucke
5358d1b09a Depsgraph: avoid checking for evaluated object in draw code
This increases playback performance from 2.9fps to 3.2fps in the test file from #126391.

The check is unnecessary in draw code, because we know that the depsgraph
finished evaluation before. These checks were introduced to handle dependency
cycles during depsgraph evaluation.

At some point it may be nice to look into making these checks cheaper to avoid having
to use the unchecked version for performance reasons.
2024-08-17 00:41:31 +02:00
Jacques Lucke
f21a25489f Volumes: speedup extracting dense voxel values
Extract dense voxels if a very memory bandwidth limited task. I get a 10-20%
speedup be reducing the number of threads doing it at the same time.
2024-08-17 00:25:36 +02:00
Jacques Lucke
aa3549f590 Fix: correct place where simplify level is taken into account for volumes
Otherwise it did not take the current frame into account properly when
the volume is a sequence.
2024-08-16 23:40:25 +02:00
Harley Acheson
aa78d43a05 UI: Multicolor Autokeying Indicator
Show the autokeying indicator (record button) on the Timeline header in
red when enabled. With a white outline on dark theme, or with a black
outline on light theme. The red color is user changeable.

Pull Request: https://projects.blender.org/blender/blender/pulls/126344
2024-08-16 23:16:40 +02:00
Harley Acheson
b04c0da6f0 UI: Increase the Editor Edge Move Zone Size
This increases the hit size for the zone that allows resizing editors.
By approximately one more pixel on each side. This should make sizing
a little bit easier, especially with pens. Corner zone and region
reveal zone take precedence so I haven't found any time this causes any
interference.

Pull Request: https://projects.blender.org/blender/blender/pulls/126376
2024-08-16 21:05:38 +02:00
casey bianco-davis
8f386cd308 GPv3: Edit Mode: "Scale Thickness" option
This implements the `use_scale_thickness` setting for GPv3.

Pull Request: https://projects.blender.org/blender/blender/pulls/126213
2024-08-16 19:50:34 +02:00
Jacques Lucke
4493842fe7 Cleanup: use ImplicitSharingPtr for volume tree sharing info
This avoids manual user management.
2024-08-16 17:45:25 +02:00
Jacques Lucke
cebffdc060 Cleanup: simplify using ImplicitSharingPtr for raw ImplicitSharingInfo 2024-08-16 17:36:29 +02:00
Jacques Lucke
eb8fb9e5a4 BLI: improve api for getting memory count
This introduces `MemoryCount` which can be used across multiple
`MemoryCounter`. Generally, `MemoryCount` is expected to live
longer (e.g. over the entire life-time of a cache), while `MemoryCounter`
is expected to only exists when actually counting the memory.
2024-08-16 17:20:19 +02:00
Jacques Lucke
37ca8347a2 BLI: support smart pointer for weak implicit sharing pointer
Previously, one always had to do manual user management for weak users.
2024-08-16 17:20:19 +02:00
Jacques Lucke
e40c3e5662 Geometry Nodes: add memory counting for bake state 2024-08-16 17:20:19 +02:00
Hans Goudey
4b71496f56 Fix #120145: mesh_new_from_object crash with evaluated object type change
When the preserve_all_data_layers argument was passed, the object
would be reevaluated, assuming the type of the original object data.
However, the evaluated object type can change compared to the
original, so to reevaluate the original mesh we need to check that
the original object was also a mesh object.

Pull Request: https://projects.blender.org/blender/blender/pulls/126407
2024-08-16 16:56:18 +02:00
Christoph Lendenfeld
ff0c097fa1 Fix #126140: Cycle aware keying not working
The issue was that the code path for layered actions never hit the
function `remap_cyclic_keyframe_location`.

The solution is to move that logic into `insert_vert_fcurve`.
My reason for why this is the correct solution is that
the remapping happens on a per FCurve basis, so it should be within `fcurve.cc`.
Doing so ensures that the layered actions also hit that code.

Pull Request: https://projects.blender.org/blender/blender/pulls/126399
2024-08-16 16:43:17 +02:00
Omar Emara
5e88a1466c Compositor: Support Viewer node in new CPU compositor
This patch supports the viewer node in the new CPU compositor. To do
that, the context viewer output mechanism was refactored to allow CPU
storage by utilizing the result class as opposed to a GPU texture.
2024-08-16 16:40:43 +03:00
Lorenzo Pierfederici
01d5581506 WM: Mark compatibility issues as fixed on save_as
The reasoning in the comment applies to "Save as..." as well, because
the destination file becomes the active one and opened data and active
file on disk match.

When saving a copy the active file is not updated, so existing
compatibility issues would remain.

Pull Request: https://projects.blender.org/blender/blender/pulls/126266
2024-08-16 15:05:51 +02:00
Lorenzo Pierfederici
d8ec92ed0b WM: Don't notify WM when file is saved as copy
When saving a copy, the active file remains unchanged so the "saved"
status and window title shouldn't be updated.
2024-08-16 15:05:47 +02:00
Bastien Montagne
5d0894f06a Packedfile reading: report filepath of missing packed file.
Can be useful info for users to rebuild missing data.
2024-08-16 15:04:21 +02:00
Bastien Montagne
7597f494b9 Fix #126147: Crash on reading blendfile with missing packed data.
Over the year, changes in how image packedfiles were handled broke the
fallback case of missing packed data in a few places, this commit fixes
proper cleanup of invalid packed files in the Image's list of
packedfiles.

In addition, also do not create inplicit sharing info when the read data
is `nullptr`.
2024-08-16 15:04:21 +02:00
Omar Emara
75cc1e4a15 Compositor: Add utility for 2D parallel for 2024-08-16 16:03:16 +03:00
Omar Emara
912284cfa3 Fix: GPU calls in CPU compositor
This patch removes an incorrect GPU call that shouldn't happen in the
CPU compositor, otherwise, it will cause a crash due to a missing
context.
2024-08-16 15:57:15 +03:00
Omar Emara
a54cf472c3 Compositor: Add utils for accessing pixel data 2024-08-16 15:55:29 +03:00
Hans Goudey
a4d94ee5d5 Fix #125565: Clear Parent & Keep Transform doesn't work in redo panel
The second time the operator ran without a depdency graph
evaluation happening for another reason, the object's evaluated
transform matrices weren't calculated. The fix is to make sure the
depsgraph is evaluated when the operator is executed.
2024-08-16 08:50:22 -04:00
Pratik Borhade
d1f0d71b54 GPv3: Few changes to invert weight operator
Cancel operator when active vgroup is locked.
Use new poll function to check if vgroup exists, otherwise grey out the
operator.
And some cleanup.
This addresses the points from !126275

Pull Request: https://projects.blender.org/blender/blender/pulls/126313
2024-08-16 13:18:26 +02:00
Christoph Lendenfeld
7547f1e59a Fix #126128: Possible to select invisible keys in the Graph Editor
The issue was that the animation filtering code for layered actions did not take
the `ANIMFILTER_FOREDIT` and `ANIMFILTER_SELEDIT` flags into account.

This also fixes another issue where it was possible to select and edit keys
on locked fcurves.

Pull Request: https://projects.blender.org/blender/blender/pulls/126373
2024-08-16 12:23:23 +02:00
Sean Kim
a2d6808a7a Revert "Fix: Sculpt: Correct asserts in previous commit"
This reverts commit 1602f82f28.

Original commit was correct, the affected functions are working on the
evaluated object, so we should assert that it is *not* the original
object.

Pull Request: https://projects.blender.org/blender/blender/pulls/126388
2024-08-16 06:50:16 +02:00
Campbell Barton
d71d325692 Cleanup: spelling in comments, strings 2024-08-16 09:33:20 +10:00
Sean Kim
e48f98efb0 GPv3: Add ReprojectMode enum and DrawingPlacement constructor
Needed to implement GPv3 version of "Bake Object Transform to Grease
Pencil"

Doesn't implement the `Surface` option, as that is not used in the
previously mentioned operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/126255
2024-08-16 01:32:13 +02:00
Hans Goudey
f6141b3fa7 Cleanup: Formatting 2024-08-15 16:14:23 -04:00
Hans Goudey
1602f82f28 Fix: Sculpt: Correct asserts in previous commit 2024-08-15 16:02:13 -04:00
Hans Goudey
f04fd1fad7 Refactor: Sculpt: Require depsgraph to access mesh positions
Part of #118145.
Similar to cfe69e32bc.
The dependency graph is required to access the evaluated object.
2024-08-15 15:43:17 -04:00
Hans Goudey
220cf67172 Cleanup: Improve object argument name
These functions expect an evaluated object which wasn't clear.
2024-08-15 13:09:28 -04:00
Hans Goudey
0adeeae2c7 Fix: Sculpt: Performance regression in expand operator
Caused by calculating the enabled vertices per node
in dd1454a648.
2024-08-15 12:44:49 -04:00
Hans Goudey
e7e1fd8a20 Fix: Sculpt: Incorrect overlay visibility check
Caused by 9eb7e8bfd1.
2024-08-15 12:44:49 -04:00
Hans Goudey
b793347b1d Sculpt: Specialize expand symmetry, sphere falloff
Parallelize the spherical falloff creation and use just a single
loop over all vertices rather than one per symmetry iteration.
2024-08-15 12:44:49 -04:00
Hans Goudey
3324a27334 Fix: Sculpt: Crash in vertex boundary test 2024-08-15 12:44:49 -04:00
Hans Goudey
294ea108f3 Sculpt: Parallelize some loops in expand operator
Parallelize loops to calculate max falloff and transfer
falloff from vertices to faces. These aren't a bottleneck
but performance should be slightly improved anyway.
2024-08-15 12:44:49 -04:00
Jacques Lucke
ab26dc5817 Nodes: add operator to get node width from parent
This operator sets the new default group node width (from e842966c5e) based on
the parent group node. This makes it easier to initialize the value. Without
this, one had to create and delete the group node potentially many times to find
a good default width.

Pull Request: https://projects.blender.org/blender/blender/pulls/126239
2024-08-15 17:54:56 +02:00
Hans Goudey
cfe69e32bc Refactor: Sculpt: Require object for position access
Part of #118145.
In preparation for removing the duplicated position arrays from the
pbvh::Tree structure, change the API functions that access the arrays
to require object arguments. This will allow retrieving data from the
original mesh or the evaluated deform mesh as necessary.

The pbvh code isn't really the right place for this, but neither is the
sculpt or paint code in my opinion, since this concept is not specific
to sculpting or painting. For now keep the API in the same place. It
probably makes sense to move a bunch of these functions at some point.

Pull Request: https://projects.blender.org/blender/blender/pulls/126370
2024-08-15 17:07:36 +02:00
Hans Goudey
df6034c869 Cleanup: Sculpt: Make positions span const 2024-08-15 09:53:22 -04:00
Aras Pranckevicius
8903205dd9 Fix: incorrect ffmpeg video length estimation logic
71f2229b0 added a workaround for video files that contain entirely
incorrect stream duration, and corrects that by using container
duration instead. However it used math of `seconds=frames*rate` instead
`seconds=frames/rate`, effectively always ending up falling back to
container instead of stream duration.

Pull Request: https://projects.blender.org/blender/blender/pulls/126368
2024-08-15 15:47:01 +02:00
Lukas Tönne
4e6dff2995 Cleanup: Use boolean operator to combine booleans instead of bitwise OR
There is a reason for the bitwise operator but it's not explained:
The attribute_foreach function callback has side-effects that the
compiler does not know about (everything is const). Simply replacing
the bitwise operator will cause the second term to be skipped, which
breaks tests due to missing attributes.

Now the term is explicitly evaluated first, then combined with actual
boolean operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/126366
2024-08-15 15:05:02 +02:00
Sergey Sharybin
d8913812ef Cleanup: Code format 2024-08-15 14:37:53 +02:00
YimingWu
4f4add5406 Fix #125426: Update paths in animation when renaming IDProperty
Previously when renaming an IDProperty the existing paths in the
animation/driver system isn't updated, this leads to missing animation
after renaming the property. Now `BKE_animdata_fix_paths_rename_all`
will be called so the animation system records the updated name.

Pull Request: https://projects.blender.org/blender/blender/pulls/125474
2024-08-15 13:56:17 +02:00