124236 Commits

Author SHA1 Message Date
Campbell Barton
7fbac7e235 UI: set the waiting cursor from pack/unpack operators
Remove the guimode argument which used to set the cursor back in v2.4x.
2023-05-23 11:58:20 +10:00
Campbell Barton
ad87bf3dc7 Cleanup: spelling, wording improvements 2023-05-23 11:50:34 +10:00
Campbell Barton
63074dddb1 Merge branch 'blender-v3.6-release' 2023-05-23 11:34:50 +10:00
Campbell Barton
bceb1adb20 Fix potential buffer overflow in AssetList::setup
While in practice an overflow seems unlikely in this particular case,
internal path manipulation assume FILE_MAX_LIBEXTRA so passing in
smaller buffer sizes is error prone.
2023-05-23 11:30:52 +10:00
Campbell Barton
5659e83e04 Cleanup: remove incorrect use of the r_ prefix, use sized argument
Rename `r_dir` to `dirpath` as this isn't a return only argument.
Also add the maximum size in the argument as a hint for the maximum size.
2023-05-23 11:21:02 +10:00
Campbell Barton
c440efb23a Fix invalid buffer size used in ED_asset_handle_get_full_library_path
Relatively harmless as the length was shorter, however all callers
used the larger size.
2023-05-23 10:56:22 +10:00
Campbell Barton
6ac6e63eaf Merge branch 'blender-v3.6-release' 2023-05-23 10:52:24 +10:00
Campbell Barton
93ca0444f3 Fix #108129: exception editing custom properties
Regression in [0], caused by the sub-type enum not containing NONE.

[0]: 6e2721da303455b57e3a313fd7905fc37d6f3708
2023-05-23 10:50:36 +10:00
Campbell Barton
2c1338f67b Merge branch 'blender-v3.6-release' 2023-05-23 10:19:09 +10:00
Campbell Barton
7d682fa107 Fix missing include 2023-05-23 10:18:02 +10:00
Daniel Salazar
c06e8f6549 UI: Change tooltip for edit mode display shapekey
Change terminology from Apply to Display.
Apply suggests a destructive change to
the base mesh.

Display is also used in modifiers.
2023-05-22 17:15:38 -06:00
Daniel Salazar
6609ca4593 UI: Shapekey pin tooltip change
Use correct terminology "value" vs strength
2023-05-22 16:45:53 -06:00
Chris Blackbourn
f85fb56a4a Merge branch 'blender-v3.6-release' 2023-05-23 09:41:01 +12:00
Chris Blackbourn
43fe7bec4f Cleanup: format 2023-05-23 09:38:47 +12:00
Chris Blackbourn
a569344a81 Fix: Build error from ae9ac99d2b93 2023-05-23 09:38:07 +12:00
Chris Blackbourn
ae9ac99d2b Fix #108117: Crash in uv editor with hidden geometry
Many "UV island" style operations internally use #UvElementMap, including:

- Transform tools
- Smart-Stitch
- UV Pinch, UV Grab and UV Relax sculpt tools.

Normally, every UV in the mesh is included in the #UvElementMap.
However, with hidden geometry, only the visible geometry is included in the map. [0]
This change enforces stricter usage, reducing the chance of crashes in other areas.

Regression from [0] which was a fix for "UV Island calculation doesn't ignore hidden faces" [1].

[0]: 8f543a73abc42843fb924fc6d849e3055e3ae011
[1]: #99659

Pull Request: https://projects.blender.org/blender/blender/pulls/108130
2023-05-22 23:23:23 +02:00
Jason Fielder
ae405639e7 Metal: Stencil texture view support
Adds stencil texture view support for Metal, allowing reading of
stencil component during texture sample/read.

