mirror of
https://github.com/blender/blender
synced 2026-09-28 04:04:20 +03:00
Fix #149438: Set Uniform Opacity removes Opacity from other stokes
In case there is no "fill_opacity" attribute already, this was added, but not initialized with 1.0 for unselected strokes. This is now fixed (similar to089a435376). Also added a `finish()` call that was missed in9759a9df5eit seems. Pull Request: https://projects.blender.org/blender/blender/pulls/149444
This commit is contained in:
parent
a445f6be96
commit
01059b9ac0
1 changed files with 4 additions and 1 deletions
|
|
@ -1072,11 +1072,14 @@ static wmOperatorStatus grease_pencil_set_uniform_opacity_exec(bContext *C, wmOp
|
|||
bke::curves::fill_points<float>(points_by_curve, strokes, opacity_stroke, opacities);
|
||||
|
||||
if (SpanAttributeWriter<float> fill_opacities = attributes.lookup_or_add_for_write_span<float>(
|
||||
"fill_opacity", AttrDomain::Curve))
|
||||
"fill_opacity",
|
||||
AttrDomain::Curve,
|
||||
bke::AttributeInitVArray(VArray<float>::from_single(1.0f, curves.curves_num()))))
|
||||
{
|
||||
strokes.foreach_index(GrainSize(2048), [&](const int64_t curve) {
|
||||
fill_opacities.span[curve] = opacity_fill;
|
||||
});
|
||||
fill_opacities.finish();
|
||||
}
|
||||
|
||||
changed = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue