Age | Commit message (Collapse) | Author |
|
GPU_SHADER_3D_POLYLINE_(FLAT/SMOOTH/UNIFORM/CLIPPED_UNIFORM)_COLOR
TODO:
* GPU_SHADER_3D_CLIPPED_UNIFORM_COLOR
* Check all usages of clipped uniform shaders.
{T95016}
|
|
The ustring is not a trivially copyable object from the C++ standard
point of view, so using memcpy on it is strictly wrong. In practice,
however, this is OK since it is just a thin wrapper around char*.
For now use explicit cast to void* same as it was done in other places
of ccl::array implementation. But also localize the place where memory
copy happens to make it easier to support proper non-trivial C++
objects in the future.
|
|
This merge the description into one struct only that can be more easily
copied during `finalize()`.
The in and out layout parameters are better named and extended with the
invocation count (with fallback support)
|
|
Route cause was data alignment mismatch between GPU and CPU. This
mismatch would not allow us to bind the UBO where data wasn't available
on the GPU.
Fixed by using float4 in stead of float2. This could eventually be
packed, but that would lead to less readable code.
|
|
Cause was incorrect logic when generating the resource layout. It the
explicit_location_support setting was ignored and the binding were
generated for image, uniform buffers and storage buffers.
|
|
- Add BM_mesh_debug_print & BM_mesh_debug_info.
- Report flags in Mesh.cd_flag in BKE_mesh_debug_print
- Move custom data printing into customdata.cc (noted as a TODO).
Note that the term "runtime" has been removed from
`BKE_mesh_runtime_debug_print` since these are useful for debugging any
kind of mesh data.
|
|
Code that handled merging & initializing custom-data from other
meshes sometimes missed checks for this flag, causing bevel weights to
lost when the mesh was converted to a BMesh.
The following changes are a more general fix for T94197.
- Add BM_mesh_copy_init_customdata_from_mesh_array which initializes
custom-data from multiple meshes at once.
As well as initializing custom-data layers from Mesh.cd_flag.
This isn't essential for boolean, however it avoids the overhead of
resizing custom-data layers.
- Loading mesh data into a BMesh now respects Mesh.cd_flag
instead of only checking if the BMesh custom-data-layer exists.
Without this, the order of meshes passed to BM_mesh_bm_from_me could
give different (incorrect) results.
- Copying mesh data now copies `cd_flag` too. This is a precaution
as in my tests evaluating modifiers these values always matched.
Nevertheless it's correct to copy this value as custom-data it's
self is being copied.
|
|
The rationale for storing thumbnails at different sizes wasn't obvious.
|
|
Error in 0e1bb232e68ce71f4c3dd331ed6331665238a065.
|
|
read_color and read_depth
The buffer passed as an argument to `GPUFrameBuffer.read_color` is used
in the return of the function and therefore, if not used, its refcount is
decremented.
So be sure to increment the refcount of the already existing objects that
will be used in the return of a function.
|
|
|
|
This was the case for multi input sockets that have a link already.
Since we have multi input sockets, the way we use `socket_is_available`
is not really giving the expected result on these.
When used for input sockets the intention is to find a free socket
(either for noodle **replacement**, then it is always available, or just
the next free available socket).
Now I would think without the intention to replace an existing link, a
multi input socket should still be available.
From the inside of the function, the `replace` argument turns [namewise]
to `allow_used`, which sounds a little different (so one might argue
that if `allow_used` is `False` this should also trigger for already
connected multi input sockets).
In the end, this is an issue with the variable naming though, cant think
of a usecase where the patch change would really go against intentions.
Maniphest Tasks: T93413
Differential Revision: https://developer.blender.org/D13866
|
|
Bug possibly introduced in {rBc57e4418bb85aec8bd3615fd775b990badb43d30}.
Interestingly, the orientation set before (NORMAL), even different from
the orientation that was actually used, was allowing the use of
"orient_matrix" ("orient_matrix_type" should have been NORMAL in that
case too).
In any case, make sure the "orient_matrix_type" and "orient_type" are the
same so that the "orient_matrix" is used.
|
|
These operations (sorting and selecting all nodes) should generally
be handled by the node editor and not outside code. They were not
called outside of the node editor, so they can be moved to the editor's
`intern` header.
|
|
This file was added nine years ago, and was unused then.
Now with active tools we use a different approach to create
toolbars, so the file is not relevant.
|
|
|
|
This node allows accessing data of other elements in the context geometry.
It is similar to the Transfer Attribute node in Index mode. The main difference
is that this node does not require a geometry input, because the context
is used.
The node can e.g. be used to generalize what the Edge Vertices node is doing.
Instead of only being able to get the position of the vertices of an edge,
any field/attribute can be accessed on the vertices.
Differential Revision: https://developer.blender.org/D13825
|
|
Adds a second output to the edge angle node that shows the signed angle
between the two faces, where Convex angles are positive and Concave angles
are negative. This calculation is slower than the unsigned angle, so it
was best to leave both for times where the unsigned angle will suffice.
Differential Revision: https://developer.blender.org/D13796
|
|
It's now easier than before to do the interpolation of attributes
only for the elements that are actually used in some cases.
This can result in a speedup because unnecessary computations
can be avoided. See the patch for a simple performance test.
Differential Revision: https://developer.blender.org/D13828
|
|
Cause of the issue isn't that clear, but the NVIDIA GLSL compiler
complained that it couldn't find an overloaded function when the second
parameter is an interger. This change fixes it by using a float.
|
|
Display exact integer values of a floating point fields without
a fraction if the step is also an exact integer. This is intended
for cases when the value can technically be fractional, but most
commonly is supposed to be integer.
This handling is not applied if the field has any unit except frames,
because integer values aren't special for quantities like length.
The fraction is discarded in the normal display mode and when copying
the value to clipboard, but not when editing to remind the user that
the field allows fractions.
Differential Revision: https://developer.blender.org/D13753
|
|
Fix a precision issue when stepping down from 1 to 0 via the left
decrement button and step 100 results in a small nonzero value.
The reason is that 0.01 can't be precisely represented in binary
and converting to double before multiplication reveals this.
Ref D13753
|
|
In normal conditions, `gpf` always has a value, but better move inside the NULL checking.
|
|
This patch converts GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR shader to use
the GPUShaderCreateInfo pattern. It can be used as a reference when
converting other shaders.
In this special case the flat uniform vector cannot be used anymore as it
doesn't fit as push constants. To solve this a uniform buffer is used.
|
|
Add a preprocessing step that removes all muted links from
the localized node tree.
Differential Revision: https://developer.blender.org/D13864
|
|
The previous optimization did not work in general yet, unfortunately.
This change makes the code more correct, but also brings back
some unnecessary updates (e.g. when creating a node group).
|
|
For boolean operations only one of the meshes was checked to determine
if bevel weights should be created.
Now initialize custom data from both meshes flag.
Note that this is a localized fix to be back-ported, further changes
will be made so edit-mode conversion accounts for this
without the caller needing explicit checks for custom-data flags.
|
|
Asset indexing was disabled as ID property indexing wasn't supported.
Now that ID property support is added we can enable asset indexing.
Check {T91406} for more information about asset indexing.
|
|
Object/collection asset workflow would need the bounding box for snapping.
The bounding box is stored using ID properties in the scene. Currently ID properties
aren't stored in the asset index, what would break object snapping. For this reason
Asset Indexing is turned off in mater. This patch will introduce the indexing of ID
properties what will allow the indexing to be turned on again.
## Data Mapping ##
For data mapping we store the internal structure of IDProperty to the indexer (including meta-data) to be able to deserialize it back.
```
[
{
"name": ..,
"value": ..,
"type": ..,
/* `subtype` and `length` are only available for IDP_ARRAYs. */
"subtype": ..,
},
]
```
| **DNA** | **Serialize type** | **Note** |
| IDProperty.name | StringValue| |
| IDProperty.type | StringValue| "IDP_STRING", "IDP_INT", "IDP_FLOAT", "IDP_ARRAY", "IDP_GROUP", "IDP_DOUBLE"|
| IDProperty.subtype | StringValue| "IDP_INT", "IDP_FLOAT", "IDP_GROUP", "IDP_DOUBLE" |
| IDProperty.value | StringValue | When type is IDP_STRING |
| IDProperty.value | IntValue | When type is IDP_INT |
| IDProperty.value | DoubleValue | When type is IDP_FLOAT/IDP_DOUBLE |
| IDProperty.value | ArrayValue | When type is IDP_GROUP. Recursively uses the same structure as described in this section. |
| IDProperty.value | ArrayValue | When type is IDP_ARRAY. Each element holds a single element as described in this section. |
NOTE: IDP_ID and IDP_IDARRAY aren't supported. The entry will not be added.
Example
```
[
{
"name": "MyIntValue,
"type": "IDP_INT",
"value": 6,
},
{
"name": "myComplexArray",
"type": "IDP_ARRAY",
"subtype": "IDP_GROUP",
"value": [
[
{
"name": ..
....
}
]
]
}
]
```
## Considered alternatives ##
- Add conversion functions inside `asset_indexer`; makes generic code part of a specific solution.
- Add conversion functions inside `BLI_serialize`; would add data transformation responsibilities inside a unit that is currently only responsible for formatting.
- Use direct mapping between IDP properties and Values; leads to missing information and edge cases (empty primitive arrays) that could not be de-serialized.
Reviewed By: Severin, mont29, HooglyBoogly
Maniphest Tasks: T92306
Differential Revision: https://developer.blender.org/D12990
|
|
This updates the example function to support assigning a subset of
bone matrices. The code was tested to work in real use by @gaiaclary.
|
|
Motion paths themselves aren't getting saved (not sure if they are
without overrides), but being able to override options makes them
usable even if it's necessary to regenerate every edit session.
Differential Revision: https://developer.blender.org/D13842
|
|
Copy paste error in a5917175d8c1a7cab83b401ae2f4affcd4ab8df4.
|
|
Some new obj exporter tests were disabled because the normals were different
in the last decimal place on different platforms.
The old python exporter deduped normals with their coordinates rounded to
four decimal places. This change does the same in the new exporter.
On one test, this produced a file 25% smaller and even ran 10% faster.
|
|
|
|
|
|
Also order items to match the "Add" menu.
|
|
The outliner selection can now be used for renaming objects,
object-data & materials.
|
|
|
|
|
|
Use selected objects collection instances to rename in the 3D view.
|
|
User must activate the operator from the outliner,
so that the selected collections can be determined.
Reviewed By: campbellbarton
Ref D13821
|
|
|
|
No change in behavior.
|
|
This can simplify iterating through all of the indices in the vector,
which is fairly common, since one of the benefits of the data structure
is that all values are contiguous.
|
|
This node's UI uses a multi-select enum to allow adjusting the
type of both handle sides with the same node. Since usually the
user wants to affect both handles, and it's the multi-select behavior
isn't obvious, selecting both by default is an improvement.
|
|
Needs more TBB task isolation, as even freeing an OpenVDB grid uses
multithreading.
|
|
This significantly reduces discontinuities on UV seams, by giving a better
match of the texture filtered colors on both sides of the seam. It works by
using pixels from adjacent faces across the UV seam.
This new option is called "Adjacent Faces" and is the default. The old option
is called "Extend", and extends border pixels outwards.
Differential Revision: https://developer.blender.org/D13303
|
|
Not needed anymore after aa0ecd179. The removed function was identical
to `icon_draw_rect()` now.
Reverts ab7214ca2ef9.
|
|
|
|
Followup to the previous commit. Jeroen and I agreed the old naming was
confusing.
|