Fix: Grease Pencil: Draw tool default aspect_ratio and u_scale to zero
The draw tool would create the `aspect_ratio` and `u_scale` attributes if they did not exist, but would set them to `0.0f` not `1.0f` Pull Request: https://projects.blender.org/blender/blender/pulls/146276
This commit is contained in:
committed by
casey-bianco-davis
parent
4eee95c0f9
commit
51f9fccc81
@@ -420,14 +420,19 @@ struct PaintOperationExecutor {
|
||||
softness.finish();
|
||||
}
|
||||
if (bke::SpanAttributeWriter<float> u_scale = attributes.lookup_or_add_for_write_span<float>(
|
||||
"u_scale", bke::AttrDomain::Curve))
|
||||
"u_scale",
|
||||
bke::AttrDomain::Curve,
|
||||
bke::AttributeInitVArray(VArray<float>::from_single(1.0f, curves.curves_num()))))
|
||||
{
|
||||
u_scale.span[active_curve] = 1.0f;
|
||||
curve_attributes_to_skip.add("u_scale");
|
||||
u_scale.finish();
|
||||
}
|
||||
if (bke::SpanAttributeWriter<float> aspect_ratio =
|
||||
attributes.lookup_or_add_for_write_span<float>("aspect_ratio", bke::AttrDomain::Curve))
|
||||
attributes.lookup_or_add_for_write_span<float>(
|
||||
"aspect_ratio",
|
||||
bke::AttrDomain::Curve,
|
||||
bke::AttributeInitVArray(VArray<float>::from_single(1.0f, curves.curves_num()))))
|
||||
{
|
||||
aspect_ratio.span[active_curve] = aspect_ratio_;
|
||||
curve_attributes_to_skip.add("aspect_ratio");
|
||||
|
||||
Reference in New Issue
Block a user