diff options
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index cbd1e1be8d5..95b874e7145 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -48,7 +48,7 @@ #include "DNA_view3d_types.h" #include "DNA_world_types.h" -#include "BLI_arithb.h" +#include "BLI_math.h" #include "BLI_editVert.h" #include "BLI_listbase.h" #include "BLI_string.h" @@ -221,7 +221,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) /* inverse parent matrix */ what_does_parent(scene, ob, &workob); - Mat4Invert(ob->parentinv, workob.obmat); + invert_m4_m4(ob->parentinv, workob.obmat); } else { ob->partype= PARVERT1; @@ -229,7 +229,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) /* inverse parent matrix */ what_does_parent(scene, ob, &workob); - Mat4Invert(ob->parentinv, workob.obmat); + invert_m4_m4(ob->parentinv, workob.obmat); } } } @@ -451,7 +451,7 @@ static int parent_clear_exec(bContext *C, wmOperator *op) ED_object_apply_obmat(ob); } else if(type == 2) - Mat4One(ob->parentinv); + unit_m4(ob->parentinv); ob->recalc |= OB_RECALC; } @@ -617,7 +617,7 @@ static int parent_set_exec(bContext *C, wmOperator *op) add_constraint_to_object(con, ob); get_constraint_target_matrix(scene, con, 0, CONSTRAINT_OBTYPE_OBJECT, NULL, cmat, scene->r.cfra - give_timeoffset(ob)); - VecSubf(vec, ob->obmat[3], cmat[3]); + sub_v3_v3v3(vec, ob->obmat[3], cmat[3]); ob->loc[0] = vec[0]; ob->loc[1] = vec[1]; @@ -637,12 +637,12 @@ static int parent_set_exec(bContext *C, wmOperator *op) ob->partype= PARSKEL; - Mat4Invert(ob->parentinv, workob.obmat); + invert_m4_m4(ob->parentinv, workob.obmat); } else { /* calculate inverse parent matrix */ what_does_parent(scene, ob, &workob); - Mat4Invert(ob->parentinv, workob.obmat); + invert_m4_m4(ob->parentinv, workob.obmat); } ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA; @@ -734,7 +734,7 @@ static int parent_noinv_set_exec(bContext *C, wmOperator *op) } else { /* clear inverse matrix and also the object location */ - Mat4One(ob->parentinv); + unit_m4(ob->parentinv); memset(ob->loc, 0, 3*sizeof(float)); /* set recalc flags */ |