diff options
author | Ton Roosendaal <ton@blender.org> | 2005-07-16 23:07:02 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-07-16 23:07:02 +0400 |
commit | e67ba0ae330561424f18dbebaede835f81f45282 (patch) | |
tree | 5c3726760a4afd50266e6a522fe7b42f4a4bb230 /source/blender/blenkernel/intern/curve.c | |
parent | 502c34ee4971bcc7cd4cb97090f84c9235518a9b (diff) |
More armature goodies;
The B-Bones!
(where the B can be read as 'block' or 'bezier' or 'b-spline')
- set option on/off in edit buttons, armature panel
- scaling of B-bones only works in editmode, use ALT+S to make bones fatter
or thinner. Also works for constrainted transform
- In pose mode, you now have a buttons panel with per-bone settings too
Here you can find the "segments" button, which allows bones to
interpolate between previous/next bones, including roll.
- Buttons to control interpolation ("In" and "Out" are disabled, doesn't
work satisfying yet
NOTE: this doesn't give deform yet! Main purpose for now is to test if this
drawing method serves to animate/pose armatures well.
Still need to review proper interpolation methods... maybe bezier is too
limited.
Diffstat (limited to 'source/blender/blenkernel/intern/curve.c')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 98aa41b392e..7dd8c6efd65 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -1055,7 +1055,8 @@ void makeNurbcurve(Nurb *nu, float *data, int dim) MEM_freeN(basisu); } -void maakbez(float q0, float q1, float q2, float q3, float *p, int it) +/* forward differencing method for bezier curve */ +void forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride) { float rt0,rt1,rt2,rt3,f; int a; @@ -1075,7 +1076,7 @@ void maakbez(float q0, float q1, float q2, float q3, float *p, int it) for(a=0; a<=it; a++) { *p= q0; - p+= 3; + p+= stride; q0+= q1; q1+= q2; q2+= q3; @@ -1612,9 +1613,9 @@ void makeBevelList(Object *ob) v2= bezt->vec[0]; /* always do all three, to prevent data hanging around */ - maakbez(v1[0], v1[3], v2[0], v2[3], data, nu->resolu); - maakbez(v1[1], v1[4], v2[1], v2[4], data+1, nu->resolu); - maakbez(v1[2], v1[5], v2[2], v2[5], data+2, nu->resolu); + forward_diff_bezier(v1[0], v1[3], v2[0], v2[3], data, nu->resolu, 3); + forward_diff_bezier(v1[1], v1[4], v2[1], v2[4], data+1, nu->resolu, 3); + forward_diff_bezier(v1[2], v1[5], v2[2], v2[5], data+2, nu->resolu, 3); if((nu->type & CU_2D)==0) { if(cu->flag & CU_3D) { |