GPv3: Tint and Color modifiers #117297

Merged
Lukas Tönne merged 20 commits from LukasTonne/blender:gp3-color-modifier into main 2024-01-19 16:59:49 +01:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 9bbd1c69c5 - Show all commits

View File

@ -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
Review

point_colors -> vertex_colors

`point_colors` -> `vertex_colors`
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

Typically * is used instead of .varray. Just a bit shorter

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

Looks like you just need attributes() here.

Looks like you just need `attributes()` here.
LukasTonne marked this conversation as resolved
Review

const

`const`

View File

@ -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

* here instead of .varray too

`*` here instead of `.varray` too
attributes.lookup_or_default<int>("material_index", bke::AttrDomain::Curve, 0).varray;
LukasTonne marked this conversation as resolved Outdated

Looks like you don't need the attributes_for_write() here, just attributes().

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

const

`const`