Commit Graph

110416 Commits

Author SHA1 Message Date
Campbell Barton
7ee6451a51 Extensions: support adding system repositories via the command line 2024-07-10 17:39:06 +10:00
Campbell Barton
b3fbc439fe readfile: add missing define check 2024-07-10 17:02:57 +10:00
il4n
e13b2f3774 Fix: VSE: Overlap after moving a retiming key was not handled
Moving a strip retiming key at the end of a strip, so that a strip
overlaps another one would leave them overlapped. The expected
behavior is that it acts according to the Overlap Mode, like it does
when moving a strip.

Co-authored-by: Richard Antalik <richardantalik@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/124424
2024-07-10 02:21:14 +02:00
il4n
b2e3b6c393 Fix: VSE: Selected strips don't get tinted while transforming
If the "Overwrite" Overlap Mode was used, the non-active strips would
not get tinted while moving them.

Pull Request: https://projects.blender.org/blender/blender/pulls/124411
2024-07-10 01:21:13 +02:00
il4n
a23cb6b1d6 Fix: VSE Set Speed operator not handling overlap
Lowering the speed of a strip that doesn't have user-created retiming
keys using the "Set Speed" operator would cause the strip to overlap
neighboring strips. The fix shuffles the retimed strip to avoid
overlap. This now matches the behavior of the same operator, when
using it on a user created retiming key.

Pull Request: https://projects.blender.org/blender/blender/pulls/124414
2024-07-10 01:19:50 +02:00
Pablo Delgado Krämer
7cc0e48882 Fix #124016: Translate Image Texture node color spaces to MaterialX
This addresses #124016. The report provides a scene to test the changes.

Currently, the Blender and MaterialX color spaces are not fully aligned,
but the linear/srgb heuristic should cover most cases however.

Pull Request: https://projects.blender.org/blender/blender/pulls/124315
2024-07-09 21:06:08 +02:00
Pratik Borhade
63cb33139f Fix #124288: Channels overlap the Dope Sheet search
Channels are drawn after/on top of the search box. To fix this, move
`ED_time_scrub_channel_search_draw` below the channel drawing function.

Pull Request: https://projects.blender.org/blender/blender/pulls/124331
2024-07-09 17:57:07 +02:00
Clément Foucault
983e4a7543 Fix: EEVEE: Shadow mode versioning node affecting Cycles
Even if Cycles is not the active render engine, this
versioning code could affect Cycles if a material was
used with Cylces in another file (using linking).

Fix this by spliting the output node into another one
that only affects EEVEE.
2024-07-09 16:46:06 +02:00
Omar Emara
0251db1447 Fix #124335: Viewport compositor crash upon scene change
The viewport compositor crashes when the scene is changed in some
situations. That's because the viewport compositor tries to use node
tree data that was freed in the last depsgraph update, while it should
have invalidate those references based on the same depsgraph update.

The source of this issue is in the depsgraph itself. In particular, when
the depsgraph evaluation happens in two passes, the ID recalculate flags
are backed up for every pass then restored at the end of all passes,
however, this doesn't happen for the ID Type Update table. So whenever
evaluations happen in two passes, changes will not be propagated to
engines that require those information, like the viewport compositor
engine in that particular case.

To fix this, we backup and restore the ID Type Update table in a similar
manner to the ID recalculate flags.

Fixes #107235, #124335, #116142.

Pull Request: https://projects.blender.org/blender/blender/pulls/124409
2024-07-09 16:10:58 +02:00
Clément Foucault
7fe7b2eed0 Fix: EEVEE: Hardware discrepancy with math wrap function
The math render tests were not passing on the AMD hardware.
This was due to some compiler behavior not returning 1
on the `floor((a - c) / (b - c))` calculation even if
`a` and `b` were equal.
2024-07-09 14:13:32 +02:00
Jeroen Bakker
34380f5c37 Fix #124377: EEVEE Incorrect HDRI Previews location
When render border is active the default framebuffer view is changed
and results to rendering the HDRI previews inside the render border
and not in the bottom right corner of the 3d viewport.

This PR fixes it by resetting the viewport when drawing the HDRI
previews.

