Age | Commit message (Collapse) | Author |
|
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
|
|
Wire-only meshes have a special case in the overlay drawing to give
the wire shader a special color (which avoids the lines being dashed,
somehow). The fast path for duplis didn't have that special case.
Differential Revision: https://developer.blender.org/D13196
|
|
Since we have the overlays popover, it makes sense to allow toggling the
context path like in the 3D viewport. This commit adds a property,
and turns it on by default in existing files.
Differential Revision: https://developer.blender.org/D13248
|
|
|
|
The problem is that drw_batch_cache_generate_requested_delayed
is called on the object, which uses the original object data type to
choose which data type to get info for. So for curves and text it uses
the incorrect type (not the evaluated mesh like we hardcoded in the
armature overlay code).
To fix this I hardcoded the "delayed" generation to only use the
evaluated mesh. Luckily it wasn't use elsewhere besides this
armature overlay system. That seems like the simplest fix for
3.0. A proper solution should rewrite this whole area anyway.
Differential Revision: https://developer.blender.org/D13439
|
|
This will allow using a function I've declared in a C++ header.
|
|
No functional change, just more clear this way it comes from src.
|
|
While it is an edge case, it isn't incorrect for the attribute storage
to have a zero size, it will just return an empty span or nothing.
|
|
|
|
After 1ef8ef4941dd there were build warnings because of unused
arguments. Also missed to change code to iterate `strips` instead of
`seqbase` in 2 functions.
|
|
The Realize Instances and Join Geometry node can share most of their code.
Until now, both nodes had their own implementations though. This patch
removes the implementation in the Join Geometry node in favor of the more
general Realize Instances implementation.
This removes an optimization for avoiding spline copies. This can be brought
back later. The realize instances code has to be rewritten to support attribute
instances anyway.
Differential Revision: https://developer.blender.org/D13417
|
|
This node calculates the dual of the input mesh. This means that faces
get replaced with vertices and vertices with faces. In principle this
only makes sense when the mesh in manifold, but there is an option to
keep the (non-manifold) boundaries of the mesh intact.
Attributes are propagated:
- Point domain goes to face domain and vice versa
- Edge domain and Face corner domain gets mapped to itself
Because of the duality, when the mesh is manifold, the attributes get
mapped to themselves when applying the node twice.
Thanks to Leul Mulugeta (@Leul) for help with the
ascii diagrams in the code comments.
Note that this does not work well with some non-manifold geometry,
like an edge connected to more than 2 faces, or a vertex connected to
only two faces, while not being in the boundary. This is because there
is no good way to define the dual at some of those points. This type
of non-manifold vertices are just removed for this reason.
Differential Revision: https://developer.blender.org/D12949
|
|
Replace compare floats node with a generalized compare node. The node
allows for the comparison of float, int, string, color, and vector.
The datatypes support the following operators:
Float, Int: <, >, <=, >=, ==, !=
String: ==, !=
Color: ==, !=, lighter, darker
(using rgb_to_grayscale value as the brightness value)
Vector Supports 5 comparison modes for: ==, !=, <, >, <=, >=
Average: The average of the components of the vectors are compared.
Dot Product: The dot product of the vectors are compared.
Direction: The angle between the vectors is compared to an angle
Element-wise: The individual components of the vectors are compared.
Length: The lengths of the vectors are compared.
Differential Revision: https://developer.blender.org/D13228
|
|
Now that we can store any dynamic attribute on the instances component,
we don't need the special case for `id`, it can just be handled by the
generic attribute storage. Mostly this just allows removing a bunch
of redundant code.
I had to add a null check for `update_custom_data_pointers` because
the instances component doesn't have any pointers to inside of
custom data.
Differential Revision: https://developer.blender.org/D13430
|
|
This patch adds a layer_idx and pass_idx parameter to the rna_Image_gl_load function. It exposes both to the Python API as optional parameters.
This allows python scripters to specifiy which layer and pass they want to load in to an OpenGL texture. Right now image.gl_load() always takes the first layer and first pass.
This is limiting when working with multilayer openEXRs.
With this patch scripters can do something like this:
```
pass_idx = area.spaces.active.image_user.multilayer_pass
layer_idx = area.spaces.active.image_user.multilayer_layer
image.gl_load(frame=0, layer_idx=layer_idx, pass_idx=pass_idx)
```
As the parameters are optional and default to 0, it should not break existing code.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D13435
|
|
Commit f0d20198b290 used this field to flag rendered strips which were
queried by `SEQ_query_rendered_strips()`. Then operators iterate all
strips and checks state of `seq->tmp_flag`.
Use collection returned by `SEQ_query_rendered_strips` directly.
There should be no functional changes.
This commit adds functions `all_strips_from_context` and
`selected_strips_from_context` that provide collection of strips based
on context. Most operators can use this collection directly.
There is already `seq->tmp` DNA field, but is should not be used unless
absolutely necessary. Better option is to use human readable flag.
Best is to not use DNA fields for temporary storage in runtime.
|
|
When enabling or disabling a Mesh Sequence Cache modifier of an Object
with a hair particle system, the hair would switch positions. This is
caused because original coordinates in Blender are expected to be
normalized, and toggling the modifier would cause the usage of different
orco layers: one that is normalized, and the other which isn't.
This bug exposes a few related issues:
- if the Alembic file did not have orco data,
`MOD_deform_mesh_eval_get`, used by the particle system modifier, would
add an orco layer without normalization
- `MOD_deform_mesh_eval_get` would also ignore the presence of an orco
layer (e.g. one that could have been read from Alembic)
- if the Alembic file did have orco data, the data would be read
unnormalized
To fix those various issues, original coordinates are normalized when
read from Alembic and unnormalized when written to Alembic; and a new
utility function `BKE_mesh_orco_ensure` is added to add a normalized
orco layer if none exists on the mesh already, this function derives
from the code used in the particle system.
Reviewed By: brecht
Maniphest Tasks: T92561
Differential Revision: https://developer.blender.org/D13306
|
|
Indicates that this is just a buffer with an element size of 8 bit, not
a displayable/printable string buffer.
|
|
The stroke generation call mistakenly uses all enabled
types to check intersection mask, the correct behavior
is to use individual edge(chain) type.
|
|
Now do not invertes view vector in different stages of calculation.
|
|
Now do not invertes view vector in different stages of calculation.
|
|
This is part of T92926, and is very similar to 221b7b27fce3, except
slightly similar, because it only transfers from one component, and
it doesn't handle multi-threading at the moment.
|
|
- Integer Field input of the number of control points on each spline
in the spline domain.
- In the point domain, it is the number of points on the spline that
contains the given control point.
Differential Revision: https://developer.blender.org/D13279
|
|
|
|
This is part of T92926.
Differential Revision: https://developer.blender.org/D13429
|
|
|
|
No behavioral changes are expected here.
Part of T91414: Unify link/append between WM operators and BPY context
manager API, and cleanup usages of `BKE_library_make_local`.
|
|
given library.
This will be used by the copy/paste code.
Part of T91414: Unify link/append between WM operators and BPY context
manager API, and cleanup usages of `BKE_library_make_local`.
|
|
When appended collections are instantiated in viewlayers, do not add to
viewlayers collections children of other instantiated collections.
This default behavior is required for proper copy/paste behavior. If
previous behavior needs to be brought back for regular append operation,
this can be decided and done, but think this default behavior also makes
sense in normal append case.
part of T91414: Unify link/append between WM operators and BPY context
manager API, and cleanup usages of `BKE_library_make_local`.
|
|
The attributes need to be reallocated when the size changes.
Differential Revision: https://developer.blender.org/D13390
|
|
|
|
Unfortunately the drop logic for file-path based drag & drop checks the
used icon for its logic. This is very bad and should be changed. But
doing this involves some changes that are better not done during bcon4,
so for now stick to it and update the icon check.
Reviewed by: Julian Eisel
Differential Revision: https://developer.blender.org/D13383?id=45314
|
|
|
|
The stroke generation call mistakenly uses all enabled
types to check intersection mask, the correct behavior
is to use individual edge(chain) type.
|
|
When adding `INSERT` operations over RNACollection items, rna diffing
code did not properly report the properties as not being equals.
This in turn triggered the 'purge unused exiting override properties'
mechanism, thus deleting the exitsting (valid) insert override property
operation.
NOTE: This should also be backported to 2.93, and probably 2.83.
Reviewed By: sybren, jbakker
Maniphest Tasks: T93353
Differential Revision: https://developer.blender.org/D13426
|
|
The default snap behavior to perform on tools and cursors is to the
final geometry and not edited geometry.
In snapping to edited geometry, there are some specific behaviors that
are not convenient in some cases. For example the general occlusion
test of X-Ray geometries during dragdrop.
This fix also resolves a regression for tools like measure and placement
that were also ignoring the snap to face in x-ray mode.
Differential Revision: https://developer.blender.org/D13410
|
|
`BKE_blendfile_link_append` module.
Note that this fully replaces the 'PyCapsule' storage of linked/appended items
in the python API code by the generic storage of items in the
`BlendfileLinkAppendContext` data.
Maniphest Tasks: T91414
Differential Revision: https://developer.blender.org/D13331
|
|
|
|
- Rename the Curve Parameter node to Spline Parameter.
- Add "Index on Spline" to the node. This output is the index of
the current point on it's parent spline rather than the entrire curve.
Differential Revision: https://developer.blender.org/D13275
|
|
This component served no purpose anymore. It was technical
dept from the early 2.80 days.
Differential Revision: https://developer.blender.org/D13422
|
|
The `ASSET_OT_bundle_install` operator only works when the blend file is
self-contained. It reports any external dependencies. Before this patch:
- every dependency was mentioned, even when it repeated the same
filename over and over again, and
- multiple dependencies were all mentioned in the error popup,
potentially filling the screen.
This is now resolved by:
- only reporting each external file once, and
- referring to the console when there are multiple external dependencies.
Reviewed by: severin, dfelinto
Differential Revision: https://developer.blender.org/D13413
|
|
`file.select()` wasn't handling redirects as it should when it also
opens directories. This was only uncovered by a change in the keymap.
Reviewed By: Bastien Montagne, Harley Acheson
Differential Revision: https://developer.blender.org/D13388
|
|
|
|
Combined view of timeline and preview causes seemingly unpredictable
behavior after some operators have been allowed to run in preview
region.
Disable new features in this combined view, so behavior should be
consistent with previous versions.
ref: https://developer.blender.org/T92584
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D13419
|
|
Now that those functions are much widely used, just return early in case
there is nothing to link/append, instead of asserting over it.
|
|
This includes adjustment of rBc12d8a72cef5 to the new path traversal code
introduced in rBe5e8db73df86.
|
|
Add flag to `BKE_bpath_traverse_id()` and friends to skip weak
references (see below). This makes a distinction between "this blend
file depends on that file" and "this blend file references that file,
but doesn't directly use its data". This distinction is for the Asset
Bundle install operator, which refuses to copy the blend file when it's
not self-contained.
Weak references are those that are not directly used by the blend file,
but are still present to allow path rewriting. For example, when an
Asset is loaded its originating blend file is saved in
`ID::library_weak_reference`; this reference is purely for deduplication
purposes, and not for actually loading any data.
Reviewed by: mont29, brecht
Differential Revision: https://developer.blender.org/D13412
|
|
If strip is removed while proxy is built, this causes crash when
building is finished. This happens because proxy anims are freed in
`SEQ_proxy_rebuild_finish()`.
Iterate over available strips and check if original strip still exists
by comparing `SessionUUID`.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D13408
|
|
It's important the coordinates the knife is operating on are never
manipulated since it will cause problems which are difficult to
troubleshoot.
Instead, use a cast in the MEM_freeN(..) call.
This reverts commit 8600d4491fa4b349cb80241382c503abaf9c5ce9.
|
|
Change the current behavior of line number highlighting to follow the
current selected line text->sell, not the current line text->curl.
|