Blender  V3.3
MOD_weightvg_util.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2011 by Bastien Montagne. All rights reserved. */
3 
8 #pragma once
9 
10 struct CurveMapping;
11 struct MDeformVert;
12 struct MDeformWeight;
13 struct Mesh;
14 struct ModifierEvalContext;
15 struct Object;
16 struct PointerRNA;
17 struct RNG;
18 struct Scene;
19 struct Tex;
20 struct uiLayout;
21 
22 /*
23  * XXX I'd like to make modified weights visible in WeightPaint mode,
24  * but couldn't figure a way to do this...
25  * Maybe this will need changes in mesh_calc_modifiers?
26  * Or the WeightPaint mode code itself?
27  */
28 
29 /**************************************
30  * Util functions. *
31  **************************************/
32 
39 #define MOD_WVG_ZEROFLOOR 1.0e-32f
40 
48 void weightvg_do_map(int num,
49  float *new_w,
50  short falloff_type,
51  bool do_invert,
52  struct CurveMapping *cmap,
53  struct RNG *rng);
54 
64  int num,
65  const int *indices,
66  float *org_w,
67  const float *new_w,
68  Object *ob,
69  struct Mesh *mesh,
70  float fact,
71  const char defgrp_name[MAX_VGROUP_NAME],
72  struct 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 
88 void weightvg_update_vg(struct MDeformVert *dvert,
89  int defgrp_idx,
90  struct 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 
103 void weightvg_ui_common(const bContext *C, PointerRNA *ob_ptr, PointerRNA *ptr, uiLayout *layout);
#define MAX_VGROUP_NAME
void weightvg_do_map(int num, float *new_w, short falloff_type, bool do_invert, struct CurveMapping *cmap, struct RNG *rng)
void weightvg_ui_common(const bContext *C, PointerRNA *ob_ptr, PointerRNA *ptr, uiLayout *layout)
void weightvg_update_vg(struct MDeformVert *dvert, int defgrp_idx, struct 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, struct Mesh *mesh, float fact, const char defgrp_name[MAX_VGROUP_NAME], struct 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)
#define C
Definition: RandGen.cpp:25
Scene scene
ccl_gpu_kernel_postfix int ccl_global int * indices
Definition: rand.cc:33
PointerRNA * ptr
Definition: wm_files.c:3480