Commit Graph

107129 Commits

Author SHA1 Message Date
Sybren A. Stüvel
f91c6a241c Cleanup: expand documentation of how to register DNA defaults
No functional changes.
2024-02-23 17:14:48 +01:00
Jeroen Bakker
7da72a938c EEVEE: Reset samples when reflection probes are updated.
This fixes an issue where the number of viewport samples are set
to 1 and reprojection is deactivated. In this case the sample that
has the data to update the probes is ignored as all samples where
already rendered. A tweak in the viewport was needed to fix this issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/118654
2024-02-23 15:53:52 +01:00
Sebastian Parborg
86c8c27974 Merge branch 'blender-v4.1-release' 2024-02-23 15:35:31 +01:00
Philipp Oeser
c75d2d09e3 Fix: Cloth could ignore "Shear" vertexgroup
Oversight in e3d31b8dfb

While most situations would have other vertexgroups set anyways (so this
probably wasnt noticed, it was only ignored if it is the only
vertexgroup used), at least theoretically it could happen that
`cloth_uses_vgroup` would return false even then `vgroup_shear` is set
(thus skipping actually setting these weights later).
2024-02-23 15:34:12 +01:00
ok_what
8b5f11839e Fix: Copying strip inside meta, copies top-most meta instead
When inside a meta strip, copying and pasting a strip would copy the
top-most meta strip, rather than the intended strip.

Pull Request: https://projects.blender.org/blender/blender/pulls/118090
2024-02-23 15:08:14 +01:00
Jeroen Bakker
03833417b3 EEVEE-Next: Fix black world probe when disabling probes
When disabling/enabling reflection probes the atlas texture can be
recreated removing the existing content of the texture. When this
happens the world probe needs to be rerendered.

Pull Request: https://projects.blender.org/blender/blender/pulls/118656
2024-02-23 14:04:36 +01:00
Julian Eisel
ee3291dc6d Fix double loading of asset catalogs when reloading "All" library
`refresh_catalogs()` for the "All" asset library effectively does the
same as iterating over all other asset libraries and calling
`get_asset_library()` on them. So doing both just performs the same work
twice.
2024-02-23 13:02:54 +01:00
Julian Eisel
49c7dfe904 Fix unintended reloading of asset catalog files from disk
Mistake in #118463.

Updating the catalogs of the "All" asset library would also reload
catalog data of the other asset libraries from disk. This wasn't
intended, this should be done with an explicit load request only (and on
a thread to not block the main thread).
2024-02-23 12:55:38 +01:00
Sergey Sharybin
9b2c312ac7 Merge branch 'blender-v4.1-release' 2024-02-23 12:33:11 +01:00
Pratik Borhade
80e7c04726 Fix #118475: Regression: NLA/driver data missing in outliner
Caused by 0a633a4e07
NLA and driver tree-elements were not added to the outliner when
"action" is unlinked from the object. This is due to the wrong `if`
condition preventing the excution of `expand_drivers/expand_NLA_tracks`.

Pull Request: https://projects.blender.org/blender/blender/pulls/118597
2024-02-23 12:07:40 +01:00
Philipp Oeser
428e67d7f9 Merge branch 'blender-v4.1-release' 2024-02-23 11:55:24 +01:00
Philipp Oeser
199f8ad817 Fix #118643: Translation of enum button tooltip not working in cases
Originally caused by 90c4e2e6ec [which did not translate the tooltip
descriptions for enum items at all]
That was fixed in cbc5d861db [which was working fine for the default
translation context -- which is most of the time]

Now 7d7318f6c5 added the `BLT_I18NCONTEXT_ID_ID` translation context
to `buttons_context_items` (rightfully so) but using this context on the
enum item **description** translation does not really make sense. So as
a result, the description was not translated in this case.

To resolve, now dont use a special translation context for the
**description** of enum items at all, this is also what
`property_enum_translate` does.

Pull Request: https://projects.blender.org/blender/blender/pulls/118653
2024-02-23 11:50:30 +01:00
Jeroen Bakker
5698fb2049 RenderDoc: Set Capture Title
Adds an option to set the capture title when using renderdoc
`GPU_debug_capture_begin` has an optional `title` parameter to set
the title of the renderdoc capture.

Pull Request: https://projects.blender.org/blender/blender/pulls/118649
2024-02-23 10:57:37 +01:00
Pratik Borhade
0209928647 GPv3: General panel in offset modifier
Same as legacy gp offset modifier

Resolves #118608

