Blender Git Loki

Blenderin Git "master"-kehityshaaran kommitit.

1 hour 26 min ago
Fix T89234: Gpencil Separate doesn't copy settings in Stroke/Point mode

Some values were not copied from the old layer to the new one as Tint or Opacity factor.

The error affected to Strokes and Point mode
Revision ed42222 by Hans Goudey
3 hours 29 min ago
Geometry Nodes: Add Curve Subdivision Node

This node creates splines with more control points in between the
existing control points. The point is to give the splines more
definition for further tweaking like randomization with white noise,
instead of deforming a resampled poly spline with a noise texture.

For poly splines and NURBS, the node simply interpolates new values
between the existing control points. However, for Bezier splines,
the result follows the existing evaluated shape of the curve, changing
the handle positions and handle types to make that possible.

The number of "cuts" can be controlled by an integer input, or an
attribute can be used. Both spline and point domain attributes are
supported, so the number of cuts can vary using the value from the
point at the start of each segment.

Dynamic curve attributes are interpolated to the result with linear

Differential Revision:
6 hours 45 min ago
Geometry Nodes: support minimum twist normal mode

The minimum twist mode is important because it allows creating
normals without sudden changes in direction. The disadvantage
of minimum twist normals is that the normals depend on all control
points. So changing one control point can change the normals
everywhere. The computed normals do not match the existing
code exactly, although they do match quite well on non-cyclic and
on some cyclic curves. I also noticed that the existing implementation
has some fairly simple failure cases that I haven't found in the new
implementation so far.

Differential Revision:
8 hours 28 min ago
Geometry Nodes: fix ownership issue in spline to points conversion

Previously, `VArray_For_SplineToPoint` did not take ownership of the
virtual array leading to use-after-free errors.
11 hours 25 min ago
Geometry Nodes: improve node locking in evaluator

This makes the parts where a node is locked more explicit. Also, now the thread
is isolated when the node is locked. This prevents some kinds of deadlocks
(which haven't happened in practice yet).
13 hours 24 min ago
Cleanup: use doxy sections for rna_mesh.c
13 hours 30 min ago
Cleanup: rename rna_Mesh_update_data to rna_Mesh_update_data_deg_all

It's ambiguous what rna_Mesh_update_data does compared with functions
that use `rna_Mesh_update_data_*` as a prefix.

Noticed by @sybren D11377 review.
13 hours 36 min ago
Cleanup: improved comment for skipping updated with zero user meshes

Noticed by @sybren D11377 review.
15 hours 0 min ago
Cleanup: split BKE_mesh_copy_settings into two functions

- BKE_mesh_copy_parameters_for_eval to be used for evaluated meshes only
as it doesn't handle ID user-counts.

- BKE_mesh_copy_parameters is a general function for copying parameters
between meshes.
15 hours 25 min ago
Cleanup: spelling
15 hours 25 min ago
Cleanup: unused argument, function & shadow variable warning
18 hours 4 min ago
VSE: Refactor transform operator code

Refactor function `freeSeqData` so it is readable.

One strip can have multiple transform operations defined. To prevent
processing strip multiple times, build `SeqCollection` and use
sequencer iterator instead of iterating `TransData` directly.

No functional changes.

Differential Revision:
18 hours 26 min ago
VSE: Reduce transform code complexity

Reduce complexity of sequencer transform code by removing recursivity.
This is possible by treating meta strips (mostly) as any other strip and
containing all transform code within SEQ_ functions.

Unfortunately internally meta strips still require special treatment,
but all complexity from code all over transform code seems to be
possible to contain within one function.

Functional change:
Previously adjusting handle of single image strip moved animation.
Now animation is not moved, which is behavior for all other strips.

Reviewed By: sergey, mano-wii

Differential Revision:
20 hours 2 min ago
Revert "Fix T89204: slow repeated rendering with GPUOffscreen.draw_view3d"

This reverts commit d03b26edbdc3a9fe87fde44bd8db8c4a67a36757. There is some
refresh issue that needs to be solved before this can be enabled.
1 day and 0 hours ago
Fix T88342: 'To Sphere' and 'Push/Pull' not working in Pose mode

Some modes don't take into account that `TransData` may be in data space.
1 day and 1 hour ago
Fix T89204: slow repeated rendering with GPUOffscreen.draw_view3d

Cache the GPUViewport so the framebuffers and associated textures are not
reallocated each time.
Revision a1cc704 by Lukas Toenne
1 day and 2 hours ago
Edge-scrolling for node editor

Starts scrolling when dragging a node or node link and going outside the current window.
Largely copied from the VIEW2D_OT_edge_pan operator.

Edge panning operator customdata and supporting functions now in
UI_view2d.h, so they could be used by operators in other editor
libraries. The VIEW2D_OT_edge_pan operator also uses this customdata and
shared functions now. Operators properties can be used to configure
edge panning margins and speed for each use case, rather than using
hardcoded values.

The speed function for edge panning has been tweaked somewhat:
* "Speed per pixel" has been replaced with a "speed ramp" distance.
This is more intuitive and also creates an upper bound for the speed,
which can otherwise become extreme with large cursor distance.
* "Max speed" is reached at the end of the speed ramp.
* Padding the region inside and outside is applied as before, but both
values are operator properties now.

Node transform operator also supports edge panning. This requires
an offset for changes in the view2d rect, otherwise nodes are "stuck"
to the original view.

Transform operator had cursor wrapping categorically enabled, but this
gets quite confusing with the edge scrolling mechanism. A new TransInfo
option T_NO_CURSOR_WRAP has been introduced to disable this behavior.
The double negative is a bit annoying, but want to avoid affecting the
existing transform modes, so by default it should still set the
OP_IS_MODAL_GRAB_CURSOR flag (which then sets the WM_CURSOR_WRAP_XY
flag during modal execution).

Reviewed By: HooglyBoogly, JacquesLucke

Differential Revision:
Revision 247abdb by YimingWu
1 day and 5 hours ago
LineArt: Cached calculation for modifiers in the same stack.

This allows line art to run only once for each modifier stacks,
with an option to toggle a specific line art modifier should
use cache or re-do their own calculations.

Reviewed By: Sebastian Parborg (zeddb), Hans Goudey (HooglyBoogly)

Differential Revision:
1 day and 5 hours ago
BLI: add C++ wrapper for task isolation

This makes it easier to use task isolation in c++ code.
Previously, one either had to check `WITH_TBB` (possibly indirectly
through `WITH_OPENVDB`) or one had to use the C function which
is less convenient.
1 day and 5 hours ago
BLI: add threading namespace

This namespace groups threading related functions/classes. This avoids
adding more threading related stuff to the blender namespace. Also it
makes naming a bit easier, e.g. the c++ version of BLI_task_isolate could
become blender::threading::isolate_task or something similar.

Differential Revision:
Tehnyt: Miika HämäläinenViimeksi p?ivitetty: 07.11.2014 14:18 MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021