GPv3: Tint and Color modifiers #117297
|
@ -107,7 +107,7 @@ static void modify_stroke_color(Object *ob,
|
|||
const bool use_curve = (cmd.influence.flag & GREASE_PENCIL_INFLUENCE_USE_CUSTOM_CURVE);
|
||||
LukasTonne marked this conversation as resolved
|
||||
const OffsetIndices<int> points_by_curve = curves.points_by_curve();
|
||||
|
||||
bke::MutableAttributeAccessor attributes = curves.attributes_for_write();
|
||||
bke::AttributeAccessor attributes = curves.attributes();
|
||||
VArray<int> stroke_materials =
|
||||
LukasTonne marked this conversation as resolved
Outdated
Hans Goudey
commented
Typically Typically `*` is used instead of `.varray`. Just a bit shorter
|
||||
attributes.lookup_or_default<int>("material_index", bke::AttrDomain::Curve, 0).varray;
|
||||
LukasTonne marked this conversation as resolved
Outdated
Falk David
commented
Looks like you just need Looks like you just need `attributes()` here.
|
||||
|
||||
LukasTonne marked this conversation as resolved
Falk David
commented
`const`
|
||||
|
|
|
@ -171,7 +171,7 @@ static void modify_stroke_color(Object *ob,
|
|||
GREASE_PENCIL_INFLUENCE_INVERT_VERTEX_GROUP);
|
||||
const OffsetIndices<int> points_by_curve = curves.points_by_curve();
|
||||
|
||||
bke::MutableAttributeAccessor attributes = curves.attributes_for_write();
|
||||
bke::AttributeAccessor attributes = curves.attributes();
|
||||
VArray<int> stroke_materials =
|
||||
LukasTonne marked this conversation as resolved
Outdated
Hans Goudey
commented
`*` here instead of `.varray` too
|
||||
attributes.lookup_or_default<int>("material_index", bke::AttrDomain::Curve, 0).varray;
|
||||
LukasTonne marked this conversation as resolved
Outdated
Falk David
commented
Looks like you don't need the Looks like you don't need the `attributes_for_write()` here, just `attributes()`.
|
||||
const VArray<float> vgroup_weights =
|
||||
LukasTonne marked this conversation as resolved
Outdated
Falk David
commented
`const`
|
||||
|
|
Loading…
Reference in New Issue
point_colors
->vertex_colors