Commit Graph

137142 Commits

Author SHA1 Message Date
Sybren A. Stüvel
96a024dede Refactor: Anim: move struct bAnimListElem down in its header file
Move the `bAnimListElem` struct down in its header file, so that it sits
underneath the `enum` types that it uses. This move is necessary for an
upcoming refactor where the struct actually declares its fields to be of
those enum types.

Separating the move from the actual change in type will help with
clarity in the diffs.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/122874
2024-06-07 13:48:32 +02:00
Campbell Barton
7d8b18a3fd Merge branch 'blender-v4.2-release' 2024-06-07 21:45:42 +10:00
Campbell Barton
c0f39e7b40 Extensions: correct 3D coat mapping 2024-06-07 21:44:14 +10:00
Jacques Lucke
c85b4c1f84 Merge branch 'blender-v4.2-release' 2024-06-07 13:42:14 +02:00
Jacques Lucke
68db2c8328 Fix #122607: connect deactivated viewer causes crash 2024-06-07 13:39:36 +02:00
Jacques Lucke
1573091b48 Merge branch 'blender-v4.2-release' 2024-06-07 13:26:54 +02:00
Nathan Vegdahl
a36599b323 Anim: implement 3D viewport keyframing functionality for layered actions
This modifies the 3D viewport keyframing operators to work with layered
actions.  The functionality is relative basic, and still leaves some things out.
Of particular note:

- Keyframing with keying sets does not yet work.
- User preferences such as the `XYZ to RGB` flag and the keyframe interpolation
  type are not yet used/respected.
- Something not caused by this PR but revealed by it: when the last keyframe of
  an fcurve is deleted in a layered action, the fcurve still sticks around. This
  is different from legacy actions, which delete fcurves when their last key is
  deleted. Since the "Only Insert Available" feature is based on the existence
  of fcurves, that makes the feature appear broken in some circumstances right
  now with layered actions.

Pull Request: https://projects.blender.org/blender/blender/pulls/121661
2024-06-07 13:26:18 +02:00
Jacques Lucke
34588cd933 Fix: invalid data sharing after loading certain .blend files
This fixes a bug that happens when two drawings in the same grease pencil
data-block reference the same array. In this case, the same attribute array
pointer is written to .blend files for both drawings. However, when loading the
.blend file, it was not detected that the data is shared. Instead each drawing
would think that it was the single owner of the array even though it was shared.

The same problem can technically occur for all kinds of shared data, and not
just for grease pencil. However, only grease pencil shows this issue currently,
because it can easily happen that the same attribute is shared between different
`CustomData` within the same data-block. This very rarely happens with meshes or
curves, because different `CustomData` usually have different sizes and don't
share the same arrays.

A previous fix (cc891aa699) solved pretty much the same issues for the case
when two layers in the same `CustomData` share data. This original fix is now
generalized and is integrated with `BLO_read_shared` which makes it less error
prone. For each data-block, the `BlendDataReader` now remembers which shared
data it has loaded before so that it is not loaded again.

In the future this could be extended to support data that is shared between
data-blocks, but that's not as straight forward as one would hope currently. For
various reasons, different data-blocks could store independent data at the same
pointer. I specifically noticed that with a regression test file:
`blender/tests/data/modeling/geometry_nodes/attributes/attribute_statistics.blend`.
To support it, one solution could be to tag `BHead` in .blend files to indicate
that a specific pointer is shared and unique within the entire file. But that's
for another day.

Pull Request: https://projects.blender.org/blender/blender/pulls/122780
2024-06-07 13:22:39 +02:00
Bastien Montagne
7d9ee6bb71 Merge branch 'blender-v4.2-release' 2024-06-07 12:59:14 +02:00
Thomas Barlow
eb7a2f47d2 Fix #122794: FBX Subsurf Export applies the last Subsurf modifier
Disabling the last Subdivision Surface modifier was removed by mistake
in
blender/blender-addons/commit/bc801d7b1dad4be446435e0cab4d3a80e6bb1d04

This patch restores the mistakenly removed code that disables the last
Subdivision Surface modifier when the option to export FBX Subdivision
Surface is enabled.

The add-on's patch version has been increased.

Pull Request: https://projects.blender.org/blender/blender/pulls/122841
2024-06-07 12:55:29 +02:00
Campbell Barton
c9324a0baa Merge branch 'blender-v4.2-release' 2024-06-07 17:38:51 +10:00
Campbell Barton
7e2552e4af Merge branch 'blender-v4.2-release' 2024-06-07 17:38:48 +10:00
Campbell Barton
059dc93cde Extensions: support refreshing local repositories when offline
Since [0] there was no way to refresh local repositories,
with the poll messages suggesting to restart Blender to see updates
which isn't practical for developers.