Stencil view creation refactored to use additional parameter in
textureview creation function, due to deferred stencil parameter
causing double texture view creation in Metal, when this should
ideally be provided upfront.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/107971
2023-05-22 20:40:38 +02:00
Bastien Montagne
5eab240f7f Merge branch 'blender-v3.6-release' 2023-05-22 18:53:56 +02:00
Bastien Montagne
e25d58a866 I18n: Updated UI translations from SVN trunk (r6538). 2023-05-22 18:52:33 +02:00
Bastien Montagne
c93bb9f323 LibOverride: Minor improvement to recent liboverride API changes.
Avoid two GHash lookups when deleting an override property by its RNA
path.
2023-05-22 17:15:13 +02:00
Brecht Van Lommel
7d416ece82 Cleanup: fix compiler warnings 2023-05-22 17:08:50 +02:00
Nate Rupsis
f9ec539a51 Merge branch 'blender-v3.6-release' 2023-05-22 10:55:21 -04:00
Nate Rupsis
24ca886ac0 Revert "Animation: Update NLA "TAB" tweak mode to be full stack evaluation"
This reverts commit 0f67ac45471d51521a21b66a3f87f81aef35d96d.
2023-05-22 10:54:57 -04:00
Sebastian Herholz
8d17458569 Cycles: Path Guiding: Adding guiding on glossy surfaces via RIS
Pull Request: https://projects.blender.org/blender/blender/pulls/107782
2023-05-22 16:47:05 +02:00
Xavier Hallade
6cce149144 Merge branch 'blender-v3.6-release' 2023-05-22 15:27:55 +02:00
Xavier Hallade
23de320878 Cycles: fix multi-device rendering with oneAPI and Hardware Raytracing
Only Embree CPU BVH was built in the multi-device case. However, one
Embree GPU BVH is needed per GPU, so we now reuse the same logic as in
the other backends.

Pull Request: https://projects.blender.org/blender/blender/pulls/107992
2023-05-22 15:26:58 +02:00
Philipp Oeser
7b818e7bcb Merge branch 'blender-v3.6-release' 2023-05-22 15:25:35 +02:00
Philipp Oeser
adb36b89c7 Fix #107988: Spreadsheet not updating when playing animation
Similar to other screen options, add one for Spreadsheet editors that
makes them update when playing animation.

NOTE: there are some editors that always update when playback was
invoked from an animation editor while others only do this when their
respective option is specifically set (think the later behavior fits the
spreadsheet better).

Pull Request: #108002
2023-05-22 15:15:22 +02:00
Jacques Lucke
e70051ae3d Merge branch 'blender-v3.6-release' 2023-05-22 14:02:28 +02:00
Jacques Lucke
9692262b9d Fix #108122: onion skin disappears after scrubbing timeline
This was broken in 037b3f87bd58e003d8fe8ca725dfa59969657e6c.
2023-05-22 14:01:14 +02:00
Jeroen Bakker
2164515fab DrawManager: Fix Incorrect Resource Binding Hair/Curves
In the DrawManager a dummy texture was attached to the a, au, c, ac
binding points. In the shader those binding points are actual texture
buffers.

The reason for the dummy texture was to work around some OpenGL driver
bugs. In Vulkan (and expected also in Metal) it is not allowed to attach
a texture as a texel buffer. Fixing this would require copying buffers into a
buffer during binding.

This patch will remove the binding of the textures and use the vbos
instead. Also it fixes an issue where a platform does support compute
shaders, but don't support transform feedback. This is currently the
case for the Vulkan backend.

Pull Request: https://projects.blender.org/blender/blender/pulls/108139
2023-05-22 12:59:09 +02:00
Damien Picard
b9049411a8 I18n: disambiguate more "A" and "B" messages
In dd32dac60f, the "A" and "B" input socket from the Mix node were
disambiguated, so as not to confuse them with Alpha and Blue.

These messages are used in other nodes and elsewhere in the same
sense, so this commit adds translation contexts to these occurrences
as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/108051
2023-05-22 12:54:39 +02:00
Bastien Montagne
1ab265f535 Merge branch 'blender-v3.6-release' 2023-05-22 12:07:08 +02:00
Damien Picard
94fd2efc96 Cleanup: remove translation headers from node files
After 22f641e7f8, translation macros were removed and thus in many
files inclusion of the translation header is no longer needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/107986
2023-05-22 12:06:46 +02:00
Damien Picard
0af41365e6 Cleanup: remove translation headers from node files
After 22f641e7f8, translation macros were removed and thus in many
files inclusion of the translation header is no longer needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/107986
2023-05-22 12:05:39 +02:00
Damien Picard
60ac9ab7a1 Fix: I18n: Vector Math node label translation function
The Vector Math node's label has a special function used to compute
its label based on the currently selected operation. This operation,
like that of the Math node, is extracted using the "NodeTree"
translation context.

