Blender V4.3
MOD_weightvg_util.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011 by Bastien Montagne. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11struct CurveMapping;
12struct MDeformVert;
13struct MDeformWeight;
14struct Mesh;
16struct Object;
17struct PointerRNA;
18struct RNG;
19struct Scene;
20struct Tex;
21struct uiLayout;
22
23/*
24 * XXX I'd like to make modified weights visible in WeightPaint mode,
25 * but couldn't figure a way to do this...
26 * Maybe this will need changes in mesh_calc_modifiers?
27 * Or the WeightPaint mode code itself?
28 */
29
30/**************************************
31 * Util functions. *
32 **************************************/
33
40#define MOD_WVG_ZEROFLOOR 1.0e-32f
41
50 int num, float *new_w, short falloff_type, bool do_invert, CurveMapping *cmap, RNG *rng);
51
61 int num,
62 const int *indices,
63 float *org_w,
64 const float *new_w,
65 Object *ob,
66 Mesh *mesh,
67 float fact,
68 const char defgrp_name[MAX_VGROUP_NAME],
69 Scene *scene,
70 Tex *texture,
71 int tex_use_channel,
72 int tex_mapping,
73 Object *tex_map_object,
74 const char *text_map_bone,
75 const char *tex_uvlayer_name,
76 bool invert_vgroup_mask);
77
86 int defgrp_idx,
87 MDeformWeight **dws,
88 int num,
89 const int *indices,
90 const float *weights,
91 bool do_add,
92 float add_thresh,
93 bool do_rem,
94 float rem_thresh,
95 bool do_normalize);
96
100void weightvg_ui_common(const bContext *C, PointerRNA *ob_ptr, PointerRNA *ptr, uiLayout *layout);
#define MAX_VGROUP_NAME
void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, MDeformWeight **dws, int num, const int *indices, const float *weights, bool do_add, float add_thresh, bool do_rem, float rem_thresh, bool do_normalize)
void weightvg_do_mask(const ModifierEvalContext *ctx, int num, const int *indices, float *org_w, const float *new_w, Object *ob, Mesh *mesh, float fact, const char defgrp_name[MAX_VGROUP_NAME], Scene *scene, Tex *texture, int tex_use_channel, int tex_mapping, Object *tex_map_object, const char *text_map_bone, const char *tex_uvlayer_name, bool invert_vgroup_mask)
void weightvg_do_map(int num, float *new_w, short falloff_type, bool do_invert, CurveMapping *cmap, RNG *rng)
void weightvg_ui_common(const bContext *C, PointerRNA *ob_ptr, PointerRNA *ptr, uiLayout *layout)
Definition rand.cc:33
PointerRNA * ptr
Definition wm_files.cc:4126