The ability to refresh was prevented when "Online Access" was disabled,
meaning a developer couldn't easily develop their own add-ons unless
they were online.

[0]: 651621da0d
2024-06-07 17:36:59 +10:00
Campbell Barton
3dd8c826b5 Extensions: correct the descriptions for active repository actions 2024-06-07 16:52:51 +10:00
Campbell Barton
69e6240587 Merge branch 'blender-v4.2-release' 2024-06-07 16:34:09 +10:00
Campbell Barton
dc0e559cbb Extensions: remove intermediate operators for upgrade and sync
The buttons to upgrade or sync extensions called extension
operators via bpy.app.handlers, requiring awkward glue-code
which didn't show error reports in to the user.

Remove these operators and call the upgrade & sync operators directly.
2024-06-07 16:33:03 +10:00
Campbell Barton
e55a2ae5e4 Merge branch 'blender-v4.2-release' 2024-06-07 15:14:03 +10:00
Campbell Barton
9c60fe88fa Cleanup: de-duplicate check/update poll function 2024-06-07 15:11:54 +10:00
Jesse Yurkovich
dc521516b8 Merge branch 'blender-v4.2-release' 2024-06-06 21:36:38 -07:00
Jesse Yurkovich
06581bde1b USD: use panels for Import and Export
Instead of using "box" layouts for these import/export operators, use
panels instead. Many choices for the layout and organization has come
from the `universal-scene-description` branch though it's not a 1:1
equivalent.

Motivation for using panels is two fold.

Firstly the use of panels instead of boxes is more consistent with other
parts of Blender and with the other IO features.

Secondly, in the case of an Import invoked from drag-n-drop or Export
configured on a Collection, the large number of options exposed results
in a very long layout. Panels allow us to close some sections by default
and allows the user to open/close panels based on their own needs in
general.

Along the way some effort went into standardizing the layout and wording
used as much as possible.

Pull Request: https://projects.blender.org/blender/blender/pulls/122415
2024-06-07 06:35:27 +02:00
Campbell Barton
d6dcd974c4 Merge branch 'blender-v4.2-release' 2024-06-07 13:44:25 +10:00
Campbell Barton
6450141a18 Fix #122769: bpy.utils.register_submodule_factory fails with extensions
The unregister function from register_submodule_factory didn't support
a sub-module name argument.
2024-06-07 13:42:59 +10:00
Campbell Barton
d1c1c6e5e0 Merge branch 'blender-v4.2-release' 2024-06-07 12:50:45 +10:00
Campbell Barton
239f032186 Fix #122857: error validating older permissions list 2024-06-07 12:49:16 +10:00
Campbell Barton
bcb00904a8 Merge branch 'blender-v4.2-release' 2024-06-07 12:17:37 +10:00
Campbell Barton
3acff7a8a1 Correct help text for system extensions
Group `--env-system-extensions` with related arguments.
2024-06-07 12:16:21 +10:00
Campbell Barton
5342424ae7 Merge branch 'blender-v4.2-release' 2024-06-07 12:11:57 +10:00
Campbell Barton
98bb157ad9 License headers: add SPDX header
Also include "addons_core" in license check.
2024-06-07 12:09:58 +10:00
Campbell Barton
333cdfb691 Merge branch 'blender-v4.2-release' 2024-06-07 11:49:05 +10:00
Campbell Barton
715bbbfa0f Docs: clarification for BKE_appdir.hh folder_id
Also add doc-string for bUserExtensionRepo::flag.
2024-06-07 11:46:40 +10:00
Campbell Barton
d8a2517622 Merge branch 'blender-v4.2-release' 2024-06-07 11:37:59 +10:00
Campbell Barton
dc9430c480 Extensions: support system repositories & BLENDER_SYSTEM_EXTENSIONS
Support for "System" extensions as an alternative to the current
"User" extensions repository.

The purpose of this change is to support bundling extensions for
offline work or in environments where users setting up thier own
extensions isn't desirable, see #122512.

Details:

The default "System" repository on Linux will for example use:
- `/usr/share/blender/4.2/extensions/{system}` For system installs.
- `./4.2/extensions/{system}` For portable installs.

- Blender's default startup now has a "System" repository
  which users or administrators may populate.

- Repositories can select between User/System paths,
  setting a custom path overrides overrides this setting.

- Add "BLENDER_SYSTEM_EXTENSIONS" (matching "BLENDER_LOCAL_EXTENSIONS").

Ref !122832
2024-06-07 11:36:20 +10:00
Campbell Barton
c225828aa8 Merge branch 'blender-v4.2-release' 2024-06-07 11:14:09 +10:00
Campbell Barton
f423ec8848 Correct mistake in last commit, accidental declaration included 2024-06-07 11:12:30 +10:00
Campbell Barton
881d83031e Cleanup: minor changes to extension repository handing
- Add a function to initialize all default repositories.
- Rename function for creating extensions.blender.org repo for clarity.

