Commit Graph

111099 Commits

Author SHA1 Message Date
Jacques Lucke d19443074a Fix (unreported): off-by-one error when setting curve handles
The problem is that `current_mask` can become `selection.size()`.
The loop could also be refactored to break out of it when the end
of the selection is reached. This can be done separately.
2021-12-05 14:49:30 +01:00
Aaron Carlisle 5ef5a9fc24 Compositor: Migrate most nodes to new socket builder API
This patch leaves a out a few nodes:

- Group Nodes
- Image input node
- File output node
- Switch View
- Cryptomatte

These nodes above are a bit more complicated and should be worked on individually.

Differential Revision: https://developer.blender.org/D13266
2021-12-03 20:26:38 -05:00
Christoph Lendenfeld d5920744f4 Create generic modal functions from GRAPH_OT_decimate
This patch extracts the modal functions from GRAPH_OT_decimate
and makes them generic so they can be reused by future operators

Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D9326
Ref: D9326
2021-12-03 22:24:41 +00:00
Hans Goudey 56ed4c14d3 Cleanup: Use LISTBASE_FOREACH macro 2021-12-03 16:33:14 -05:00
Hans Goudey 2d8606b360 Cleanup: Use references in node editor, other improvements
This helps to tell when a pointer is expected to be null, and avoid
overly verbose code when dereferencing. This commit also includes
a few other cleanups in this area:
 - Use const in a few places
 - Use `float2` instead of `float[2]`
 - Remove some unnecessary includes and old code
The change can be continued further in the future.
2021-12-03 16:25:17 -05:00
Hans Goudey ca0dbf8c26 Cleanup: Remove unused code
This is very old and is unlikely to be useful in the near future.
2021-12-03 12:31:00 -05:00
Hans Goudey d1f118d228 Cleanup: Const, use references, C++ types
Also remove some unnecessary includes
2021-12-03 11:43:10 -05:00
Hans Goudey be3f3812dc Cleanup: Comments and ordering in node editor header 2021-12-03 11:31:25 -05:00
Hans Goudey cb0fbe1fde Cleanup: Use typed enum for node resize direction 2021-12-03 11:05:59 -05:00
Jeroen Bakker ab927f5ca7 ImBuf: Made Wrapping and Cropping optional in IMB_transform.
`IMB_transform` is used in VSE. It had a required crop parameter
for cropping the source buffer. This is not always needed.

In the image engine we want to use the use the `IMB_transform`
with wrap repeat. Both options are mutual exclusive and due
to performance reasons the wrap repeat is only available when
performing a nearest interpolation.
2021-12-03 13:48:00 +01:00
Campbell Barton c4e041da23 Cleanup: move public doc-strings into headers for 'bmesh'
Some minor improvements to doc-strings too.

Ref T92709
2021-12-03 20:10:57 +11:00
Jesse Yurkovich 7c4fc5b58d Fix T93541: Use warning instead of error for exceeding layer limits
Instead of using RPT_ERROR, use RPT_WARNING which will not raise an
exception to Python. This broke some scripts (including FBX import)
which already check for a None return value.

Ref D13458

Reviewed By: campbellbarton
2021-12-03 17:05:18 +11:00
Campbell Barton de5d36560f Fix T93574: Asset triangulating a mesh
Correct assert for edit-mesh normal calculation.
2021-12-03 16:55:34 +11:00
Julian Eisel 56ff954030 UI: Expand tree-view items (e.g. asset catalogs) on click to activate
This actually gives a quite nice behavior in my opinion, especially for
asset catalogs, where activating a catalog makes all assets inside it or
its (grand-)child catalogs visible, so showing the child catalogs then
adds useful information. Maybe this should become a feature for
asset catalogs only, to be evaluated once the tree-view API is used in
more cases. Only asset catalogs are affected by this change right now.

Part of T93582.
2021-12-02 19:49:48 +01:00
Julian Eisel c0122cc888 Asset Browser: Don't expand top-level catalogs by default
The "All" item will be expanded of course, and the tree will also be
expanded so that the active item is visible. But feedback was that in
some setups, opening all the top-level catalogs is a bit too much. So
collapse them for a more compact default layout.

Part of T93582.
2021-12-02 19:49:48 +01:00
Dalai Felinto a159f67ccc Merge remote-tracking branch 'origin/blender-v3.0-release' 2021-12-02 19:37:01 +01:00
Dalai Felinto f1cca30557 Blender 3.0 - version bump -> release 2021-12-02 19:35:47 +01:00
Dalai Felinto 0988711575 Licenses: Attribution document for Blender 3.0
A few libraries were updated, a few were added, and a few were missing
from the previous license document.
2021-12-02 19:35:01 +01:00
Julian Eisel fca6a9fe3f Asset Browser: Remove home icon for "All" item
Originally this wasn't really meant to stay there permanently, but
helped giving things a nicer alignment. Others seemed to like it at
first so it stayed, but after more feedback we decided to remove it
again. The alingment is better now with the previous commit.