Pull Request: https://projects.blender.org/blender/blender/pulls/118647
2024-02-23 10:56:47 +01:00
Philipp Oeser
b492ac723b Merge branch 'blender-v4.1-release' 2024-02-23 09:17:19 +01:00
Philipp Oeser
8b44c62ce7 Fix #118307: Outliner crash with additional constraint on overridden bone
Since `IDOverrideLibraryProperty` apparently stores its rna_path with
string-based collection keys, we have to make sure we also use string-
based keys elsewhere in `OverrideRNAPathTreeBuilder::build_path` and
down the line, otherwise:
- we get duplicate collection entries ("pose.bones[1].constraints" vs.
"pose.bones["Bone.001"].constraints")
- crashes may occur (we are reading on an already freed `TreeElement`
see #118307 for ASAN output)

So now make sure we are using string-based collection keys when we can
so the TreeElements match /and dont get duplicated).

NOTE: the duplication of entries came with 67b92418ee

Pull Request: https://projects.blender.org/blender/blender/pulls/118573
2024-02-23 09:15:37 +01:00
Aras Pranckevicius
2171eef2c4 Merge branch 'blender-v4.1-release' 2024-02-23 07:28:48 +02:00
Aras Pranckevicius
3e232aaac1 Fix #118501: crash opening some projects if Load UI is off
Wrong check for vecscope_rgb array free, introduced in 567455124d
2024-02-23 07:27:57 +02:00
Campbell Barton
3edd6ae69b UI: remove directory button label in extensions & add doc-string 2024-02-23 15:18:02 +11:00
Campbell Barton
92987cbe4a Extensions: user interface improvements
- Remove name from "Add Remote Repository" popup,
  the name is set automatically based on the host-name.
- URL text field is active for new remote repositories,
  the name field is active for local repositories.
- When the custom-path is disabled, show the automatically created
  directory name which is used.
- Use the host-name for the repository name when version patching
  user preferences.

Resolves #118638 design task.
2024-02-23 14:59:30 +11:00
Campbell Barton
c32747319b UI: support UI_ITEM_R_IMMEDIATE all RNA buttons
This was only being checked for key-map entry buttons however this is
useful to enable immediate editing of text fields.
2024-02-23 14:58:08 +11:00
Campbell Barton
291f2ce42f UI: prevent file-selector buttons operating on non-editable properties
While relatively harmless, it's annoying if a user spends time to select
a file only to find the property can't be changed.
2024-02-23 14:58:05 +11:00
Campbell Barton
f726779d76 UI: remove tool-tip message that non-editable properties are internal
Properties that aren't editable aren't necessarily internal,
only use this message for registerable properties.
2024-02-23 14:58:05 +11:00
Campbell Barton
86954de57a RNA: move the read-only extension "directory" to RNA
This allows it to be exposed in the user interface when the
custom-directory is disabled without having to use a label which can't
handle non UTF-8 characters which file-paths can contain.
2024-02-23 14:57:05 +11:00
Harley Acheson
d379897019 UI: Improvements to Confirmation of Unpack Linked Libraries
A more informative confirmation dialog to confirm that the user wishes
to unpack linked libraries.

Pull Request: https://projects.blender.org/blender/blender/pulls/117154
2024-02-23 02:02:55 +01:00
Hans Goudey
c5d855b497 Cleanup: Use C++ function callbacks for some UI widgets
Use std::function instead of separately allocated arguments and
function pointers. This improves type safety and makes the code less
verbose. It also moves us closer to not having two methods of adding
button callbacks.
2024-02-22 15:53:05 -05:00
Hans Goudey
fdc367f842 Cleanup: Use Vector instead of linked list for data-block sorting utility 2024-02-22 15:34:21 -05:00
Bastien Montagne
b42dc08452 Merge branch 'blender-v4.1-release' 2024-02-22 19:56:59 +01:00
Bastien Montagne
1dca5af712 Core: Libraries: Fix library parenting when libraries are deleted.
So far, when deleting a library (either explicitely, or through e.g.
relocation), its dependencies would get a `nullptr` parent, and
therefore become 'directly used' libraries.

This commit adds a new util to rebuild the libraries hieararchy, and
calls it when a Library ID is deleted.

