Age | Commit message (Collapse) | Author |
|
Previously this was only loading built-in render passes. Now instead of trying
to load the scene render passes, load whatever passes exist in the cache file.
|
|
header for std::function was not included
reported/fixed by Charlie on chat
|
|
Using a RenderResult (or a Viewer) was never really working (think you
cant get a real ImBuff from these) -- cannot use it as a clone, stencil
or canvas [Single Image paint texture slot].
In the case of using it as a 2D paint clone image this would also crash
[due to the Image Editor drawing refactor in 2.91].
Now [in the spirit of T73182 / D11179], prevent using these where
unappropriate by using rna pointer polling functions.
Also add a security check for the 2D paint clone image crash in case a
stencil ImBuff cannot be provided for some reason, but generally old
files are now patched in do_versions_after_linking_300 (thx @brecht!).
Fixes T91625.
Maniphest Tasks: T91625
Differential Revision: https://developer.blender.org/D12609
|
|
|
|
This follows three main targets:
* Make creation of new tree UIs easy.
* Groundwork to generalize tree UIs (so e.g. Outliner, animation
channels, asset catalogs and spreadsheet data-sets don't have to
re-implement basic tree UI code) or even other data-view UIs.
* Better separate data and UI state. E.g. with this, tree-item selection
or the open/collapsed state can be stored on the UI level, rather than
in data. (Asset Catalogs need this, storing UI state info in them is
not an option.)
In addition, the design should be well testable and could even be
exposed to Python.
Note that things will likely change in master still. E.g. the actually
resulting UI isn't very nice visually yet.
The design is documented here:
https://wiki.blender.org/wiki/Source/Interface/Views
Differential Revision: https://developer.blender.org/D12573
|
|
This patch simplifies the curve object to mesh conversion
used by the object convert operator and exporters.
The existing code had a convoluted model of ownership, and did quite
a bit of unnecessary work. It also assumed that curve objects always
evaluated to a mesh, which is not the case anymore.
Now the code checks if the object it receives is evaluated. If so,
it can simply return a copy of the evaluated mesh (or convert the
evaluated curve wire edges to a mesh if there was no evaluated mesh).
If the object isn't evaluated, it uses a temporary copy of the object
with modifiers removed to create the mesh in the same way.
This follows up on the recent changes to curve evaluation,
namely that the result is always either a mesh or a wire curve.
Differential Revision: https://developer.blender.org/D12533
|
|
|
|
Ref T91645
|
|
The implicit default constructor zeroes all plain data fields, and now
this behaviour is explicit & tested for in a unit test.
|
|
Use explicit `uint32_t` instead of `uint`, add a missing end-of-namespace
comment, and change `auto` to `const auto *`.
No functional changes.
|
|
The previous commit added a new method to the same in a better way.
|
|
This adds three new methods:
* `InstancesComponent::foreach_reference_as_geometry(...)`
* `GeometrySet::attribute_foreach(...)`
* `GeometrySet::gather_attributes_for_propagation(...)`
The goal is that these iteration primitives can be used in places
where we use more specialized iterators currently.
Differential Revision: https://developer.blender.org/D12613
|
|
Make it possible to unit test with `EXPECT_NE(uuid1, uuid2)`.
|
|
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.
|
|
No functional changes.
|
|
There is no such thing as a "relative path" when it comes to asset catalog
paths (they're always absolute).
No functional changes.
|
|
Protect against integer overflow.
|
|
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.
|
|
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
|
|
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
|
|
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.
|
|
The variable is only used in debug builds.
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
|
|
Option is now available to append operator, alsthough hidden and
disabled by default.
|
|
When we re-use a local ID, we need to delete the matching linked data.
|
|
|
|
ones.
|
|
|
|
Forgot that one in rB794c2828af60.
Noted by Antonio Vazquez (@antoniov), thanks.
|
|
in asset context, when user drag & drop a material several time, they
would still expect to re-use existing one instead of getting new copies
of it, even if this material is directly appended (and not an indirect
dependency of an object e.g.).
|
|
Flags controlling link/append code are split between two enums, one in
`DNA_space_types.h` and one in `BLO_readfile.h`.
This commit:
- Moves flags exclusively used in WM and BLO code to `eBLOLibLinkFlags`
in `BLO_readfile.h`. Flags in `eFileSel_Params_Flag` from
`DNA_space_types.h` are now only the ones effectively used by the
file browser editor code too.
- Fixes some internal utils in `readfile.c` still taking `short` flag
parameter instead of proper `int` one.
NOTE: there are a few other flags that could probably be moved to
`eBLOLibLinkFlags` (at the very least `FILE_LINK`, probably also
`FILE_AUTOSELECT` and `FILE_ACTIVE_COLLECTION`), since those are not
effectively used by the file browser, and control linking/appending
behavior, not filebrowser behavior.
However for now think it's safer to not touch that.
|
|
|
|
The resolution for surfaces was 12 for U, 4 for V,
where both should have been set to 4.
Regression in 9a076dd95a01135ea50f9ccc675668db9f2155f4
|
|
|
|
This commit changes the custom property edit operator to make editing
different properties types more obvious and expose more of the data,
made more easily possible by the recent UI data refactor.
Previously, the operator guessed the type you wanted based on what you
wrote in a text box. That was problematic, you couldn't make a string
property with a value of `1234`, and you had to know about the Python
syntax for lists in order to create an array property. It was also slow
and error prone; it was too easy to make a typo.
Improvements compared to the old operator:
- A type drop-down to choose between the property types.
- Step and precision values are exposed.
- Buttons that have the correct type based on the property.
- String properties no longer display min, max, etc. buttons.
- Generally works in more cases. The old operator tended to break.
- Choose array length with a slider.
- Easy to choose to use python evaluation when necessary.
- Code is commented, split up, and much easier to understand.
The custom property's value is purposefully not exposed, since the Edit
operator is for changing the property's metadata now, rather than the
value itself. Though in the "Python" mode the value is still available.
More improvements are possible in the future, like exposing different
subtypes, and improving the UI of the custom properties panel.
Differential Revision: https://developer.blender.org/D12435
|
|
This adds constrained angle mode improvements,
snapping to global and local orientation,
visible distance and angle measurements,
undo capability,
x-ray mode,
multi-object edit mode.
See https://developer.blender.org/D12600 for more details.
Note: this project moved some of the default keymappings
around a bit, as discussed with users in the thread
https://devtalk.blender.org/t/gsoc-2021-knife-tool-improvements-feedback/19047
We'll change the manual documentation in the next couple of days.
|
|
Issue caused by our patch in rB1af722b81912
we replaced an array with a memory allocation
but we forgot to update the assert which now
used an invalid method to calculate the array
size.
SVN libs will have to be updated before
T91602 will be fixed for end users.
|
|
I had to add `no_muted_links` to the declaration API. The name could
change there, but I think it's more obvious than "internal"
|
|
|
|
This converts socket declarations for most shader nodes that had already
been converted to C++, but skips those that needed a special flag.
|
|
|