Blender  V2.93
BKE_object_deform.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
17 #pragma once
18 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 struct ID;
30 struct MDeformVert;
31 struct Object;
32 struct bDeformGroup;
33 
34 /* General vgroup operations */
35 void BKE_object_defgroup_remap_update_users(struct Object *ob, const int *map);
36 
37 bool BKE_object_defgroup_array_get(struct ID *id, struct MDeformVert **dvert_arr, int *dvert_tot);
38 
39 struct bDeformGroup *BKE_object_defgroup_add(struct Object *ob);
40 struct bDeformGroup *BKE_object_defgroup_add_name(struct Object *ob, const char *name);
42 
43 bool BKE_object_defgroup_clear(struct Object *ob,
44  struct bDeformGroup *dg,
45  const bool use_selection);
46 bool BKE_object_defgroup_clear_all(struct Object *ob, const bool use_selection);
47 
48 void BKE_object_defgroup_remove(struct Object *ob, struct bDeformGroup *defgroup);
49 void BKE_object_defgroup_remove_all_ex(struct Object *ob, bool only_unlocked);
50 void BKE_object_defgroup_remove_all(struct Object *ob);
51 
53  struct Object *ob_dst,
54  int *r_map_len);
56  int dvert_len,
57  const int *map,
58  int map_len);
59 
60 /* Select helpers */
61 enum eVGroupSelect;
63  enum eVGroupSelect subset_type,
64  int *r_defgroup_tot,
65  int *r_subset_count);
66 void BKE_object_defgroup_subset_to_index_array(const bool *defgroup_validmap,
67  const int defgroup_tot,
68  int *r_defgroup_subset_map);
69 
70 /* ********** */
71 
72 bool *BKE_object_defgroup_lock_flags_get(struct Object *ob, const int defbase_tot);
73 bool *BKE_object_defgroup_validmap_get(struct Object *ob, const int defbase_tot);
75  int defbase_tot,
76  int *r_dg_flags_sel_tot);
77 
78 bool BKE_object_defgroup_check_lock_relative(const bool *lock_flags,
79  const bool *validmap,
80  int index);
82  const bool *lock_flags,
83  const bool *selected,
84  int sel_tot);
86  int defbase_tot, const bool *locked, const bool *deform, bool *r_locked, bool *r_unlocked);
87 
89  int defbase_tot,
90  const bool *selection,
91  bool *dg_flags_sel,
92  int *r_dg_flags_sel_tot);
93 
94 #ifdef __cplusplus
95 }
96 #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)
void BKE_object_defgroup_subset_to_index_array(const bool *defgroup_validmap, const int defgroup_tot, int *r_defgroup_subset_map)
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_lock_flags_get(struct Object *ob, const int defbase_tot)
bool BKE_object_defgroup_clear(struct Object *ob, struct bDeformGroup *dg, const bool use_selection)
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:72
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)
struct bDeformGroup * BKE_object_defgroup_add_name(struct Object *ob, const char *name)
bool * BKE_object_defgroup_validmap_get(struct Object *ob, const int defbase_tot)
bool BKE_object_defgroup_clear_all(struct Object *ob, const bool use_selection)
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)
eVGroupSelect
Definition: DNA_ID.h:273