Age | Commit message (Collapse) | Author |
|
This was originally written by Ankit Meel as a GSoC 2020 project.
Howard Trickey added some tests and made some corrections/modifications.
See D13046 for more details.
This commit inserts a new menu item into the export menu called
"Wavefront OBJ (.obj) - New".
For now the old Python exporter remains in the menu, along with
the Python importer, but we plan to remove it soon (leaving the
old addon bundled with Blender but not enabled by default).
|
|
Compare the start of the range to zero to figure out whether the
indices for the instances to keep starts at zero. Also rename the
selection argument, since it made it seem like the selected indices
should be removed rather than kept.
|
|
The activation of the text button is a bit special, since it happens during
drawing, the layout isn't computed yet then. Comparable cases where the button
is added on top don't use the layout system, so this didn't become an issue
until now. Trigger a delayed call to `UI_but_ensure_in_view()`.
|
|
This completes 1a721c5dbec928b0e by versioning old files to correct the
region type. The "tools" region type is relatively standard for this type
of region and doesn't require any changes to the theme, unlike
the "nav bar" type, which would have been a reasonable choice.
|
|
Calculates the angle in radians between two faces that meet at an edge.
0 to PI in either direction with flat being 0 and folded over on itself PI.
If there are not 2 faces on the edge, the angle will be 0.
For valid edges, the angle is the same as the 'edge angle' overlay.
For the Face and Point domain, the node uses simple interpolation to calculate a value.
Differential Revision: https://developer.blender.org/D13366
|
|
Allow overriding simple properties of cloth simulations, colliders
and force fields. Vertex group and shape key selectors in cloth are
still not overridable since they are tied to mesh data.
Force fields have a number of physical fields shared between multiple
RNA fields. Until they are decoupled, they will produce redundant
overrides, and cannot have different hard range limits.
Differential Revision: https://developer.blender.org/D13710
|
|
Regression introduced in rB098008f42d8127d9b60717c7059d3c55a3bfada7
Previously the selected geometry was ignored along with the hidden one.
The mentioned commit caused neither the hidden nor the selected one to be ignored.
But hidden geometry needs to be ignored.
|
|
Continuation of the D13404 which finished the design of not having
geometry-level nodes dependent on object-level.
Differential Revision: https://developer.blender.org/D13405
|
|
|
|
|
|
ObjectValue was to confusing as it is the term from JSON.
|
|
This implements the design detailed in T92696 to support virtual
filenames for UDIM textures. Currently, the following 2 substitution
tokens are supported:
| Token | Meaning |
| ----- | ---- |
| <UDIM> | 1001 + u-tile + v-tile * 10 |
| <UVTILE> | Equivalent to u<u-tile + 1>_v<v-tile + 1> |
Example for u-tile of 3 and v-tile of 1:
filename.<UDIM>_ver0023.png --> filename.1014_ver0023.png
filename.<UVTILE>_ver0023.png --> filename.u4_v2_ver0023.png
For image loading, the existing workflow is unchanged. A user can select
one or more image files, belonging to one or more UDIM tile sets, and
have Blender load them all as it does today. Now the <UVTILE> format is
"guessed" just as the <UDIM> format was guessed before.
If guessing fails, the user can simply go into the Image Editor and type
the proper substitution in the filename. Once typing is complete,
Blender will reload the files and correctly fill the tiles. This
workflow is new as attempting to fix the guessing in current versions
did not really work, and the user was often stuck with a confusing
situation.
For image saving, the existing workflow is changed slightly. Currently,
when saving, a user has to be sure to type the filename of the first
tile (e.g. filename.1001.png) to save the entire UDIM set. The number
could differ if they start at a different tile etc. This is confusing.
Now, the user should type a filename containing the appropriate
substitution token. By default Blender will fill in a default name using
the <UDIM> token but the user is free to save out images using <UVTILE>
if they wish.
Differential Revision: https://developer.blender.org/D13057
|
|
Also add file namespace
This is needed to use new node APIs
Differential Revision: https://developer.blender.org/D13690
|
|
It is common to have fields that contain a constant value. Before this
commit, such constants were represented by operation nodes which
don't have inputs. Having a special node type for constants makes
working with them a bit cheaper.
It also allows skipping some unnecessary processing when evaluating
fields, because constant fields can be detected more easily.
This commit also generalizes the concept of field node types a bit.
|
|
Currently, a node either supports lazyness during execution (like the Switch
node), or it doesn't. If it does support lazyness, then every input is computed
lazily. However, usually not all inputs actually have to be computed lazily.
E.g. the boolean switch input is always required, while the other inputs
should be computed lazily.
Better support for such sockets can avoid unnecessary round trips through
the node execution function.
|
|
Exposes compare operations via rna emums.
This uses the rna enum to build the search list using
named operations linked to socket A.
This also weights the Math Node comparison operations lower
for geometry node trees.
Differential Revision: https://developer.blender.org/D13695
|
|
The logic used to be:
"if collection doesn't have child collection, check if ob is from this one"
The correct logic should be:
"if collection child does not have this ob, then check this collection".
|
|
Handles rare cases where line doesn't intersect the triangle correctly.
|
|
In the past that worked because the `GPUMaterial` referenced the
`ImageUser` from the image node. However, that design was incompatible
with the recent node tree update refactor (rB7e712b2d6a0d257d272e).
Also, in general it is a bad idea to have references between data that is
owned by two different data blocks.
This incompatibility was resolved by copying the image user from the node
to the `GPUMaterial` (rB28df0107d4a8). Unfortunately, eevee depended
on this reference, because the image user on the node was update when the
frame changed. Because the image user was copied, the image user in the
`GPUMaterial` did not receive the frame update anymore.
This frame update is added back by this commit. The main change is that
the image user iterator now also iterates over image users in `GPUMaterial`s
on material and world data blocks. An issue is that these materials don't
exist on the original data blocks and that caused the check in
`build_animation_images` in the depsgraph to give the wrong answer.
Therefore the check is extended.
Right now the check is not optimal, because it results in more depsgraph
nodes than are necessary. This can be improved when it becomes cheaper
to check if a node tree contains any references to a video texture.
The node tree update refactor mentioned before makes it much easier
to construct this kind of run-time data from the bottom up, instead of
scanning the entire node tree recursively every time some information
is needed.
|
|
Incorrectly used comparison for empty string.
Reported in chat by @jacqueslucke.
|
|
This just skips the entire algorithm when there are cycles.
In the future, cycles could be handled more gracefully in the
algorithm, but for now that's not worth it and is not necessary
to fix the bug.
|
|
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
|