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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-02-14 18:46:29 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-02-15 13:53:58 +0300
commit67cec97387965009dfaa57f7f4c8ab948e048e70 (patch)
tree7e2ec71d0db86c28a2a7ce051a4593661637f726 /source/blender/makesdna/DNA_particle_types.h
parentffde74a878882618ab4d4179ba8dd9b98aab15e2 (diff)
Simple hair children: Make twist affected by vertex group
The idea is to give a control over direction of twist, and maybe amount of twist as well. More concrete example: make braids on left and right side of character head to be twisting opposite directions. Now, tricky part: we need some negative values to flip direction, but weights can not be negative. So we use same trick as displacement map and tangent normal maps, where 0.5 is neutral, values below 0.5 are considered negative and values above 0.5 are considered positive.
Diffstat (limited to 'source/blender/makesdna/DNA_particle_types.h')
-rw-r--r--source/blender/makesdna/DNA_particle_types.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 371b53567a6..8dd4d46a596 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -307,7 +307,8 @@ typedef struct ParticleSystem {
char bb_uvname[3][64]; /* billboard uv name, MAX_CUSTOMDATA_LAYER_NAME */
/* if you change these remember to update array lengths to PSYS_TOT_VG! */
- short vgroup[12], vg_neg, rt3; /* vertex groups, 0==disable, 1==starting index */
+ short vgroup[13], vg_neg, rt3; /* vertex groups, 0==disable, 1==starting index */
+ char pad[6];
/* temporary storage during render */
struct ParticleRenderData *renderdata;
@@ -567,7 +568,7 @@ typedef enum eParticleChildFlag {
#define PART_DUPLIW_CURRENT 1
/* psys->vg */
-#define PSYS_TOT_VG 12
+#define PSYS_TOT_VG 13
#define PSYS_VG_DENSITY 0
#define PSYS_VG_VEL 1
@@ -581,6 +582,7 @@ typedef enum eParticleChildFlag {
#define PSYS_VG_TAN 9
#define PSYS_VG_ROT 10
#define PSYS_VG_EFFECTOR 11
+#define PSYS_VG_TWIST 12
/* ParticleTarget->flag */
#define PTARGET_CURRENT 1