Also tried to pass the DRW default view during submission, but that
didn't fixed the issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/124402
2024-07-09 13:30:09 +02:00
Campbell Barton
1cfc83d5f6 UI: add cancel_default option to WindowManager.invoke_props_dialog
Make it possible that the cancel option is default for operator
popups.
2024-07-09 19:26:25 +10:00
Christoph Lendenfeld
0e8f36e63d Fix #106946: NLA sync length stops keys from being inserted
The option on NLA strips "Sync Length" (in the Action Clip dropdown of the N panel)
stops keys from being inserted if it is disabled.
This is due to the evaluation mode of the strip, which is set
to "Hold" internally but ONLY IF "Sync Length" is enabled.
Removing that condition allows to key in tweak mode regardless of that setting.

## History
This has been put in place by 89ee260ef2
Judging by the commit description, this was put in place to allow keyframing
in tweak mode. However, no explanation is given why this is only allowed
with "Sync Length" enabled. Potentially because there was no special
handling of tweak strips for keying evaluation, which has been put in
place later. (09709a7e64)

Pull Request: https://projects.blender.org/blender/blender/pulls/123902
2024-07-09 09:16:50 +02:00
Campbell Barton
8bbe1fe6ef CMake: remove logic to exclude removed add-ons directories
Using a REGEX on an absolute path may not work reliably without
escaping the path. Remove the exclusion as these paths are no longer
part of Blender's sources.

If some developers happen to have these directories it's harmless as
they won't be used.
2024-07-09 15:32:08 +10:00
Campbell Barton
da9cfbdae9 Docs: add doc-string to mathutils.Vector swizzle attributes
Also refactor definitions into a macro as they were exceeding the
line-length and wrapping.

Ref: !124275

Co-authored-by: Nathan Burnham <nathan@nathanburnham.uk>
2024-07-09 13:45:07 +10:00
nutti
5523662414 Docs: add default parameters to Context.temp_override
Ref: !124348
2024-07-09 13:44:09 +10:00
Richard Antalik
1f42c9eb54 Fix: Crash when clicking on unrealized retiming key
When keys are realized, strip handle positions are used to ensure, that
left and right key exists. If strip content is offset to the right,
this caused crash. This happened, because `SEQ_retiming_add_key()`
clamped timeline frame to strip content only on right side.

Clamp timeline frame to strip content on both sides.

Pull Request: https://projects.blender.org/blender/blender/pulls/124207
2024-07-09 01:30:40 +02:00
Sean Kim
d527e3a6bd Fix #122947: Curve stroke on duplicate object doesn't update normals
When a mesh is shared between multiple objects, sculpting with a brush
with the Curve stroke type doesnt update normal values for the affected
nodes when using PBVH drawing. This is because when reevaluating the
depsgraph for the objects, the shared PBVH is destroyed and the nodes
are recalculated, losing the existing node flag updates.

This only occurs for the Curve stroke type because all of its stroke
steps are performed within a single call to the overall operator when
the user presses enter, unlike other brush strokes which apply on each
mouse movement.

To fix this, we simply force update the normals before destroying the
PBVH at the end of the stroke step.

Pull Request: https://projects.blender.org/blender/blender/pulls/124268
2024-07-08 21:36:28 +02:00
Harley Acheson
9a26bfcd5f Fix: Shade Smooth Removal Notification When Needed
Only send `NC_OBJECT | ND_DRAW` notification if the smooth by angle
modifier has been removed, not on all changes. This is a slight
adjustment to #124330.

Pull Request: https://projects.blender.org/blender/blender/pulls/124362
2024-07-08 21:35:26 +02:00
Pratik Borhade
e8f0dabc7e Fix #124302: Crash when clicking arrow button in outliner
This is due to missing rebuild of outliner tree. Auto smooth operator
is cleared with shade flat execution but outliner is unaware of this and
the modifier tree element remains intact. This add a notifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/124330
2024-07-08 18:42:06 +02:00
Jesse Yurkovich
7d6835f043 Fix #124075: Read Alembic point cloud velocity data
This regressed during the change to use GeometrySets in ea256346a8.

