The viewport compositor crashes if the user enters a group node if no
viewer node exists. This is because the code still allowed group output
nodes to be added as compositor outputs in none root contexts, which is
forbidden since e34e6373b6. To fix this, we refactor the code to
disallow such cases.
Pull Request: https://projects.blender.org/blender/blender/pulls/143933
As discussed in #143014, the ripping operators gave error messages that
left the user clueless as to why the operator fails and what to do from
there. This PR aims to fix that by changing the error messages.
Pull Request: https://projects.blender.org/blender/blender/pulls/143102
The EEVEE performance tests call scene.frame_set at the end of the warmup stage, which recursively
calls frame_change_handler. Eventually, this leads to a RecursionError. This PR adds a guard for
checking if frame_set is currently active and returns early for this recursive call of the function.
Pull Request: https://projects.blender.org/blender/blender/pulls/143203
As part of the addition of free normals, the join geometry and realize
instances nodes were updated to properly join custom normals. When one
mesh input had tangent space normals and another had no custom normals,
I chose to use free custom normals for the output mesh since that has
drastically better performance. However, it turns out users get into
that situation much more often than I expected, and because many areas
still don't support free custom normals very well, and their presense
isn't obvious, this causes confusion.
This commit changes this code to output tangent space custom normals
whenever any of the input meshes have tangent space custom normals.
That also maintains the most information for propagation later, since the
"default" status of (0,0) custom normals is maintained.
Fixes#143368
Pull Request: https://projects.blender.org/blender/blender/pulls/143498
In a58dd0b5c3 sequential overlay segments
writing was replaced by a parallel one. But there was one hidden issue:
each curve knows its number of points and starting offset. If you want
to drop one curves set from domain -- you have to sequentially offset
all other curves. And this was not done. Gap between poly and nurbs
curve ,point indices created for bezier still there. And once it stop
being filled by 0 after 3e8250e60c we meet
all the segments of garbage. Proper fix: lay left handle segments in
space created for bezier segments. This fix: hide issue until proper
fix (non trivial refactor).
Pull Request: https://projects.blender.org/blender/blender/pulls/143858
The default grain size of 10000 for multi function execution was much
too large for the fairly expensive BVH traversal. In the file from
#143455, reducing te grain size to 512 increase the playback FPS from
8 to 20.
This adds support for tracing bundle and closure structures through repeat zones,
simulation zones and bake nodes. Previously, syncing through these nodes just
didn't work.
Pull Request: https://projects.blender.org/blender/blender/pulls/143860
This makes it so that Grease Pencil Bezier handles use the same colors and shaders as `Curves` Objects.
This also makes the handles follow `handle_display` and add the option the the edit mode overlay.
Pull Request: https://projects.blender.org/blender/blender/pulls/141524
This adds support for creating Combine Bundle, Separate Bundle and Evaluate Closure
nodes using link drag search in some cases that were not previously supported.
Pull Request: https://projects.blender.org/blender/blender/pulls/143835
We generally expect `bNodeTreeRuntime::nodes_by_id` to be valid at all times, so
it also has to have the same order `bNodeTree.nodes`. When freeing a node, the
entire vector set was rebuild currently to ensure that invariant. This leads
O(n^2) behavior when all nodes are freed as is commonly the case with depsgraph
copies etc.
This patch implements an optimization where `nodes_by_id` is not rebuild if only
the last node was removed. In this case, that not can just be popped from
`nodes_by_id` without affecting the order of the other nodes. To use this
optimization, the node tree freeing code now frees nodes in reverse order.
Pull Request: https://projects.blender.org/blender/blender/pulls/143831
This is useful when the src node name is not unique, but the caller can provide
a unique name more efficiently then if the function has to compute the name
automatically.
This removes the "Geometry" part from their name because we want to use them in
other node tree types too (see #141936).
Usually, we don't change idnames because they are the primary identifier of
nodes and is expected to stay the same. Since they are generally not shown to
users (just Python developers), it's also not urgent to change them. However, in
this specific case we have the opportunity to update the idname before the node
becomes an official feature, so it's not as bad to change it.
This patch has full backward compatibility, but no forward compatibility (for
files that used the experimental feature).
Pull Request: https://projects.blender.org/blender/blender/pulls/143823
This makes sure that a bundle item has a more well defined beginning
and end when using e.g. a comma separated list for bundle items.
This allows using e.g. `, ` instead of just `,` as separator (note the
extra space in the first separator).
While all callers currently operate on the selection, the function
supports other header-flags, so check the selection is being used
before updating & flushing the selection.
The current glare streaks threshold for highlights is too high so the
input is just a black image, and no effects are output.
The threshold was reduced from 2.0 to 0.2 to produce a visible change.
Pull Request: https://projects.blender.org/blender/blender/pulls/142320
`node_pixelate` sets the output pixel size to 1, meaning no
transformation occurs and it is essentially the same as a single value
input. This will add a new test that pixelates the image, and renames
the original test to better reflect that edge case
Coverage:
- Function: 62.50% -> 100%
- Line: 37.36% -> 100%
- Region: 45.83% -> 100%
- Branch: 20.00% -> 90.00%
Pull Request: https://projects.blender.org/blender/blender/pulls/142438
This adds "use_occlude_geometry=True" and "only_selected=False" to the
keymap entry for K, mesh.knife_tool, even though these are the default
values for this operator. This fixes the complaint. And these same
props are set for "Knife Topology Tool" on the VIEW3D_MT_edit_mesh
menu so that it displays the shortcut correctly (#139393 remains
corrected).
Pull Request: https://projects.blender.org/blender/blender/pulls/143673
The EEVEE performance tests wait for shader compilation to finish before
beginning to record performance. However, shader compilation can also
happen after the first frame. This PR adds a check to the warmup phase
to see if shader compilation is still happening. This happens, e.g., for
the Mr. Elephant demo scene.
Pull Request: https://projects.blender.org/blender/blender/pulls/143690
This is yet another fully virtual property (it does not exist as-is in
DNA, and requires both getter and setter) that does handle ID
refcounting of the affected materials. Now these require an explicit
definition of `PROP_ID_REFCOUNT`, as this flag cannot be defined
automatically by makesrna.
`delete_cached_binary` didn't work correctly since the cache hash could
be overwritten before the subprocess crashed.
This fix requires an extra memory copy, but it doesn't seem to incur any
measurable overhead.
An alternative could be to store the cache name in its own variable in
ShaderBinaryHeader, but that would break cache files compatibility.
Pull Request: https://projects.blender.org/blender/blender/pulls/143649
Add a [Python code generator][1] that takes an OpenAPI definition and
outputs the corresponding data model as [dataclasses][2]
This is intended to be used in the Remote Asset Library project, to
create, download, parse, and validate information of a remote asset
library.
[1]: https://koxudaxi.github.io/datamodel-code-generator/
[2]: https://docs.python.org/3/library/dataclasses.html
## Running the Generator
The generator is a Python script, which creates its own Python
virtualenv, installs the dependencies it needs, and then runs the
generator within that virtualenv.
The script is intended to run via the `generate_datamodels` CMake
target. For example, `ninja generate_datamodels` in the build
directory.
## Details
The virtualenv is created in Blender's build directory, and is not
cleaned up after running. This means that subsequent runs will just
use it directly, instead of reinstalling dependencies on every run.
## Generated Code & Interaction with Build System
It is my intention that the code generation _only_ happens when the
OpenAPI specification changes. This means that the generated code will
be committed to Git like any hand-written code. Building Blender will
therefore _not_ require the code generator to run. Only people working
on the area that uses the generated code will have to deal with this.
Pull Request: https://projects.blender.org/blender/blender/pulls/139495
When adding a shape key, set its blend value to 1.0 / 100%.
There is no practical use case where user wants to add shape key but
not work on it. New shape keys at value 0 have no purpose. Adding
shape key should be interpreted by Blender as user wanting to
sculpt/model on it. Also, being at 1.0 initially doesn't change
anything visually, because key isn't edited yet and it doesn't deform
mesh.
The default value of the shape key is also set to 1.0. When using
right-click to reset values, user most often wants to return to 1
(which is "correct" state of deformation without multiplication)
rather than 0 (which is no deformation at all).
Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/133399