Add support a new Rotation socket/data type to a Mix node.
Rotation socket avala ible only in Geometry Nodes right now,
list of supported types for node depend on own node tree type.
Mixing kind is slerp (interpolation) of a quaternion. As initial
phase this is enough. In a future, other modes of interpolation
can be added (Euler for XY+Z, YZ+X, ZX+Y, ...). Clamping for
factor work the same as for all other data types.
Drag and drop should take care avoiding create links between
Rotation sockets and all other socket types, this requires chages
is mix node callback for drag & drop system.
See: https://projects.blender.org/blender/blender/issues/92967
Pull Request: https://projects.blender.org/blender/blender/pulls/109084
This is the same as 48fad9cd0c9693e4dbb3 but applied to the positions
array instead of other generic attributes. For test case with 90k poly
curves, this reduced the conversion time from 1.7 to 1.3 ms, and reduced
memory usage from 67 to 59 MiB (as reported by Blender).
When the profile is a single point, and all the curves are poly curves,
the mesh has the same number of points as the curves, and attributes
can be shared, reducing memory usage and time spend copying. This
doesn't apply to positions yet though. With 8 attributes, the
time for the conversion in a test went from 55 to 14 ms.
When profile is a single point but the curves aren't poly curves,
we can evaluate main point attributes directly into the mesh attribute
arrays rather than using a temporary buffer. In a test with 8
attributes, the time went from 3.7 to 1.6 ms.
When the profile is the default (or manually set to a single point at
the origin), avoid computing tangents and normals, and avoid evaluating
the radius attribute. That data is only used to build the transforms of
the new points. In a simple test case, this changed the total time from
34.4 to 14.7 ms (removing the cost 4.7, 8.4, and 2.1 ms) cost of
calculating tangents, normals, and radii.
A GPU_finish for each EEVEE_render_draw was initially added by
3f0873fa1e48e277f85801ca03c344bed4a77320 but it introduces
important GPU execution gaps during rendering.
Removing it gives a ~10% improvement on Intel Arc / Windows from
our testing with Red Autumn Forest scene.
Pull Request: https://projects.blender.org/blender/blender/pulls/109382
Since snapping to endpoints is already done when you snap to edges
together, there is no need to create a bvhtree with all the vertices.
Also use the appropriate endpoint definition for snap to armatures.
This is part of what was implemented in #109062
When adding multiple snap points (`A` key), the 'Snap Base' location no longer corresponds to the snap target point, so it becomes invisible.
Therefore, show the resulting `Snap Base` during this operation.
Pull Request: https://projects.blender.org/blender/blender/pulls/109379
No user visible changes expected.
Part of #96713, continuation of work started in 249e4df110 and 2e221de4ce.
Refer to these for a motivation and design overview.
Removes `isExpandValid()` from `AbstractTreeElement` and its sub-classes as all ID elements are ported to new tree-element code design. It was meant to be temporary for this transition phase.
Pull Request: https://projects.blender.org/blender/blender/pulls/109380
No user visible changes expected.
This function was added in 86b2cf4574 as a more type safe and more
convenient way of setting button callbacks. So use it for simple cases.
No user visible changes expected.
Rather than relying on a C-style function pointer with void pointer
arguments, allow storing a `std::function` object, which can hold
arbitrary data in a type safe way. This can be conveniently used with
lambdas for example.
This is not used yet, but will be with #104831 merged. Replacing the
existing C-style callback uses with this can be done separately.
Pull Request: https://projects.blender.org/blender/blender/pulls/109016
No user visible changes expected.
Part of #96713, continuation of work started in 249e4df110 and 2e221de4ce.
Refer to these for a motivation and design overview.
Adds a default expansion for `TreeElementID`, removing the need for `outliner_add_id_contents()`.
Pull Request: https://projects.blender.org/blender/blender/pulls/109256
The problem was caused because the `Nearest2dUserData::obmat_` member
was deallocated in derived classes even before the main class
destructor was called.
This is strange behavior and only seen in Mac or Linux Release builds.
The solution is to not rely on the destructor to register snap values.
So create a separate function.
This moves the `stroke_cache` that was previously stored on every
drawing to the `GreasePencilRuntime` struct.
Since this cache is only used for when a user is drawing a stroke, there
can only ever be one. It makes more sense to have this cache on the
data-block runtime data, rather than every drawings runtime data.
- "Front"/"Back": 'put something at the front/back' or 'the front/back
face of something'. (e. g. the Empty Image options, Depth and Side
option, both use the same strings as enum, which should be avoided
in some languages).
- "Flip": invert, as in normals, or mirror, as in an image.
- "Path": a path to a resource, in general a file but sometimes a
datablock, as opposed to a trajectory in space.
- "Join": disambiguate for the Grease Pencil operator, which may use a
different word as that for meshes.
- "Wave": an ondulating motion, as opposed to a fluid dynamics motion.
- "Step": can mean the distance between two things, or a number of
times to do something. In this case it is better to use the plural.
- "Edge": generally the edges of a mesh, but can also mean edge
detection. Additionally, it was used for the option to enable
Freestyle. This was changed to "Use Freestyle".
- "Boundary": the limit of a grease pencil drawing for filling
purposes, as opposed to the external limit of a (non-manifold) mesh.
- "Rotations": can be translated to something like "Turns", in the
context of a spiral.
Pull Request: https://projects.blender.org/blender/blender/pulls/108213
For repeat / extend / mirror mode, both wrap and read_clip functions did
the bounds check. Removing it improves performance between 0.5% and 1.5%
in the classroom scene in one test. Clip mode is unchanged.
Pull Request: https://projects.blender.org/blender/blender/pulls/109304
When using ATI GPU on MacOS/Metal compilation of Eevee shaders crashed due to an infinitive
loop in the compiler backend. This change fixes this by using a more reliable loop that
ensures that the loop will be finite.
Thanks for the Apple developers working on finding the root cause and Michael Parking White
for the initial fix.
Fixes#107322Fixes#107451
Pull Request: https://projects.blender.org/blender/blender/pulls/109358
The Undo History menu displays each undo step's name. These are either
operators or property names. Operators are translated upon display,
and they use the operator name. Currently, many of them are not
translated because they do not use the proper translation
context.
This commit changes the translation context to
BLT_I18NCONTEXT_OPERATOR_DEFAULT ("Operator").
Pull Request: https://projects.blender.org/blender/blender/pulls/108872