Therefore, in this function it must also use the same context to
translate the label.

In addition, a few node types can have an "Unknown" label if there is
a problem with their internal state (operation, filter type, blending
type). This message can also be translated.

Pull Request: https://projects.blender.org/blender/blender/pulls/108029
2023-05-22 12:04:29 +02:00
Bastien Montagne
1277f7a476 Merge branch 'blender-v3.6-release' 2023-05-22 12:01:45 +02:00
Damien Picard
94934301e9 I18n: Add translation contexts to properties declared from Python
Some property labels need a context to disambiguate them from others
which have the same name.

The only way to show the proper text currently for such properties is
to override it in the UI code with a translation context, like:

```python
    layout.prop(obj, "area", text="Area",
                context=i18n_contexts.amount)
```

Python properties already store a translation context though, but this
context cannot be chosen from a Python script.

For instance, typing:

```python
bpy.types.Scene.test_area = bpy.props.BoolProperty(name="Area")
print(bpy.context.scene.bl_rna.properties['test_area'].translation_context)
```

will print `*`, the default context for Python props.

This commit allows specifying a context in this manner:

```python
from bpy.app.translations import contexts as i18n_contexts
bpy.types.Scene.test_number_area = bpy.props.BoolProperty(
    name="Area", translation_context=i18n_contexts.amount
)
print(bpy.context.scene.bl_rna.properties['test_number_area'].translation_context)
```

will now print `Amount` and can be translated differently from other
labels. In this instance, the word for a surface area measurement,
instead of a UI area.

-----

This is what translated properties look like using the existing ("Area", "") and ("Area", "Amount") messages:
![python_prop_contexts_test.png](/attachments/b0d9737e-4b31-4c91-a08e-b347db31225f)

The panel can be generated with this script:
[python_prop_contexts_test.py](/attachments/ab613cdc-8eba-46bc-8f3c-ad0a97e7a6e5)

Pull Request: https://projects.blender.org/blender/blender/pulls/107150
2023-05-22 11:41:48 +02:00
Damien Picard
2decfe4f00 I18n: Add translation contexts to properties declared from Python
Some property labels need a context to disambiguate them from others
which have the same name.

The only way to show the proper text currently for such properties is
to override it in the UI code with a translation context, like:

```python
    layout.prop(obj, "area", text="Area",
                context=i18n_contexts.amount)
```

Python properties already store a translation context though, but this
context cannot be chosen from a Python script.

For instance, typing:

```python
bpy.types.Scene.test_area = bpy.props.BoolProperty(name="Area")
print(bpy.context.scene.bl_rna.properties['test_area'].translation_context)
```

will print `*`, the default context for Python props.

This commit allows specifying a context in this manner:

```python
from bpy.app.translations import contexts as i18n_contexts
bpy.types.Scene.test_number_area = bpy.props.BoolProperty(
    name="Area", translation_context=i18n_contexts.amount
)
print(bpy.context.scene.bl_rna.properties['test_number_area'].translation_context)
```

will now print `Amount` and can be translated differently from other
labels. In this instance, the word for a surface area measurement,
instead of a UI area.

-----

This is what translated properties look like using the existing ("Area", "") and ("Area", "Amount") messages:
![python_prop_contexts_test.png](/attachments/b0d9737e-4b31-4c91-a08e-b347db31225f)

The panel can be generated with this script:
[python_prop_contexts_test.py](/attachments/ab613cdc-8eba-46bc-8f3c-ad0a97e7a6e5)

Pull Request: https://projects.blender.org/blender/blender/pulls/107150
2023-05-22 11:38:51 +02:00
Damien Picard
e718f29ec3 I18n: fix node socket extraction regexes
The node socket extraction regexes introduced in 6d39ba7b41 suffered
from two issues:

1. the contextless name extraction would also extract socket names
   which did have a context. To solve, this, use a negative lookahead
   at the end of the regex, containing ".translation_context(".
