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>2015-02-05 16:49:44 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-02-05 16:59:52 +0300
commitf6e798946092c5d30ad0c011bd8c2920971471b2 (patch)
treefec4dc809a96a4c531256140804a8fa7ad2af9b8 /source/blender/makesdna/DNA_modifier_types.h
parent2c3e4fbd7e91e7faeaaed3946874beb4be4e7817 (diff)
Custom Loop Normals: Add NormalEdit modifier
Nothing much to say here, basic tool to make normals point toward a target, or to make them point 'outward' as if object was a spheroid (useful for game bushes etc.). Also, forgot a big thank you to Campbell for the extensive review work he has done on this project!
Diffstat (limited to 'source/blender/makesdna/DNA_modifier_types.h')
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 47273d3c713..b32b228fda4 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -83,6 +83,7 @@ typedef enum ModifierType {
eModifierType_LaplacianDeform = 47,
eModifierType_Wireframe = 48,
eModifierType_DataTransfer = 49,
+ eModifierType_NormalEdit = 50,
NUM_MODIFIER_TYPES
} ModifierType;
@@ -1443,5 +1444,37 @@ enum {
MOD_DATATRANSFER_USE_POLY = 1 << 31,
};
+/* Set Split Normals modifier */
+typedef struct NormalEditModifierData {
+ ModifierData modifier;
+ char defgrp_name[64]; /* MAX_VGROUP_NAME */
+ struct Object *target; /* Source of normals, or center of ellipsoid. */
+ short mode;
+ short flag;
+ short mix_mode;
+ char pad[2];
+ float mix_factor;
+ float offset[3];
+} NormalEditModifierData;
+
+/* NormalEditModifierData.mode */
+enum {
+ MOD_NORMALEDIT_MODE_RADIAL = 0,
+ MOD_NORMALEDIT_MODE_DIRECTIONAL = 1,
+};
+
+/* NormalEditModifierData.flags */
+enum {
+ MOD_NORMALEDIT_INVERT_VGROUP = (1 << 0),
+ MOD_NORMALEDIT_USE_DIRECTION_PARALLEL = (1 << 1),
+};
+
+/* NormalEditModifierData.mix_mode */
+enum {
+ MOD_NORMALEDIT_MIX_COPY = 0,
+ MOD_NORMALEDIT_MIX_ADD = 1,
+ MOD_NORMALEDIT_MIX_SUB = 2,
+ MOD_NORMALEDIT_MIX_MUL = 3,
+};
#endif /* __DNA_MODIFIER_TYPES_H__ */