Blender V5.0
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
13struct bContext;
14struct CurveMapping;
15struct MDeformVert;
16struct MDeformWeight;
17struct Mesh;
19struct Object;
20struct PointerRNA;
21struct RNG;
22struct Scene;
23struct Tex;
24struct uiLayout;
25
26/*
27 * XXX I'd like to make modified weights visible in WeightPaint mode,
28 * but couldn't figure a way to do this...
29 * Maybe this will need changes in mesh_calc_modifiers?
30 * Or the WeightPaint mode code itself?
31 */
32
33/**************************************
34 * Util functions. *
35 **************************************/
36
43#define MOD_WVG_ZEROFLOOR 1.0e-32f
44
53 int num, float *new_w, short falloff_type, bool do_invert, CurveMapping *cmap, RNG *rng);
54
64 int num,
65 const int *indices,
66 float *org_w,
67 const float *new_w,
68 Object *ob,
69 Mesh *mesh,
70 float fact,
71 const char defgrp_name[MAX_VGROUP_NAME],
72 Scene *scene,
73 Tex *texture,
74 int tex_use_channel,
75 int tex_mapping,
76 Object *tex_map_object,
77 const char *text_map_bone,
78 const char *tex_uvlayer_name,
79 bool invert_vgroup_mask);
80
89 int defgrp_idx,
90 MDeformWeight **dws,
91 int num,
92 const int *indices,
93 const float *weights,
94 bool do_add,
95 float add_thresh,
96 bool do_rem,
97 float rem_thresh,
98 bool do_normalize);
99
103void weightvg_ui_common(const bContext *C, PointerRNA *ob_ptr, PointerRNA *ptr, uiLayout *layout);
ATTR_WARN_UNUSED_RESULT const size_t num
Object is a sort of wrapper for general info.
#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)
#define C
Definition RandGen.cpp:29
static ushort indices[]
TEX_TEMPLATE DataVec texture(T, FltCoord, float=0.0f) RET
Definition rand.cc:33
PointerRNA * ptr
Definition wm_files.cc:4238