30 valid_names.
add_new(defgroup->name);
41 int defgroup_index = 0;
43 if (!valid_names.
contains(defgroup->name)) {
60 name.copy_utf8_truncated(defgroup->
name);
73 if (
mask.is_empty()) {
84 name.copy_utf8_truncated(defgroup->
name);
91 mask.foreach_index([&](
const int point_i) {
117 name.copy_utf8_truncated(defgroup->
name);
134 bool changed =
false;
149 if (!use_selection || selection[
i]) {
Low-level operations for curves.
Low-level operations for grease pencil.
Utility functions for vertex groups in grease pencil objects.
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Object is a sort of wrapper for general info.
constexpr IndexRange index_range() const
bool contains(const Key &key) const
void add_new(const Key &key)
GAttributeReader lookup_or_default(StringRef attribute_id, AttrDomain domain, AttrType data_type, const void *default_value=nullptr) const
bke::CurvesGeometry & strokes_for_write()
void * MEM_callocN(size_t len, const char *str)
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
void clear_vertex_groups(GreasePencil &grease_pencil)
bool remove_from_vertex_group(Drawing &drawing, StringRef name, bool use_selection)
int ensure_vertex_group(StringRef name, ListBase &vertex_group_names)
void assign_to_vertex_group(Drawing &drawing, StringRef name, float weight)
void assign_to_vertex_group_from_mask(CurvesGeometry &curves, const IndexMask &mask, StringRef name, float weight)
void validate_drawing_vertex_groups(GreasePencil &grease_pencil)
void remove_defgroup_index(MutableSpan< MDeformVert > dverts, int defgroup_index)
float wrap(float value, float max, float min)
ListBase vertex_group_names