Age | Commit message (Collapse) | Author |
|
|
|
|
|
Differential Revision: https://developer.blender.org/D12652
|
|
As also explained in D6134, in most case of Stretch To usage in
rigs, it is desirable to use swing rotation, either via the old
method of pairing the constraint with Damped Track, or via the
Swing rotation type introduced in 2.82. This is for instance true
for all usages of the constraint in Rigify.
The reason can be understood by realizing that unlike order-
dependent euler rotations, swing is not biased to an axis, and
isn't affected by gimbal lock effects at merely 90 degrees
of rotation (it has only one singularity at 180 degrees).
Thus it makes sense to change the default for newly created
constraints to the Swing mode. This has no backward compatibility
concerns except for old tutorials and rig generation scripts.
Differential Revision: https://developer.blender.org/D12643
|
|
Found by clang tidy (P2439).
|
|
Change `auto &catalog` to `const auto &catalog`.
No functional changes.
|
|
The Asset Catalog Definition File is now saved whenever the blend file
is saved. The location of the CDF depends on where the blend file is
saved, and whether previously a CDF was already loaded, according to the
following rules. The first matching rule wins:
1. Already loaded a CDF from disk? -> Always write to that file.
2. The directory containing the blend file has a
`blender_assets.cats.txt` file? -> Merge with & write to that file.
3. The directory containing the blend file is part of an asset library,
as per the user's preferences? -> Merge with & write to
`${ASSET_LIBRARY_ROOT}/blender_assets.cats.txt`
4. Create a new file `blender_assets.cats.txt` next to the blend file.
|
|
Add `BKE_preferences_asset_library_containing_path(&U, some_path)` that
finds the asset library that contains the given path.
This is a simple linear search, returning the first asset library that
matches. There is no smartness when it comes to nested asset libraries
(like returning the library with the best-matching path), although this
could be a useful feature to add later.
|
|
that are assigned to particle systems/hair.
`BKE_object_material_slot_used` would only check obdata usages, but
particle settings can also (weirdly enough) use objects' material slots.
So now, as its name suggests, `BKE_object_material_slot_used` does take
an object as parameter, and also checks for potential slot usage from
psys in the object.
|
|
* Fixes missing update of the catalog tree when adding catalogs.
* Adds iterators for the catalogs, needed for UI code.
* Store catalog ID in the catalog tree items, needed for UI code.
* Other smaller API additions for the UI.
* Improve comments and smaller cleanups.
New functions are covered with unit tests.
Differential Revision: https://developer.blender.org/D12618
Reviewed by: Sybren Stüvel
|
|
This adds a new `GeometrySet::modify_geometry_sets` method that can be
used to update each sub-geometry-set separately without making any
instances real.
Differential Revision: https://developer.blender.org/D12650
|
|
If the theme used by the user did not touch the wire or the wire outline
colors this will update them as well.
This was supposed to be a part of a bigger UI theme change for 3.0. But
it was expedited because of the recent change in line thickness for the
noodles (2bd02052157).
Theme change by Pablo Vazquez.
Differential Revision: https://developer.blender.org/D12649
|
|
The original limit dates back from 2002 when Blender went open source.
After that many years some productions (e.g., Sprite Fright) are already
experiencing limitations for complex edits.
The future plans is to support an initial shorter (2?) number of
channels with support to "unlimited" channels.
Finally, I'm bumping the minimum file requirement since files with more
than 32 channels won't work well in old Blender versions.
In a future commit I will implement a sanitization so that we only read (and write)
128 channels. Making sure future changes of this number won't corrupt Blender.
Differential Revision: https://developer.blender.org/D12645
|
|
Better to keep such related operations close together in code.
|
|
There is no function definition for this declaration. Instead there is
`BKE_preferences_asset_library_remove()`.
|
|
conversion).
Proxy conversion is a fairly particular case of liboverride creation, in
which remapping all local usages of linked data probably makes more
sense, rather than only doing so whitin the overridden 'group' of IDs.
|
|
Introduce `BKE_callback_remove()`, which undoes the effect of
`BKE_callback_add()`. It also respects `funcstore->alloc` by freeing the
removed `funcstore` when needed.
This allows for shorter-lived objects in memory to unregister their
callbacks at the end of their lifespan.
`BKE_callback_global_finalize()` has been adjusted so that the
responsibility "remove a callback" is given to one function only.
Reviewed by: campbellbarton
Differential Revision: https://developer.blender.org/D12625
|
|
This adds a new Instance on Points node that is a replacement
for the old Point Instance node. Contrary to the old node,
it does not have a mode to instance objects or collections
directly. Instead, the node has to be used with an Object/
Collection Info to achieve the same effect.
Rotation and scale of the instances can be adjusted in the node
directly or can be controlled with a field to get some variation
between instances.
The node supports placing different instances on different points.
The user has control over which instance is placed on which point
using an Instance Index input. If that functionality is used, the
Instance Geometry has to contain multiple instances that can are
instanced separately.
Differential Revision: https://developer.blender.org/D12478
|
|
No functional changes.
|
|
This node replaces the deprecated Attribute Randomize node, populating
a vector, float, integer or boolean field with random values. Vector,
float, and integer have min/max settings, which are also field aware.
The boolean type has a probability value for controlling what portion
of the output should be true. All four types have a field seed input
which is implicitly driven by the index, otherwise, all values would
be the same "random" value.
The Random Float node is now deprecated like other nodes, since it is
redundant with this node.
Differential Revision: https://developer.blender.org/D12603
|
|
This commit adds a node that generates a text paragraph as curve
instances. The inputs on the node control the overall shape of the
paragraph, and other nodes can be used to move the individual instances
afterwards. To output more than one line, the "Special Characters" node
can be used.
The node outputs instances instead of real geometry so that it doesn't
have to duplicate work for every character afterwards. This is much
more efficient, because all of the curve evaluation and nodes like fill
curve don't have to repeat the same calculation for every instance of
the same character.
In the future, the instances component will support attributes, and the
node can output attribute fields like "Word Index" and "Line Index".
Differential Revision: https://developer.blender.org/D11522
|
|
This patch adds a new node called "Special Characters" with two string
outputs: "Line Break" and "Tab". This is necessary because the newline
character cannot be easily typed with a keyboard, but is necessary for
the string to curve node.
Differential Revision: https://developer.blender.org/D12620
|
|
No functional changes.
|
|
Weird that this was not reported before, this was creating a lot of
extra actions everytime...
|
|
When writing asset catalog definition files, order the catalogs by
(path, UUID). This ensures that every write produces the same file, playing
nice with versioning / synchronisation systems.
|
|
The "path with trailing slash" test catalog was using the same path as
another catalog, which meant it was ignored after doing the path
cleanup. It's now different in the test file in SVN, so it'll actually
show up in the test.
|
|
This commit also add an experimental userPreferences to prevent proxies
conversions on file load, and reporting for amount of coverted proxies
(and possible issues).
Note that potentially linked proxies from other libraries are not
hamdled here (this feature seems to be broken anyway in master
currently?).
|
|
|
|
This adds a replacement for the deprecated Point Distribute node.
Arguments for the name change can be found in T91155.
Descriptions of the sockets are available in D12536.
Thanks to Jarrett Johnson for the initial patch!
Differential Revision: https://developer.blender.org/D12536
|
|
|
|
Remove unnecessary call to `std::string::c_str()`.
No functional changes.
|
|
Goal is to add the length attribute to the Hair Info node, for better control over color gradients or similar along the hair.
Reviewed By: #eevee_viewport, brecht
Differential Revision: https://developer.blender.org/D10481
|
|
|
|
This implements the update logic for the vizualization of which
sockets pass data or constants directly, and which pass functions.
The socket shapes may still have to be updated. That should be
done separately, because it might be a bit more involved, because
socket shapes are currently linked to keyframe shapes. Currently
the circle and diamond shapes are used with the following meanings:
- Input Sockets:
- Circle: Required to be a single value.
- Diamond: This input supports fields.
- Output Sockets:
- Circle: This output is a single value.
- Diamond: This output may be a field.
Connecting a field to a circle input socket is an error, since a
field cannot be converted to a single value. If the socket shape
is a diamond with a dot in the middle, it means it is currently
a single value, but could be a field.
In addition to socket shapes, the intention is to draw node links
differently based on the field status. However, the exact method for
conveying that isn't decided yet.
Differential Revision: https://developer.blender.org/D12584
|
|
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
|
|
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
|
|
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.
|
|
There is no such thing as a "relative path" when it comes to asset catalog
paths (they're always absolute).
No functional changes.
|
|
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.
|
|
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
|
|
|
|
|
|
|
|
Forgot that one in rB794c2828af60.
Noted by Antonio Vazquez (@antoniov), thanks.
|
|
The resolution for surfaces was 12 for U, 4 for V,
where both should have been set to 4.
Regression in 9a076dd95a01135ea50f9ccc675668db9f2155f4
|
|
|
|
This commit adds to ID struct a new optional 'weak reference' to a
linked ID (in the form of a blend file library path and full ID name).
This can then be used on next append to try to find a matching local ID
instead of re-making the linked data local again.
Ref. T90545
NOTE: ID re-use will be disabled for regular append for the time being
(3.0 release), and only used for assets. Therefore, this commit should
not change anything user-wise.
Differential Revision: https://developer.blender.org/D12545
|
|
|
|
This node can be used to fillet splines at control points to
create a circular arc.
The implementation roughly follows T89227's design.
The node works in two main modes: Bezier and Poly
* Bezier: Creates a circular arc at vertices by changing
handle lengths (applicable only for Bezier splines).
* Poly: Creates a circular arc by creating vertices (as
many as defined by the Count fields input) along
the arc (applicable for all spline types).
In both modes, the radius of the created arc is defined
by the Radius fields input.
The Limit Radius attribute can be enabled to prevent
overlapping when the defined radius exceeds the maximum
possible radius for a given point.
Reviewed By: Hans Goudey
Differential Revision: https://developer.blender.org/D12115
|