Blender Git Commits

Blender Git "master" branch commits.

Page: 139 / 5574

September 23, 2021, 15:59 (GMT)
Geometry Nodes: remove old method to iterate over attributes

The previous commit added a new method to the same in a better way.
September 23, 2021, 15:58 (GMT)
Cleanup: asset catalogs, correct assertion message

There is no such thing as a "relative path" when it comes to asset catalog
paths (they're always absolute).

No functional changes.
September 23, 2021, 15:58 (GMT)
Cleanup: bUUID, document the constructors

No functional changes.
September 23, 2021, 15:58 (GMT)
UUID: place C++ code in correct namespace

Put the `bUUID` class in the `blender` namespace, instead of the
`blender::bke` namespace.

As a result, some C++ code now correctly uses the C++ class, where
previously it would use the C struct and use implicit casting where
necessary. As a result, support for initializer lists had to be
explicitly coded and in another place an explicit `::bUUID` was
necessary to avoid ambiguity.
September 23, 2021, 15:58 (GMT)
UUID: add `!=` operator for comparing UUIDs

Make it possible to unit test with `EXPECT_NE(uuid1, uuid2)`.
September 23, 2021, 15:48 (GMT)
Fix Cycles compiler warning on GCC 11

For shadow rays there are no closures, leave out the closure merging code
there to avoid warnings about accessing closure memory that does not exist.
September 23, 2021, 15:48 (GMT)
Fix T91641: crash rendering with 16k environment map in Cycles

Protect against integer overflow.
September 23, 2021, 15:41 (GMT)
Cleanup: Remove hardcoded values and rename keyframe shape shaders

No functional change.

The shader is complicated by itself, having hardcoded values makes it
even more cryptic.

I also renamed the shader because the shader is not for the keyfarme diamond only,
but for all the keyframe shapes.

Differential Revision: https://developer.blender.org/D12615
September 23, 2021, 14:56 (GMT)
Fix T91557: Texture Paint Stencil doesnt use assigned UV Layer

Choosing a UV layer would actually affect the overlay in the viewport
and also painting with the mask brush was in that UV space, but the
resulting stencil mask was always applied with the active UV (not the
explicitly selected stencil UV -- the one one is looking at in the
viewport!) to painting.

This has been like that as far as I have checked back (at least 2.79b),
I am surprised this has not come up before, but it does not seem to make
sense at all...

Now use the UV specified for the stencil layer when applying the mask for
painting, so it corresponds to the stencil mask one is looking at in the
viewport.

Maniphest Tasks: T91557

Differential Revision: https://developer.blender.org/D12583
September 23, 2021, 14:06 (GMT)
Asset Catalogs: explicit version number in catalog definition files

Declare the current format used for asset catalog definition files as
version 1, and write that to the files. Files without that version number
will be rejected.

This makes it much easier to move to different versions later, with the
opportunity to do versioning on file load.

The version is not associated with any version of Blender, but a separate
integer that's simply incremented when a non-backward-compatible change
happens.
Revision aa2493e by Julian Eisel
September 23, 2021, 13:04 (GMT)
Fix unused variable warning in release builds

The variable is only used in debug builds.
September 23, 2021, 13:00 (GMT)
Assets: add Asset Catalog system

Catalogs work like directories on disk (without hard-/symlinks), in that
an asset is only contained in one catalog.

See T90066 for design considerations.

#### Known Limitations

Only a single catalog definition file (CDF), is supported, at
`${ASSET_LIBRARY_ROOT}/blender_assets.cats.txt`. In the future this is
to be expanded to support arbitrary CDFs (like one per blend file, one
per subdirectory, etc.).

The current implementation is based on the asset browser, which in
practice means that the asset browser owns the `AssetCatalogService`
instance for the selected asset library. In the future these instances
will be accessible via a less UI-bound asset system.

The UI is still very rudimentary, only showing the catalog ID for the
currently selected asset. Most notably, the loaded catalogs are not
shown yet. The UI is being implemented and will be merged soon.

#### Catalog Identifiers

Catalogs are internally identified by UUID. In older designs this was a
human-readable name, which has the problem that it has to be kept in
sync with its semantics (so when renaming a catalog from X to Y, the
UUID can be kept the same).

Since UUIDs don't communicate any human-readable information, the
mapping from catalog UUID to its path (stored in the Catalog Definition
File, CDF) is critical for understanding which asset is stored in which
human-readable catalog. To make this less critical, and to allow manual
data reconstruction after a CDF is lost/corrupted, each catalog also has
a "simple name" that's stored along with the UUID. This is also stored
on each asset, next to the catalog UUID.

#### Writing to Disk

Before saving asset catalogs to disk, the to-be-overwritten file gets
inspected. Any new catalogs that are found thre are loaded to memory
before writing the catalogs back to disk:

- Changed catalog path: in-memory data wins
- Catalogs deleted on disk: they are recreated based on in-memory data
- Catalogs deleted in memory: deleted on disk as well
- New catalogs on disk: are loaded and thus survive the overwriting

#### Tree Design

This implements the initial tree structure to load catalogs into. See
T90608, and the basic design in T90066.

Reviewed By: Severin

Maniphest Tasks: T91552

Differential Revision: https://developer.blender.org/D12589
Revision 222fd1a by Julian Eisel
September 23, 2021, 12:46 (GMT)
Asset Browser: Disable metadata editing for external asset libraries

Buttons to edit asset metadata are now disabled for assets from an
external library (i.e. assets not stored in the current .blend file).
Their tooltips explain why they are disabled.

Had to do some RNA trickery to disable the metadata properties at RNA
level, not at UI script level.
The basic idea is:
* Local data-block assets set the data-block as owning ID for the asset
metadata RNA pointer now.
* That way we can use the owner ID to see where the metadata belongs to
and decide if it's editable that way.
* Additionaly, some Python operators needed better polling so they show
as grayed out, and don't just fail.

One important thing: Custom properties of the metadata can still be
edited. The edits won't be saved however. Would be nice to disable that,
but it's currently not supported on BPY/IDProperty/RNA level.

Addresses T82943.

Differential Revision: https://developer.blender.org/D12127
September 23, 2021, 12:42 (GMT)
Fileops: call `BLI_path_slash_native()` in `BLI_dir_create_recursive()`

Make the Windows version of `BLI_dir_create_recursive()` call
`BLI_path_slash_native()` before it tries to handle the path. This
should make it possible to call it with non-native path separators.

This change was provided by our Windows platform maintainer @LazyDodo in
P2414, so I assume he agrees with this change.
September 23, 2021, 12:10 (GMT)
Keymap: RMB select option to place cursor on Alt-LMB

This allows most tools to activate on press, removing a small but
noticeable distance between the initial press and detection of a drag
event.

Gizmo tweak no longer actives when Alt is held, to avoid conflicting
with cursor placement.

This has the advantage that the gizmo doesn't get in the way when Alt
is used for activating tools or placing the cursor.
September 23, 2021, 12:08 (GMT)
Cleanup: spelling in comments
September 23, 2021, 12:08 (GMT)
WM: gestures now activate immediately on mouse press

Some gestures were activating immediately on tweak events,
extend this to mouse-press and click-drag.

Without this change, box-select for example wouldn't be automatically
activated on mouse-press.
September 23, 2021, 12:06 (GMT)
Cleanup: assign variable for LMB select
September 23, 2021, 11:48 (GMT)
LibLink: Modify WM API to link/append one ID to take flag parameter.

There is no reason to lock behavior into a specific configuration in
those calls, make them properly configurable like the rest of the
link/append code.

This also enable users of those functions to activate 'ID reuse'
behavior.
September 23, 2021, 11:46 (GMT)
Geometry Nodes: add utility to print an attribute id.
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021