Blender V5.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
8
9#pragma once
10
11#include "DNA_object_types.h"
12
13namespace blender {
14
15struct bContext;
16struct CurveMapping;
17struct MDeformVert;
18struct MDeformWeight;
19struct Mesh;
21struct Object;
22struct PointerRNA;
23struct RNG;
24struct Scene;
25struct Tex;
26
27namespace ui {
28struct Layout;
29} // namespace ui
30
31/*
32 * XXX I'd like to make modified weights visible in WeightPaint mode,
33 * but couldn't figure a way to do this...
34 * Maybe this will need changes in mesh_calc_modifiers?
35 * Or the WeightPaint mode code itself?
36 */
37
38/**************************************
39 * Util functions. *
40 **************************************/
41
48#define MOD_WVG_ZEROFLOOR 1.0e-32f
49
58 int num, float *new_w, short falloff_type, bool do_invert, CurveMapping *cmap, RNG *rng);
59
68void weightvg_do_mask(const ModifierEvalContext *ctx,
69 int num,
70 const int *indices,
71 float *org_w,
72 const float *new_w,
73 Object *ob,
74 Mesh *mesh,
75 float fact,
76 const char defgrp_name[MAX_VGROUP_NAME],
77 Scene *scene,
78 Tex *texture,
79 int tex_use_channel,
80 int tex_mapping,
81 Object *tex_map_object,
82 const char *text_map_bone,
83 const char *tex_uvlayer_name,
84 bool invert_vgroup_mask);
85
93void weightvg_update_vg(MDeformVert *dvert,
94 int defgrp_idx,
95 MDeformWeight **dws,
96 int num,
97 const int *indices,
98 const float *weights,
99 bool do_add,
100 float add_thresh,
101 bool do_rem,
102 float rem_thresh,
103 bool do_normalize);
104
108void weightvg_ui_common(const bContext *C,
109 PointerRNA *ob_ptr,
110 PointerRNA *ptr,
111 ui::Layout &layout);
112
113} // namespace blender
Object is a sort of wrapper for general info.
#define MAX_VGROUP_NAME
#define C
Definition RandGen.cpp:29
Definition scene.h:133
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
BMesh Iterators.
ATTR_WARN_UNUSED_RESULT const size_t num
void weightvg_ui_common(const bContext *C, PointerRNA *ob_ptr, PointerRNA *ptr, ui::Layout &layout)
void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, MDeformWeight **dws, int num, const int *indices, const float *weights, const bool do_add, const float add_thresh, const bool do_rem, const float rem_thresh, const bool do_normalize)
void weightvg_do_mask(const ModifierEvalContext *ctx, const int num, const int *indices, float *org_w, const float *new_w, Object *ob, Mesh *mesh, const float fact, const char defgrp_name[MAX_VGROUP_NAME], Scene *, Tex *texture, const int tex_use_channel, const int tex_mapping, Object *tex_map_object, const char *text_map_bone, const char *tex_uvlayer_name, const bool invert_vgroup_mask)
void weightvg_do_map(int num, float *new_w, short falloff_type, const bool do_invert, CurveMapping *cmap, RNG *rng)