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:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-10-03 19:09:43 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-10-17 17:55:34 +0300
commite5b18390fa591c8b37b9ef9884611b2888bab188 (patch)
tree78c9feebbe3d266f6c2960d9b6259743d51f60ed /source/blender/makesdna/DNA_constraint_types.h
parentd31ea3b89aa8d583a6d089f96dff46c0759f8c8a (diff)
Shrinkwrap: implement the use of smooth normals in constraint & modifier.
- Use smooth normals to displace in Above Surface mode. - Add an option to align an axis to the normal in the constraint. I've seen people request the alignment feature, and it seems useful. For the actual aligning I use the damped track logic. In order to conveniently keep mesh data needed for normal computation together, a new data structure is introduced. Reviewers: mont29 Differential Revision: https://developer.blender.org/D3762
Diffstat (limited to 'source/blender/makesdna/DNA_constraint_types.h')
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index a92899deaa8..fd98774e948 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -430,7 +430,8 @@ typedef struct bShrinkwrapConstraint {
float projLimit; /* distance to search */
char shrinkMode; /* inside/outside/on surface (see MOD shrinkwrap) */
char flag; /* options */
- char pad[2];
+ char trackAxis; /* axis to align to normal */
+ char pad;
} bShrinkwrapConstraint;
/* Follow Track constraints */
@@ -642,6 +643,8 @@ typedef enum eShrinkwrap_Flags {
CON_SHRINKWRAP_PROJECT_OPPOSITE = (1 << 0),
/* Invert the cull mode when projecting opposite. */
CON_SHRINKWRAP_PROJECT_INVERT_CULL = (1 << 1),
+ /* Align the specified axis to the target normal. */
+ CON_SHRINKWRAP_TRACK_NORMAL = (1 << 2),
/* Ignore front faces in project; same value as MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE */
CON_SHRINKWRAP_PROJECT_CULL_FRONTFACE = (1 << 3),