diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-08-09 15:32:55 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-08-09 15:32:55 +0400 |
commit | dd75ec490761640571a0d8e53a0d439091f2736f (patch) | |
tree | 25b3966862febbf3ee8c81ed45f7045c99f84016 /source/blender/blenkernel/intern/object.c | |
parent | 02b0967bd11dd6fd2454b37182d9f94ea451b603 (diff) | |
parent | c026b8066ddc1c42144d2e5132384ea7c1211050 (diff) |
Merged changes in the trunk up to revision 31190.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 39e02ee584d..c08a3408505 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -283,7 +283,7 @@ void free_object(Object *ob) ob->path= 0; if(ob->adt) BKE_free_animdata((ID *)ob); if(ob->poselib) ob->poselib->id.us--; - if(ob->gpd) ob->gpd->id.us--; + if(ob->gpd) ((ID *)ob->gpd)->us--; if(ob->defbase.first) BLI_freelistN(&ob->defbase); if(ob->pose) @@ -1627,10 +1627,7 @@ float bsystem_time(struct Scene *scene, Object *ob, float cfra, float ofs) void object_scale_to_mat3(Object *ob, float mat[][3]) { float vec[3]; - - vec[0]= ob->size[0]+ob->dsize[0]; - vec[1]= ob->size[1]+ob->dsize[1]; - vec[2]= ob->size[2]+ob->dsize[2]; + add_v3_v3v3(vec, ob->size, ob->dsize); size_to_mat3( mat,vec); } @@ -1688,7 +1685,7 @@ void object_mat3_to_rot(Object *ob, float mat[][3], int use_compat) void object_apply_mat4(Object *ob, float mat[][4]) { float mat3[3][3]; - VECCOPY(ob->loc, mat[3]); + copy_v3_v3(ob->loc, mat[3]); mat4_to_size(ob->size, mat); copy_m3_m4(mat3, mat); object_mat3_to_rot(ob, mat3, 0); @@ -1796,7 +1793,7 @@ static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[][4]) copy_m4_m4(mat, rmat); } - VECCOPY(mat[3], vec); + copy_v3_v3(mat[3], vec); } } @@ -1823,7 +1820,7 @@ static void ob_parbone(Object *ob, Object *par, float mat[][4]) copy_m4_m4(mat, pchan->pose_mat); /* but for backwards compatibility, the child has to move to the tail */ - VECCOPY(vec, mat[1]); + copy_v3_v3(vec, mat[1]); mul_v3_fl(vec, pchan->bone->length); add_v3_v3(mat[3], vec); } |