Prepare for !122832.
2024-06-07 11:02:48 +10:00
Jesse Yurkovich
954bd240c8 Merge branch 'blender-v4.2-release' 2024-06-06 17:16:57 -07:00
Guillermo Venegas
26965a0758 Fix #122802: Drag and droping a .vdb file no longer works
Changes in view3d_id_path_drop_copy from 8b6a21c122 assumed that
drag-drop filepaths was handled only with FileHandlers in View3d. This
adds the missing drop-box to FileHandler conversion for .vdb files.

Pull Request: https://projects.blender.org/blender/blender/pulls/122839
2024-06-07 02:15:34 +02:00
noodlebox
b73b663309 Fix: Redundant submenus are created in the Add menu for certain catalog names
A few of the recently added submenus are not included in the list of builtin
menus, so node assets under those catalog names will generate redundant submenus.
Fixes same issue as b49c84276c for newly added nested menus.

Pull Request: https://projects.blender.org/blender/blender/pulls/122855
2024-06-06 23:39:00 +02:00
Hans Goudey
7daf5a9483 Merge branch 'blender-v4.2-release' 2024-06-06 17:19:17 -04:00
Hans Goudey
b5022828d6 Fix #122849: Curve to mesh node crash with non-point builtin attributes
If the mesh has a curve builtin attribute that's not stored on the point domain,
the creation of the attribute will fail and it can't be interpolated. Possibly this
could be supported somehow, by averaging all the values in the curve's points
or so, but for now just avoid the crash.
2024-06-06 17:18:45 -04:00
Hans Goudey
bd5bf4aac4 Cleanup: Sculpt: Resolve todo about const in auto-masking argument
It turns out the undo push is unrelated to this though.
2024-06-06 17:10:53 -04:00
Hans Goudey
5758149546 Cleanup: Sculpt: Remove unnecessary coping in auto mask orig data
The original data is retrieved just for positions below.
2024-06-06 17:06:53 -04:00
Hans Goudey
e4ab6dd8de Fix: Sculpt draw brush doesn't apply positions with deformation
Only the evaluated positions were changed when deform or subsurf
modifiers were active. This was caused by only writing to the
evaluated positions owned by the PBVH and assuming these were
aliased with the mesh positions.

There were also quite a few TODOs in the area related to an extra
positions array that was passed around that was conceptually
unnecessary. Brush deformations should be based on the evaluated
positions, but only the original positions should be written to.

This PR resolves those TODOs while resolving sculpting with deform
modifiers and shape keys. We do this by only writing to the original
mesh positions. For shape keys we use the existing translations from
the brush rather than recomputing them, and only copy the mesh
original positions to the active shape key.

This also makes it easier to remove the PBVH's copy of vertex
positions in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/122842
2024-06-06 23:05:41 +02:00
Hans Goudey
44a1e6a219 Sculpt: Split area and normal sampling per PBVH type
Part of #118145.
Previous commits attempted to reduce the deduplication
associated with this change, though there still is some.
2024-06-06 16:28:15 -04:00
Hans Goudey
313e22091d Cleanup: Sculpt: Extract functions from area sampling
In preparation for splitting the code per PBVH type.
2024-06-06 16:28:15 -04:00
Hans Goudey
46a9296c56 Cleanup: Sculpt: Use C++ types for area center/normal sampling
Also reduce variable scope, and remove an unnecessary `no_s`
variable that was leftover from when normals were stored as shorts.
2024-06-06 16:28:15 -04:00
Hans Goudey
914c400353 Cleanup: Sculpt: Move sampling code to namespace, tweak arguments
Move the code to the proper namespace and change some arguments
from the sculpt paint struct to just the brush.
2024-06-06 16:28:15 -04:00
Sean Kim
b1d2ae7efc Merge branch 'blender-v4.2-release' 2024-06-06 13:16:59 -07:00
Sean Kim
afa4523322 Fix #121008: Paint undo causes uncolored mesh
Update PBVH GPU argument initialization to prefer using the PBVH mesh
attributes instead of the evaluated mesh attributes for color.

The values can be out of sync due to differences with the evaluated
and original mesh data.

Pull Request: https://projects.blender.org/blender/blender/pulls/122850
2024-06-06 22:11:30 +02:00
Jacques Lucke
10984c1461 Geometry Nodes: resimulate current frame if it's the last cached one
The goal is to simplify debugging the "current" simulation step. Previously, when a frame
was cached already, one would have to go back to the beginning to cache everything again.
Now, the last cached simulation step is discarded and simulated again if any property that
affects it is changed.

Pull Request: https://projects.blender.org/blender/blender/pulls/122736
2024-06-06 20:47:17 +02:00