Age | Commit message (Collapse) | Author |
|
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.
|
|
This reverts commit 0a68fa8e14bdafaa2bc456981a571a3f65ad8b76.
|
|
To handle a rare case where it leads to a -1 index in isect order lookup
|
|
|
|
To be used in the future to support unity builds
|
|
|
|
|
|
Fixes many instances of `-Wstringop-overread` warning on GCC 11
Differential Revision: https://developer.blender.org/D13672
|
|
Use c++ headers; use nullptr; redundant `void` in parameter list;
inconsistent parameter name.
|
|
Doing this in preparation for some work on asset preview generation.
Differential Revision: https://developer.blender.org/D13676
|
|
The calls to `.fill` were overwriting indices that are processed by
other threads.
|
|
This evaluator is used in order to evaluate subdivision at render time, allowing for
faster renders of meshes with a subdivision surface modifier placed at the last
position in the modifier list.
When evaluating the subsurf modifier, we detect whether we can delegate evaluation
to the draw code. If so, the subdivision is first evaluated on the GPU using our own
custom evaluator (only the coarse data needs to be initially sent to the GPU), then,
buffers for the final `MeshBufferCache` are filled on the GPU using a set of
compute shaders. However, some buffers are still filled on the CPU side, if doing so
on the GPU is impractical (e.g. the line adjacency buffer used for x-ray, whose
logic is hardly GPU compatible).
This is done at the mesh buffer extraction level so that the result can be readily used
in the various OpenGL engines, without having to write custom geometry or tesselation
shaders.
We use our own subdivision evaluation shaders, instead of OpenSubDiv's vanilla one, in
order to control the data layout, and interpolation. For example, we store vertex colors
as compressed 16-bit integers, while OpenSubDiv's default evaluator only work for float
types.
In order to still access the modified geometry on the CPU side, for use in modifiers
or transform operators, a dedicated wrapper type is added `MESH_WRAPPER_TYPE_SUBD`.
Subdivision will be lazily evaluated via `BKE_object_get_evaluated_mesh` which will
create such a wrapper if possible. If the final subdivision surface is not needed on
the CPU side, `BKE_object_get_evaluated_mesh_no_subsurf` should be used.
Enabling or disabling GPU subdivision can be done through the user preferences (under
Viewport -> Subdivision).
See patch description for benchmarks.
Reviewed By: campbellbarton, jbakker, fclem, brecht, #eevee_viewport
Differential Revision: https://developer.blender.org/D12406
|
|
Before one could only create a new group input using the link drag search.
With this patch it becomes possible to create a Group Input node for an
existing input.
Differential Revision: https://developer.blender.org/D13674
|
|
This adds `blender::is_same_any_v` which is the almost the same as
`std::is_same_v`. The difference is that it allows for checking multiple
types at the same time.
Differential Revision: https://developer.blender.org/D13673
|
|
The placement-new operator requires `#include <new>`.
It is used in `MEM_new`.
|
|
In case they overflowed the bounding area maximum link count,
Protect the link array so it doesn't crash.
|
|
The edge is linked twice from differen calls during line art calculation
Probably caused by a merge and both calls stayed for some reason.
This would lead to edge link overflowing its limit of 2^16 items.
|
|
Missed this function in rB67525b88d2e
|
|
Own mistake in rB67525b88d2e
|
|
The crash happens when opening a panel (added in rB43f5e761a66e87fed664a199cda867639f8daf3e)
when no CacheFile is set in the modifier.
To fix this, check that the CacheFile pointer is not null before attempting to draw anything.
|
|
Most of the comment block is similar to the text in the source
code documentation wiki. It's helpful to have some text in
a header file too, so it's closer for programmers already looking
at the code.
This also uses more consistent syntax and wording in the comments
about the attribute API in `GeometryComponent`.
Ref T93753
Differential Revision: https://developer.blender.org/D13661
|
|
It's preferred to use `area` as a name for `ScrArea` variables.
|
|
Differential Revision: https://developer.blender.org/D13666
|
|
This patch adds the breakdown (or tween) functionality to the graph editor.
The factor defines the linear interpolation from left key to right key.
Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D9375
Ref: D9375
|
|
This node is a bit special in that it uses two internal sockets
for a hack for Eevee; see rBffd5e1e6acd296a187e7af016f9d7f8a9f209f87
As a result, the `SOCK_UNAVAIL` flag is exposed to socket builder API.
Reviewed By: JacquesLucke, fclem
Differential Revision: https://developer.blender.org/D13496
|
|
Also simplify the allocation name to `__func__`
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D13665
|
|
This patch adds the blend to neighbor operator to the Graph editor.
The operator acts like the blend to neighbor operator for a pose context, just working on keyframes.
Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D9374
Ref: D9374
|
|
The prop name was wrong.
|
|
The issue was caused by rB7e712b2d6a0d257d272ed35622b41d06274af8df
and the fact that `GPUMaterialTexture` contains an `ImageUser *` which
references the `ImageUser` on e.g. `NodeTexImage`.
Since the node tree update refactor, it is possible that the node tree changes
without changing the actual material. Therefore, either the renderer should
check if the node tree has changed or it should not store pointers to data in
node storage. The latter approach is implemented in this patch.
Differential Revision: https://developer.blender.org/D13663
|
|
|
|
Differential Revision: https://developer.blender.org/D12962
|