139 for (
int i = 0; i < dvert_tot; i++) {
141 for (
int j = 0; j < dv->
totweight; j++) {
154 *dvert_arr =
nullptr;
157 switch (
GS(id->name)) {
161 if (
BMEditMesh *em = mesh->runtime->edit_mesh.get()) {
168 if (cd_dvert_offset == -1) {
197 if (!mesh->deform_verts().is_empty()) {
200 *dvert_tot = mesh->verts_num;
202 MEM_mallocN(
sizeof(
void *) * mesh->verts_num, __func__));
206 const VArray<bool> select_vert = *attributes.lookup_or_default<
bool>(
209 for (
int i = 0; i < mesh->verts_num; i++) {
210 (*dvert_arr)[i] = select_vert[i] ? &dverts[i] :
nullptr;
214 for (
int i = 0; i < mesh->verts_num; i++) {
215 (*dvert_arr)[i] = &dverts[i];
231 MEM_mallocN(
sizeof(
void *) * (*dvert_tot), __func__));
234 for (
int i = 0; i < *dvert_tot; i++) {
235 (*dvert_arr)[i] = (def->
f1 &
SELECT) ? <->
dvert[i] :
nullptr;
239 for (
int i = 0; i < *dvert_tot; i++) {
240 (*dvert_arr)[i] = lt->
dvert + i;
260 const bool *vgroup_validmap,
261 const int vgroup_tot)
281 for (
int i_src = 0; i_src < dvert_tot; i_src++) {
282 if (dvert_array[i_src] !=
nullptr) {
285 if (i_dst != -1 && dvert_array_all[i_dst] !=
nullptr) {
291 dv_dst, dv_src, vgroup_validmap, vgroup_tot, flip_map, flip_map_len);
293 dvert_array[i_dst] = dvert_array_all[i_dst];
320 for (
int i = 0; i < dvert_tot; i++) {
321 if (dvert_array[i] ==
nullptr) {
324 if ((i_sel != -1) && (i_sel != i) && (dvert_array[i_sel])) {
326 dvert_array[i] = dvert_array_all[i];
336 const bool *vgroup_validmap,
337 const int vgroup_tot,
339 const bool keep_single)
343 for (
int i = 0; i < dvert_tot; i++) {
345 if (!(dv = dvert_array[i])) {
359 if ((dw->
def_nr < vgroup_tot) && vgroup_validmap[dw->
def_nr]) {
360 if (dw->
weight <= epsilon) {
380 bool new_vgroup =
false;
392 static_cast<ID *
>(ob_from->
data), &dvert_array_from, &dvert_tot_from,
false);
395 if ((dvert_array ==
nullptr) && (dvert_array_from !=
nullptr) &&
402 if (dvert_tot == 0 || (dvert_tot != dvert_tot_from) || dvert_array_from ==
nullptr ||
403 dvert_array ==
nullptr)
408 if (dvert_array_from) {
412 if (new_vgroup ==
true) {
418 return (dvert_tot == dvert_tot_from);
427 if (defbase_tot_from < defbase_tot) {
430 for (i = 0; i <= defbase_tot_from; i++) {
433 for (; i <= defbase_tot; i++) {
440 if (dvert_array_from !=
nullptr && dvert_array !=
nullptr) {
441 dvf = dvert_array_from;
444 for (i = 0; i < dvert_tot; i++, dvf++, dv++) {
462 float *dvert_weights,
465 for (
int i = 0; i < dvert_tot; i++) {
473 const float *dvert_weights,
475 const bool remove_zero)
479 for (i = 0; i < dvert_tot; i++) {
482 if (dvert_weights[i] > 0.0f) {
485 dw->
weight = dvert_weights[i];
526 Object *ob,
BMVert *eve,
int def_nr,
int vidx,
const int cd_dvert_offset)
529 BMEditMesh *em = mesh->runtime->edit_mesh.get();
535 if (eve_mirr && eve_mirr != eve) {
557 if ((vidx_mirr) >= 0 && (vidx_mirr != vidx)) {
567 BMEditMesh *em = mesh->runtime->edit_mesh.get();
603 BMEditMesh *em = mesh->runtime->edit_mesh.get();
607 int subset_count, vgroup_tot;
608 const bool *vgroup_validmap;
617 if (dvert_act ==
nullptr) {
622 ob, subset_type, &vgroup_tot, &subset_count);
643 int i, vgroup_tot, subset_count;
645 ob, subset_type, &vgroup_tot, &subset_count);
647 if (
BMEditMesh *em = mesh->runtime->edit_mesh.get()) {
668 const VArray<bool> select_vert = *attributes.lookup_or_default<
bool>(
676 for (i = 0; i < mesh->verts_num; i++) {
677 if (select_vert[i] && &dverts[i] != dvert_act) {
701 "Selected Pose Bones",
702 "All Vertex Groups assigned to Selection"},
707 "All Vertex Groups assigned to Deform Bones"},
708 {
WT_VGROUP_ALL,
"ALL", 0,
"All Groups",
"All Vertex Groups"},
709 {0,
nullptr, 0,
nullptr,
nullptr},
716 const uint selection_mask)
784 "Define which subset of groups shall be used");
809 Object *ob,
const int def_nr,
const int vertnum,
const float weight,
const int assignmode)
818 if (dvert ==
nullptr) {
823 if ((vertnum < 0) || (vertnum >= tot)) {
834 switch (assignmode) {
856 switch (assignmode) {
938 if (
BMEditMesh *em = mesh->runtime->edit_mesh.get()) {
942 if (cd_dvert_offset != -1 && vertnum < em->
bm->
totvert) {
955 if (vertnum >= mesh->verts_num) {
958 dv = &dverts[vertnum];
969 dv = <->
dvert[vertnum];
1025 if (
BMEditMesh *em = mesh->runtime->edit_mesh.get()) {
1028 if (cd_dvert_offset != -1) {
1055 const VArray<bool> hide_vert = *attributes.lookup_or_default<
bool>(
1058 attributes.lookup_or_add_for_write_only_span<
bool>(
".select_vert",
1061 for (
const int i : select_vert.span.index_range()) {
1062 if (!hide_vert[i]) {
1069 select_vert.finish();
1085 for (a = 0, bp = lt->
def; a < tot; a++, bp++, dv++) {
1092 if (actbp && bp == actbp) {
1105 using namespace ed::greasepencil;
1107 for (MutableDrawingInfo info : drawings) {
1119 char name[
sizeof(dg->
name)];
1122 int i, idg, icdg, dvert_tot = 0;
1132 if (!strstr(dg->
name,
"_copy")) {
1153 for (i = 0; i < dvert_tot; i++) {
1158 const float weight = dw_org->weight;
1160 dw_cpy->weight = weight;
1185 float weight_max = 0.0f;
1187 for (
int i = 0; i < dvert_tot; i++) {
1190 if (!(dv = dvert_array[i])) {
1200 if (weight_max > 0.0f) {
1201 for (
int i = 0; i < dvert_tot; i++) {
1204 if (!(dv = dvert_array[i])) {
1210 dw->
weight /= weight_max;
1227 const bool *vgroup_validmap,
1228 const int vgroup_tot,
1246 for (
int i = 0; i < dvert_tot; i++) {
1248 if (!(dv = dvert_array[i])) {
1254 if (vgroup_validmap[j]) {
1265 if (use_mirror && use_vert_sel) {
1274 const bool *vgroup_validmap,
1275 const int vgroup_tot,
1276 const int subset_count,
1277 const bool lock_active,
1281 int i, dvert_tot = 0;
1286 if (subset_count == 0) {
1297 bool changed =
false;
1299 if ((lock_active ==
true) && (lock_flags !=
nullptr) && (def_nr < defbase_tot)) {
1300 lock_flags[def_nr] =
true;
1304 for (i = 0; i < defbase_tot; i++) {
1305 if (lock_flags[i] ==
false) {
1310 if (i == defbase_tot) {
1316 for (i = 0; i < dvert_tot; i++) {
1318 if ((dv = dvert_array[i])) {
1322 else if (lock_active) {
1358 "Unlock all vertex groups if there is at least one locked group, lock all in other case"},
1359 {
VGROUP_LOCK,
"LOCK", 0,
"Lock",
"Lock all vertex groups"},
1360 {
VGROUP_UNLOCK,
"UNLOCK", 0,
"Unlock",
"Unlock all vertex groups"},
1361 {
VGROUP_INVERT,
"INVERT", 0,
"Invert",
"Invert the lock state of all vertex groups"},
1362 {0,
nullptr, 0,
nullptr,
nullptr},
1373 {
VGROUP_MASK_ALL,
"ALL", 0,
"All",
"Apply action to all vertex groups"},
1377 "INVERT_UNSELECTED",
1379 "Invert Unselected",
1380 "Apply the opposite of Lock/Unlock to unselected vertex groups"},
1381 {0,
nullptr, 0,
nullptr,
nullptr},
1400 mask =
static_cast<bool *
>(
MEM_callocN(defbase_tot *
sizeof(
bool), __func__));
1404 if (sel_count == 0 && actdef >= 1 && actdef <= defbase_tot) {
1405 mask[actdef - 1] =
true;
1414 bool *selected =
nullptr;
1470 dg->
flag &= ~DG_LOCK_WEIGHT;
1488 const bool *vgroup_validmap,
1489 const int vgroup_tot,
1491 const bool auto_assign,
1492 const bool auto_remove)
1505 for (
int i = 0; i < dvert_tot; i++) {
1507 if (!(dv = dvert_array[i])) {
1514 if (vgroup_validmap[j]) {
1530 if (use_mirror && use_vert_sel) {
1543 const bool *vgroup_validmap,
1544 const int vgroup_tot,
1545 const int subset_count,
1548 const float fac_expand)
1550 const float ifac = 1.0f - fac;
1559 const bool use_hide = use_select;
1561 const int expand_sign =
signum_i(fac_expand);
1562 const float expand =
fabsf(fac_expand);
1563 const float iexpand = 1.0f - expand;
1567 Mesh *mesh = em ? nullptr :
static_cast<Mesh *
>(ob->
data);
1569 float *weight_accum_prev;
1570 float *weight_accum_curr;
1580 vgroup_subset_weights.
fill(0.0f);
1591 mesh->edges(), mesh->verts_num, vert_to_edge_offsets, vert_to_edge_indices);
1594 weight_accum_prev =
static_cast<float *
>(
1595 MEM_mallocN(
sizeof(*weight_accum_prev) * dvert_tot, __func__));
1596 weight_accum_curr =
static_cast<float *
>(
1597 MEM_mallocN(
sizeof(*weight_accum_curr) * dvert_tot, __func__));
1599 verts_used =
static_cast<uint *
>(
MEM_mallocN(
sizeof(*verts_used) * dvert_tot, __func__));
1602#define IS_BM_VERT_READ(v) (use_hide ? (BM_elem_flag_test(v, BM_ELEM_HIDDEN) == 0) : true)
1603#define IS_BM_VERT_WRITE(v) (use_select ? (BM_elem_flag_test(v, BM_ELEM_SELECT) != 0) : true)
1609#define IS_ME_VERT_READ(v) (use_hide ? !(hide_vert && hide_vert[v]) : true)
1610#define IS_ME_VERT_WRITE(v) (use_select ? select_vert[v] : true)
1614 for (
int i = 0; i < dvert_tot; i++) {
1631 const VArray<bool> select_vert = *attributes.lookup_or_default<
bool>(
1635 for (
int i = 0; i < dvert_tot; i++) {
1637 for (
int j = 0; j < emap[i].
size(); j++) {
1638 const int2 &edge = edges[emap[i][j]];
1639 const int i_other = (edge[0] == i) ? edge[1] : edge[0];
1649 for (subset_index = 0; subset_index < subset_count; subset_index++) {
1650 const int def_nr = vgroup_subset_map[subset_index];
1654 (
const MDeformVert **)dvert_array, dvert_tot, weight_accum_prev, def_nr);
1655 memcpy(weight_accum_curr, weight_accum_prev,
sizeof(*weight_accum_curr) * dvert_tot);
1657 for (iter = 0; iter < repeat; iter++) {
1662 for (vi_step = verts_used; vi_step != vi_end; vi_step++) {
1663 const uint i = *vi_step;
1664 float weight_tot = 0.0f;
1665 float weight = 0.0f;
1667#define WEIGHT_ACCUMULATE \
1669 float weight_other = weight_accum_prev[i_other]; \
1670 float tot_factor = 1.0f; \
1671 if (expand_sign == 1) { \
1672 if (weight_other < weight_accum_prev[i]) { \
1673 weight_other = (weight_accum_prev[i] * expand) + (weight_other * iexpand); \
1674 tot_factor = iexpand; \
1677 else if (expand_sign == -1) { \
1678 if (weight_other > weight_accum_prev[i]) { \
1679 weight_other = (weight_accum_prev[i] * expand) + (weight_other * iexpand); \
1680 tot_factor = iexpand; \
1683 weight += tot_factor * weight_other; \
1684 weight_tot += tot_factor; \
1707 const VArray<bool> select_vert = *attributes.lookup_or_default<
bool>(
1716 for (j = 0; j < emap[i].
size(); j++) {
1717 const int2 &edge = edges[emap[i][j]];
1718 const int i_other = (edge[0] == i ? edge[1] : edge[0]);
1725#undef WEIGHT_ACCUMULATE
1727 if (weight_tot != 0.0f) {
1728 weight /= weight_tot;
1729 weight = (weight_accum_prev[i] * ifac) + (weight * fac);
1732 CLAMP(weight, 0.0f, 1.0f);
1733 weight_accum_curr[i] = weight;
1737 std::swap(weight_accum_curr, weight_accum_prev);
1743#undef IS_BM_VERT_READ
1744#undef IS_BM_VERT_WRITE
1745#undef IS_ME_VERT_READ
1746#undef IS_ME_VERT_WRITE
1794 const bool *vgroup_validmap,
1795 const int vgroup_tot,
1796 const int subset_count,
1797 const int max_weights)
1800 int i, dvert_tot = 0;
1807 int num_to_drop = 0;
1809 for (i = 0; i < dvert_tot; i++) {
1812 int bone_count = 0, non_bone_count = 0;
1816 if (!(dv = dvert_array[i])) {
1820 num_to_drop = subset_count - max_weights;
1823 if (num_to_drop > 0) {
1832 dw_temp[dv->
totweight - 1 - bone_count] = dv->
dw[j];
1836 dw_temp[non_bone_count] = dv->
dw[j];
1837 non_bone_count += 1;
1841 num_to_drop = bone_count - max_weights;
1842 if (num_to_drop > 0) {
1843 qsort(&dw_temp[non_bone_count],
1852 remove_tot += num_to_drop;
1866 const bool *vgroup_validmap,
1867 const int vgroup_tot,
1869 const float epsilon,
1870 const bool keep_single)
1882 if (use_mirror && use_vert_sel) {
1890 dvert_array, dvert_tot, vgroup_validmap, vgroup_tot, epsilon, keep_single);
1897 const bool *vgroup_validmap,
1898 const int vgroup_tot,
1911 const float steps_fl =
steps;
1914 if (use_mirror && use_vert_sel) {
1918 for (
int i = 0; i < dvert_tot; i++) {
1922 if (!(dv = dvert_array[i])) {
1927 for (j = 0, dw = dv->
dw; j < dv->
totweight; j++, dw++) {
1928 if ((dw->
def_nr < vgroup_tot) && vgroup_validmap[dw->
def_nr]) {
1942 const char sel_mirr,
1943 const int *flip_map,
1944 const int flip_map_len,
1945 const bool mirror_weights,
1946 const bool flip_vgroups,
1947 const bool all_vgroups,
1948 const int act_vgroup)
1952 if (sel_mirr && sel) {
1954 if (mirror_weights) {
1956 std::swap(*dvert, *dvert_mirr);
1962 if (dw && dw_mirr) {
1986 std::swap(dvert, dvert_mirr);
1989 if (mirror_weights) {
2006 const bool mirror_weights,
2007 const bool flip_vgroups,
2008 const bool all_vgroups,
2009 const bool use_topology,
2017 int totmirr = 0, totfail = 0;
2019 *r_totmirr = *r_totfail = 0;
2023 if ((mirror_weights ==
false && flip_vgroups ==
false) ||
2029 int *flip_map =
nullptr;
2037 if (flip_map ==
nullptr) {
2051 if (
BMEditMesh *em = mesh->runtime->edit_mesh.get()) {
2055 if (cd_dvert_offset == -1) {
2068 if (eve_mirr != eve) {
2073 if ((sel || sel_mirr) && (eve != eve_mirr)) {
2105 if (mesh->deform_verts().is_empty()) {
2112 const VArray<bool> select_vert = *attributes.lookup_or_default<
bool>(
2115 for (
int vidx = 0; vidx < mesh->verts_num; vidx++) {
2119 if (vidx != vidx_mirr) {
2121 const bool sel = use_vert_sel ? select_vert[vidx] :
true;
2122 const bool sel_mirr = use_vert_sel ? select_vert[vidx_mirr] :
true;
2124 if (sel || sel_mirr) {
2156 if (lt->
pntsu == 1 || lt->
dvert ==
nullptr) {
2163 int pntsu_half = lt->
pntsu / 2;
2165 for (
int w = 0;
w < lt->
pntsw;
w++) {
2166 for (
int v = 0;
v < lt->
pntsv;
v++) {
2167 for (
int u = 0; u < pntsu_half; u++) {
2168 int u_inv = (lt->
pntsu - 1) - u;
2177 const bool sel_mirr = bp_mirr->
f1 &
SELECT;
2179 if (sel || sel_mirr) {
2201 if (flip_vgroups && flip_map[def_nr] >= 0) {
2202 ob->actdef = flip_map[def_nr] + 1;
2207 *r_totmirr = totmirr;
2208 *r_totfail = totfail;
2214#undef VGROUP_MIRR_OP
2242 if (mesh->runtime->edit_mesh) {
2243 BMEditMesh *em = mesh->runtime->edit_mesh.get();
2244 int cd_dvert_offset;
2271 const VArray<bool> select_vert = *attributes.lookup_or_default<
bool>(
2276 for (
int i = 0; i < mesh->verts_num; i++) {
2277 if (select_vert[i]) {
2293 if (lt->
dvert ==
nullptr) {
2300 for (a = 0, bp = lt->
def; a < tot; a++, bp++, dv++) {
2317 using namespace ed::greasepencil;
2319 for (MutableDrawingInfo info : drawings) {
2345 const ID *data =
static_cast<const ID *
>(ob->
data);
2394 const bool needs_select,
2395 const short ob_type_flag)
2403 if (ob_type_flag && ((1 << ob->
type) & ob_type_flag) == 0) {
2424static bool vertex_group_vert_poll(
bContext *C)
2441static bool vertex_group_mesh_vert_select_poll(
bContext *C)
2510 ot->
name =
"Add Vertex Group";
2511 ot->
idname =
"OBJECT_OT_vertex_group_add";
2512 ot->
description =
"Add a new vertex group to the active object";
2531 const bool use_selection,
2532 const bool all_drawings =
false)
2534 using namespace ed::greasepencil;
2551 for (
const MutableDrawingInfo &info : drawings) {
2559 const bool use_selection,
2560 const bool all_drawings =
false,
2561 const bool only_unlocked =
false)
2583 if (all_vgroup || only_unlocked) {
2598 if (all_vgroup || only_unlocked) {
2617 ot->
name =
"Remove Vertex Group";
2618 ot->
idname =
"OBJECT_OT_vertex_group_remove";
2619 ot->
description =
"Delete the active or all vertex groups from the active object";
2635 ot->
srna,
"all_unlocked",
false,
"All Unlocked",
"Remove all unlocked vertex groups");
2661 ot->
name =
"Assign to Vertex Group";
2662 ot->
idname =
"OBJECT_OT_vertex_group_assign";
2663 ot->
description =
"Assign the selected vertices to the active vertex group";
2696 ot->
name =
"Assign to New Group";
2697 ot->
idname =
"OBJECT_OT_vertex_group_assign_new";
2698 ot->
description =
"Assign the selected vertices to a new vertex group";
2725 if (use_all_groups) {
2737 if (dg ==
nullptr) {
2759 ot->
name =
"Remove from Vertex Group";
2760 ot->
idname =
"OBJECT_OT_vertex_group_remove_from";
2761 ot->
description =
"Remove the selected vertices from active or all vertex group(s)";
2775 ot->
srna,
"use_all_groups",
false,
"All Groups",
"Remove from all groups");
2778 ot->
srna,
"use_all_verts",
false,
"All Vertices",
"Clear the active group");
2808 ot->
name =
"Select Vertex Group";
2809 ot->
idname =
"OBJECT_OT_vertex_group_select";
2810 ot->
description =
"Select all the vertices assigned to the active vertex group";
2842 ot->
name =
"Deselect Vertex Group";
2843 ot->
idname =
"OBJECT_OT_vertex_group_deselect";
2844 ot->
description =
"Deselect all selected vertices assigned to the active vertex group";
2876 ot->
name =
"Duplicate Vertex Group";
2877 ot->
idname =
"OBJECT_OT_vertex_group_copy";
2903 int subset_count, vgroup_tot;
2906 ob, subset_type, &vgroup_tot, &subset_count);
2920 ot->
name =
"Vertex Group Levels";
2921 ot->
idname =
"OBJECT_OT_vertex_group_levels";
2923 "Add some offset and multiply with some gain the weights of the active vertex group";
2934 ot->
srna,
"offset", 0.0f, -1.0, 1.0,
"Offset",
"Value to add to weights", -1.0f, 1.0f);
2936 ot->
srna,
"gain", 1.0f, 0.0f,
FLT_MAX,
"Gain",
"Value to multiply weights by", 0.0f, 10.0f);
2965 ot->
name =
"Normalize Vertex Group";
2966 ot->
idname =
"OBJECT_OT_vertex_group_normalize";
2968 "Normalize weights of the active vertex group, so that the highest ones are now 1.0";
2999 for (
int i = 0; i < defgroup_tot; i++) {
3000 if (defgroup_validmap[i] ==
true) {
3008 return target_group;
3023 int subset_count, vgroup_tot;
3025 ob, subset_type, &vgroup_tot, &subset_count);
3028 ob, vgroup_validmap, vgroup_tot, subset_count, lock_active, op->
reports);
3046 ot->
name =
"Normalize All Vertex Groups";
3047 ot->
idname =
"OBJECT_OT_vertex_group_normalize_all";
3049 "Normalize all weights of all vertex groups, "
3050 "so that for each vertex, the sum of all weights is 1.0";
3064 "Keep the values of the active group while normalizing others");
3100 return TIP_(
"Lock all vertex groups of the active object");
3102 return TIP_(
"Lock selected vertex groups of the active object");
3104 return TIP_(
"Lock unselected vertex groups of the active object");
3106 return TIP_(
"Lock selected and unlock unselected vertex groups of the active object");
3112 return TIP_(
"Unlock all vertex groups of the active object");
3114 return TIP_(
"Unlock selected vertex groups of the active object");
3116 return TIP_(
"Unlock unselected vertex groups of the active object");
3118 return TIP_(
"Unlock selected and lock unselected vertex groups of the active object");
3124 return TIP_(
"Toggle locks of all vertex groups of the active object");
3126 return TIP_(
"Toggle locks of selected vertex groups of the active object");
3128 return TIP_(
"Toggle locks of unselected vertex groups of the active object");
3131 "Toggle locks of all and invert unselected vertex groups of the active object");
3137 return TIP_(
"Invert locks of all vertex groups of the active object");
3140 return TIP_(
"Invert locks of selected vertex groups of the active object");
3142 return TIP_(
"Invert locks of unselected vertex groups of the active object");
3154 ot->
name =
"Change the Lock On Vertex Groups";
3155 ot->
idname =
"OBJECT_OT_vertex_group_lock";
3156 ot->
description =
"Change the lock state of all or some vertex groups of active object";
3171 "Lock action to execute on vertex groups");
3178 "Apply the action based on vertex group selection");
3196 int subset_count, vgroup_tot;
3199 ob, subset_type, &vgroup_tot, &subset_count);
3213 ot->
name =
"Invert Vertex Group";
3214 ot->
idname =
"OBJECT_OT_vertex_group_invert";
3229 "Add vertices from groups that have zero weight before inverting");
3234 "Remove vertices from groups that have zero weight after inverting");
3252 for (
Object *ob : objects) {
3253 int subset_count, vgroup_tot;
3256 ob, subset_type, &vgroup_tot, &subset_count);
3272 ot->
name =
"Smooth Vertex Weights";
3273 ot->
idname =
"OBJECT_OT_vertex_group_smooth";
3293 "Expand/contract weights",
3312 for (
Object *ob : objects) {
3313 int subset_count, vgroup_tot;
3316 ob, subset_type, &vgroup_tot, &subset_count);
3332 ot->
name =
"Clean Vertex Group Weights";
3333 ot->
idname =
"OBJECT_OT_vertex_group_clean";
3334 ot->
description =
"Remove vertex group assignments which are not required";
3350 "Remove vertices which weight is below or equal to this limit",
3357 "Keep verts assigned to at least one group when cleaning");
3374 int subset_count, vgroup_tot;
3377 ob, subset_type, &vgroup_tot, &subset_count);
3391 ot->
name =
"Quantize Vertex Weights";
3392 ot->
idname =
"OBJECT_OT_vertex_group_quantize";
3403 RNA_def_int(
ot->
srna,
"steps", 4, 1, 1000,
"Steps",
"Number of steps between 0 and 1", 1, 100);
3417 int remove_multi_count = 0;
3420 for (
Object *ob : objects) {
3422 int subset_count, vgroup_tot;
3424 ob, subset_type, &vgroup_tot, &subset_count);
3426 ob, vgroup_validmap, vgroup_tot, subset_count, limit);
3429 if (remove_count != 0) {
3434 remove_multi_count += remove_count;
3437 if (remove_multi_count) {
3440 "%d vertex weights limited",
3441 remove_multi_count);
3454 ot->
name =
"Limit Number of Weights per Vertex";
3455 ot->
idname =
"OBJECT_OT_vertex_group_limit_total";
3457 "Limit deform weights associated with a vertex to a specified number by removing lowest "
3468 RNA_def_int(
ot->
srna,
"limit", 4, 1, 32,
"Limit",
"Maximum number of deform weights", 1, 32);
3480 int totmirr = 0, totfail = 0;
3503 ot->
name =
"Mirror Vertex Group";
3504 ot->
idname =
"OBJECT_OT_vertex_group_mirror";
3506 "Mirror vertex group, flip weights and/or names, editing only selected vertices, "
3507 "flipping when both sides are selected otherwise copy from unselected";
3519 ot->
srna,
"flip_group_names",
true,
"Flip Group Names",
"Flip vertex group names");
3526 "Use topology based mirroring (for when both sides of mesh have matching, unique topology)");
3538 int changed_tot = 0;
3556 if ((changed_tot == 0 && fail == 0) || fail) {
3559 "Copy vertex groups to selected: %d done, %d failed (object data must support "
3560 "vertex groups and have matching indices)",
3571 ot->
name =
"Copy Vertex Group to Selected";
3572 ot->
idname =
"OBJECT_OT_vertex_group_copy_to_selected";
3573 ot->
description =
"Replace vertex groups of selected objects by vertex groups of active object";
3625 tmp.
icon = ICON_GROUP_VERTEX;
3642 ot->
name =
"Set Active Vertex Group";
3643 ot->
idname =
"OBJECT_OT_vertex_group_set_active";
3674 char *name_array =
static_cast<char *
>(
3695 int *sort_map_update =
static_cast<int *
>(
3696 MEM_mallocN(
sizeof(
int) * (defbase_tot + 1), __func__));
3697 int *sort_map = sort_map_update + 1;
3720 if (cd_dvert_offset != -1) {
3748 dvert_tot = gps->totpoints;
3750 while (dvert_tot--) {
3766 while (dvert_tot--) {
3777 for (i = 0; i < defbase_tot; i++) {
3781 sort_map_update[0] = 0;
3807 if (bonebase ==
nullptr) {
3809 if (armobj !=
nullptr) {
3816 if (bonebase !=
nullptr) {
3821 if (dg !=
nullptr) {
3847 switch (sort_type) {
3876 {0,
nullptr, 0,
nullptr,
nullptr},
3879 ot->
name =
"Sort Vertex Groups";
3880 ot->
idname =
"OBJECT_OT_vertex_group_sort";
3936 {-1,
"UP", 0,
"Up",
""},
3937 {1,
"DOWN", 0,
"Down",
""},
3938 {0,
nullptr, 0,
nullptr,
nullptr},
3942 ot->
name =
"Move Vertex Group";
3943 ot->
idname =
"OBJECT_OT_vertex_group_move";
3944 ot->
description =
"Move the active vertex group up/down in the list";
3958 "Direction to move the active vertex group towards");
3974 if (
BMEditMesh *em = mesh->runtime->edit_mesh.get()) {
3980 if (dvert_act ==
nullptr) {
4005 if (dvert_act ==
nullptr) {
4011 const VArray<bool> select_vert = *attributes.lookup_or_default<
bool>(
4014 for (i = 0; i < mesh->verts_num; i++) {
4015 if (select_vert[i] && (&dverts[i] != dvert_act)) {
4069 ot->
name =
"Paste Weight to Selected";
4070 ot->
idname =
"OBJECT_OT_vertex_weight_paste";
4072 "Copy this group's weight to other selected vertices (disabled if vertex group is locked)";
4087 "Index of source weight in active vertex group",
4120 ot->
name =
"Delete Weight";
4121 ot->
idname =
"OBJECT_OT_vertex_weight_delete";
4122 ot->
description =
"Delete this weight from the vertex (disabled if vertex group is locked)";
4137 "Index of source weight in active vertex group",
4154 if (wg_index != -1) {
4167 ot->
name =
"Set Active Group";
4168 ot->
idname =
"OBJECT_OT_vertex_weight_set_active";
4184 "Index of source weight in active vertex group",
4217 ot->
name =
"Normalize Active";
4218 ot->
idname =
"OBJECT_OT_vertex_weight_normalize_active_vertex";
4252 ot->
name =
"Copy Active";
4253 ot->
idname =
"OBJECT_OT_vertex_weight_copy";
#define CTX_DATA_BEGIN(C, Type, instance, member)
void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
ToolSettings * CTX_data_tool_settings(const bContext *C)
CustomData interface, see also DNA_customdata_types.h.
int CustomData_get_offset(const CustomData *data, eCustomDataType type)
const void * CustomData_get_layer_named(const CustomData *data, eCustomDataType type, blender::StringRef name)
bool CustomData_has_layer(const CustomData *data, eCustomDataType type)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
Utility functions for vertex groups in grease pencil objects.
BPoint * BKE_lattice_active_point_get(Lattice *lt)
int BKE_lattice_index_from_uvw(const Lattice *lt, int u, int v, int w)
Mesh * BKE_mesh_from_object(Object *ob)
Object * BKE_modifiers_is_deformed_by_armature(Object *ob)
General operations, lookup, etc. for blender objects.
Object * BKE_object_pose_armature_get(Object *ob)
bool BKE_object_is_in_wpaint_select_vert(const Object *ob)
bool BKE_object_is_in_editmode_vgroup(const Object *ob)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
#define BLI_BITMAP_NEW(_num, _alloc_string)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_ENABLE(_bitmap, _index)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
void void void void void void BLI_duplicatelist(struct ListBase *dst, const struct ListBase *src) ATTR_NONNULL(1
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void void BLI_listbase_sort(struct ListBase *listbase, int(*cmp)(const void *, const void *)) ATTR_NONNULL(1
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void void bool BLI_listbase_link_move(ListBase *listbase, void *vlink, int step) ATTR_NONNULL()
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float max_ff(float a, float b)
MINLINE int signum_i(float a)
#define STRNCPY(dst, src)
#define SNPRINTF(dst, format,...)
int char char int int int BLI_strcasecmp_natural(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define UNUSED_FUNCTION(x)
#define IN_RANGE_INCL(a, b, c)
#define STACK_PUSH(stack, val)
#define STACK_DECLARE(stack)
#define STACK_SIZE(stack)
#define STACK_INIT(stack, stack_num)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
#define ID_IS_EDITABLE(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
#define ME_USING_MIRROR_X_VERTEX_GROUPS(_me)
Object is a sort of wrapper for general info.
#define OB_TYPE_SUPPORT_VGROUP(_type)
#define WT_VGROUP_MASK_ALL
MDeformVert * ED_mesh_active_dvert_get_em(Object *ob, BMVert **r_eve)
BMVert * EDBM_verts_mirror_get(BMEditMesh *em, BMVert *v)
void EDBM_verts_mirror_cache_begin(BMEditMesh *em, int axis, bool use_self, bool use_select, bool respecthide, bool use_topology)
void paintvert_flush_flags(Object *ob)
int mesh_get_x_mirror_vert(Object *ob, Mesh *mesh_eval, int index, bool use_topology)
void EDBM_deselect_flush(BMEditMesh *em)
int ED_mesh_mirror_get_vert(Object *ob, int index)
void ED_mesh_report_mirror(wmOperator *op, int totmirr, int totfail)
void EDBM_verts_mirror_cache_end(BMEditMesh *em)
void EDBM_select_flush(BMEditMesh *em)
MDeformVert * ED_mesh_active_dvert_get_only(Object *ob)
MDeformVert * ED_mesh_active_dvert_get_ob(Object *ob, int *r_index)
BMVert * editbmesh_get_x_mirror_vert(Object *ob, BMEditMesh *em, BMVert *eve, const float co[3], int index, bool use_topology)
bool ED_operator_object_active_local_editable_ex(bContext *C, const Object *ob)
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
#define BM_ELEM_CD_GET_VOID_P(ele, offset)
#define BM_elem_index_get(ele)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
void BM_data_layer_add(BMesh *bm, CustomData *data, int type)
#define BM_ITER_ELEM(ele, iter, data, itype)
#define BM_ITER_MESH(ele, iter, bm, itype)
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
ATTR_WARN_UNUSED_RESULT BMesh * bm
void BM_vert_select_set(BMesh *bm, BMVert *v, const bool select)
Select Vert.
void BM_mesh_elem_hflag_disable_all(BMesh *bm, const char htype, const char hflag, const bool respecthide)
void BM_mesh_elem_table_ensure(BMesh *bm, const char htype)
void BM_mesh_elem_index_ensure(BMesh *bm, const char htype)
BLI_INLINE BMVert * BM_vert_at_index(BMesh *bm, const int index)
BLI_INLINE BMVert * BM_edge_other_vert(BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void fill(const T &value) const
constexpr bool is_empty() const
blender::bke::AttrDomain ED_grease_pencil_edit_selection_domain_get(const ToolSettings *tool_settings)
void *(* MEM_mallocN)(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_dupallocN)(const void *vmemh)
ccl_device_inline float4 mask(const int4 mask, const float4 a)
ccl_device_inline float4 select(const int4 mask, const float4 a, const float4 b)
bool remove_from_vertex_group(Drawing &drawing, StringRef name, bool use_selection)
void select_from_group(Drawing &drawing, const AttrDomain selection_domain, StringRef name, bool select)
void assign_to_vertex_group(Drawing &drawing, StringRef name, float weight)
GroupedSpan< int > build_vert_to_edge_map(Span< int2 > edges, int verts_num, Array< int > &r_offsets, Array< int > &r_indices)
void vgroup_parray_to_weight_array(const MDeformVert **dvert_array, int dvert_tot, float *dvert_weights, int def_nr)
void OBJECT_OT_vertex_weight_paste(wmOperatorType *ot)
static void grease_pencil_clear_from_all_vgroup(Scene &scene, Object &ob, const bool use_selection, const bool all_drawings=false, const bool only_unlocked=false)
void OBJECT_OT_vertex_group_normalize(wmOperatorType *ot)
void OBJECT_OT_vertex_group_sort(wmOperatorType *ot)
void OBJECT_OT_vertex_group_levels(wmOperatorType *ot)
static void vgroup_smooth_subset(Object *ob, const bool *vgroup_validmap, const int vgroup_tot, const int subset_count, const float fac, const int repeat, const float fac_expand)
static bool object_array_for_wpaint_filter(const Object *ob, void *user_data)
static int vertex_group_select_exec(bContext *C, wmOperator *)
void OBJECT_OT_vertex_weight_set_active(wmOperatorType *ot)
static void vgroup_quantize_subset(Object *ob, const bool *vgroup_validmap, const int vgroup_tot, const int, const int steps)
static int vertex_group_smooth_exec(bContext *C, wmOperator *op)
static int vgroup_sort_name(const void *def_a_ptr, const void *def_b_ptr)
static bool vgroup_normalize_active_vertex(Object *ob, eVGroupSelect subset_type)
static int vertex_group_normalize_all_exec(bContext *C, wmOperator *op)
static bool vgroup_normalize(Object *ob)
void OBJECT_OT_vertex_group_set_active(wmOperatorType *ot)
void OBJECT_OT_vertex_group_smooth(wmOperatorType *ot)
void OBJECT_OT_vertex_group_lock(wmOperatorType *ot)
static const EnumPropertyItem vgroup_lock_actions[]
static const EnumPropertyItem * rna_vertex_group_select_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
static void vgroup_nr_vert_add(Object *ob, const int def_nr, const int vertnum, const float weight, const int assignmode)
void vgroup_data_clamp_range(ID *id, int total)
void vgroup_parray_from_weight_array(MDeformVert **dvert_array, int dvert_tot, const float *dvert_weights, int def_nr, bool remove_zero)
bool vgroup_array_copy(Object *ob, Object *ob_from)
static void vgroup_copy_active_to_sel_single(Object *ob, const int def_nr)
void vgroup_parray_remove_zero(MDeformVert **dvert_array, int dvert_tot, const bool *vgroup_validmap, int vgroup_tot, float epsilon, bool keep_single)
static int vertex_group_normalize_exec(bContext *C, wmOperator *)
static const EnumPropertyItem * rna_vertex_group_with_single_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
bool vgroup_parray_alloc(ID *id, MDeformVert ***dvert_arr, int *dvert_tot, bool use_vert_sel)
void OBJECT_OT_vertex_weight_normalize_active_vertex(wmOperatorType *ot)
static int vertex_group_limit_total_exec(bContext *C, wmOperator *op)
static void mesh_defvert_mirror_update_internal(Object *ob, MDeformVert *dvert_dst, MDeformVert *dvert_src, const int def_nr)
static int vertex_group_assign_new_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
bool vgroup_sync_from_pose(Object *ob)
@ VGROUP_MASK_INVERT_UNSELECTED
static int vertex_group_levels_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_limit_total(wmOperatorType *ot)
static int vgroup_do_remap(Object *ob, const char *name_array, wmOperator *op)
static void ED_mesh_defvert_mirror_update_ob(Object *ob, int def_nr, int vidx)
static int vertex_weight_copy_exec(bContext *C, wmOperator *)
static int vertex_group_deselect_exec(bContext *C, wmOperator *)
static int vgroup_limit_total_subset(Object *ob, const bool *vgroup_validmap, const int vgroup_tot, const int subset_count, const int max_weights)
static void vgroup_duplicate(Object *ob)
static void vgroup_sort_bone_hierarchy(Object *ob, ListBase *bonebase)
static const EnumPropertyItem vgroup_lock_mask[]
void OBJECT_OT_vertex_group_copy_to_selected(wmOperatorType *ot)
static bool vertex_group_supported_poll(bContext *C)
void OBJECT_OT_vertex_weight_copy(wmOperatorType *ot)
static int vertex_weight_delete_exec(bContext *C, wmOperator *op)
void vgroup_parray_mirror_assign(Object *ob, MDeformVert **dvert_array, int dvert_tot)
static bool UNUSED_FUNCTION vertex_group_poll_edit(bContext *C)
static int vertex_weight_set_active_exec(bContext *C, wmOperator *op)
static void vgroup_clean_subset(Object *ob, const bool *vgroup_validmap, const int vgroup_tot, const int, const float epsilon, const bool keep_single)
static int vertex_group_mirror_exec(bContext *C, wmOperator *op)
static int vertex_group_sort_exec(bContext *C, wmOperator *op)
static int vertex_group_quantize_exec(bContext *C, wmOperator *op)
Object * context_object(const bContext *C)
static int vertex_group_remove_from_exec(bContext *C, wmOperator *op)
static void dvert_mirror_op(MDeformVert *dvert, MDeformVert *dvert_mirr, const char sel, const char sel_mirr, const int *flip_map, const int flip_map_len, const bool mirror_weights, const bool flip_vgroups, const bool all_vgroups, const int act_vgroup)
static int vertex_weight_paste_exec(bContext *C, wmOperator *op)
static int vertex_weight_normalize_active_vertex_exec(bContext *C, wmOperator *)
static Lattice * vgroup_edit_lattice(Object *ob)
void OBJECT_OT_vertex_group_mirror(wmOperatorType *ot)
float vgroup_vert_weight(Object *ob, bDeformGroup *dg, int vertnum)
static int vertex_group_clean_exec(bContext *C, wmOperator *op)
static char * vgroup_init_remap(Object *ob)
void OBJECT_OT_vertex_group_deselect(wmOperatorType *ot)
static bool vertex_group_vert_select_poll(bContext *C)
static void vgroup_copy_active_to_sel(Object *ob, eVGroupSelect subset_type)
static bool vertex_group_poll_ex(bContext *C, Object *ob)
static int vertex_group_lock_exec(bContext *C, wmOperator *op)
static void vgroup_delete_active(Object *ob)
static int vertex_group_copy_to_selected_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_invert(wmOperatorType *ot)
void OBJECT_OT_vertex_group_move(wmOperatorType *ot)
static bool vgroup_normalize_all(Object *ob, const bool *vgroup_validmap, const int vgroup_tot, const int subset_count, const bool lock_active, ReportList *reports)
static int vertex_group_copy_exec(bContext *C, wmOperator *)
static void grease_pencil_clear_from_vgroup(Scene &scene, Object &ob, bDeformGroup *dg, const bool use_selection, const bool all_drawings=false)
void vgroup_mirror(Object *ob, bool mirror_weights, bool flip_vgroups, bool all_vgroups, bool use_topology, int *r_totmirr, int *r_totfail)
static int vertex_group_invert_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
const EnumPropertyItem * vgroup_selection_itemf_helper(const bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free, unsigned int selection_mask)
static int vertex_group_remove_exec(bContext *C, wmOperator *op)
static bool vertex_group_vert_select_unlocked_poll(bContext *C)
static int inv_cmp_mdef_vert_weights(const void *a1, const void *a2)
static const EnumPropertyItem * vgroup_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
static void vgroup_invert_subset(Object *ob, const bool *vgroup_validmap, const int vgroup_tot, const int, const bool auto_assign, const bool auto_remove)
void vgroup_select_by_name(Object *ob, const char *name)
static eVGroupSelect normalize_vertex_group_target(Object *ob)
void OBJECT_OT_vertex_group_assign_new(wmOperatorType *ot)
static void vgroup_operator_subset_select_props(wmOperatorType *ot, bool use_active)
void OBJECT_OT_vertex_weight_delete(wmOperatorType *ot)
static bool vertex_group_vert_poll_ex(bContext *C, const bool needs_select, const short ob_type_flag)
static bool vertex_group_supported_poll_ex(bContext *C, const Object *ob)
static void ED_mesh_defvert_mirror_update_em(Object *ob, BMVert *eve, int def_nr, int vidx, const int cd_dvert_offset)
void OBJECT_OT_vertex_group_copy(wmOperatorType *ot)
void vgroup_parray_mirror_sync(Object *ob, MDeformVert **dvert_array, int dvert_tot, const bool *vgroup_validmap, int vgroup_tot)
static void vgroup_select_verts(const ToolSettings &tool_settings, Object *ob, Scene &scene, int select)
static bool vertex_group_mesh_vert_poll(bContext *C)
static int vgroup_move_exec(bContext *C, wmOperator *op)
static bool vertex_group_poll(bContext *C)
static float get_vert_def_nr(Object *ob, const int def_nr, const int vertnum)
void OBJECT_OT_vertex_group_quantize(wmOperatorType *ot)
static Vector< Object * > object_array_for_wpaint(bContext *C)
static void vgroup_levels_subset(Object *ob, const bool *vgroup_validmap, const int vgroup_tot, const int, const float offset, const float gain)
static std::string vertex_group_lock_get_description(bContext *, wmOperatorType *, PointerRNA *ptr)
void vgroup_vert_add(Object *ob, bDeformGroup *dg, int vertnum, float weight, int assignmode)
static const EnumPropertyItem WT_vertex_group_select_item[]
void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
void vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
@ SORT_TYPE_BONEHIERARCHY
static bool vertex_group_use_vert_sel(Object *ob)
static bool check_vertex_group_accessible(wmOperator *op, Object *ob, int def_nr)
static int vertex_group_add_exec(bContext *C, wmOperator *)
void OBJECT_OT_vertex_group_add(wmOperatorType *ot)
static void vgroup_assign_verts(Object *ob, Scene &scene, const float weight)
blender::Vector< Object * > objects_in_mode_or_selected(bContext *C, bool(*filter_fn)(const Object *ob, void *user_data), void *filter_user_data)
void OBJECT_OT_vertex_group_clean(wmOperatorType *ot)
void OBJECT_OT_vertex_group_select(wmOperatorType *ot)
static void vgroup_remove_weight(Object *ob, const int def_nr)
void vgroup_vert_active_mirror(Object *ob, int def_nr)
static void vgroup_lock_all(Object *ob, int action, int mask)
static bool vertex_group_vert_select_mesh_poll(bContext *C)
static int vertex_group_assign_exec(bContext *C, wmOperator *)
static bool * vgroup_selected_get(Object *ob)
void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot)
static int set_active_group_exec(bContext *C, wmOperator *op)
float wrap(float value, float max, float min)
#define IS_BM_VERT_READ(v)
#define IS_ME_VERT_READ(v)
#define IS_ME_VERT_WRITE(v)
#define IS_BM_VERT_WRITE(v)
#define WEIGHT_ACCUMULATE
int RNA_int_get(PointerRNA *ptr, const char *name)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
const EnumPropertyItem rna_enum_dummy_NULL_items[]
struct MDeformVert * dvert
struct EditLatt * editlatt
struct ToolSettings * toolsettings
MutableVArraySpan< T > span
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
std::string(* get_description)(bContext *C, wmOperatorType *ot, PointerRNA *ptr)
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)