Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2011-09-05 20:16:00 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2011-09-05 20:16:00 +0400
commit4393df93202198b5eaaff438e18060c66b98928d (patch)
treee6f045ff5c0e5a6e676cf93cf8bc6c4c41431b50 /source/blender/modifiers/intern/MOD_weightvg_util.h
parentcc906e0e2a1de9b19c6cefa1167332f348bb9e0f (diff)
VGroup Modifiers: added mapping options to proximity and edit.
*Added Smooth/Sharp/Root/etc. mappings to WeightVGEdit modifier, in addition to custom curve one. *Added Smooth/Sharp/Root/etc. mappings to WeightVGProximity modifier, without the custom curve one! *Factorized the common mapping code into MOD_weightvg_util.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvg_util.h')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.h b/source/blender/modifiers/intern/MOD_weightvg_util.h
index b42e9c20035..3afff391943 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.h
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.h
@@ -37,11 +37,10 @@
/* so modifier types match their defines */
#include "MOD_modifiertypes.h"
-struct Tex;
+struct CurveMapping;
struct DerivedMesh;
struct Object;
-/*struct ModifierData;
-struct MappingInfoModifierData;*/
+struct Tex;
/*
* XXX I'd like to make modified weights visible in WeightPaint mode,
@@ -61,14 +60,22 @@ struct MappingInfoModifierData;*/
*/
#define MOD_WVG_ZEROFLOOR 1.0e-32f
+/* Maps new_w weights in place, using either one of the predifined functions, or a custom curve.
+ * Return values are in new_w.
+ * If indices is not NULL, it must be a table of same length as org_w and new_w, mapping to the real
+ * vertex index (in case the weight tables do not cover the whole vertices...).
+ * cmap might be NULL, in which case curve mapping mode will return unmodified data.
+ */
+void weightvg_do_map(int num, float *new_w, short mode, struct CurveMapping *cmap);
+
/* Applies new_w weights to org_w ones, using either a texture, vgroup or constant value as factor.
* Return values are in org_w.
* If indices is not NULL, it must be a table of same length as org_w and new_w, mapping to the real
* vertex index (in case the weight tables do not cover the whole vertices...).
* XXX The standard “factor” value is assumed in [0.0, 1.0] range. Else, weird results might appear.
*/
-void weightvg_do_mask(int num, int *indices, float *org_w, float *new_w, Object *ob,
- struct DerivedMesh *dm, float fact, const char defgrp_name[32], Tex *texture,
+void weightvg_do_mask(int num, const int *indices, float *org_w, const float *new_w, Object *ob,
+ DerivedMesh *dm, float fact, const char defgrp_name[32], Tex *texture,
int tex_use_channel, int tex_mapping, Object *tex_map_object,
const char *tex_uvlayer_name);