Part of T93582.
2021-12-02 19:14:50 +01:00
Julian Eisel e38532773b Asset Browser: Nest all catalogs under the "All" item
This makes the relation to the catalogs and the behavior more clear.

Part of T93582.
2021-12-02 19:14:50 +01:00
Brecht Van Lommel cef8f5ff50 Docs: add README for HIPEW library 2021-12-02 18:43:42 +01:00
Dalai Felinto 1e98a0cee5 NanoSVG: Mention the version we use 2021-12-02 18:22:05 +01:00
Dalai Felinto 431255e5e8 Docs: 3.0 release description for Linux appdata
Includes a typo fix for 2.93.
2021-12-02 18:02:19 +01:00
Hans Goudey 27b70428c1 Cleanup: Avoid using C++ keyword as variable name 2021-12-02 11:20:22 -05:00
Brecht Van Lommel e6a732daad Merge branch 'blender-v3.0-release' 2021-12-02 16:43:25 +01:00
Brecht Van Lommel 7e60d8a713 Fix missing Blender logo in Windows store package
D9681 was not properly merged to all branches, leaving a path to a non-existent
icon file in the maniphest.
2021-12-02 16:35:24 +01:00
Brecht Van Lommel 2fd657db5b Fix T93560: crash with image paint undo and cycles preview render
Cycles preview rendering could free the image buffers being used by drawing in
another thread due to a race condition. This race condition was unlikely before,
but now that preview renders are started right before we draw the image in the
image editor or load it as a texture in the 3D viewport, it's likely to happen.

As we are close to release this is too risky to fix properly, just avoid freeing
the cache for preview renders instead and accept increased memory usage in some
cases.
2021-12-02 16:34:16 +01:00
Jacques Lucke aec56e562a Fix (unreported): incorrect custom data layer created
Without this fix `CustomDataAttributes::create_by_move`
did not work on named attributes.
2021-12-02 15:32:19 +01:00
Hans Goudey a1f0f2eacb Cleanup: Move public docs to BKE_spline.hh header 2021-12-02 09:24:21 -05:00
Sybren A. Stüvel 23ffcb242d Merge remote-tracking branch 'origin/blender-v3.0-release' 2021-12-02 14:40:20 +01:00
Sybren A. Stüvel 61e92eeb3e Fix `Action.asset_data["is_single_frame"]` set incorrectly
The asset metadata custom property `["is_single_frame"]` was set
incorrectly. Since this is intended for forward compatibility, including
being covered by the asset metadata indexing, it's important to have it
set correctly from the first release of Blender that includes the asset
browser.

Differential Revision: https://developer.blender.org/D13452
2021-12-02 14:35:12 +01:00
Sybren A. Stüvel 1620dcd208 Fix: don't use `BLI_strncpy_utf8` for copying file paths
File paths can be any encoding, so using some UTF-8-specific function is
not the right way to go.
2021-12-02 13:02:39 +01:00
Sybren A. Stüvel c5ec3738d8 Blenloader: move ghost include path from INC to TEST_INC
The Ghost dependency was added to avoid a memory leak (rBc7a1e115b507),
but since that's only for the unit tests, it's better to add the path to
`TEST_INC`.
2021-12-02 12:58:45 +01:00
Jacques Lucke e130903060 BLI: avoid invoking tbb for small workloads
We often call `parallel_for` in places with very variable
sized workloads. When many elements are processed,
using multi-threading is great, but when processing
few elements (possibly many times) using `parallel_for`
can result in significant overhead.

I measured that this improves performance by >20% in
the refactored realize instances code I'm working on
separately. The change might also help with debugging
sometimes, because the stack trace is smaller and contains
fewer irrevelant symbols.
2021-12-02 12:56:47 +01:00
Campbell Barton 0f89d05848 Fix T93563: Crash subdividing with overlapping tri and quad
The first loop was left out when finding the split edge boundary.

Error from f2138686d9.
2021-12-02 22:53:44 +11:00
Campbell Barton 42a6b2fd06 Cleanup: move public doc-strings into headers for 'python' 2021-12-02 22:53:44 +11:00
Patrick Mours 1766549418 Fix T92308: OptiX denoising fails with high resolutions
The OptiX denoiser does have an upper limit as to how many pixels it can denoise at once, so
this changes the OptiX denoising process to use tiles for high resolution images.
The OptiX SDK does have an utility function for this purpose, so changes are minor, adjusting
the configured tile size and including enough overlap.

