Commit Graph

124635 Commits

Author SHA1 Message Date
Campbell Barton
64aa96d421 Fix failure to paste material color alpha & paste line-art
Error in [0] excluded these members from pasting.

[0]: 5177e2f20b
2023-06-02 13:50:14 +10:00
Campbell Barton
168b66461d Merge branch 'blender-v3.6-release' 2023-06-02 13:39:22 +10:00
Campbell Barton
eae85468ee Merge branch 'blender-v3.6-release' 2023-06-02 13:39:20 +10:00
Campbell Barton
07371c772b Merge branch 'blender-v3.6-release' 2023-06-02 13:39:17 +10:00
Campbell Barton
6325673a0a Merge branch 'blender-v3.6-release' 2023-06-02 13:39:15 +10:00
Campbell Barton
d0a8e23cd4 Merge branch 'blender-v3.6-release' 2023-06-02 13:39:11 +10:00
Campbell Barton
12240499ac Fix/workaround crash pasting MTex
Pasting MTex referenced Texture & Object data-blocks without any
check for their validity.

This isn't ideal as it doesn't handle re-allocated ID's,
it just prevents a crash referencing freed data-blocks.
2023-06-02 13:37:58 +10:00
Campbell Barton
58a08f9ea1 Cleanup: use local utility functions for clipboard file-paths
Also rename pose paste `tmp_bmain` to match the name used in copying.
2023-06-02 12:46:58 +10:00
Germano Cavalcante
c2846f6b81 Transform: Remove 'Resize' fallback from 'Shrink/Fatten'
There are no relevant functional changes.

This commit removes the `Resize` fallback from `Shrink/Fatten`
operation.

This fallback is supposedly executed when the operation is called in a
mode other than mesh editing.

But even the `poll` of the `transform.shrink_fatten` operator restricts
its operation only for edit mode.

Furthermore, the fallback scenario is hardly encountered. To trigger
the fallback, the user would need to explicitly define, in the global
keymap, the `transform.transform` operator with the `Shrink/Fatten`
mode on and call it in a mode other than mesh editing.
(Although `transform.resize` could be used instead).

Therefore, considering the lack of benefits in using this resource, it
is better to remove it and prevent its use. Thus, simplifying the code.
2023-06-01 23:31:55 -03:00
Campbell Barton
118a47b7f6 Cleanup: quiet warnings
Resolve undeclared function & dangling reference warning.
2023-06-02 12:21:56 +10:00
Campbell Barton
5177e2f20b Fix #108495: Pasting a material crashes
References to data-blocks in a material were stored in-memory and could
crash if the data-blocks referenced by the material no longer existed
when pasting.

Resolve by using a blend-file for material copy/paste, matching how the
clipboard works in the 3D view-port.

Currently there is no support for including indirectly linked
data-blocks when pasting the material. Instead, data-blocks are restored
by name, by inspecting the current file.

This also fixes a crash where the `SpaceNode::nodetree` could point to
freed memory when pasting a material.

Ref !108496.

Includes contributions by @mont29.
2023-06-02 10:16:30 +10:00
Campbell Barton
9b97123bf9 Cleanup: spelling in comments, odd comment block spacing 2023-06-02 10:16:16 +10:00
Campbell Barton
f47aa50d7e Cleanup: format 2023-06-02 10:16:14 +10:00
Harley Acheson
7372b3bdda Fix Build Warning of Unused Function
My prior commit omitted the assignment of an operator callback setting
a custom description.

Introduced in #104678
2023-06-01 09:50:27 -07:00
Julian Eisel
83047bed26 Correction to b1b8091667: Use utility function
Avoid duplicated query.
2023-06-01 17:54:24 +02:00
Harley Acheson
a58e5ccdec UI: File Save Incremental Operator
Operator for the TopBar File Menu that saves the currently open file
with a numerically incremented name.

Pull Request: https://projects.blender.org/blender/blender/pulls/104678
2023-06-01 17:34:57 +02:00
Julian Eisel
b1b8091667 Fix 106976: Crash when setting custom asset preview
When the temporary File Browser uses a maximized editor, it reuses the
File/Asset Browser under the cursor. When the file browsing action is
confirmed, the old editor state is restored but the file-list cleared,
so it fails to find the active asset and the ID it represents in
context.

Work around this by getting the ID before spawning the File Browser from
the operator.
2023-06-01 17:32:27 +02:00
Ray Molenkamp
35ca8bd80f Merge branch 'main' of projects.blender.org:blender/blender into main 2023-06-01 09:12:43 -06:00
Ray Molenkamp
82d3bf01d4 Deps_builder: Fix USD debug build on windows
Two issues there

