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:
Diffstat (limited to 'source/blender/makesdna/DNA_modifier_types.h')
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h167
1 files changed, 166 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index d2d8e014015..2b1111e1308 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -71,6 +71,9 @@ typedef enum ModifierType {
eModifierType_Solidify,
eModifierType_Screw,
eModifierType_Warp,
+ eModifierType_WeightVGEdit,
+ eModifierType_WeightVGMix,
+ eModifierType_WeightVGProximity,
NUM_MODIFIER_TYPES
} ModifierType;
@@ -674,7 +677,6 @@ typedef struct ShrinkwrapModifierData {
#define MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS (1<<2)
#define MOD_SHRINKWRAP_PROJECT_OVER_NORMAL 0 /* projection over normal is used if no axis is selected */
-
typedef struct SimpleDeformModifierData {
ModifierData modifier;
@@ -784,4 +786,167 @@ typedef enum {
/* PROP_RANDOM not used */
} WarpModifierFalloff;
+typedef struct WeightVGEditModifierData {
+ ModifierData modifier;
+
+ /* XXX Note: I tried to keep everything logically ordered – provided the
+ * alignment constraints…
+ */
+
+ char defgrp_name[32]; /* Name of vertex group to edit. */
+
+ /* Flags (MOD_WVG_EDIT_MAP, MOD_WVG_EDIT_CMAP, MOD_WVG_EDIT_REVERSE_WEIGHTS,
+ * MOD_WVG_EDIT_ADD2VG, MOD_WVG_EDIT_REMFVG, MOD_WVG_EDIT_CLAMP).
+ */
+ int edit_flags;
+ float default_weight; /* Weight for vertices not in vgroup. */
+
+ /* Mapping stuff. */
+ float map_org_min, map_org_max;
+ float map_new_min, map_new_max;
+ struct CurveMapping *cmap_curve; /* The custom mapping curve! */
+
+ /* The add/remove vertices weight thresholds. */
+ float add_threshold, rem_threshold;
+
+ /* Clamping options. */
+ float clamp_min_weight, clamp_max_weight;
+
+ /* Masking options. */
+ float mask_constant; /* The global “influence”, if no vgroup nor tex is used as mask. */
+ /* Name of mask vertex group from which to get weight factors. */
+ char mask_defgrp_name[32];
+
+ /* Texture masking. */
+ int mask_tex_use_channel; /* Which channel to use as weightf. */
+ struct Tex *mask_texture; /* The texture. */
+ struct Object *mask_tex_map_obj; /* Name of the map object. */
+ /* How to map the texture (using MOD_DISP_MAP_xxx constants). */
+ int mask_tex_mapping;
+ char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */
+
+ /* Padding… */
+ int pad_i1;
+} WeightVGEditModifierData;
+
+/* WeightVGEdit flags. */
+/* Use parametric mapping. */
+#define MOD_WVG_EDIT_MAP (1 << 0)
+/* Use curve mapping. */
+#define MOD_WVG_EDIT_CMAP (1 << 1)
+/* Reverse weights (in the [0.0, 1.0] standard range). */
+#define MOD_WVG_EDIT_REVERSE_WEIGHTS (1 << 2)
+/* Add vertices with higher weight than threshold to vgroup. */
+#define MOD_WVG_EDIT_ADD2VG (1 << 3)
+/* Remove vertices with lower weight than threshold from vgroup. */
+#define MOD_WVG_EDIT_REMFVG (1 << 4)
+/* Clamp weights. */
+#define MOD_WVG_EDIT_CLAMP (1 << 5)
+
+typedef struct WeightVGMixModifierData {
+ ModifierData modifier;
+
+ /* XXX Note: I tried to keep everything logically ordered – provided the
+ * alignment constraints…
+ */
+
+ char defgrp_name[32]; /* Name of vertex group to modify/weight. */
+ char defgrp_name2[32]; /* Name of other vertex group to mix in. */
+ float default_weight; /* Default weight value for first vgroup. */
+ float default_weight2; /* Default weight value to mix in. */
+ char mix_mode; /* How second vgroup’s weights affect first ones */
+ char mix_set; /* What vertices to affect. */
+
+ char pad_c1, pad_c2;
+ int pad_i1;
+
+ /* Masking options. */
+ float mask_constant; /* The global “influence”, if no vgroup nor tex is used as mask. */
+ /* Name of mask vertex group from which to get weight factors. */
+ char mask_defgrp_name[32];
+
+ /* Texture masking. */
+ int mask_tex_use_channel; /* Which channel to use as weightf. */
+ struct Tex *mask_texture; /* The texture. */
+ struct Object *mask_tex_map_obj; /* Name of the map object. */
+ int mask_tex_mapping; /* How to map the texture! */
+ char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */
+
+ /* Padding… */
+ int pad_i2;
+} WeightVGMixModifierData;
+
+/* How second vgroup’s weights affect first ones. */
+#define MOD_WVG_MIX_SET 1 /* Second weights replace weights. */
+#define MOD_WVG_MIX_ADD 2 /* Second weights are added to weights. */
+#define MOD_WVG_MIX_SUB 3 /* Second weights are subtracted from weights. */
+#define MOD_WVG_MIX_MUL 4 /* Second weights are multiplied with weights. */
+#define MOD_WVG_MIX_DIV 5 /* Second weights divide weights. */
+#define MOD_WVG_MIX_DIF 6 /* Difference between second weights and weights. */
+#define MOD_WVG_MIX_AVG 7 /* Average of both weights. */
+
+/* What vertices to affect. */
+#define MOD_WVG_SET_ALL 1 /* Affect all vertices. */
+#define MOD_WVG_SET_ORG 2 /* Affect only vertices in first vgroup. */
+#define MOD_WVG_SET_NEW 3 /* Affect only vertices in second vgroup. */
+#define MOD_WVG_SET_UNION 4 /* Affect only vertices in one vgroup or the other. */
+#define MOD_WVG_SET_INTER 5 /* Affect only vertices in both vgroups. */
+
+typedef struct WeightVGProximityModifierData {
+ ModifierData modifier;
+
+ /* XXX Note: I tried to keep everything logically ordered – provided the
+ * alignment constraints…
+ */
+
+ char defgrp_name[32]; /* Name of vertex group to modify/weight. */
+
+ /* Proximity modes. */
+ int proximity_mode;
+ int proximity_flags;
+
+ /* Target object from which to calculate vertices’ distances. */
+ struct Object *proximity_ob_target;
+
+ /* Masking options. */
+ float mask_constant; /* The global “influence”, if no vgroup nor tex is used as mask. */
+ /* Name of mask vertex group from which to get weight factors. */
+ char mask_defgrp_name[32];
+
+ /* Texture masking. */
+ int mask_tex_use_channel; /* Which channel to use as weightf. */
+ struct Tex *mask_texture; /* The texture. */
+ struct Object *mask_tex_map_obj; /* Name of the map object. */
+ int mask_tex_mapping; /* How to map the texture! */
+ char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */
+
+ /* Padding… */
+ int pad_i2;
+} WeightVGProximityModifierData;
+
+/* Modes of proximity weighting. */
+/* Dist from target object to affected object. */
+#define MOD_WVG_PROXIMITY_OBJ2OBJDIST 1
+/* Dist from target object to vertex. */
+#define MOD_WVG_PROXIMITY_OBJ2VERTDIST 2
+
+/* Flags options for proximity weighting. */
+/* Use nearest vertices of target obj, in OVJ2VERTDIST mode. */
+#define MOD_WVG_PROXIMITY_O2VD_VERTS (1 << 0)
+/* Use nearest edges of target obj, in OVJ2VERTDIST mode. */
+#define MOD_WVG_PROXIMITY_O2VD_EDGES (1 << 1)
+/* Use nearest faces of target obj, in OVJ2VERTDIST mode. */
+#define MOD_WVG_PROXIMITY_O2VD_FACES (1 << 2)
+
+/* Defines common to all WeightVG modifiers. */
+/* Tex channel to be used as mask. */
+#define MOD_WVG_MASK_TEX_USE_INT 1
+#define MOD_WVG_MASK_TEX_USE_RED 2
+#define MOD_WVG_MASK_TEX_USE_GREEN 3
+#define MOD_WVG_MASK_TEX_USE_BLUE 4
+#define MOD_WVG_MASK_TEX_USE_HUE 5
+#define MOD_WVG_MASK_TEX_USE_SAT 6
+#define MOD_WVG_MASK_TEX_USE_VAL 7
+#define MOD_WVG_MASK_TEX_USE_ALPHA 8
+
#endif