Pull Request: https://projects.blender.org/blender/blender/pulls/124077
2024-07-08 17:56:43 +02:00
Jesse Yurkovich
f9b2edbf01 Fix #124009: Clamp material index when uploading mesh through Hydra
Prevent crash from a mesh created around the time of Blender 4.0 with
bad (negative) material indices on some faces.

The Poly Haven folks were poked to fix the actual asset as well but it's
simple enough for us to clamp in this code path, especially since we
were already doing it for the upper bound.

Pull Request: https://projects.blender.org/blender/blender/pulls/124026
2024-07-08 17:55:50 +02:00
Clément Foucault
15b2d77f29 Fix: EEVEE: Invalid sphere probe border pixel
Border pixels of the world probe were not
copied correctly to local sphere probes.

Maybe side effect of #123074 or maybe it was
always broken.

Fix is to use the same sampling functions as
regular sampling for biasing the UVs correctly.

Fixes render tests.
2024-07-08 17:27:10 +02:00
Sybren A. Stüvel
9d3dc77e05 Anim: move Bone Selection Sets add-on into Blender
The functionality of the Bone Selection Sets add-on is now integrated
into Blender itself. Rigify has been updated to no longer check for the
add-on, but just assume that the functionality is available.

The keymap is still the same, and so are all the class names. This
ensures that there are no conflicts when people still have the old
add-on enabled somehow. And there is versioning code to remove the
'add-on enabled' state so that Blender won't complain it cannot find it
any more.

Compared to the add-on, the following changes are made:

- The 'bone' icon has been removed from the list of available selection
  sets. It was the same for each entry anyway, and thus didn't provide
  any information.
- The code has been split up into multiple files, with the UI elements
  in `scripts/startup/bl_ui/properties_data_armature.py` and the
  operators in `scripts/startup/bl_operators/bone_selection_sets.py`.
- Helper functions and classes are prefixed with `_` to indicate that
  they are not part of any public API.
- The `Operator` helper subclasses have been transformed to mix-in
  classes. This way the only subclasses of `Operator` are the actual
  operators.
- Comments & descriptions have been updated for clarity & consistency.

This commit contains code by the following authors, ordered by number of
commits in the original add-on repository, highest first:

Co-Authored By: Ines Almeida <britalmeida@gmail.com>
Co-Authored By: Sybren A. Stüvel <sybren@stuvel.eu>
Co-Authored By: Campbell Barton <ideasman42@gmail.com>
Co-Authored By: meta-androcto <meta.androcto1@gmail.com>
Co-Authored By: Demeter Dzadik <Mets>
Co-Authored By: lijenstina <lijenstina@gmail.com>
Co-Authored By: Brecht Van Lommel <brechtvanlommel@gmail.com>
Co-Authored By: Aaron Carlisle <carlisle.b3d@gmail.com>

For the full history see the original add-on at:
https://projects.blender.org/blender/blender-addons/commits/branch/main/bone_selection_sets.py

Reviewed On: https://projects.blender.org/blender/blender/pulls/124343
2024-07-08 16:28:42 +02:00
Philipp Oeser
93585602a1 Fix #100164: Alembic import: Ensure mesh normals are normalized
Similar to !124267 and !124261

This normal data is eventually passed into `BKE_mesh_set_custom_normals`
and through to `mesh_normals_corner_custom_set` which expects normals to
actually be normalized per its documentation.

Not doing so would yield meshes with incorrect "sharp" data for affected
edges.

Thx @OmarEmaraDev for the initial patch

Pull Request: https://projects.blender.org/blender/blender/pulls/124336
2024-07-08 16:03:52 +02:00
Miguel Pozo
a7e24222cf EEVEE: Show compilation subprocesses information
Inform the user when EEVEE is compiling materials and parallel
compilation is disabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/124249
2024-07-08 15:23:58 +02:00
Hans Goudey
80a0c4237a Fix #121696: Use after free with static asset caches when opening new file
The cause of the crash was that asset libraries are freed, but the filtered
trees used for things like node tool menus weren't marked dirty, so we
continued to use the freed asset data. On a design level this is quite
concerning because it means the lifetimes of the asset tree caches and
the asset system's asset libraries are connected tenuously.

