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:
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c2
-rw-r--r--source/blender/editors/object/object_edit.c28
-rw-r--r--source/blender/editors/object/object_relations.c6
-rw-r--r--source/blender/editors/object/object_transform.c2
4 files changed, 5 insertions, 33 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index b1405d1d12e..484a67b94db 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1118,7 +1118,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base)
ob->lay= base->lay;
copy_m4_m4(ob->obmat, dob->mat);
- ED_object_apply_obmat(ob);
+ object_apply_mat4(ob, ob->obmat);
}
copy_object_set_idnew(C, 0);
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 807fa00d806..65e8fbeeb8f 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -150,34 +150,6 @@ static int pupmenu(const char *msg) {return 0;}
static bContext *C;
static void error_libdata() {}
-/* ********************************** */
-
-/* --------------------------------- */
-
-void ED_object_apply_obmat(Object *ob)
-{
- float mat[3][3], imat[3][3], tmat[3][3];
-
- /* from obmat to loc rot size */
-
- if(ob==NULL) return;
- copy_m3_m4(mat, ob->obmat);
-
- VECCOPY(ob->loc, ob->obmat[3]);
-
- mat3_to_eul( ob->rot,mat);
- eul_to_mat3( tmat,ob->rot);
-
- invert_m3_m3(imat, tmat);
-
- mul_m3_m3m3(tmat, imat, mat);
-
- ob->size[0]= tmat[0][0];
- ob->size[1]= tmat[1][1];
- ob->size[2]= tmat[2][2];
-
-}
-
/* ********* clear/set restrict view *********/
static int object_restrictview_clear_exec(bContext *C, wmOperator *op)
{
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index f55e7594c24..94eae2a7ab9 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -430,7 +430,7 @@ static int parent_clear_exec(bContext *C, wmOperator *op)
else if(type == 1) {
ob->parent= NULL;
ob->track= NULL;
- ED_object_apply_obmat(ob);
+ object_apply_mat4(ob, ob->obmat);
}
else if(type == 2)
unit_m4(ob->parentinv);
@@ -572,7 +572,7 @@ static int parent_set_exec(bContext *C, wmOperator *op)
Object workob;
/* apply transformation of previous parenting */
- ED_object_apply_obmat(ob);
+ object_apply_mat4(ob, ob->obmat);
/* set the parent (except for follow-path constraint option) */
if(partype != PAR_PATH_CONST)
@@ -887,7 +887,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op)
}
if(type == 1)
- ED_object_apply_obmat(ob);
+ object_apply_mat4(ob, ob->obmat);
}
CTX_DATA_END;
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index db15322bbc4..ca6feabdf80 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -392,7 +392,7 @@ static void ignore_parent_tx(Main *bmain, Scene *scene, Object *ob )
/* a change was made, adjust the children to compensate */
for(ob_child=bmain->object.first; ob_child; ob_child=ob_child->id.next) {
if(ob_child->parent == ob) {
- ED_object_apply_obmat(ob_child);
+ object_apply_mat4(ob_child, ob_child->obmat);
what_does_parent(scene, ob_child, &workob);
invert_m4_m4(ob_child->parentinv, workob.obmat);
}