diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-09-12 20:25:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-09-12 20:25:49 +0400 |
commit | f130f16fef38d40ee492ccb4ff1ad0708329ae3c (patch) | |
tree | 3eac35dcbfd3669f0ff18f366f715587d4d032dc /source/blender/blenlib | |
parent | d16bde417fb985eb348cdbf2314e324fa9d098a9 (diff) |
Use curve radius for paths
- use_radius option, off by default for 2.4x files, on by default on new curves.
- curve deform modifiers (think tentacles)
- follow path (parent mode and constraint)
- curve guides
- added back Alt+S to scale point radius
- Mat3Scale and Mat4Scale arithb.c functions to make a new uniform scale matrix.
- TODO, effectors, looks like they have no way to scale from the radius yet.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_arithb.h | 3 | ||||
-rw-r--r-- | source/blender/blenlib/intern/arithb.c | 20 |
2 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_arithb.h b/source/blender/blenlib/BLI_arithb.h index 40076755fa0..c2d707f60f0 100644 --- a/source/blender/blenlib/BLI_arithb.h +++ b/source/blender/blenlib/BLI_arithb.h @@ -320,6 +320,9 @@ void Mat3Clr(float *m); void Mat3One(float m[][3]); void Mat4One(float m[][4]); +void Mat3Scale(float m[][3], float scale); +void Mat4Scale(float m[][4], float scale); + void Mat3Ortho(float mat[][3]); void Mat4Ortho(float mat[][4]); diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c index 9a05cd75ad0..9e769e19674 100644 --- a/source/blender/blenlib/intern/arithb.c +++ b/source/blender/blenlib/intern/arithb.c @@ -854,6 +854,26 @@ void Mat3One(float m[][3]) m[2][0]= m[2][1]= 0.0; } +void Mat4Scale(float m[][4], float scale) +{ + + m[0][0]= m[1][1]= m[2][2]= scale; + m[3][3]= 1.0; + m[0][1]= m[0][2]= m[0][3]= 0.0; + m[1][0]= m[1][2]= m[1][3]= 0.0; + m[2][0]= m[2][1]= m[2][3]= 0.0; + m[3][0]= m[3][1]= m[3][2]= 0.0; +} + +void Mat3Scale(float m[][3], float scale) +{ + + m[0][0]= m[1][1]= m[2][2]= scale; + m[0][1]= m[0][2]= 0.0; + m[1][0]= m[1][2]= 0.0; + m[2][0]= m[2][1]= 0.0; +} + void Mat4MulVec( float mat[][4], int *vec) { int x,y; |