Eventually there should be a better solution, but I found the simplest
fix for now is just to add a notifier when opening a new file that causes
the asset tree caches to be tagged dirty.

Pull Request: https://projects.blender.org/blender/blender/pulls/124254
2024-07-08 15:10:42 +02:00
Lukas Tönne
d14478c747 Fix #124310: Add override flag to prevent infinite recursion
The `enum_definition` property was changed by #121234 and now returns
the node itself. This creates an infinite recursion in the override
system that must be avoided by adding this flag.

Pull Request: https://projects.blender.org/blender/blender/pulls/124347
2024-07-08 15:04:49 +02:00
Lukas Stockner
26b6c2b94d Fix #124211: FCurve generates NaNs with Vector handles
The issue here was that the left handle of the first point was calculated
incorrectly (set to the position of the point itself), which caused a
NaN when attempting to normalize a zero vector when computing extrapolation
vectors.

Pull Request: https://projects.blender.org/blender/blender/pulls/124239
2024-07-08 15:01:18 +02:00
Alaska
a0869d2ca6 Shader: Update Principled BSDF node description
Update the description to mention the node is now based on the OpenPBR
model rather than the Disney Principled Model. This has been the
case since Blender 4.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/124209
2024-07-08 14:38:07 +02:00
Campbell Barton
5eef5454fa Fix #124250: enabling add-ons from command line broken
Excluding add-ons caused an `_bpy_internal.addons` not to install.
2024-07-08 22:27:47 +10:00
Damien Picard
9a0b5ac0c6 I18n: Translate sequencer channel and metastrip names
Both the metastrips and sequencer channels are user-editable data, so
translation of their names uses DATA_().

Issues reported by Gabriel Gazzàn.

Pull Request: https://projects.blender.org/blender/blender/pulls/124314
2024-07-08 13:00:09 +02:00
Jesse Yurkovich
f49780b888 Fix #120590: USD: Ensure mesh normals are actually normalized
This normal data is eventually passed into `BKE_mesh_set_custom_normals`
and through to `mesh_normals_corner_custom_set` which expects normals to
actually be normalized per its documentation.

Not doing so would yield meshes with incorrect "sharp" data for affected
edges.

Pull Request: https://projects.blender.org/blender/blender/pulls/124267
2024-07-07 21:27:01 +02:00
Jacques Lucke
bdb444bc2b Fix #124290: frames disappear when an invalid link exists 2024-07-07 11:16:50 +02:00
Campbell Barton
850e715682 UI: add UILayout.template_popup_confirm(..) function
This makes it possible for popups to have their confirm & cancel buttons
defined in the operator's draw callback.

When used with popups created by: `WindowManager::invoke_props_dialog()`
to override the default confirm/cancel buttons.

In the case of `WindowManager::popover(..)` & `bpy.ops.wm.call_panel()`
this can be used to add confirm/cancel buttons.

Details:

- When the confirm or cancel text argument is a blank string the button
  isn't shown, making it possible to only show a single button.
- The template is similar to UILayout::operator in that it returns the
  operator properties for the confirm action.
- MS-Windows alternate ordering of Confirm/Cancel is followed.

Needed to resolve #124098.

Ref !124139
2024-07-06 14:49:39 +10:00
Campbell Barton
bdf06e6d82 Cleanup: spelling in comments 2024-07-06 14:21:24 +10:00
Campbell Barton
c4ab17ab79 Cleanup: quiet compiler warnings 2024-07-06 13:37:16 +10:00
Charles Wardlaw
5224b1cab2 Fix #124206: USD: Always export animation transforms, even when identity
Now the export only skips identity transforms on static exports, to save
space.

Co-authored-by: Charles Wardlaw <cwardlaw@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/124251
2024-07-05 20:19:47 +02:00
Harley Acheson
938f50e1f7 Fix #124168: Allow File Browser Layout Initialization While Minimized
If you change an area to a File Browser while it is vertically
minimized we get an assert on layout initialization since there
are no visible rows. But this state is valid and it works great
without this assert. This PR removes the assert and adds a comment.

