Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|