The mesh positions are now a span, but the convex hull didn't copy
the custom data layout to the new mesh since it assumed it didn't
need to. Moving UV maps to a generic attribute triggers this difference
in the test results.
It doesn't really make sense for the convex hull node to copy the
source mesh custom data layout at all anyway, but do it anyway
to avoid having to change the tests right now.
Currently the `MLoopUV` struct stores UV coordinates and flags related
to editing UV maps in the UV editor. This patch changes the coordinates
to use the generic 2D vector type, and moves the flags into three
separate boolean attributes. This follows the design in T95965, with
the ultimate intention of simplifying code and improving performance.
Importantly, the change allows exporters and renderers to use UVs
"touched" by geometry nodes, which only creates generic attributes.
It also allows geometry nodes to create "proper" UV maps from scratch,
though only with the Store Named Attribute node for now.
The new design considers any 2D vector attribute on the corner domain
to be a UV map. In the future, they might be distinguished from regular
2D vectors with attribute metadata, which may be helpful because they
are often interpolated differently.
Most of the code changes deal with passing around UV BMesh custom data
offsets and tracking the boolean "sublayers". The boolean layers are
use the following prefixes for attribute names: vert selection: `.vs.`,
edge selection: `.es.`, pinning: `.pn.`. Currently these are short to
avoid using up the maximum length of attribute names. To accommodate
for these 4 extra characters, the name length limit is enlarged to 68
bytes, while the maximum user settable name length is still 64 bytes.
Unfortunately Python/RNA API access to the UV flag data becomes slower.
Accessing the boolean layers directly is be better for performance in
general.
Like the other mesh SoA refactors, backward and forward compatibility
aren't affected, and won't be changed until 4.0. We pay for that by
making mesh reading and writing more expensive with conversions.
Resolves T85962
Differential Revision: https://developer.blender.org/D14365
Edit-mesh duplicator logic used a struct member vert_coords which read
as an alternative (and inconsistent) naming to vert_positions.
Rename to `vert_positions_deform` as the purpose of this value is to
assign when modifiers deform an edit-mesh.
Add `_deform` suffix to normals as well.
Use font's OS/2 table code page range bits to help differentiate
between Korean, Japanese, Simplified & Traditional Chinese fonts.
See D16484 for details.
Differential Revision: https://developer.blender.org/D16484
Reviewed by Brecht Van Lommel
Wayland requires the windows surface size is divisible by the surface
scale. This wasn't guaranteed when creating new temporary windows.
This meant opening the preferences could exit Blender with an error
with Hi-DPI configurations.
**Changes**
As described in T93602, this patch removes all use of the `MVert`
struct, replacing it with a generic named attribute with the name
`"position"`, consistent with other geometry types.
Variable names have been changed from `verts` to `positions`, to align
with the attribute name and the more generic design (positions are not
vertices, they are just an attribute stored on the point domain).
This change is made possible by previous commits that moved all other
data out of `MVert` to runtime data or other generic attributes. What
remains is mostly a simple type change. Though, the type still shows up
859 times, so the patch is quite large.
One compromise is that now `CD_MASK_BAREMESH` now contains
`CD_PROP_FLOAT3`. With the general move towards generic attributes
over custom data types, we are removing use of these type masks anyway.
**Benefits**
The most obvious benefit is reduced memory usage and the benefits
that brings in memory-bound situations. `float3` is only 3 bytes, in
comparison to `MVert` which was 4. When there are millions of vertices
this starts to matter more.
The other benefits come from using a more generic type. Instead of
writing algorithms specifically for `MVert`, code can just use arrays
of vectors. This will allow eliminating many temporary arrays or
wrappers used to extract positions.
Many possible improvements aren't implemented in this patch, though
I did switch simplify or remove the process of creating temporary
position arrays in a few places.
The design clarity that "positions are just another attribute" brings
allows removing explicit copying of vertices in some procedural
operations-- they are just processed like most other attributes.
**Performance**
This touches so many areas that it's hard to benchmark exhaustively,
but I observed some areas as examples.
* The mesh line node with 4 million count was 1.5x (8ms to 12ms) faster.
* The Spring splash screen went from ~4.3 to ~4.5 fps.
* The subdivision surface modifier/node was slightly faster
RNA access through Python may be slightly slower, since now we need
a name lookup instead of just a custom data type lookup for each index.
**Future Improvements**
* Remove uses of "vert_coords" functions:
* `BKE_mesh_vert_coords_alloc`
* `BKE_mesh_vert_coords_get`
* `BKE_mesh_vert_coords_apply{_with_mat4}`
* Remove more hidden copying of positions
* General simplification now possible in many areas
* Convert more code to C++ to use `float3` instead of `float[3]`
* Currently `reinterpret_cast` is used for those C-API functions
Differential Revision: https://developer.blender.org/D15982
Since internal links are only runtime data, we have the flexibility to
allocating every link individually. Instead we can store links directly
in the node runtime vector. This allows avoiding many small allocations
when copying and changing node trees.
In the future we could use a smaller type like a pair of sockets
instead of `bNodeLink` to save memory.
Differential Revision: https://developer.blender.org/D16960
activeSnap --> transform_snap_is_active
activeSnap_SnappingIndividual --> transform_snap_project_individual_is_active
activeSnap_SnappingAsGroup --> transform_snap_mixed_is_active
applySnappingIndividual --> transform_snap_project_individual_apply
applySnappingAsGroup --> transform_snap_mixed_apply
Also rearrange functions to be close to where they are used.
And use static when possible.
When rendering in the viewport (or probably on instanced objects, but I didn't
test that), emissive objects whose scale is negative give the wrong value on the
"backfacing" input when multiple sampling is enabled.
The underlying problem was a corner case in how normal transformation is handled,
which is generally a bit messy.
From what I can tell, the pattern appears to be:
- If you first transform vertices to world space and then compute the normal from
them (as triangle light samping, MNEE and light tree do), you need to flip
whenever the transform has negative scale regardless of whether the transform
has been applied
- If you compute the normal in object space and then transform it to world space
(as the regular shader_setup_from_ray path does), you only need to flip if the
transform was already applied and was negative
- If you get the normal from a local intersection result (as bevel and SSS do),
you only need to flip if the transform was already applied and was negative
- If you get the normal from vertex normals, you don't need to do anything since
the host-side code does the flip for you (arguably it'd be more consistent to
do this in the kernel as well, but meh, not worth the potential slowdown)
So, this patch fixes the logic in the triangle emission code.
Also, turns out that the MNEE code had the same problem and was also having
problems in the viewport on negative-scale objects, this is also fixed now.
Differential Revision: https://developer.blender.org/D16952
- Avoid calling node interface items "sockets"
- Use "active" instead of "current" to be more correct
- Avoid using the same word in description and name
- A couple grammar fixes
- Matrix normalize overloads needs to have the vector normalize redefined.
- double underscore (anywhere in symbol name) are reserved.
- Some operation yield different result due to float imprecision. Increasing
epsilon threshold for the failing tests.
Incorrect offset was calculated when strip was implicitly retimed (movie
FPS does not match scene FPS). This is because strip playback rate was
not used for offset calculation at all.
Since hold offset is specifying numbers of frames to skip, but at frame
rate of the source, this could result in gap when splitting the strip.
If that occurs, gap is compensated by moving handle to frame where strip
is split.
Happens, for example, when the object has animation, and disabled for
render, and animation render is performed.
The regression has been uncovered by f12f7800c2 which made it so
the dependency graph relies on runtime visibility tracking and
updates (without updating relations).
The optimization from a while ago in the ff60dd8b18 got in a way
of the visibilit updates because it removed relation between two
no-op nodes which belong to different IDs, which make the visibility
tracking impossible.
This change makes it so only relations which belong to the same
component are removed. This matches the expectations of the visibility
tracking (which, actually, also needed to happen at the moment of the
initial optimization commit). Technically, this change could introduce
some performance regression, but with the current design design of the
graph it is not really avoidable.
The idea to gain the best performance is to separate relations which
actually define the execution flow, and which are only needed to
define things like visibility dependencies.
When drawing using the option `Outline` the result stroke
was not using the Vertex Color option and always was converted
using material.
Now the vertex color option is used.
Crash only occured when textures was stored in a gray scale GPU
texture and was scaled down to fit inside the given limitation.
In this case the original number of pixels were packed into the
GPU buffer, not taken into account the scaled down image. This
resulted in a buffer overflow.
The bug is caused by rBb66b3f547c43e841a7d5da0ecb2c911628339f56.
From what I can see, that fix was intended to enable manual lens shift for
panorama cameras, but it appears that it also unintentionally applies
interocular shift.
This fix disables the multiview shift for panorama cameras, that way manual lens
shift still works but we get the 2.x behavior for stereoscopic renders back.
Differential Revision: https://developer.blender.org/D16950
The code that computes and inverts the shutter CDF had some issues that caused
the result to be asymmetric, this tweaks it to be more robust and produce
symmetric outputs for symmetric inputs.
At the first bounce, the diffuse/glossy/transmission weights are stored so that
contributions along the path can be split into the d/g/t indirect passes.
However, volume bounces always set the weight even at indirect bounces, so
even paths that had their first bounce on a purely glossy object would suddenly
start counting towards the diffuse indirect pass after a secondary volume bounce.
Do not clear all the font's glyph caches with single-step zoom
operators if the area does not change font size when doing so.
See D16785 for more details.
Differential Revision: https://developer.blender.org/D16785
Reviewed by Campbell Barton
During geometry nodes evaluation some sockets can be determined
to be unused, for example based on the condition input in a switch node.
Once a socket is determined to be unused, that information has to be
propagated backwards through the tree to free any memory that may
have been reserved for those sockets already. This is happening before
this commit already, but in a less ideal way.
Determining that sockets are unused early is good because it helps with
memory reuse and avoids copy-on-write copies caused by shared data.
Now, nodes that are scheduled because an output became unused have
priority over nodes scheduled for other reasons.
This allows auto-vectorization to happen when the a multi-function is
evaluated in "materialized" mode, i.e. it is processed in chunks where
all input and outputs values are stored in contiguous arrays.
It also unifies the handling input, mutable and output parameters a bit.
Now they all can use tempory buffers in the same way.
Staging texture update copied over the entire texture, rather than just the region of the texture which had been updated. Also added early-exit for cases where the net texture update extent was zero, as this was causing validation failures.
Authored by Apple: Michael Parkin-White
Ref T103658
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T103658, T96261
Differential Revision: https://developer.blender.org/D16924
First binding of a framebuffer lead to an incorrect SRGB conversion state being applied, as attachments, where presence of SRGB is determined, were processed after the SRGB check rather than before.
This DIFF also cleans up SRGB naming conventions and caching of fallback non-srgb texture view, for use when SRGB mode is disabled.
Authored by Apple: Michael Parkin-White
Ref T103399
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T103399, T96261
Differential Revision: https://developer.blender.org/D16907
This simplifies the code enough so that msvc is able to unroll and
vectorize some multi-functions like simple addition.
The performance improvements are almost as good as the GCC
improvements shown in D16942 (for add and multiply at least).
Required texture bytesize calculation for compacted data types was incorrectly calculated, resulting in an erroneous format conversion taking place instead of direct data upload.
Metal dummy buffer size also temporarily increased to address problematic cases where the bound buffer was too small for missing UBOs.
Authored by Apple: Michael Parkin-White
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D16904
This was caused by rB0d73d5c1a2, which releases the scene mutex during kernel
loading. However, the reset mutex was still held, which can cause a deadlock
if another thread tries to reset the session, since it will acquire the
released scene mutex and then wait for the reset mutex.
Turns out there's no point in keeping the reset mutex locked after the delayed
reset section, so now we just release it earlier, which resolves the deadlock.
This mainly helps GCC catch up with Clang in terms of field evaluation
performance in some cases. In some cases this patch can speedup
field evaluation 2-3x (e.g. when there are many float math nodes).
See D16942 for a more detailed benchmark.
This moves all multi-function related code in the `functions` module
into a new `multi_function` namespace. This is similar to how there
is a `lazy_function` namespace.
The main benefit of this is that many types names that were prefixed
with `MF` (for "multi function") can be simplified.
There is also a common shorthand for the `multi_function` namespace: `mf`.
This is also similar to lazy-functions where the shortened namespace
is called `lf`.
* `depends_on_context` was not used for a long time already.
* `param_data_indices` is not used since rB42b88c008861b6.
* The remaining data is moved to a single `Vector` to avoid
having to do two allocations when the size signature becomes
larger than fits into the inline buffer.
This avoids a move of the signature after building it. Tthe value had
to be moved out of `MFSignatureBuilder` in the `build` method.
This also makes the naming a bit less confusing where sometimes
both the `MFSignature` and `MFSignatureBuilder` were referred
to as "signature".
* New `build_mf` namespace for the multi-function builders.
* The type name of the created multi-functions is now "private",
i.e. the caller has to use `auto`. This has the benefit that the
implementation can change more freely without affecting
the caller.
* `CustomMF` does not use `std::function` internally anymore.
This reduces some overhead during code generation and at
run-time.
* `CustomMF` now supports single-mutable parameters.
This refactors how devirtualization is done in general and how
multi-functions use it.
* The old `Devirtualizer` class has been removed in favor of a simpler
solution. It is also more general in the sense that it is not coupled
with `IndexMask` and `VArray`. Instead there is a function that has
inputs which control how different types are devirtualized. The
new implementation is currently less general with regard to the number
of parameters it supports. This can be changed in the future, but
does not seem necessary now and would make the code less obvious.
* Devirtualizers for different types are now defined in their respective
headers.
* The multi-function builder works with the `GVArray` stored in `MFParams`
directly now, instead of first converting it to a `VArray<T>`. This reduces
some constant overhead, which makes the multi-function slightly
faster. This is only noticable when very few elements are processed though.
No functional changes or performance regressions are expected.
This implement most of the functions provided by the BLI math library.
This is part of the effort to unify GLSL and C++ syntax. Ref T103026.
This also adds some infrastructure to make it possible to run GLSL shader unit
test.
Some code already present in other libs is being copied to the new libs.
This patch does not make use of the new libs outside of the tests.
Note that the test is still crashing when using metal.
This was limiting the use of the templates with other non internal types
like Ceres types, xithout defining thing like that:
`template<> inline constexpr bool is_math_float_type<mpq_class> = true;`
This breaks backwards compatibility some in that 3 sides will be mapped
differently now, but difficult to avoid and can be considered a bugfix.
Similar to rBdd8016f7081f.
Maniphest Tasks: T103615
Differential Revision: https://developer.blender.org/D16910
This patch implements the matrix types (i.e:float4x4) by making heavy
usage of templating. All matrix functions are now outside of the vector
classes (inside the blender::math namespace) and are not vector size
dependent for the most part.
###Motivations
The goal/motivations of this rewrite are the same as the Vector C++ API (D13791):
- Template everything for making it work with any types and avoid code duplication.
- Use functional style instead of Object Oriented function call to allow a simple compatibility layer with GLSL syntax (see T103026 for more details).
- Allow most convenient constructor syntax and accessors (array subscript `matrix[c][r]`, or component alias `matrix.y.z`).
- Make it cover all features the current C API supports for adoption.
- Keep compilation time and debug performance somehow acceptable.
###Consideration:
- The new `MatView` class can be generated by `my_float.view<NumCol, NumRow, StartCol, StartRow>()` (with the last 2 being optionnal). This one allows modifying parts of the source matrix in place. It isn't pretty and duplicates a lot of code, but it is needed mainly to replace `normalize_m4`. At least I think it is a good starting point that can refined further.
- An exhaustive list of missing `BLI_math_matrix.h` functions from the new API can be found here P3373.
- This adds new Rotation types in order to have a clean API. This will be extended when we port the full Rotation API. The types are made so that they don't allow implicit down-casting to their vector representation.
- Some functions make direct use of the Eigen library, bypassing the Eigen C API defined in `intern/eigen`. Its use is contained inside `math_matrix.cc`. There is conflicting opinion wether we should use it more so I contained its usage to almost the tasks as in the C API for now.
Reviewed By: sergey, JacquesLucke, HooglyBoogly, Severin, brecht
Differential Revision: https://developer.blender.org/D16625
Profiling shows that this computation consumes a noticeable amount
of time, so it is worth moving it to an earlier part of the code
that is executed less frequently and is multithreaded.
Differential Revision: https://developer.blender.org/D16933
Both cloth object collision and self collision use a BVH tree
representing the current cloth shape. The only difference between
them is the epsilon threshold value.
If these values are the same, it is possible to use the same tree
for both uses, thus easily reducing the overhead in the case when
both collision modes are used by the same cloth object.
Differential Revision: https://developer.blender.org/D16914
Caused by f1c0249f34, which filled the wrong value.
I have noticed several problems:
- Using a full array as single result.
- Checking single material index for 0. If we have a list of all slots,
then we must check this in the list.
- The result was filled false. Simple fix.
- Fixed problem with incorrect recording by mask indices, not polygons.
- Added domain specifics to names to avoid confusion.
Differential Revision: https://developer.blender.org/D16926
Previously you had to use a workaround with the Object info node to get
evaluated data from the new curves object to an original editable mesh.
This commit makes it so that a curves object can be converted directly
to a mesh object if it has evaluated curves or an evaluated mesh.
Differential Revision: https://developer.blender.org/D16930
Socket locations are set while drawing the node tree in the editor.
They can always be recalculated this way based on the node position and
other factors. Storing them in the socket is misleading. Plus, ideally
sockets would be quite small to store, this helps us move in that
direction.
Now the socket locations are stored as runtime data of the node editor,
making use of the new node topology cache's `index_in_tree` function
to make a SoA layout possible.
Differential Revision: https://developer.blender.org/D15874
Improve animation playback performance in EEVEE for materials using Mix
nodes. Socket availability was being set and reset on every evaluation
of Mix nodes, during animation playback, this was causing the graph to
be marked dirty, and the whole graph being re-evaluated on every frame,
causing performance issues during playback.
Additionally, do a bit of cleanup, traversing the node sockets with
the next link to improve clarity and reduce errors. Also refactoring
`nodeSetSocketAvailability` to early out and increase clarity on no-op.
Differential Revision: https://developer.blender.org/D16929
The reported backtrace in T102766 strongly points at some
concurrency issues within exisitng liboverride diffing code that
restores forbidden changes to reference linked data values.
This commit instead add tags to mark liboverrides/properties that need
to be restored, and do so in a separate new step of diffing, from the
main thread only.
This patch moves the realtime compositor out of experimental. See
T99210.
The first milestone is finished with regards to implementing most
essential nodes for single pass compositing. It is also now documented
in the manual and no major issues are known.
Differential Revision: https://developer.blender.org/D16891
Reviewed By: Clement Foucault
This patch allows the realtime compositor to be limited to a specific
compositing region that is a subset of the full render region. In the
context of the viewport compositor, when the viewport is in camera view
and has a completely opaque passepartout, the compositing region will be
limited to the visible camera region.
On the user-level, this gives the user the ability to make the result of
the compositor invariant of the aspect ratio, shift, and zoom of the
viewport, making the result in the viewport identical to the final
render compositor assuming size relative operations.
It should be noted that compositing region is the *visible* camera
region, that is, the result of the intersection of the camera region and
the render region. So the user should be careful not to shift or zoom
the view such that the camera border extends outside of the viewport to
have the aforementioned benefits. While we could implement logic to fill
the areas outside of the render region with zeros in some cases, there
are many other ambiguous cases where such a solution wouldn't work,
including the problematic case where the user zooms in very close,
making the camera region much bigger than that of the render region.
Differential Revision: https://developer.blender.org/D16899
Reviewed By: Clement Foucault
Previously when on frame 2.5 and trying to jump to a
keyframe that was on frame 2, it would instead jump past it.
Now it properly respects the subframes for that.
Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D16651
Ref: D16651
The "While Held" option from the Pose Propagate Operator
doesn't do anything meaningful.
After talking with the Animation Module it was decided to remove it.
In code it was called `POSE_PROPAGATE_SMART_HOLDS`
Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D16771
Ref: D16771
Ideally, we would also get variance information out of the test, but that
seems a bit more complex to implement. For now just run the test a couple
of times and average the timings.
The test now runs between 5 and 100 times, depending on how long it
to run the test once.
I noticed that sometimes the geometry nodes benchmark would not work
if there were some left-over debug prints in the code. The reason it did
not work was because the prints were mixed with the test output print.
I also tried using explicit flusing and `atexit` for printing the test output,
but that didn't solve it. Just printing additional newlines to better separate
the test output from other printed output helped though.
Using negative blend factors for blending in flipped poses was undesirable.
Instead, the pose blending operator now uses CTRL to flip the pose.
Negative blend values are still allowed, and cause the pose asset to be
subtracted from the current pose. It can quickly break the rig, but for
small adjustments it can be useful.
The slider component can now be told to not use CTRL for toggling stepped
10% increments. This is useful when the operator that uses the slider needs
that modifier key for its own purposes.
Initial error caused by 1efc94bb2f and fixed in 6a7917162c. However
the empty index files (empty as in, they contain the version number but
no assets) will have to be fixed somehow, since otherwise assets don't
show up at all for people who saved asset files in a broken version.
Delete empty index files if the modification timestamp indicates a time
when the bug was present (plus a day before and after, to address
possible time zone differences). This will basically make Blender skip
the optimization for .blend files without assets for one load, but even
then the index should still produce faster results than a completely
non-index read.
This can be removed after a while, it's just a (much needed) fix for
people who were using alpha/beta builds.
Differential Revision: https://developer.blender.org/D16678
Reviewed by: Jeroen Bakker
The use of `std::variant` allows combining the four vectors
into one which more closely matches the intend and avoids
a workaround used before.
Note that this uses `std::get_if` instead of `std::get` because
`std::get` is only available since macOS 10.14.
Issue comes from the fact that some of the image updates are handled
outside of depsgraph context (through the signal system), and therefore
completely ignored by the undo/redo code.
Now that undo/redo tries to update as little data as possible, it needs
to be aware of these changes.
As a temporary workaround, until image update is fully handled through depsgraph,
consider that IDs tagged with `ID_RECALC_SOURCE` should get their caches
cleared on undo/redo, and tag some RNA property updates of
Image/ColorSpace as such.
Reviewed By: sergey
Maniphest Tasks: T103242
Differential Revision: https://developer.blender.org/D16927
This workaround is no longer needed and prevents our OCIO configuration
from being loaded if Blender is unpacked under a Unicode path.
Differential Revision: https://developer.blender.org/D16818
Multiple improvements to UV Cylinder and UV Sphere projection including:
* New option "Pinch" or "Fan" to improve unwrap of faces at the poles.
* Support for "Polar ZY" option on "View On Equator" and "Align To Object"
* Better handling of inputs with round-off error.
* Improved handling of faces touching the unit square border.
* Improved handling of very wide quads spanning the right hand border.
* Improved accuracy near to (0, 0).
* Code cleanup and simplification.
Differential Revision: https://developer.blender.org/D16869
- Add parentheses to suppress an assertion on some compilers.
- It turns out cloth self-collision math is not precisely symmetric,
so sort the triangle index pair to restore behavior exactly identical
to the version before the new traversal.
Follow up to rB0796210c8df32
Previously cloth self-collision and other code that wants self-overlap
data was using an ordinary BVH overlap utility function. This works,
but is suboptimal because it fails to take advantage of the fact that
it is comparing two identical trees.
The standard traversal for self-collision essentially devolves into
enumerating all elements of the tree, and then matching them to the
tree starting at the root. However, the tree itself naturally partitions
the space, so overlapping elements are likely to be mostly placed nearby
in the tree structure as well.
Instead, self-overlap can be computed by recursively computing ordinary
overlap between siblings within each subtree. This only considers each
pair of leaves once, and provides significantly better locality.
It also avoids outputting every overlap pair twice in different order.
Differential Revision: https://developer.blender.org/D16915
To better estimate light contribution. Note that estimating the texture
from the IES file is still missing.
Contributed by Alaska.
Differential Revision: https://developer.blender.org/D16901
This patch adds two new panels in which users can control
offset (position, rotation, scale) by layer and by stroke number.
Use cases:
- if you want to create array of Suzannes and place them one behind
another, in 2d mode, Z depth will be wrong.
In 3d mode there will be Z fighting. With combination of stroke
and layer offset we can fight this issue without touching original drawing.
- even easier way to create 2.5d environments..
simply draw on layers and then displace them in one panel
instead fiddling with every layer individually
Possible improvements:
- add offset by material slot
- add step parameter, to allow displacing groups of N strokes.
{F13129598}
Reviewed By: mendio, antoniov
Differential Revision: https://developer.blender.org/D15106
Due an internal scale of the brush size done by grease pencil
draw tool (this scale factor cannot be removed), the size of the
radial control is not equal to the actual stroke thickness and
this makes the radial size displayed useless.
This patch adds a new property that allows to pass the
path of the tool path and this value is used to apply
the correct scale to the radial size.
Reviewed By: mendio, frogstomp, pepeland, brecht
Differential Revision: https://developer.blender.org/D16866
Use NodeTree.bl_label instead of "NodeTree" for more descriptive name.
Implemented by Iliya Katueshenock.
Differential Revision: https://developer.blender.org/D16856
Since rBcommit 74c4977a the pose library blending operator can extrapolate.
This is now also reflected in the hard min/max value of the blend factor
RNA property. The soft min/max are still -1/1 to indicate normal use.
While blending, press E to enable extrapolation / overshoot of the pose.
It will make it possible to blend in more than 100% of the pose asset.
This has the potential to completely break the rig, but it can be useful
to exaggerate poses when used with caution.
This was the case when an Annotation is also present as in the report.
Since {rB92d7f9ac56e0}, Dopesheet is aware of greaspencil/annotations
(displays its channels/keyframes, can rename their data, layers, fcurve
groupings etc.). However, the Graph Editor does not display these /
should not be aware of them.
Above commit already had issues that were addressed in the following
commits (mostly adding the new `ANIMFILTER_FCURVESONLY` to places that
dont handle greasepencil/annotations)
- {rBfdf34666f00f}
- {rB45f483681fef}
- {rBa26038ff3851}
Now in T103303 it was reported that doublicking a channel would not
select all fcurve`s keyframes anymore and this wasnt actually an issue
with that particular operator, but instead with another operator that is
also mapped to doubleclicking: the channel renaming (I assume the
keyconflict here is actually wanted behavior).
Channel renaming would not return `OPERATOR_PASS_THROUGH` here anymore
in the case nothing cannot be renamed, so we would not actually reach
the 2nd operator at all (the one selecting all keyframes).
Deeper reason for this is that the renaming operator would actually
"see" a channel that could be renamed (in the case of the report: an
annotation layer), but then cannot proceed, because the "real"
underlying data where the doubleclick happens is an fcurve...
So now exclude non-greasepencil channels in filtering as well where
appropriate by also adding `ANIMFILTER_FCURVESONLY` to the filter there.
Fixes T103303.
Maniphest Tasks: T103303
Differential Revision: https://developer.blender.org/D16871
Multiframe copy paste operations were prohibited by a block of code.
While this is understandable as it prevents confusing actions, there is a good use case to allow multiframe copy pasting.
This patch does:
- remove restricting block of code
- adds outer loops for frames both in copy and paste actions.
In copy action it will create an array of selected strokes from all selected frames
In paste action it will create new from previous copy action merged to a single frame. It will paste to all selected frames and create new frame if autokey is on and time cursor is not on any of the keyframes.
The main usecase is for creating motion smears as in examples attached. The user still need to do some actions in order to achieve desired look, such as stroke ordering and deleting excessive strokes.
{F14069747}
{F14069743}
Reviewed By: antoniov, mendio
Differential Revision: https://developer.blender.org/D16805
This issue was introduced in rB78f28b55d39288926634d0cc.
The fix is to use a `std::shared_ptr` to ensure that the `Global` will live
long enough until all `Local` objects are destructed.
This was quite a fight, some resulting notes:
* We cannot use anymore Boost packages because of a weird bug breaking
Blender debug builds and ivolving Boost, TBB and USD (see also
rB019b930d6b9c).
* OCIO, OIIO, OpenVDB and USD build options where updated to match these
from cmake libs building.
** Most notably, USD now has imaging, OIIO, OpenVDB and GL support.
Ref. T99618.
Previously, the lifetimes of anonymous attributes were determined by
reference counts which were non-deterministic when multiple threads
are used. Now the lifetimes of anonymous attributes are handled
more explicitly and deterministically. This is a prerequisite for any kind
of caching, because caching the output of nodes that do things
non-deterministically and have "invisible inputs" (reference counts)
doesn't really work.
For more details for how deterministic lifetimes are achieved, see D16858.
No functional changes are expected. Small performance changes are expected
as well (within few percent, anything larger regressions should be reported as
bugs).
Differential Revision: https://developer.blender.org/D16858
It is a part of old-standing TODO, and code which accesses
the value was commented out for many years.
Remove the field to help with an upcoming const-correctness
improvements.
To aid in debugging the case where your compiler is too old for Blender,
actually log which version CMake found.
Before, CMake would output:
```
CMake Error at CMakeLists.txt:121 (message):
The minimum supported version of GCC is 11.0.0
```
With the patch, it logs:
```
CMake Error at CMakeLists.txt:121 (message):
The minimum supported version of GCC is 11.0.0, found 10.4.0
```
This has been implemented for GCC and Clang. MSVC has been explicitly
excluded, as the version numbers used for this comparison are internal
versions and not directly usable/recognisable.
Reviewed By: LazyDodo, brecht
Differential Revision: https://developer.blender.org/D16849
Change the logic for propagating poses such that it checks keyframes
on all selected bones to determine the frame on which a pose
should be propagated to.
It then adds keyframes if they don't exist on whatever
frame the pose should be propagated to.
Reviewd by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D16654
Ref: D16654
Added a new operator that aligns selected keys on an exponential curve
Revied by Reviewed by: Sybren A. Stüvel
Differential Revision: https://developer.blender.org/D9479
Ref: D9479
Although viewport compositor isn't supported yet on Apple deviced the
shaderlibs are compiled. The compositor shaders uses mat3 constructor
with a single vec3 and 6 floats. This constructor wasn't defined in
metal so it failed the compilation.
This patch adds the override to mat3.
This patch adds a new "Kernel Optimization Level" dropdown menu to control Metal kernel specialisation. Currently this defaults to "full" optimisation, on the assumption that the changes proposed in D16371 will address usability concerns around app responsiveness and shader cache housekeeping.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D16514
For some reason I don't understand, the dragged link is sorted across
all the node's multi-input sockets. This leads to problems when there
are multiple sockets to sort. With this patch, I'm making the feature
work more directional.
Differential Revision: https://developer.blender.org/D16892
Reading or writing a vertex group is expensive enough that it's worth
parallelizing. On a Ryzen 3700x, in a grid of 250k vertices with
30 randomly assigned vertex groups (each to 10-50% of vertices),
I observed a 4x improvement for writing to a group and a 3x
improvement when reading their data. This significantly speeds
up nodes that create a new mesh from a mesh that had vertex groups.
Previously, this happened when the "node task" first runs, which might
not actually execute the node if there are missing inputs. Deferring the
allocation of storage and default inputs allows for better memory reuse
later (currently the memory is not reused).
Since 78f28b55d3, allocating on multiple threads is much
faster, making it a nice improvement to parallelize vertex group
operations. This patch adds multi-threading when removing a
vertex group from the "Remove Named Attribute" node.
On a Ryzen 3700x:
Before: `(Average: 15.6 ms, Min: 15.0 ms)`
After: `(Average: 8.1 ms, Min: 7.6 ms)`
Differential Revision: https://developer.blender.org/D16916
All kernel specialisation is now performed in the background regardless of kernel type, meaning that the first render will be visible a few seconds sooner. The only exception is during benchmark warm up, in which case we wait for all kernels to be cached. When stopping a render, we call a new `cancel()` method on the device which causes any outstanding compilation work to be cancelled, and we destroy the device in a detached thread so that any stale queued compilations can be safely purged without blocking the UI for longer than necessary.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D16371
If we change the radius of a point or spot lamp, we also change the area lamp size.
As shown in T102853, this is bad for animating the lamp type.
The solution is to make the property point to another member of the DNA
struct `Light`.
Differential Revision: https://developer.blender.org/D16669
The members `soft`, `bleedbias`, `bleedexp` and `contact_spread` were
deprecated in rBd8aaf25c23fa, and are no longer really used.
`soft` is only used by Collada as an extra value for exporting and
importing Blender files in collada.
`bleedexp` and `contact_spread` are only used in versioning to
initialize a default value.
Reviewed By: brecht, fclem
Differential Revision: https://developer.blender.org/D16834
Both, the guarded and lockfree allocator, are keeping track of current
and peak memory usage. Even the lockfree allocator used to use a
global atomic variable for the memory usage. When multiple threads
use the allocator at the same time, this variable is highly contended.
This can result in significant slowdowns as presented in D16862.
While specific cases could always be optimized by reducing the number
of allocations, having this synchronization point in functions used by
almost every part of Blender is not great.
The solution is use thread-local memory counters which are only added
together when the memory usage is actually requested. For more details
see in-code comments and D16862.
Differential Revision: https://developer.blender.org/D16862
This is now only an indirect dependency on shared libraries, which means
this combination is valid.
Also remove mechanism that automatically disabled WITH_BOOST if no libraries
are using it, this is no longer really helpful with shared boost libraries.
"show_expanded" did not dirty the keymap diff cache, leading to old flags
being written to the item when another item was edited.
Differential Revision: https://developer.blender.org/D13418
There are dependencies between shared libraries, and Python modules which are
always installed on Linux and macOS can use these also.
Instead of adding logic for dealing with dependencies and conditional Python
module installs, just always install everything when using precompiled
libraries. This does not affect compile time which would be the main reason to
turn off build options, and it does not affect the case where system libraries
are used.
More automatic and convenient to update existing configurations this way.
Also move into platform_old_libs_update.cmake where similar logic was put
already.
WLROOTS compositors don't run surface leave callbacks,
while this may be considered a bug in WLROOTS, neither GTK/SDL crash
so workaround the crash too.
This also fixes a minor glitch where the cursor scale wasn't updated
when changing monitor scale at run-time.
Use the same `".selection"` attribute for both curve and point domains,
instead of a different name for each. The attribute can now have
either boolean or float type. Some tools create boolean selections.
Other tools create float selections. Some tools "upgrade" the attribute
from boolean to float.
Edit mode tools that create selections from scratch can create boolean
selections, but edit mode should generally be able to handle both
selection types. Sculpt mode should be able to read boolean selections,
but can also and write float values between zero and one.
Theoretically we could just always use floats to store selections,
but the type-agnosticism doesn't cost too much complexity given the
existing APIs for dealing with it, and being able to use booleans is
clearer in edit mode, and may allow future optimizations like more
efficient ways to store boolean attributes.
The attribute API is usually used directly for accessing the selection
attribute. We rely on implicit type conversion and domain interpolation
to simplify the rest of the code.
Differential Revision: https://developer.blender.org/D16057
Finding the active view item button should only happen when it's actually
necessary, since looping through all buttons and blocks is an expensive
operation. This patch limits the search a bit more, to left clicks (the only
case that is actually handled).
This improves drawing performance in the node editor slightly,
where this was a bottleneck.
Differential Revision: https://developer.blender.org/D16882
This functionality is related only to debugging of SYCL implementation
via single-threaded CPU execution and is disabled by default.
Host device has been deprecated in SYCL 2020 spec and we removed it
in 305b92e05f.
Since this is still very useful for debugging, we're restoring a
similar functionality here through SYCL 2020 Host Task.
When pasting nodes with the shortcut or the context menu, place the
center of the selected nodes at the same position as the mouse cursor.
This should save time, and is more intuitive because the new nodes are
actually visible.
Based on a patch by Juanfran Matheu (@jfmatheu).
Differential Revision: https://developer.blender.org/D10787
The main change is returning a socket pointer instead of using two
return arguments. Also use the topology cache instead of linked lists,
references over pointers, and slightly adjust whitespace.
* Add missing constructor for squared matrix types.
* Use using instead of define for typenames.
* Add `==, !=, unary-` operators
* Catch all functional style constructors inside the regex
Always hide the area header contents when the slider UI component is used.
This prevents the slider from being drawn semi-transparently on top of
other UI elements.
Avoid saving the 'flipped' operator property of the "apply pose asset"
(`POSELIB_OT_apply_pose_asset`) operator. This caused problems: when
choosing "Apply Pose Flipped" in the asset browser, double-clicking a pose
would cause it to always be flipped.
Interactive blending of poses can now use negative factors (i.e. drag to
the left) to blend in the flipped pose.
This reverts rB6eb1c98b15bb7ea6cf184b08617f24c7afb91b6c where the F key
was used to flip the pose. That was already described as stop-gap
measure, and the new behaviour is more intuitive & direct.
Functionality over-the-shoulder reviewed by @hjalti.
Add a field `is_bidirectional` to sliders (`tSlider`). By defafult this
is `false`; when set to `true` the slider allows negative values.
The allowed ranges are now:
- No overshoot, no bidirectional: `[0, 1]`
- No overshoot, bidirectional: `[-1, 1]`
- Overshoot, no bidirectional: `[0, infinity)`
- Overshoot, bidirectional: `(-infinity, infinity)`
This will be used for the pose library blending operator, where sliding
to the right (postitive) blends as normal, and sliding to the left
(negative) flips the pose before blending.
This is part of D16858. Iterating over all field inputs allows us to extract
all anonymous attributes used by a field relatively easily which is necessary
for D16858.
This could potentially be used for better field tooltips for nested fields,
but that needs further investigation.
This is part of D16858 but is also useful for other purposes.
The changes to the node declaration in this commit allow us to figure
out which fields might be evaluated on which geometries statically (without
executing the node tree). This allows for deterministic anonymous attribute
handling, which will be committed separately. Furthermore, this is necessary
for usability features that help the user to avoid creating links that don't
make sense (e.g. because a field can't be evaluated on a certain geometry).
This also allows us to better separate fields which depend or don't depend
on anonymous attributes.
The main idea is that each node defines some relations between its sockets.
There are four relations:
* Propagate relation: Indicates that attributes on a geometry input can be
propagated to a geometry output.
* Reference relation: Indicates that an output field references an inputs field.
So if the input field depends on an anonymous attribute, the output field
does as well.
* Eval relation: Indicates that an input field is evaluated on an input geometry.
* Available relation: Indicates that an output field has anonymous attributes
that are available on an output geometry.
These relations can also be computed for node groups automatically, but that
is not part of this commit.
This was the case when done via the py-API.
Now also set active_color_attribute / default_color_attribute on newly
created attributes (in case none exist yet).
Maniphest Tasks: T103564
Differential Revision: https://developer.blender.org/D16898
Python API for moving strips to and from meta strips did not invalidate
strip lookup cache. Because of that, `SEQ_get_seqbase_by_seq()` failed
to lookup origin of strip, which resulted in crash on NULL dereference.
Invalidateion was added to functions `SEQ_edit_move_strip_to_meta()` and
`SEQ_add_meta_strip()`.
Partly a cleanup, but also iterating over spans can be faster than
linked lists. Also rewrite the multi-input socket link counting
to avoid the need for a temporary map. Overall, on my setup the changes
save about 5% (3ms) when drawing a large node tree (the mouse house file).
Small memory allocations are a bottleneck when drawing large node trees.
Avoid them by passing the socket index in the whole tree and getting the
tree from the context rather than allocating structs for the tree, node,
and socket. The performance improvement will be a few percent at most.
This was an oversight in rBdba2d828462ae22de5.
The evaluator uses multiple threads to initialize node states
but it is still in single threaded mode.
`get_main_or_local_allocator` did not return the right allocator
in this case.
During pose blending, when flipping the pose with {key F}, the pose
backup needs to be recreated. Without this, the blending wouldn't be
done properly.
F-for-flipping was introduced in rB6eb1c98b15bb7ea6cf184b08617f24
While blending poses from the pose library, press {key F} to flip the
pose.
Since rBc164c5d86655 removed the "Flip Pose" checkbox, there was no more
way to blend poses flipped.
Note that this is a bit of a stop-gap measure. The goal is to have a
bidirectional blend slider, where dragging to the left flips the pose,
and dragging to the right blends it normally.
As an optimization, dependency graph evaluation skips through
no-op nodes at the scheduling stage. However, that leaves update
flags enabled on the node, and the most problematic one is the
USER_MODIFIED flag, which get flushed to children every time
the no-op node is tagged.
This in turn can cause simulation caches downstream to be
permanently stuck in an outdated state until the depsgraph
is rebuilt and the stuck flag cleared out.
Differential Revision: https://developer.blender.org/D16868
The BONE_SEGMENTS operation node is only created if the bone is
actually a B-Bone. One location in the code wasn't checking that
before trying to create a relation.
Move some functions for transforming a span of vectors to a header
and call them from these functions, just like was done for curves
objects recently.
Resolves T102027, T102026
Differential Revision: https://developer.blender.org/D16883
Expose `BKE_pose_apply_action_blend` and a simplified pose backup system
to RNA. This will make it possible to easily create some interactive
tools in Python for pose blending.
When creating a backup via this API, it is stored on the
`Object::runtime` struct. Any backup that was there before is freed
first. This way the Python code doesn't need access to the actual
`PoseBackup *`, simplifying memory management.
The limitation of having only a single backup shouldn't be too
problematic, as it is meant for things like interactive manipulation of
the current pose. Typical use looks like:
- Interactive operator starts, and creates a backup of the current pose.
- While the operator is running:
- The pose backup is restored, so that the next steps always use the
same reference pose.
- Depending on user input, determine a blend factor.
- Blend some pose from the pose library into the current pose.
- On confirmation, leave the pose as-is.
- On cancellation, restore the backup.
- Free the backup.
`BKE_pose_apply_action_blend` is exposed to RNA to make the above
possible.
An alternative approach would be to rely on the operator redo system.
However, since for poses this would use the global undo, it can get
prohibitively slow. This change is to make it easier to prototype
things; further into the future the undo system for poses should be
improved, but that's an entire project on its own.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D16900
While the cost of creating AttributeAccessor and finding the "material_index"
attribute is not large, there's really no need to do that for each
polygon. Move the access outside of the per-polygon loop.
Move `pose_backup.cc` from `editors/armature` to `blenkernel`. This is
in preparation of an upcoming change where the pose backup is going to be
owned by the `Object`. This will need to be automatically cleared when the
object is freed, which means that `blenkernel` needs the corresponding
logic.
Technically only the freeing code could be moved, but I felt it made more
sense to keep the related code together.
No functional changes.
The "osl_texture" intrinsic was not implemented correctly. It should handle alpha
separately from color, the number of channels input parameter only counts color
channels.
There are two underlying issues which got uncovered by the report:
First, is that the poll() function for the operator was using legacy
API which is on its way of removal in the next major version release.
This part is fixed in this patch based on a patch provided by Philipp
Oeser (P3389) with the modification that the `clip` is not accessed
prior to None check. Ended up in a bit annoying one-liner, the entire
function could be refactored to use early returns.
The second issue is that the Python access to the legacy property
was wrong: need to access camera reconstruction instead of accessing
deprecated DNA field.
Some files out there (e.g. in T103441) contain face definitions with
four indices, which the importer code was not expecting. The OBJ
standard spells out up to three indices per face corner; the file in
there must be using some sort of non-standard OBJ syntax extension.
Now the code simply ignores any trailing per-face-corner data.
Similar to T98782 that was about normal indices: some files out there
are technically "wrong" since they refer to UV indices, without ever
defining any UVs. If the file does not have any UVs, simply ignore UV
indices in the OBJ face definitions. Fixes T103212.
It's confusing for users when the Dopesheet's Editor Buttons for Grease Pencil are greyed out.
{F14099985}
[[ https://blenderartists.org/t/cant-create-new-layers-in-grease-pencil-dopesheet/1353882 | Can’t create new layers in grease pencil dopesheet ]]
This is often because the 'Only Show Selected' filter is disabled. This 'requirement' does not seem to be necessary since the Dopesheet is already in Grease Pencil mode and there is an active Grease Pencil Object. It is also not apparent as to why so many Operators depend on it and unintuitive that it controls their function. The 'Only Show Selected' filter button is far away from the Operator buttons in the User Interface Header, so it's difficult to make the association.
If the 'Only Show Selected' IS absolutely required, I believe it should be closer to the DOPESHEET_HT_editor_buttons. Otherwise, I think the requirement should be removed.
Reviewed By: antoniov
Differential Revision: https://developer.blender.org/D16885
Based on suggestion from Ray molenkamp (@LazyDodo), thanks.
Also fix patching of OSL code, would not work properly when using repo
checkout instead of archive download.
Re. T99618.
- Move from blenkernel to the node editor, the only place it was used
- Use two vectors instead of ListBase
- Remove define for validating the clipboard, which shouldn't be skipped
- Comment formatting, other small cleanups to whitespace
Differential Revision: https://developer.blender.org/D16880
The geometry nodes evaluator supports "lazy threading", i.e. it starts out
single-threaded. But when it determines that multi-threading can be
benefitial, it switches to multi-threaded mode.
Now it only creates an enumerable-thread-specific if it is actually using
multiple threads. This results in a 6% speedup in my test file with many
node groups and math nodes.
When these declarations are built without the help of the special
builder class, it's much more convenient to set them directly rather
than with a constructor, etc. In most other situations the declarations
should be const anyway, so theoretically this doesn't affect safety too
much. Most construction of declarations should still use the builder.
Whenever a node group is entered during evaluation, a new compute
context is entered which has a corresponding hash. When node groups
are entered and exited a lot, this can have some overhead. In my test
file with ~100.000 node group invocations, this patch improves performance
by about 7%.
The speedup is achieved in two ways:
* Avoid computing the same hash twice by caching it.
* Invoke the hashing algorithm (md5 currently) only once instead of twice.
Geometry nodes used to log all socket values during evaluation.
This allowed the user to hover over any socket (that was evaluated)
to see its last value. The problem is that in large (nested) node trees,
the number of sockets becomes huge, causing a lot of performance
and memory overhead (in extreme cases, more than 70% of the
total execution time).
This patch changes it so, that only socket values are logged that the
user is likely to investigate. The simple heuristic is that socket values
of the currently visible node tree are logged.
The downside is that when the user changes the visible node tree, it
won't have any logged values until it is reevaluated. I updated the
tooltip message for that case to be a bit more precise.
If user feedback suggests that this new behavior is too annoying, we
can always add a UI option to log all socket values again. That shouldn't
be done without an actual need though because it takes up UI space.
Differential Revision: https://developer.blender.org/D16884
Read the selection attribute on the proper domain using implicit
interpolation rather than just using its oiginal domain that might
not match the domain of the color attribute.
Lazy-function graphs are now evaluated properly even if they contain
cycles. Note that cycles are only ok if there is no data dependency cycle.
For example, a node might output something that is fed back into itself.
As long as the output can be computed without the input that it feeds into,
everything is ok.
The code that builds the graph is responsible for making sure that there
are no actual data dependencies.
This patch adds rename popup when using Y key to switch
active layer and choosing New layer in Draw mode.
It follows https://developer.blender.org/D15092, which introduced this
for moving selected strokes to layers in Edit mode.
Reviewed By: antoniov
Differential Revision: https://developer.blender.org/D16877
OIIO: 2.4.6.0
OpenVDB: 10.0.0
OSD: 3.5.0
OCIO: 2.2.0
NOTE: Had to fight OpenVDB to force it to use 'deprecated' TBB 2020, it
really wants to use oneTBB when it can find it.
Re. T99618.
Use socket indices to keep track of logged values instead of their
identifiers. This decreases memory pressure when there are many
sockets. In cases with many cheap nodes, this can give a relatively
large improvement to overall performance. We observed a 15% increase
in a case with many math nodes and a larger increase in an experimental
softbody node setup. The log is invalidated when we add/remove/move
sockets anyway.
This is the best way I found to make building socket declarations without
the builder helper class work. Besides a vague hope for non-leaky
abstractions, I don't think there's any reason for these fields not to be
accessible directly.
Ref D16850
Fix warning generated due to the full-stop in the description message of
the property `use_auto_mask`
Property added in: rBa9cb66b856e80d0542a9ad3fec0b0fb47d28f805
Remove the option to display the real size of the cursor
and set as default. Now the cursor is displayed or not using
show_cursor option, but if it's displayed always use the real size.
This patch makes sure that each of the expand keymap entries will use consistent "invert" and "use_mask_preserve" properties.
Based on previous discussions we decided to flip the default Mask Expand behavior.
This has multiple benefited:
- The mask creation is more consistent with other masking tools (Always add to existing mask. Mask selected areas)
- It's easier to use expanding for masking face sets (Snapping with `Ctrl`) or building a mask from repeated operations
- It's less likely to mask certain areas unintentionally (Loose mesh islands)
- If the current behavior is desired for an expand operation the user can use `E` & `F` in the modal keymap (Which is less often the case).
If we want to revisit the original design of inverted masking again in the future we should do this via {T97903}.
Reviewed By: Joseph Eagar
Differential Revision https://developer.blender.org/D16434
Ref D16434
Scale texture coordiantes for square brushes by sqrt2,
proportionally to how square they are (how close
tip_roundness is to zero).
Note: this is done in `calc_brush_local_mat()`, the
result of which appears to be used exclusively for
texture mapping.
Don't allow calling Attribute Convert operator in edit mode.
Right now BMesh does not support attribute operations.
Differential Revision: https://developer.blender.org/D16864
The node doesn't support blurring boolean attributes, so avoid
compiling an implementation for boolean data.
Differential Revision: https://developer.blender.org/D16867
When converting from imesh to mesh for the final result, custom
data should be copied from ALL operands including the main mesh.
Differential Revision: https://developer.blender.org/D16854
I missed adding the "convert type/domain to mask" macros.
Also refactor slightly to split the matching attribute test to a
separate function to ease debugging and reduce duplication.
The effect of CANCELLED on the undo stack is quite obscure, and
mistakenly using it after doing some changes causes confusing
behavior. It's better to describe it explicitly in the docs.
This commit addresses that specific case related to Collection ID type,
using a band-aid fix which is hopefully safe enough.
T103062 will remain open as a TODO task for a proper fix later.
This is an obvious editing mistake introduced in 05952aa94d,
resulting in incorrect vertex coordinates used when raycasting
for internal springs with a rest shape key.
In rBfcddb7cda766 I forgot to update part of the whole diffing chain,
effectively breaking the report flags propagation from any sub-structs
of RNA IDs structs.
Remove the redundant option to disable selection in order to simplify
the tools and UI, both conceptually and internally.
It was possible to disable curves selection completely by clicking on
the active selection domain. However, that was redundant compared to
just selecting everything by pressing "A". The remaining potential use
could have been saving a selection for later, but that can be done with
more complete attribute editing tools in the future.
The color of the brush cursor is changed depending
of the mode selected.
If the mode is stroke vertex color, use vertex color, otherwise
it uses material stroke color.
On gcc 11.3, Ubuntu 22.04 the default constructor for
ColorSceneLinear4f did not zero the r,g,b,a member variables. Replacing
the empty constructor with a default constructor circumvents this
problem (compiler bug? ) even though it *should* be more or less
equivalent.
This panel showed a duplication of options that were in the main light panel and only mistakenly shows up in the workbench engine where lights should have no options.
This panel was also used by the POV-Ray add-on but that was removed recently.
This panel showed a duplication of options that were in the main light panel and only mistakenly shows up in the workbench engine where lights should have no options.
This panel was also used by the POV-Ray add-on but that was removed recently.
When drawing strokes in Grease Pencil, it was always a bit hard
to predict how thick the strokes would be, because there was
no visual reference of the thickness in the cursor.
This patch adds that visual reference. It shows the brush size
as a circle in the draw cursor.
Showing the brush size can be toggled in the Cursor menu
of the Grease Pencil draw tool.
Request in RCS with 26 upvotes for this option:
https://blender.community/c/rightclickselect/0zfbbc
On the technical side: the brush size is calculated
in 3D space and takes zoom level into account, as well as
object/layer transfrom, layer thickness change (gpl->line_change)
and thickness scale (gpd->pixfactor).
Reviewed By: mendio, antoniov
Differential Revision: https://developer.blender.org/D16851
Add required additional_info to shader using gpu_shader_point_uniform_color_aa_frag.glsl. This is the only other reference to the shader which requires the additional_info to be added.
{F14085803}
Reviewed By: #eevee_viewport, fclem
Maniphest Tasks: T103426
Differential Revision: https://developer.blender.org/D16853
This replaces the old Edit menu, creating a menu only for catalog
operators. The Undo/Redo were already working only for catalogs, so now
this is more clear.
The menu also contains the Save and New catalog operators.
Differential Revision: https://developer.blender.org/D16820
Caused by rB6514bb05ea5a.
For the remeshing, we have to make sure these names are brought over
each time a mesh is made from another in the process.
This happens when reprojecting the colors in
`BKE_remesh_reproject_vertex_paint` and also again in
`BKE_mesh_nomain_to_mesh`. A bit unsure if this should happen as deep as
in `BKE_mesh_nomain_to_mesh` (if not, this can be isolated to
`voxel_remesh_exec`), but I would assume other callers of
`BKE_mesh_nomain_to_mesh` would actually benefit from it, too?
Maniphest Tasks: T103394
Differential Revision: https://developer.blender.org/D16847
Caused by 7d7e90ca68.
When accessing context members from the windowmanager context
(`C->wm.store` which is mainly used for UI related stuff) the above
commit broke behavior in `CTX_store_ptr_lookup` in that it changed and
would **always** return NULL if no type is passed in. The call to
`CTX_store_ptr_lookup` from `ctx_data_get` **always** passes in NULL
though.
Accessing other context members survived since they take a different
code path in `ctx_data_get` and dont use `CTX_store_ptr_lookup`.
Now also return the entry if a NULL type was passed as it was before.
Fixes T103370, T103405, T103417
Differential Revision: https://developer.blender.org/D16840
Until now the owner spaces in the object constraint properties used the
same descriptions as the target spaces, unlike bone constraints.
For instance, if you chose World Space as owner space, you'd get the
description: "The transformation of the target is evaluated relative to
the world coordinate system".
Reuse the existing descriptions from the bone constraints instead, so
now you get: "The constraint is applied relative to the world coordinate
system".
Reviewed By: sybren
Maniphest Tasks: T43295
Differential Revision: https://developer.blender.org/D16747
Convert 3D point shader fragment color from sRGB space to framebuffer space to match 3D line shader.
Reviewed By: fclem
Maniphest Tasks: T97394
Differential Revision: https://developer.blender.org/D16831
Make the "Clear Motion Paths" operators more intuitive. Previously, the
only way to clear the motion path of the selected object/bone would be
to shift-click the "Clear ALL Motion Paths" button. Now there are two
"X" buttons, one for "selected" and one for "all".
The "Clear Selected" and "Clear All" buttons align with the
corresponding "Update Selected" and "Update All" buttons.
When building without WITH_WINDOWS_BUNDLE_CRT the manifest
did not contain the blender.shared dependentAssembly leading
to missing dll errors at blender startup.
(MacOS) only: In the System tab of the user preferences the user has the
ability to select a GPU backend that Blender will use. After changing
the GPU backend setting, the user has to restart Blender before the
setting is used.
It was added to start collecting feedback on the Metal backend without
using the command lines.
By default Blender will select OpenGL as backend. When Metal is selected
(via `--gpu-backend metal` or via user preferences) OpenGL will be used as
fallback when the platform isn't capable of running Metal.
Separate the "insert nodes into group" operation into more distinct
phases. This helps to clarify what is actually happening, to avoid
redundant updates to group nodes every time a new socket is discovered,
and to make use of the topology cache to avoid the "accidentally
quadratic" alrogithms that we have slowly been removing from node
editing.
The change is motivated by the desire to use dynamic node declarations
for group nodes and group input/output nodes, where it is helpful to
avoid updating the declaration and sockets multiple times.
Use the map created for copying nodes more instead of iterating over all
nodes unnecessarily a few times. Use the map empty check instead of
a separate boolean variable. Use a utility function to retrieve a
separate buffer of selected nodes in case the nodes by id Vector
is reallocated (that part is technically a fix).
This enable building the metal backend by default on Apple hardware.
This is needed for further testing and the new backend selector D16774.
Ref T96261
Global scope arrays can incur suboptimal per-shader-thread memory allocations, resulting in excessive usage of limited local memory resources. These changes ensure that any arrays are limited to the closest scope in which they are required and thus will get correctly optimized by the compiler.
A number of constants have also been replaced with Macro's as these can result in better runtime performance for complex shader code.
Authored by Apple: Michael Parkin-White
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D16825
Propagate `eRNAOverrideMatchResult` 'return' flags at higher level into
BKE API, instead of just returning a boolean true when new override
rules have been created.
NOTE: This is an intermediary step towards fixing T102766.
Differential Revision: https://developer.blender.org/D16761
This was harmless because the function would just return null in release
builds, which was checked. Theoretically this vertex group mapping
shouldn't depend on the object type, but the vertex group API would
have to move away from the object-level first.
These are meant to be regression tests, not fuzz tests. The "random"
shuffling made debugging quite annoying, even though the random order
was the same every time. Instead, hard-code the two lists to make
things more obvious. The resulting list doesn't make much sense
(for example, the multires modifier has to be first in the stack),
but for now avoid changing things further.
Also remove some comments that weren't helpful.
Previously, the same `FieldInferencingInterface` was build for every node
multiple times. Now only once during the inferencing. Going forward,
it would be even better to store the inferencing interface as part of the
node declaration to avoid building it during inferencing at all.
A number of paths resulted in compilation errors after porting EEVEE to use Create-Info. Namely the fallback path for cubemap support. A number of other strict compilation failures regarding format comparison also required fixing when this mode is enabled.
Authored by Apple: Michael Parkin-White
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261, T103313
Differential Revision: https://developer.blender.org/D16819
Add documentation for `BKE_id_defgroup_list_get()` and document that
`CD_MDEFORMVERT` mesh layers contain `MDeformVert` structs.
No functional changes.
The Metal backend already supports output for the 6 clipping planes via gl_ClipDistances equivalent, however, functionality to toggle clipping plane enablement was missing.
Authored by Apple: Michael Parkin-White
Ref T96261
Depends on D16777
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D16813
Line Loop topology support for cutting tool and add support for packing several vertex attributes across individual pixels within a texture buffer.
Authored by Apple: Michael Parkin-White
Ref T96261
Reviewed By: fclem
Maniphest Tasks: T96261
Differential Revision: https://developer.blender.org/D16783
- Support for non-contiguous shader resource bindings for all cases required by create-info
- Implement missing geometry shader alternative path for edit curve handle.
- Add support for non-float dummy textures to address all cases where default bindings may be required.
Authored by Apple: Michael Parkin-White
Ref T96261
Depends on D16721
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D16777
The Realtime Compositor crashes on undo after an operation like Dissolve
node.
The compositor evaluator stored a reference to the compositor node tree
assuming that it will always be valid. This is not guaranteed, however,
and changes to the node tree can invalidate that reference. So we get
the node tree from the context directly every time to fix the crash.
Such IDs are tagged with the new `LIB_TAG_RUNTIME`. They are essentially
like any other regular ID, except that they do not get written in .blend
files. They also do not make their linked data usages directly linked.
They do be written in undo steps however.
This tag should be ignored in any non-Main IDs (e.g. evaluated data,
`NO_MAIN`, etc.).
This commit also adds a new RNA ID property, `is_runtime`. This is not a
direct mapping to the DNA tag, as a non-main ID will also return True,
and the property is only editable for Main IDs.
Some basic testing for expected behavior of that new tag was also added
to `blendfile_io` py unittest.
Required for brush asset project, see T101908.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D16675
ID tags were fully cleared on file write, however some should be written
so that they are preserved accross undo steps.
Currently this likely did not cause any serious issue, as the missing
ones were not that critical.
When creating a new mesh to change it in some way, the active and
default color attribute names should be copied to the new mesh.
Doing that in the generic "copy parameters for eval" function should
cover the vast majority of cases.
Accessing a mesh with write access can be costly if it is used
elsewhere at the same time because of copy-on-write. When always did
that at the end of the modifier calculation, but it's trivial to only
do that when we might need actually use the mesh to add original
index layers.
Caused by b08301c865. This also contains an optimization
compared to the previous version to avoid recalculating normals when
the entire mesh has moved by the same offset.
Reported by Demeter in chat.
This reverts commit a3a9459050.
And fixes T103337.
a3a9459050 has some flaws and it needs to go through review (See D16803).
Conflicts:
intern/ghost/intern/GHOST_SystemWin32.cpp
This was due to a missing endpoint case that wasn't handled in the port.
The last point still have to be discarded manually because of the
dot/stroke setting of the material.
The first test `ma1.x == -1` is not necessary anymore since the index
buffer do not contain this point (which was rendered using instance
rendering before.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D16812
Unlike other (closed) hierarchies, view layers dont show their contents
next to their names.
Code would still find the item via outliner_find_item_at_x_in_row though,
this is now prevented (same as if the viewlayer was open [instead of
collapsed]).
Fixes T102357.
Maniphest Tasks: T102357
Differential Revision: https://developer.blender.org/D16662
This patch implements the Streaks Glare node. Which is an approximation
to the existing implementation in the CPU compositor. The difference due
to the approximation is bearily visible in artificial test cases, but is
less visible in actual use cases. Since the difference is rather similar
to that we discussed in the Simple Star mode, the decision to allow that
difference would probably hold here.
For the future, we can look into approximating this further using a
closed form IIR recursive filter with parallel interconnection and
block-based parallelism. That's because the streak filter is already
very similar to the causal pass of a fourth order recursive filter,
just with exponential steps.
Differential Revision: https://developer.blender.org/D16789
Reviewed By: Clement Foucault
This patch implements the variable size mode of the blur node. This is
not identical to the CPU implementation, but is visually very close.
That's because of two things. First, the Extend Bounds option introduces
a 2px offset that doesn't make sense, which is likely a bug in the CPU
implementation. Second, the CPU implementation approximate the result
using three passes, the first two of which are separable morphological
operators applied on the size input. But this approximation does not
provide an advantage because the last pass is non-separable anyways. So
the GPU implementation does not attempt this approximation for more
accurate and faster results.
Differential Revision: https://developer.blender.org/D16762
Reviews By: Clement Foucault
This simplifies some memory management, ammortizes some of the many
small allocations when building UI layouts, and simplifies the code
that deals with the groups. `uiBlock` is no longer a trivial type.
In my testing this saved a few ms when drawing a large node tree.
Duplicating context lists took a measurable amount of time when drawing
large node trees in the node editor. Instead of using a linked list of
entries, which results in many small allocations, use a vector. Also,
use std::string and StringRefNull instead of char buffers and pointers.
I had forgotten about curves sculpt mode when I wrote
this function. It just initializes the viewport
pivot point to the evaluated object bounding box.
Should be used inside the mode entry function.
Texpaint now bounds checks material indices when looking up
materials, in case the user has corrupted the material_index
attribute somehow. We may wish to report this to the user
somehow on entering texture paint mode.
Partially addresses T72011.
The problem here is that the previous barycentric clamping did not deal well
with skinny triangles and would end up generating "sub-pixel jittering"
locations that were actually >20 pixels away.
Differential Revision: https://developer.blender.org/D16727
Previously, the code tried to keep node groups working even if some of
their input/output sockets had undefined type. This caused some
complexity with no benefit because not all places outside of this file
would handle the case correctly. Now node groups with undefined
interface sockets are disabled and have to be fixed manually before
they work again.
Undefined interface sockets are mostly caused by invalid Python
API usage and incomplete forward compatibility (e.g. when newer
versions introduce new socket types that the older version does
not know).
Avoid utility function call that would query the file system, this was a
bottleneck. The path joining was also problematic. See patch for more
details.
Differential Revision: https://developer.blender.org/D16768
Reviewed by: Jacques Lucke
Expands Color Mix nodes with new Exclusion mode.
Similar to Difference but produces less contrast.
Requested by Pierre Schiller @3D_director and
@OmarSquircleArt on twitter.
Differential Revision: https://developer.blender.org/D16543
Materials without connections to the output node would crash with OSL
in OptiX, since the Cycles `OSLCompiler` generates an empty shader
group reference for them, which resulted in the OptiX device
implementation setting an empty SBT entry for the corresponding direct
callables, which then crashed when calling those direct callables was
attempted in `osl_eval_nodes`. This fixes that by setting the SBT entries
for empty shader groups to a dummy direct callable that does nothing.
Switching viewport denoising causes kernels to be reloaded with a new
feature mask, which would destroy the existing OptiX pipelines. But OSL
kernels were not reloaded as well, leaving the shading pipeline
uninitialized and therefore causing an error when it is later attempted to
execute it. This fixes that by ensuring OSL kernels are always reloaded
when the normal kernels are too.
Restrict the condition under which paint cursors read use the cursor
location from the the operating-system.
This caused a glitch when dragging UI elements in painting context
popup. Since the paint cursor would display using mouse motion
which was clamped to the window center - an internal detail of hidden
cursor grabbing.
Now only read the cursor coordinates when clamped to a region which
is used for the transform cursor to stay visible even when the cursor
wraps around.
Recent reverting of changes to cursor grabbing intended to match
Blender 3.3 release. This is the case for 3.4x branch, however there is
an additional change to grabbing on WIN32 by Germano [0] which is a
significant improvement on old grabbing logic for Windows.
So instead of matching 3.3x behavior, restore logic that keeps
the cursor centered while grabbing & hidden.
This re-introduces T102792 issue displaying the paint-brush while
dragging buttons, this will have to be solved separately.
Re-apply [1] & [2], revert [3] & [4].
[4]: a3a9459050
[0]: 9fd6dae793
[1]: 4cac8025f0
[2]: 230744d6fd
[3]: 0240b89599
The paint cursor was continuously set which meant hiding the cursor
while interacting with buttons would immediately show it again.
This exposed cursor warping.
Small roundoff errors during UV editing can sometimes occur, most likely
due to so-called "catastrophic cancellation".
Here we set a tolerance around zero when using Constrain-To-Bounds and UV Scaling.
The tolerance is set at one quarter of a texel, on a 65536 x 65536 texture.
TODO: If this fix holds, we should formalize the tolerance into the UV editing
subsystem, perhaps as a helper function, and investigate where else it needs
to be applied.
Differential Revision: https://developer.blender.org/D16702
When migrating to the new packing API, pin_unselected was not
implemented correctly.
Regression from rB143e74c0b8eb, rBe3075f3cf7ce, rB0ce18561bc82.
Differential Revision: https://developer.blender.org/D16788
Reviewed By: Campbell Barton
Duplicated in blender-v3.4-release as rB3dcd9992676a
Upon conversion, the newly-created UV map with default name "UVMap"
should be translated.
Reviewed By: mont29
Maniphest Tasks: T103183
Differential Revision: https://developer.blender.org/D16775
Replace ../lib/linux_centos7_x86_64 with ../lib/linux_x86_64_glibc_228,
built with Rocky8 Linux, compatible with the VFX platform CY2023,
see: T99618.
- Update build-bot configuration.
- Remove unnecessary check for Blosc, this is part of OpenVDB lib now.
- Remove WITH_CXX11_ABI, always use new C++11 ABI now
- Replace centos7 by glibc_228 everywhere
Note that existing builds with cached paths pointing to
"../lib/linux_centos7_x86_64" will need to be updated.
Includes contributions by Brecht.
Attributes are unifying around a name-based API, and we would like to
be able to move away from CustomData in the future. This patch moves
the identification of active and fallback (render) color attributes
to strings on the mesh from flags on CustomDataLayer. This also
removes some ugliness used to retrieve these attributes and maintain
the active status.
The design is described more here: T98366
The patch keeps forward compatibility working until 4.0 with
the same method as the mesh struct of array refactors (T95965).
The strings are allowed to not correspond to an attribute, to allow
setting the active/default attribute independently of actually filling
its data. When applying a modifier, if the strings don't match an
attribute, they will be removed.
The realize instances / join node and join operator take the names from
the first / active input mesh. While other heuristics may be helpful
(and could be a future improvement), just using the first is simple
and predictable.
Differential Revision: https://developer.blender.org/D15169
If the resulting geometry from applying a geometry nodes modifier
contains no mesh, give an error message. This gives people something to
search and makes the behavior more purposeful.
Also remove the `modifyMesh` implementation from the geometry nodes
modifier, since it isn't necessary anymore. And remove the existing
"Modifier returned error, skipping apply" message which was cryptic
and redundant if applying returns an actual error message.
Resolves T103229
Differential Revision: https://developer.blender.org/D16782
This patch allows skipping the automatic insertion of nodes on top of
links when the transform operator ends. When putting nodes into small
spaces this often gets in the way and wastes time. Now, when holding
`alt`, this is turned off.
The header text is also improved to add this shortcut and to remove
the Dx and Dy values and improve the formatting a bit.
Making this functionality optional might allow us to use it in more
places in the future, like for the nodes added by link-drag-search.
Differential Revision: https://developer.blender.org/D16230
The function was highly related to the apply modifier operator,
and only used once. This was too specific to be in the blenkernel,
especially in a mesh conversion file.
This was missing some paths setup in the environment, ctest
normally sets this up before running the tests from the CLI
but that does not help the IDE all that much.
After switching over to using start_frame / end_frame, scaling an NLA strip didn't scale the strip, it just repeated the action.
Now withing the NLA transform code, we look for TFM_TIME_EXTEND / TFM_TIME_SCALE transform mode, and handle the update to strip scale accordingly
Since rB8014180720d8, all paint modes support orbiting around last
stroke, so [a] the comment there is out of date and [b] the fallback
case of orbiting around the center will never be used (unless there is
no stroke information - but BKE_paint_stroke_get_average handles that
anyways).
Spotted while looking into T101766.
Maniphest Tasks: T101766
Differential Revision: https://developer.blender.org/D16779
The problem was the bake function was using the evaluated
data and must use the original data.
The problem was caused by commit: rBcff6eb65804d: Cleanup: Remove duplicate Bake modifier code.
Fix by Philipp Oeser
Editmode should display the original (non-evaluated) points unless there
is something like an "On Cage" option of a modifier [which none of the
curves modifiers have].
This was not the case since the introduction in rBe15320568a29.
So we now draw the editpoints from the original curves. This also means
that original and evaluated curves might not have the same number of
points, so we have to get independent of `proc_point_buf` since that
would possibly create vertexbuffers of different sizes (compared to the
original curves) which is not allowed for a single batch.
- remove the "pos" alias from the vertex buffer format of proc_point_buf
- instead, create a new "edit_points_pos" vertex buffer
- fill that with the original (un-evaluated) curves positions
- dont request `proc_point_buf` anymore
- rename the editpoints flags buffer to be more consistent
And since original and evaluated points might also be in completely
different positions, we also need to draw connecting lines between those
editpoints to not have them float in thin air. For drawing these in
editmode, a simple polyline was chosen (instead of drawing lines in a
resolution that is take from the old particle system -- which is not
depending on points even but has a hardcoded resolution that can only be
upped by the hair_subdiv scene render setting)
- create appropriate batch and indexbuffer for this
- positions vertex buffer can be reused
- reuse particle edit shader (instead of curve edi shader) to get
segment highlighting
{F14055436}
NOTE: this also removes the broken depth handling and instead makes it
work (also XRay is properly taken into account) by binding the correct
overlay framebuffer.
NOTE: to further clarify the distinction between curves drawing (that is
based on the old partice system drawing) and drawing in editmode, the
corresponding vertexbuffers have been moved out of CurvesEvalCache into
CurvesBatchCache directly.
NOTE: drawing the lines in editmode could be improved (taking the "real"
resolution of splines into account, but since this should happen on the
GPU in a compute shader, this is for later)
Potentionally fixes T101889.
Maniphest Tasks: T101889
Differential Revision: https://developer.blender.org/D16281
2022-12-15 08:44:16 +01:00
1323 changed files with 35053 additions and 20141 deletions
option(WITH_CYCLES_ONEAPI_BINARIES"Enable Ahead-Of-Time compilation for Cycles oneAPI device"OFF)
option(WITH_CYCLES_ONEAPI_HOST_TASK_EXECUTION"Switch target of oneAPI implementation from SYCL devices to Host Task (single thread on CPU). This option is only for debugging purposes."OFF)
('SOBOL_BURLEY',"Sobol-Burley","Use on-the-fly computed Owen-scrambled Sobol for random sampling",0),
('TABULATED_SOBOL',"Tabulated Sobol","Use precomputed tables of Owen-scrambled Sobol for random sampling",1),
('TABULATED_SOBOL',"Tabulated Sobol","Use pre-computed tables of Owen-scrambled Sobol for random sampling",1),
)
enum_emission_sampling=(
@@ -905,7 +905,8 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
use_fast_gi:BoolProperty(
name="Fast GI Approximation",
description="Approximate diffuse indirect light with background tinted ambient occlusion. This provides fast alternative to full global illumination, for interactive viewport rendering or final renders with reduced quality",
description="Approximate diffuse indirect light with background tinted ambient occlusion. "
"This provides fast alternative to full global illumination, for interactive viewport rendering or final renders with reduced quality",
default=False,
)
@@ -1539,10 +1540,24 @@ class CyclesPreferences(bpy.types.AddonPreferences):
use_metalrt:BoolProperty(
name="MetalRT (Experimental)",
description="MetalRT for ray tracing uses less memory for scenes which use curves extensively, and can give better performance in specific cases. However this support is experimental and some scenes may render incorrectly",
description="MetalRT for ray tracing uses less memory for scenes which use curves extensively, and can give better "
"performance in specific cases. However this support is experimental and some scenes may render incorrectly",
default=False,
)
kernel_optimization_level:EnumProperty(
name="Kernel Optimization",
description="Kernels can be optimized based on scene content. Optimized kernels are requested at the start of a render. "
"If optimized kernels are not available, rendering will proceed using generic kernels until the optimized set "
"is available in the cache. This can result in additional CPU usage for a brief time (tens of seconds)",
default='FULL',
items=(
('OFF',"Off","Disable kernel optimization. Slowest rendering, no extra background CPU usage"),
('INTERSECT',"Intersection only","Optimize only intersection kernels. Faster rendering, negligible extra background CPU usage"),
('FULL',"Full","Optimize all kernels. Fastest rendering, may result in extra background CPU usage"),
set(SYCL_OFFLINE_COMPILER_PARALLEL_JOBS1CACHESTRING"Number of parallel compiler instances to use for device binaries compilation (expect ~8GB peak memory usage per instance).")
if(WITH_CYCLES_ONEAPI_BINARIES)
set(SYCL_OFFLINE_COMPILER_PARALLEL_JOBS1CACHESTRING"Number of parallel compiler instances to use for device binaries compilation (expect ~8GB peak memory usage per instance).")
if(WITH_CYCLES_ONEAPI_BINARIES)
message(STATUS"${SYCL_OFFLINE_COMPILER_PARALLEL_JOBS} instance(s) of oneAPI offline compiler will be used.")
endif()
# SYCL_CPP_FLAGS is a variable that the user can set to pass extra compiler options
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.