NOTE: While logic is somewhat similar to what liboverride resync does to
sort the libraries by indirect levels
(`lib_override_libraries_index_define`), there are some key differences
here, notably the fact that if a library has a valid `parent` pointer,
it is not replaced, even if a 'better' parent (less indirect library)
could be found.
2024-02-22 19:25:59 +01:00
Hans Goudey
c78d668f17 Cleanup: Simplify iteration of corners in face in one case
No need to reconstruct the IndexRange. Also use the more
standard name "corner".
2024-02-22 12:59:06 -05:00
Sean Kim
41cfb379af Cleanup: Remove unused SCULPT_OT_set_detail_size operator
This PR removes the unused `SCULPT_OT_set_detail_size` operator and related code.

Addresses cleanup of #108111 now that #118403 is merged in.

Pull Request: https://projects.blender.org/blender/blender/pulls/118591
2024-02-22 18:20:16 +01:00
Weizhen Huang
a3f0ff6184 Cycles: make Principled Hair Huang a near- and far-field model
for a camera ray, compute the actual range of the hair width that the
current pixel covers, and only integrate that subset, to prevent a
ribbon-like appearance in close-up looks.
When the hair covers less than one pixel on the screen or when the ray
is not camera ray, the model works the same as before.

Pull Request: https://projects.blender.org/blender/blender/pulls/116094
2024-02-22 18:18:14 +01:00
Jeroen Bakker
17842d4d40 Fix: CustomData crash in debug builds with empty name
Due to a recent change the name of a layer is passed using a string ref
but the check if it is filled was done by checking if the first char
was zero. This fails as string ref first does the bound checks.

This is fixed by using `!is_empty()`. There might be more places, but this
one fired when loading production files.

Issue introduced by a39e8a4ab9

Pull Request: https://projects.blender.org/blender/blender/pulls/118605
2024-02-22 18:01:06 +01:00
Hans Goudey
77cba3d551 Geometry Nodes: Sample grid node
This simple node finds the values of a volume grid at
positions in the local space used in geometry nodes
evaluation. There are three interpolation modes to
choose how to mix values between neighboring voxels.

For the implementation, first the values are sampled
with the grid's type directly, then implicit type conversions
are used to get the final type. This makes gives us flexibility
in case there aren't exact matches in support between grid
types and Blender types.

Pull Request: https://projects.blender.org/blender/blender/pulls/118397
2024-02-22 17:58:09 +01:00
Hans Goudey
6099252dd4 Instances: Move transforms to attribute
Similar to 2e6223d90f, but potentially 16 times more effective.
The new attribute is named "instance_transform". It isn't displayed in the
spreadsheet since that wouldn't really be useful. This simplifies a lot of
code since it doesn't have to handle transforms specially anymore. But
complexity is added in the store named attribute node and attribute input
node to keep the old "position" attribute working for compatibility.

Pull Request: https://projects.blender.org/blender/blender/pulls/118531
2024-02-22 17:57:09 +01:00
Richard Antalik
d4925b9775 Cleanup: Refactor VSE movie loading
Original code was very confusing, with seemingly indecisive logic.
I hope, that it is less confusing now, however there is still some
indecisiveness present. This is because multiview configuration may not
be correct, so there must be fallback and only some multiview settings
require loading of multiple files. Perhaps be better wording could be
used for `open_anim_file_multiview()`.
Fortunately this is now expressed within 5 lines of code instead of 100.

Further this can be improved by checking if the file exists, since now
VSE crashes when right eye image is missing, because loading code
does not try to actually open the file.

Pull Request: https://projects.blender.org/blender/blender/pulls/118580
2024-02-22 17:48:40 +01:00
Brecht Van Lommel
624e0b1519 Merge branch 'blender-v4.1-release' into main 2024-02-22 15:12:40 +01:00
Bastien Montagne
f15f57c5ea GPv3: Add layer 'pass_index' attribute.
Add this data as a layer attribute. It's usage was already implemented
by the modifier filtering generic code, but data itself did not yet
exist in GPv3 data.

Also add RNA accessors and handle it in conversion code.

Pull Request: https://projects.blender.org/blender/blender/pulls/118495
2024-02-22 14:53:48 +01:00
Christoph Lendenfeld
a102d3e454 Fix #99635: Make last frame of motion path range inclusive
The issue described was that the motion path didn't display the last frame
of a scene.

This PR makes the user facing motion path range inclusive on both ends.
E.g. when the user specifies a motion path from 1-24 the will now get all 24
frames, whereas previously the motion path would end at frame 23.

This also makes the `Scene Frame Range` option work properly since that
had the same issue. Now it displays the actual full scene range.

Internally, the `bMotionPath` is still exclusive on the upper bound.
It is just the `bAnimVizSettings` range that has been modified.