2. the number of characters in a message was limited to 1, because the
   _str_base component would match one or more chars after the first
   one, while it should have matched zero or more.

This last issues existed before, and the fix allows the extraction of
three new messages.

Pull Request: https://projects.blender.org/blender/blender/pulls/108052
2023-05-22 11:36:59 +02:00
Bastien Montagne
a440386654 Merge branch 'blender-v3.6-release' 2023-05-22 11:18:37 +02:00
PaulKristoffersson
b7a71d65f8 Fix Estonian language name from #105461
Pull Request: https://projects.blender.org/blender/blender/pulls/108042
2023-05-22 11:13:55 +02:00
PaulKristoffersson
963c4a8baa Fix Estonian language name from #105461
Pull Request: https://projects.blender.org/blender/blender/pulls/108042
2023-05-22 11:10:14 +02:00
Sergey Sharybin
eb3e32b653 Fix #108136: Regression : Texture paint is broken
Mistake in the 406cfd214a which was calculating the offset wrongly.

Pull Request: https://projects.blender.org/blender/blender/pulls/108138
2023-05-22 10:45:15 +02:00
Sybren A. Stüvel
7a06588f05 Fix #102662: NLA-Strip Corrupted after reopening file w/ lib override
Mark `NlaStrip.frame_{start,end}` and `NlaStrip.frame_{start,end}_ui` as
to-be-ignored for the library override system, and add a new set of RNA
properties `frame_{start,end}_raw` that the library override system can
use.

Versioning code ensures that overrides on `frame_{start,end}` are
altered to be applied to the `..._raw` counterpart instead.

The override system uses RNA to update properties one-by-one, and the
RNA code trying its best to keep things consistent / valid. This is very
much desired behaviour while a human is editing the data.

However, when the library override system is doing this, it is not
replaying the individual steps (that each end in a valid configuration),
but just setting each property one by one. As a result, the intermediate
state can be invalid (for example moving one strip into another) even
when the end result is perfectly fine.

This is what the `..._raw` properties do -- they set the values without
doing any validation, so they allow the library overrides system to move
strips around.

This assumes that the result of the override is still valid. Logic to
detect invalid situations, and reshuffle the NLA strips if necessary, is
left for a future commit as it is related to #107990 (NLA Vertical
Reorder).

Additionally, this commit adds functions
`BKE_lib_override_library_property_rna_path_change()` and
`BKE_lib_override_library_property_search_and_delete()` to the library
override API. The former is used to change RNA paths of property
overrides, and the latter is used to remove a property override
identified by its RNA path.
2023-05-22 10:36:50 +02:00
Xavier Hallade
7f4aa0b553 Merge branch 'blender-v3.6-release' 2023-05-22 10:17:40 +02:00
Xavier Hallade
3695f0dffc Cycles: fix device settings update for Multi-device
Hardware Raytracing wasn't properly disabled or enabled in the
subdevices of the multi-device.

This construct:
foreach ( DeviceInfo &info,
  (device.multi_devices.size() != 0 ?
    device.multi_devices : vector<DeviceInfo>({device}))
)
was a nice trap - it was giving a copy to iterate on.

Pull Request: https://projects.blender.org/blender/blender/pulls/107989
2023-05-22 10:14:35 +02:00
Jacques Lucke
64c33871bd Cleanup: add missing inline
This is necessary for correctness of the code to avoid duplicate symbols.
In practice, this wasn't necessary yet, because usually we pass lambdas
into these functions which cause every instantiation to have a different
signature.
2023-05-22 09:32:35 +02:00
Jacques Lucke
7725bacd6a BLI: support aligned parallel reduce
Alignment here means that the size of the range passed into callback
is a multiple of the alignment value (which has to be a power of two).
This can help with performance when loops in the callback are are
unrolled and/or vectorized. Otherwise, it can potentially reduce
performance by splitting work into more unequally sized chunks.
For example, chunk sizes might be 4 and 8 instead of 6 and 6 when
alignment is 4.
2023-05-22 09:30:51 +02:00
Jacques Lucke
3895261454 BLI: add size_in_bytes method to MutableSpan 2023-05-22 09:25:25 +02:00