Age | Commit message (Collapse) | Author |
|
As @hooglyboogly suggested in D13680, this patch adds weighting
to the search results. Dragging from a vector/rgba socket weights
the Vector Math node higher than a float Math node, and vice versa.
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D13691
|
|
Search was picking up the menu separator entries.
Add check for these which are defined by empty identifier strings.
|
|
Rather than using the array syntax that doesnt work in C++,
use a switch state which is also much easier to read.
|
|
Also add file namespace
This is needed to use new node APIs
Differential Revision: https://developer.blender.org/D13690
|
|
When the material is used in several objects, the filter by material is not working as expected because the internal pointers are different due eval version.
Now, the original version of the material is compared to keep same address.
|
|
Bug: Set Origin causes unexpected offset on Grease Pencil strokes when Curve Editing is enabled.
Fix: Add transformation of editcurve points in `object_origin_set_exec`.
Reviewed By: #grease_pencil, antoniov
Maniphest Tasks: T93134
Differential Revision: https://developer.blender.org/D13273
|
|
Before the negative scales produced a thickness invalid. Now, the value is used in absolute value to avoid this situation.
|
|
Exposes math operations via rna emums.
This uses the rna enum to build the search list.
Differential Revision: https://developer.blender.org/D13680
|
|
This is analagous to 6a71b2af66cf10556b21 which did the same
thing for mesh data. Two differences are that here the coordinates
are simply `float3`, and we account for the radius if it's available.
Here I observed a similar performance increase, from 50ms
average to 10ms average, with 16 million points, a 5x speedup.
The calculation is about 1.4 times faster when no radius is used, down
to 7.3ms average. Before, the calculation was only 1.2 times faster.
|
|
|
|
Also add/correct file namespace
This is needed to use new node APIs
Differential Revision: https://developer.blender.org/D13688
|
|
This was caused by a mistake in eb0eb54d9644c5139, which removed
the clearing of the curve edit mode pointers that are set when creating
the temporary data for the conversion. If they are not cleared, the
generic ID free function will also free the edit mode data, which is
wrong when the source curve is in edit mode.
|
|
At the time of allocating the buffer with vertices in context, we don't
know exactly how many vertices are affected, but we do know that it is
less than or equal to twice the number of vertices killed.
|
|
This just moves the relations update to a lower level function that is used
by other functions. Eventually, the special case for this node should be
generalized.
|
|
|
|
Ever since the instance domain was added, this was exposed, it just
didn't do anything. This patch implements the instances domain in the
delete and separate geometry nodes, where it acts on the top-level
instances.
We act on a mutable instances input, with the idea that eventually
copy on write attribute layers will make this less expensive. It also
allows us to keep the instance references in place and to do less
work in some situations.
Ref T93554
Differential Revision: https://developer.blender.org/D13565
|
|
This function node creates a running total of a given Vector, Float, or
Int field.
Inputs:
- Value: The field to be accumulated
- Group Index: The values of this input are used to aggregate the input
into separate 'bins', creating multiple accumulations.
Outputs:
- Leading and Trailing: Returns the running totals starting
at either the first value of each accumulations or 0 respectively.
- Total: Returns the total accumulation at all positions of the field.
There's currently plenty of duplicate work happening when multiple outputs
are used that could be optimized by a future refactor to field inputs.
Differential Revision: https://developer.blender.org/D12743
|
|
A few typos in 17770192fb0c5fddda lead to an incorrect count of custom
data layers in the test meshes. We only want to consider layers that are
not anonymous, and there was a copy and paste mistake.
|
|
- Use default size consistent with other curve nodes
- Use column instead of row for properties
|
|
`GeometrySet::compute_boundbox_without_instances` may not initialize min
max in some cases such as meshes without vertices.
This can result in a Bounding Box with impossible dimensions
(min=FLT_MAX, max=-FLT_MAX).
So repeat the same solution seen in `BKE_object_boundbox_calc_from_mesh`
and set boundbox values to zero.
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D13664
|
|
|
|
All these function paramaters are set to NULL so they arent necessary.
Reviewed By: HooglyBoogly, JacquesLucke
Differential Revision: https://developer.blender.org/D13686
|
|
Some projects need more than 8-bit RGBA off-screen, so add the ability to
accept color format and defaults to RGBA8 so existing code should not be
affected.
Currently supported formats:
- RGBA8 (default)
- RGBA16
- RGBA16F
- RGBA32F
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D13650
|
|
Blend factor was used to adjust alpha of background image, which is not
correct. This was done in fdee84fd567a where another change was, that
background alpha is copied into result, which is correct.
Apply blend factor to foreground image alpha channel.
|
|
The array modifier does not necessarily tag normals dirty.
If it doesnt, normals are recalculated "internally" using the offset ob
transform. This was happening for the array items, but not for the caps.
Now do the same thing for caps.
Maniphest Tasks: T94422
Differential Revision: https://developer.blender.org/D13681
|
|
I had assumed that the span's size was the same as the length variable.
In the future, separate lengths could be removed in favor of using
lengths directly from spans.
|
|
Also add file namespace
This is needed to use new node APIs
Differential Revision: https://developer.blender.org/D13684
|
|
Fixes two instances of `-Wunused-but-set-variable`
There are several more of these but these were low hanging
and noisy with one being in a header functions.
|
|
- modernize-deprecated-headers
- modernize-redundant-void-arg
Missed in rB11ac276caaa6e6d42176452526af97cf972abb5f
|
|
|
|
This improves code readability.
Take the opportunity and improve the comments too.
|
|
|
|
Unity build saves 5 seconds off the total build time when compiling `bf_nodes_function`.
Total build times went from 25s to 20s (20% reduction),
tested with ninja on linux running i5 8250U.
|
|
In the future this will be used to support unity builds for function nodes
Differential Revision: https://developer.blender.org/D13682
|
|
|
|
To be used in the future to support unity builds
|
|
Using the output declarations is incorrect because there is a
declaration for each type. Instead loop over the names directly,
since it will make it easier to add an integer mode that only
supports some of the outputs.
|
|
The calculation to find the factor between two evaluated points assumed
that the points were not at the same location. This assumption is some-
what reasonable, since we might expect `lower_bound` to skip those
point anyway. However, the report found a case where the first two
evaluated points were coincident, and there is no strong reason not
to make this safe, so add a check for 0 length before the division.
|
|
This is part of T94439
|
|
In the future this will be used to support unity builds for composite nodes
Differential Revision: https://developer.blender.org/D13678
|
|
The region used to be type "Channels", but the standard for this
type is "Tools", which is what the file browser uses. This follows
the changes in rB01df48a98394, which also make the region more
"standard."
|
|
Some effect functions looped over alternating lines, previously with
different factors. Since only one factor is used, code can be
simplified by looping all lines in one for loop.
There should be no functional changes.
|
|
This fix avoid the segment fault for several operators.
|
|
Also avoid overriding collections of bone shape objects, if possible.
|
|
* Assert about source ID of an overridden pointer property not being a
liboverride was not necessary, just skip in that case.
* Tag actual 'real' ID owner for resync, and not (potentially) an embedded one.
|
|
2 factor variables were passed to effects, but they were hard coded to
have same value.
Remove duplicate variable from arguments, rename single argument to
`fac`. Inverted factor variables were renamed to `mfac`. Any other
factor related variables are prefixed with `temp_`.
There should be no functional changes.
|
|
If the override system creates an override record for the cache
name (no idea why though), it trashes the disk cache on file load.
The reason is that it tries to rename cache files in update handler
when assigning the name, and BLI_rename deletes the target file even
if both names are the same.
This is a safe fix that simply aborts the pointless rename attempt.
Differential Revision: https://developer.blender.org/D13679
|
|
|
|
Stubs were missing for functions added to opensubdiv_evaluator_capi.h
|
|
The deadlock was caused as the lock on the Mesh mutex used to compute
the subdivision wrapper was not released in some early exits of the
function.
|