Pull Request: https://projects.blender.org/blender/blender/pulls/118611
2024-02-22 14:44:26 +01:00
Sergey Sharybin
e3b9ccc7b2 Merge branch 'blender-v4.1-release' 2024-02-22 14:43:01 +01:00
Jacques Lucke
e2d809fa91 Fix: show invalid links when separate group input nodes have different linked menu items
Previously, these invalid links would not show as invalid even though they don't work.

Pull Request: https://projects.blender.org/blender/blender/pulls/118610
2024-02-22 14:40:21 +01:00
Brecht Van Lommel
056becae8a Merge branch 'blender-v4.1-release' into main 2024-02-22 14:36:13 +01:00
Sebastian Parborg
8aed44471e Merge branch 'blender-v4.1-release' 2024-02-22 14:28:04 +01:00
Jeroen Bakker
5a4877bbdd EEVEE-Next: Update reflection probes when resolution changes
When the resolution of the reflection probes changes the change
was only applied when the reflection probes where updated. To improve
the workflow this change will tag the reflection probes when the
resolution is modified.

Pull Request: https://projects.blender.org/blender/blender/pulls/118607
2024-02-22 14:26:40 +01:00
Brecht Van Lommel
8dfb87d1af Fix: Update tests data path to new directory 2024-02-22 14:25:54 +01:00
Sebastian Parborg
b5c8505f5a Fix: Always print warnings when file/folder renaming fails
Rewrite the code so that users get an error message when trying to
rename something to an existing file in the file browser. Before this
change Blender would not print any notifications on why the rename
failed if a file with the same name already existed.

Pull Request: https://projects.blender.org/blender/blender/pulls/118571
2024-02-22 14:24:33 +01:00
Sebastian Parborg
b4610f8fc0 Fix #116049, #117754: Renaming fails on linux with certain filesystems
Not all filesystems on linux supports the RENAME_NOREPLACE flag.
If we get a EINVAL return value, retry with a non atomic operation.

RENAME_NOREPLACE was introduced in 050d48edfc, so this is a regression
fix as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/118571
2024-02-22 14:23:54 +01:00
Sergey Sharybin
396348eea9 Merge branch 'blender-v4.1-release' 2024-02-22 13:51:48 +01:00
Sergey Sharybin
3dc832a904 Switch SVN to Git submodules using Git-LFS
This change makes it so build system and update utilities for Blender builds
are using pre-compiled libraries and other resources attached as Git modules
instead of using checkout of SVN repositories in the parent folder.

The directory layout:
```
  * release/datafiles/
    * assets/        -> blender-assets.git
      * publish/
      * ...
      * README.txt
  * lib/
    * darwin_x64/    -> lib-darwin_x64.git
    * darwin_arm64/  -> lib-darwin_arm64.git
    * linux_x64/     -> lib-linux_x64.git
    * windows_x64/   -> lib-windows_x64.git
  * tests/
    * data/         -> blender-test-data.git
```

The changes about configuring the actual Git sub-modules are not included
into this patch, as those require repository to actually exist before it
can be used.

The assets submodule is enabled by default, and the rest of them are
disabled. This means that if someone runs `git submodule update --init`
they will not get heavy libraries. The platform-specific and tests
related submodules are enabled when using `make update` or `make test`.

All the submodules are tracked: this means that when new commits are
done to the submodule, the blender.git repository is to be updated to
point them to the new hash. This causes some extra manual work, but it
allows to more easily update Blender and its dependencies to known good
state when performing operations like bisect.

Ref #108978

Pull Request: https://projects.blender.org/blender/blender/pulls/117946
2024-02-22 13:50:55 +01:00
Jacques Lucke
50709ca253 BLI: add named constructors for IndexRange
Unless you're very familiar with `IndexRange`, it's often hard to know what
e.g. `IndexRange(10, 15)` means. Without more context, one could think
that it means `10-14`, `10-15` or `10-24`. This patch adds named constructors
to `IndexRange` to make the behavior more obvious when writing and when
reading the code. With those one can use `IndexRange::from_begin_end(10, 15)`,
`IndexRange::from_begin_end_inclusive(10, 15)` or `IndexRange::from_begin_size(10, 15)`
respectively. While being a bit more verbose, the explicitness makes code easier to
understand and also allows abstracting away some common index computations.

The old unnamed constructor that takes a begin and size is not removed by this patch,
as that would make the patch significantly bigger. I think it's reasonable to generally
use the named constructors going forward and to change the existing usages of the
old constructor over time.

Pull Request: https://projects.blender.org/blender/blender/pulls/118606
2024-02-22 12:57:10 +01:00