Blender V5.3
BKE_object_deform.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
12
13#include "DNA_scene_enums.h"
14
15namespace blender {
16
17struct ID;
18struct MDeformVert;
19struct Object;
20struct bDeformGroup;
21
22/* General vgroup operations. */
23
31void BKE_object_defgroup_remap_update_users(struct Object *ob, const int *map);
32
38bool BKE_object_defgroup_array_get(struct ID *id, struct MDeformVert **dvert_arr, int *dvert_tot);
39
47struct bDeformGroup *BKE_object_defgroup_add_name(struct Object *ob, const char *name);
52
59bool BKE_object_defgroup_clear(struct Object *ob, struct bDeformGroup *dg, bool use_selection);
66bool BKE_object_defgroup_clear_all(struct Object *ob, bool use_selection);
67
71void BKE_object_defgroup_remove(struct Object *ob, struct bDeformGroup *defgroup);
76void BKE_object_defgroup_remove_all_ex(struct Object *ob, bool only_unlocked);
81
88 struct Object *ob_dst,
89 int *r_map_len);
91 int dvert_len,
92 const int *map,
93 int map_len);
94
95/* Select helpers. */
96
101 enum eVGroupSelect subset_type,
102 int *r_defgroup_tot,
103 int *r_subset_count);
107void BKE_object_defgroup_subset_to_index_array(const bool *defgroup_validmap,
108 int defgroup_tot,
109 int *r_defgroup_subset_map);
110
111/* ********** */
112
117bool *BKE_object_defgroup_lock_flags_get(struct Object *ob, int defbase_tot);
118bool *BKE_object_defgroup_validmap_get(struct Object *ob, int defbase_tot);
124 int defbase_tot,
125 int *r_dg_flags_sel_tot);
126
132bool BKE_object_defgroup_check_lock_relative(const bool *lock_flags,
133 const bool *validmap,
134 int index);
141 const bool *lock_flags,
142 const bool *selected,
143 int sel_tot);
144
149
156 int defbase_tot, const bool *locked, const bool *deform, bool *r_locked, bool *r_unlocked);
157
164 int defbase_tot,
165 const bool *selection,
166 bool *dg_flags_sel,
167 int *r_dg_flags_sel_tot);
168
169} // namespace blender
BMesh Iterators.
struct MDeformVert * BKE_object_defgroup_data_create(struct ID *id)
void BKE_object_defgroup_remap_update_users(struct Object *ob, const int *map)
bool BKE_object_defgroup_array_get(struct ID *id, struct MDeformVert **dvert_arr, int *dvert_tot)
void BKE_object_defgroup_mirror_selection(struct Object *ob, int defbase_tot, const bool *selection, bool *dg_flags_sel, int *r_dg_flags_sel_tot)
bool BKE_object_defgroup_clear_all(struct Object *ob, bool use_selection)
bool * BKE_object_defgroup_validmap_get(struct Object *ob, int defbase_tot)
void BKE_object_defgroup_split_locked_validmap(int defbase_tot, const bool *locked, const bool *deform, bool *r_locked, bool *r_unlocked)
void BKE_object_defgroup_remove_all(struct Object *ob)
bool * BKE_object_defgroup_selected_get(struct Object *ob, int defbase_tot, int *r_dg_flags_sel_tot)
void BKE_object_defgroup_index_map_apply(struct MDeformVert *dvert, int dvert_len, const int *map, int map_len)
struct bDeformGroup * BKE_object_defgroup_add_name(struct Object *ob, const char *name)
bool BKE_object_defgroup_clear(struct Object *ob, struct bDeformGroup *dg, bool use_selection)
void BKE_object_defgroup_subset_to_index_array(const bool *defgroup_validmap, int defgroup_tot, int *r_defgroup_subset_map)
bool * BKE_object_defgroup_lock_flags_get(struct Object *ob, int defbase_tot)
bool BKE_object_defgroup_check_lock_relative_multi(int defbase_tot, const bool *lock_flags, const bool *selected, int sel_tot)
int * BKE_object_defgroup_index_map_create(struct Object *ob_src, struct Object *ob_dst, int *r_map_len)
struct bDeformGroup * BKE_object_defgroup_add(struct Object *ob)
bool BKE_object_defgroup_active_is_locked(const struct Object *ob)
void BKE_object_defgroup_remove_all_ex(struct Object *ob, bool only_unlocked)
bool * BKE_object_defgroup_subset_from_select_type(struct Object *ob, enum eVGroupSelect subset_type, int *r_defgroup_tot, int *r_subset_count)
void BKE_object_defgroup_remove(struct Object *ob, struct bDeformGroup *defgroup)
bool BKE_object_defgroup_check_lock_relative(const bool *lock_flags, const bool *validmap, int index)