Maniphest Tasks: T92308

Differential Revision: https://developer.blender.org/D13436
2021-12-02 12:10:46 +01:00
Julian Eisel 7da979c070 Merge branch 'blender-v3.0-release' 2021-12-02 11:19:00 +01:00
Julian Eisel 67c490daaf Fix T93548: Appended (material) assets don't have a fake user
Since our design is to always keep data-blocks marked as assets on exit,
and our technical design for this is to do this via fake users, ensure
the fake user is set for an appended asset.

Reviewed by: Bastien Montagne

Differential Revision: https://developer.blender.org/D13443
2021-12-02 11:18:27 +01:00
Jacques Lucke 68e3755209 Fix T93555: crash when muting nodes with multiple internal links
The crash happened because I was incorrectly and inconsistently assuming
that a socket is part of at most one internal link. However, this is not the case.
In geometry nodes, an input socket can be internally linked to multiple
output sockets. In the general case, an output could also be linked to multiple
input sockets, even though we don't have that in Blender yet.

Dalai gave green light to cherry pick this fix for 3.0.
2021-12-02 11:10:41 +01:00
Bastien Montagne 9f290467ca Blendread: Remove all instantiation logic from `BLO_library_link_` code.
Instantiation is now fully handled by BKE_blendfile_link_append module.

Note that this also allows removal of the `BLO_LIBLINK_NEEDS_ID_TAG_DOIT`
flag.

Part of T91414: Unify link/append between WM operators and BPY context
manager API, and cleanup usages of `BKE_library_make_local`.
2021-12-02 11:10:34 +01:00
Bastien Montagne 4fe8c62b56 Cleanup: Readfile: Remove deprecated `BLO_library_link_copypaste`.
Rewrite of ID paste code in rB3f08488244c0 made this function useless,
ID pasting is now handled by the BKE_blendfile_link_append module too.
2021-12-02 10:27:34 +01:00
Jacques Lucke 198e571e87 Fix T93555: crash when muting nodes with multiple internal links
The crash happened because I was incorrectly and inconsistently assuming
that a socket is part of at most one internal link. However, this is not the case.
In geometry nodes, an input socket can be internally linked to multiple
output sockets. In the general case, an output could also be linked to multiple
input sockets, even though we don't have that in Blender yet.
2021-12-02 09:41:36 +01:00
Campbell Barton f1b0b0ffb8 Cleanup: spelling in comments 2021-12-02 16:02:34 +11:00
Campbell Barton 8f69c91408 Fix T93410: Crash hiding a region from Python used by a popover
Close all active buttons when hiding a region as this can be called
from Python a popover is open from that region.

Failure to do this causes the popover to read from the freed button.

Also rename UI_screen_free_active_but to
UI_screen_free_active_but_highlight since it only frees highlighted
buttons.
2021-12-02 15:53:41 +11:00
Aaron Carlisle 0de1d2e84e Cleanup: FIx build with USD after recent refactor
rB218360a89217f4e8321319035bf4d9ff97fb2658 missed a couple renames in USD code paths.
2021-12-01 23:34:51 -05:00
Leon Leno bb3d03973a UI: Fix scaling of HSV cursor when zooming
The small circle used to choose the hue/saturation and value in the
color widget was drawn with a fixed screen space size. Now scale the
circle used as cursor in the color widget based on the zoom. This
could have been part of a9642f8d61 but the implementation is
different.

Based on a fix provided by Erik Abrahamsson

Differential Revision: https://developer.blender.org/D13444
2021-12-01 22:22:53 -05:00
Nikhil Shringarpurey 26d2caee3b Fix T92268: Group input and output nodes have inconsistent padding
The group output node did not have the same size padding as the group
input, leading to the node looking different and actually being smaller.

Differential Revision: https://developer.blender.org/D13092
2021-12-01 22:04:44 -05:00
Hans Goudey 218360a892 Cleanup: Rename curve struct fields
These existing names were unhelpful at best, actively confusing at
worst. This patch renames them to be consistent with the terms
used to refer to the values in the UI.
 - `width` -> `offset`
 - `ext1` -> `extrude`
 - `ext2` -> `bevel_radius`

Differential Revision: https://developer.blender.org/D9627
2021-12-01 22:01:35 -05:00
Hans Goudey ca9cdba2df Fix: Add tooltip translation marker to disabled hints
This was overlooked, as it seems there's no way for these strings to be
translated currently. Generally it's not that clear whether `N_` or
`TIP_` should be used in this case, but `TIP_` seems more consistent.
To avoid the cost of the translation lookup when the UI text isn't
necessary, we could allow the disabled hint argument to be optional.

Differential Revision: https://developer.blender.org/D13141
2021-12-01 21:55:04 -05:00