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:
authorDaniel Genrich <daniel.genrich@gmx.net>2014-02-06 21:44:05 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2014-02-06 21:55:08 +0400
commit28936a415076dbded4ec55cf94c49e8d0abe4035 (patch)
tree7fccc9f1cea7e2fe91bf0a4f6669e3ae44af0c19 /source/blender/blenkernel/BKE_cloth.h
parente2541f87bcef84481aabf19e15664cfdac452cf7 (diff)
Patch T31269: Add sewing seams to cloth simulation
Description: -------------------------- Use loose edges marked as seams as sewing springs. Usage: ------------------------- All this patch does is set the rest length to 0 and the stiffness to 1 for springs for loose edges marked as seams so that during the cloth simulation they will be brought together. Example Video: ------------------------- http://www.youtube.com/watch?v=-Y_bC0gjoM0 Original Patch by thesleepless (+ git patch by codemanx) Thank you!
Diffstat (limited to 'source/blender/blenkernel/BKE_cloth.h')
-rw-r--r--source/blender/blenkernel/BKE_cloth.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h
index 1b61d0a5443..1e7ac2815b0 100644
--- a/source/blender/blenkernel/BKE_cloth.h
+++ b/source/blender/blenkernel/BKE_cloth.h
@@ -106,6 +106,7 @@ typedef struct ClothVertex {
float bend_stiff;
float shear_stiff;
int spring_count; /* how many springs attached? */
+ float shrink_factor; /* how much to shrink this cloth */
}
ClothVertex;
@@ -149,7 +150,8 @@ typedef enum {
CLOTH_SIMSETTINGS_FLAG_TEARING = ( 1 << 4 ),// true if tearing is enabled
CLOTH_SIMSETTINGS_FLAG_SCALING = ( 1 << 8 ), /* is advanced scaling active? */
CLOTH_SIMSETTINGS_FLAG_CCACHE_EDIT = (1 << 12), /* edit cache in editmode */
- CLOTH_SIMSETTINGS_FLAG_NO_SPRING_COMPRESS = (1 << 13) /* don't allow spring compression */
+ CLOTH_SIMSETTINGS_FLAG_NO_SPRING_COMPRESS = (1 << 13), /* don't allow spring compression */
+ CLOTH_SIMSETTINGS_FLAG_SEW = (1 << 14), /* pull ends of loose edges together */
} CLOTH_SIMSETTINGS_FLAGS;
/* COLLISION FLAGS */
@@ -163,7 +165,8 @@ typedef enum {
CLOTH_SPRING_TYPE_STRUCTURAL = (1 << 1),
CLOTH_SPRING_TYPE_SHEAR = (1 << 2),
CLOTH_SPRING_TYPE_BENDING = (1 << 3),
- CLOTH_SPRING_TYPE_GOAL = (1 << 4)
+ CLOTH_SPRING_TYPE_GOAL = (1 << 4),
+ CLOTH_SPRING_TYPE_SEWING = (1 << 5)
} CLOTH_SPRING_TYPES;
/* SPRING FLAGS */