- it was picking up release mode libs for oiio/tbb
- TBB had both debug and release libs in a variable that should only
have a single library causing a cmake error.
2023-06-01 09:12:18 -06:00
Falk David
612f6fd8d3 Add credit for static data
Credit the author of the default grease pencil Suzanne.
2023-06-01 17:12:18 +02:00
Falk David
7e115a056e Cleanup 2023-06-01 17:09:57 +02:00
Nate Rupsis
b95cf5ff0f Animation: Update NLA "TAB" tweak mode to be full stack evaluation
This PR updates the key mapping (TAB) for Tweak mode (Lower stack) to Full stack for the NLA editor

[Issue](https://projects.blender.org/blender/blender/issues/108026)

Pull Request: https://projects.blender.org/blender/blender/pulls/108050
2023-06-01 11:03:13 -04:00
YimingWu
95f1d8289c GPv3: "Add Suzanne" option in Add operator
This patch moves the "Add Suzanne" option to the new data structure.

Pull Request: https://projects.blender.org/blender/blender/pulls/108503
2023-06-01 16:39:47 +02:00
Julian Eisel
c08282f468 Fix invalid UI panel bit-flag value
These bit-flags were passed around in `short`s which can hold 16 bits
usually, but the enum defined 17 flags.
2023-06-01 16:03:55 +02:00
Hans Goudey
9e9e0bf6d0 Geometry Nodes: Copy no loose vert/edge status in delete geometry node
When the loose edge and vertex status are cached in the source mesh and
the combination of selection domain and mode don't add loose elements,
copy the cache status to avoid recomputation. In a test with a 1 million
face grid:
- All: 23 -> 30 FPS
- Only faces: 22 -> 23.5 FPS
- Only edges and faces: 24 -> 27 FPS

Also remove unnecessary includes and fix a build error introduced in
the last commit to this area from an inconsistent forward declaration.
2023-06-01 10:02:37 -04:00
Jason Fielder
3788f70647 Fix #107704: Release infrequently used memory in Metal buffer pools
Excessive memory pool bloating could occur for certain workloads in
Metal. Particularly those which continuously allocate increasingly
large buffers with minimal re-use of existing buffers.

New logic added to the memory pool flushes old buffers if they
have not been used for a set period of time. Timing is calibrated
against system resources and overall memory pressure.

Metal memory pressure will run higher than OpenGL, however,
this is an active decision to provide significant performance
improvements for scenarios which allocate lots of memory and
for keeping frames queued in flight without stalling on pending
GPU work.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/108083
2023-06-01 15:48:30 +02:00
Jason Fielder
361b42d526 Fix #107766: Resolve Metal texutre usage issue for GreasePencil fill
Certain textures require explicit HOST READ support for reading
data back to CPU. Given the compute based texture read path may
be used for this, if format conversion is required, this flag should
also imply general texture read support.

This resolves a bug with GreasePencil fill which relies on this.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/108463
2023-06-01 15:44:18 +02:00
Jason Fielder
c3f7b723b2 Fix #108500: Resolve Metal line loop emulation for armature limits
Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/108512
2023-06-01 15:41:25 +02:00
Nathan Vegdahl
355f4164b6 Fix: action's actual users and recorded user count could diverge
The user count decrement and unassigning the action were split
between two different conditionals, which weren't guaranteed
to both execute/not-execute together.
2023-06-01 15:04:19 +02:00
Christoph Lendenfeld
98d48c16a3 Paint: Add loop select for faces
Add loop selection identical to the behavior of ALT+Click in Edit Mode.

* ALT click: select loop
* ALT Shift click: add loop while retaining current selection
* ALT Shift Ctrl click: deselect loop

Pull Request: https://projects.blender.org/blender/blender/pulls/107653
2023-06-01 14:58:58 +02:00
Hans Goudey
50bfe1dfe3 Geometry Nodes: Rewrite mesh delete geometry node
Replace the implementation of the separate and delete geometry nodes
for meshes. The new code makes more use of the `IndexMask` class, which
was recently optimized. The main goal is to make more of the work scale
with the size of the result mesh rather than the input. For example,
instead of keeping a map from input to output elements, the maps used
to copy attributes go from output to input elements.

The new implementation is generally 2-4x faster, depending on the mode
and the number of elements selected. The new code is also able to skip
more work when nothing is removed.

This also allows using more existing attribute interpolation code,
allowing the overall removal of over 300 lines. Some of the attribute
utilities from a similar change for curves (f63cfd8e28) are
reused directly.

The indices of the result changes, so the test file needs to be updated.

Pull Request: https://projects.blender.org/blender/blender/pulls/108435
2023-06-01 14:55:21 +02:00
Hans Goudey
c5694fdf10 Cleanup: Use unique_ptr, references for UV aabb islands
Using unique_ptr is typically the better practice since it makes memory
management automatic and makes ownership clear. Also use references
when retrieving items from the span, and don't unnecessarily specify
specific lambda captures.

Pull Request: https://projects.blender.org/blender/blender/pulls/108510
2023-06-01 14:13:28 +02:00
Almaz Shinbay
8374208a57 Outliner: Port curve elements to new tree-element code design
No user visible changes expected.

Part of #96713, continuation of work started in 249e4df110 and 2e221de4ce.
Refer to these for a motivation and design overview.

Adds a new tree-element class for curve IDs.

Pull Request: https://projects.blender.org/blender/blender/pulls/108498
2023-06-01 12:43:59 +02:00
guishe
f957fd227e Fix: Avoid windows.h min/max macro definition in BLI_winstuff.h
When moving io_allembic to c++, the compiler would throw the error
`type "unknown-type" unexpected`.

Pull Request: https://projects.blender.org/blender/blender/pulls/108471
2023-06-01 12:26:34 +02:00
Jacques Lucke
cf959c1a90 Fix: remove materials from simulation state in all cases
This was somewhat inconsistent before where materials sometimes worked
and sometimes did not (#108178). There is a design task for supporting materials
properly: #108410.

Pull Request: https://projects.blender.org/blender/blender/pulls/108411
2023-06-01 12:11:10 +02:00
Campbell Barton
d3e5c1bfa6 Merge branch 'blender-v3.6-release' 2023-06-01 18:15:36 +10:00
RedMser
6bea428b7f UI: Incorrect add-ons button label in preferences
"Remove addon" button was in the row labeled "Internet", which is
misleading when no documentation buttons appears in the same row.

Now a separate row is created instead.

Ref !108429.
2023-06-01 18:14:34 +10:00
Campbell Barton
532560eba3 Merge branch 'blender-v3.6-release' 2023-06-01 17:03:49 +10:00
Campbell Barton
db1344530f Cleanup: unused argument warning 2023-06-01 16:33:10 +10:00
Chris Blackbourn
63f2114759 Merge branch 'blender-v3.6-release' 2023-06-01 11:53:58 +12:00
Chris Blackbourn
f87f119c2f UV: Update ui for the uv pack islands operator
Reorder options and improve naming for UV Pack Islands

Update names of constants to match names in the UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/108253
2023-06-01 01:45:07 +02:00
Chris Blackbourn
69ae7500d0 Merge branch 'blender-v3.6-release' 2023-06-01 11:34:47 +12:00
Chris Blackbourn
f78d1fd114 Fix memory leak during uv packing
Regression from [0].

[0]: 91020ccde1
2023-06-01 11:29:06 +12:00
Iliya Katueshenock
a63c0a8fca Fix: Crash in 2.8 versioning after recent cleanup
Fix a mistake in 30a25a42e6.

Pull Request: https://projects.blender.org/blender/blender/pulls/108476
2023-05-31 19:12:06 +02:00
Almaz Shinbay
f63c3075cb Outliner: Port mesh elements to new tree-element code design
No user visible changes expected.

Part of #96713, continuation of work started in 249e4df110 and 2e221de4ce.
Refer to these for a motivation and design overview.

Adds a new tree-element class for mesh IDs.

Pull Request: https://projects.blender.org/blender/blender/pulls/108437
2023-05-31 18:43:46 +02:00
Falk David
b14cdb440a GPv3: Add operator to create new grease pencil object
This adds the operator `OBJECT_OT_grease_pencil_add` to create a new grease pencil object.

Currently it supports the `EMPTY` and `STROKE` type.
This also replaces the add menu for the legacy grease pencil type in the Shift+A menu when the experimental option is enabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/108462
2023-05-31 18:00:26 +02:00
Miguel Pozo
4808856dc2 Draw: Fix: Clear layer_views_ on Texture::free() 2023-05-31 17:54:29 +02:00
Falk David
e18325b2b9 GPencil: Fix memory leak when creating layers
Use `MEM_new` and `MEM_delete` to allocate and free the memory.
2023-05-31 17:37:54 +02:00
Julian Eisel
06be652055 Cleanup: Clang-format 2023-05-31 17:18:20 +02:00
Hans Goudey
49b48209e7 BLI: Improve IndexMask::complement() performance
IndexMask::complement() is often used in geometry processing
algorithms when a selection needs to be inverted, mostly just in
curves code so far.

Instead of reusing `from_predicate` and lookup in the source mask,
scan the mask once, inserting segments between the original indices.

Theoretically this improves the performance from O(N*log(N)) to O(N).
But with the small constant offset of the former, the improvement is
generally just 3-4 times faster. However in some cases like empty
and full masks, the new code takes constant time.

![image](/attachments/d2f6b0be-f195-4206-9bf4-c0ab20041d1b)

Pull Request: https://projects.blender.org/blender/blender/pulls/108331
2023-05-31 17:11:04 +02:00