Blender  V3.3
BKE_object_deform.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 struct ID;
16 struct MDeformVert;
17 struct Object;
18 struct bDeformGroup;
19 
20 /* General vgroup operations. */
21 
29 void BKE_object_defgroup_remap_update_users(struct Object *ob, const int *map);
30 
36 bool BKE_object_defgroup_array_get(struct ID *id, struct MDeformVert **dvert_arr, int *dvert_tot);
37 
41 struct bDeformGroup *BKE_object_defgroup_add(struct Object *ob);
45 struct bDeformGroup *BKE_object_defgroup_add_name(struct Object *ob, const char *name);
50 
57 bool BKE_object_defgroup_clear(struct Object *ob, struct bDeformGroup *dg, bool use_selection);
64 bool BKE_object_defgroup_clear_all(struct Object *ob, bool use_selection);
65 
69 void BKE_object_defgroup_remove(struct Object *ob, struct bDeformGroup *defgroup);
74 void BKE_object_defgroup_remove_all_ex(struct Object *ob, bool only_unlocked);
78 void BKE_object_defgroup_remove_all(struct Object *ob);
79 
86  struct Object *ob_dst,
87  int *r_map_len);
89  int dvert_len,
90  const int *map,
91  int map_len);
92 
93 /* Select helpers. */
94 
95 enum eVGroupSelect;
100  enum eVGroupSelect subset_type,
101  int *r_defgroup_tot,
102  int *r_subset_count);
106 void BKE_object_defgroup_subset_to_index_array(const bool *defgroup_validmap,
107  int defgroup_tot,
108  int *r_defgroup_subset_map);
109 
110 /* ********** */
111 
116 bool *BKE_object_defgroup_lock_flags_get(struct Object *ob, int defbase_tot);
117 bool *BKE_object_defgroup_validmap_get(struct Object *ob, int defbase_tot);
123  int defbase_tot,
124  int *r_dg_flags_sel_tot);
125 
131 bool BKE_object_defgroup_check_lock_relative(const bool *lock_flags,
132  const bool *validmap,
133  int index);
140  const bool *lock_flags,
141  const bool *selected,
142  int sel_tot);
149  int defbase_tot, const bool *locked, const bool *deform, bool *r_locked, bool *r_unlocked);
150 
157  int defbase_tot,
158  const bool *selection,
159  bool *dg_flags_sel,
160  int *r_dg_flags_sel_tot);
161 
162 #ifdef __cplusplus
163 }
164 #endif
bool BKE_object_defgroup_check_lock_relative(const bool *lock_flags, const bool *validmap, int index)
struct MDeformVert * BKE_object_defgroup_data_create(struct ID *id)
void BKE_object_defgroup_split_locked_validmap(int defbase_tot, const bool *locked, const bool *deform, bool *r_locked, bool *r_unlocked)
bool BKE_object_defgroup_clear_all(struct Object *ob, bool use_selection)
bool BKE_object_defgroup_array_get(struct ID *id, struct MDeformVert **dvert_arr, int *dvert_tot)
void BKE_object_defgroup_remove(struct Object *ob, struct bDeformGroup *defgroup)
int * BKE_object_defgroup_index_map_create(struct Object *ob_src, struct Object *ob_dst, int *r_map_len)
bool * BKE_object_defgroup_validmap_get(struct Object *ob, int defbase_tot)
void BKE_object_defgroup_remove_all_ex(struct Object *ob, bool only_unlocked)
void BKE_object_defgroup_index_map_apply(struct MDeformVert *dvert, int dvert_len, const int *map, int map_len)
void BKE_object_defgroup_remap_update_users(struct Object *ob, const int *map)
Definition: object_deform.c:52
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)
struct bDeformGroup * BKE_object_defgroup_add(struct Object *ob)
bool * BKE_object_defgroup_subset_from_select_type(struct Object *ob, enum eVGroupSelect subset_type, int *r_defgroup_tot, int *r_subset_count)
bool BKE_object_defgroup_check_lock_relative_multi(int defbase_tot, const bool *lock_flags, const bool *selected, int sel_tot)
void BKE_object_defgroup_subset_to_index_array(const bool *defgroup_validmap, int defgroup_tot, int *r_defgroup_subset_map)
struct bDeformGroup * BKE_object_defgroup_add_name(struct Object *ob, const char *name)
Definition: object_deform.c:95
bool * BKE_object_defgroup_lock_flags_get(struct Object *ob, int defbase_tot)
bool * BKE_object_defgroup_selected_get(struct Object *ob, int defbase_tot, int *r_dg_flags_sel_tot)
void BKE_object_defgroup_remove_all(struct Object *ob)
bool BKE_object_defgroup_clear(struct Object *ob, struct bDeformGroup *dg, bool use_selection)
eVGroupSelect
SocketIndexByIdentifierMap * map
Definition: DNA_ID.h:368