Pull Request: https://projects.blender.org/blender/blender/pulls/124253
2024-07-05 19:36:49 +02:00
Hans Goudey
b9edd2e02e Fix #124216: "Remove Hook" operator causes crash with geometry nodes
It looks like the "user edited flag propagation" node built for the geometry
nodes modifier is unchanged after modifiers are removed. My guess is this
is now a more general problem when modifiers are removed-- I guess the
depsgraph nodes for an object have to be rebuilt when that happens now.

Maybe there is a more general fix, but to fix the crash mentioned in the
report, I tagged the depsgraph for a relations update, which rebuilds the
problematic modifier node.

Pull Request: https://projects.blender.org/blender/blender/pulls/124252
2024-07-05 19:35:03 +02:00
Harley Acheson
fd06a407e1 Fix #124163: Update SO_DATA_API Outliner When Windows are Removed
On Window close send NC_WINDOW | NA_REMOVED notification. If Outliner
is in SO_DATA_API mode with this message then refresh.

Pull Request: https://projects.blender.org/blender/blender/pulls/124205
2024-07-05 19:33:27 +02:00
Philipp Oeser
4b168dd645 Fix #124166: Assetbrowser crash on quick Editor change (from py)
FileList can still be uninitialized while loading, so simple nullptr
check.

Pull Request: https://projects.blender.org/blender/blender/pulls/124243
2024-07-05 18:56:11 +02:00
Jacques Lucke
57e925b38f Fix: don't show grease pencil domain in Domain Size node
This fixes part of #123935. The change has to be reverted
in the `main` branch.
2024-07-05 18:09:38 +02:00
Jacques Lucke
da2a262658 Fix: don't show layer domain in viewer node
This fixes part of #123935.
2024-07-05 18:09:38 +02:00
Miguel Pozo
b20bacf657 Fix #123758: Viewport Render Animation doesn't track World updates
Viewport instances created by the Viewport Render Animation operator
don't get `view_updated` notifications.
Fix update detection by implementing a `last_update` timestamp for
`World`, similar to the ones added in #115196.

Pull Request: https://projects.blender.org/blender/blender/pulls/124114
2024-07-05 18:05:27 +02:00
Christoph Lendenfeld
c446813dd3 Fix #123943: manual channel ordering no longer works
The issue was that the function `animfilter_action` got a new
code segment at the start which checked `if (action.is_empty())`.
That function didn't check if the `groups` list of the action is empty
though. Regular keyframe animation is usually sorted into
keyframe groups, which means it is not stored under `curves` of the action.
However in the anim filtering code, the function `split_groups_action_temp`
moves the fcurves to their groups under the `groups` listbase.

Pull Request: https://projects.blender.org/blender/blender/pulls/124172
2024-07-05 17:56:45 +02:00
Jacques Lucke
e4c9b73051 Fix #124160: crash when trying to load unavailable grid
The openvdb API was used incorrectly before. I didn't notice that this is
a static function and requires the type to be passed in.

Note that this does not solve the cache invalidation issue yet. Instead
it handles the case more gracefully when the stored .vdb file changes
when Blender doesn't expect it to change.
2024-07-05 17:55:04 +02:00
Dalai Felinto
e969769a0c UI: Extensions: Update the tooltip for Allow Online Access
Some users were concerned that the tooltip wasn't clear enough on
indicating that Blender doesn't really inforce an offline mode.

The final text was a collaborative effort together with the UI team and
participants from the user-interface-module chat.

The tooltip talks about internet instead of specifically extensions or
repositories to leave room to be used in the future for other things
(e.g., for Blender to check for new release updates).
2024-07-05 17:49:10 +02:00
Sebastian Parborg
f853d097a5 Fix: GLSL error in the sequencer when running mesa
It would error out with "illegal use of reserved word 'active'"
Rename the boolan value to not use the reserved word.
2024-07-05 17:22:52 +02:00
Iliya Katueshenock
a2a5532818 Fix #121110: Allow changing type of reroute node sockets
Simple fix to avoid regression of reroute sockets in a custom nodes system.
Proper solution will be in 4.3: #121146.

Pull Request: https://projects.blender.org/blender/blender/pulls/124244
2024-07-05 17:14:54 +02:00