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/object_transform.c')
-rw-r--r--source/blender/editors/object/object_transform.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index b8a7ce999f1..34395163ad3 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -370,8 +370,8 @@ 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) {
- object_apply_mat4(ob_child, ob_child->obmat, TRUE, FALSE);
- what_does_parent(scene, ob_child, &workob);
+ BKE_object_apply_mat4(ob_child, ob_child->obmat, TRUE, FALSE);
+ BKE_object_workob_calc_parent(scene, ob_child, &workob);
invert_m4_m4(ob_child->parentinv, workob.obmat);
}
}
@@ -434,17 +434,17 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
/* calculate rotation/scale matrix */
if (apply_scale && apply_rot)
- object_to_mat3(ob, rsmat);
+ BKE_object_to_mat3(ob, rsmat);
else if (apply_scale)
- object_scale_to_mat3(ob, rsmat);
+ BKE_object_scale_to_mat3(ob, rsmat);
else if (apply_rot) {
float tmat[3][3], timat[3][3];
/* simple rotation matrix */
- object_rot_to_mat3(ob, rsmat);
+ BKE_object_rot_to_mat3(ob, rsmat);
/* correct for scale, note mul_m3_m3m3 has swapped args! */
- object_scale_to_mat3(ob, tmat);
+ BKE_object_scale_to_mat3(ob, tmat);
invert_m3_m3(timat, tmat);
mul_m3_m3m3(rsmat, timat, rsmat);
mul_m3_m3m3(rsmat, rsmat, tmat);
@@ -460,7 +460,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
if (!(apply_scale && apply_rot)) {
/* correct for scale and rotation that is still applied */
- object_to_mat3(ob, obmat);
+ BKE_object_to_mat3(ob, obmat);
invert_m3_m3(iobmat, obmat);
mul_m3_m3m3(tmat, rsmat, iobmat);
mul_m3_v3(tmat, mat[3]);
@@ -491,7 +491,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
}
/* update normals */
- mesh_calc_normals_mapping(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL, NULL, 0, NULL, NULL);
+ BKE_mesh_calc_normals_mapping(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL, NULL, 0, NULL, NULL);
}
else if (ob->type == OB_ARMATURE) {
ED_armature_apply_transform(ob, mat);
@@ -546,9 +546,9 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
unit_axis_angle(ob->rotAxis, &ob->rotAngle);
}
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
if (ob->type == OB_ARMATURE) {
- where_is_pose(scene, ob); /* needed for bone parents */
+ BKE_pose_where_is(scene, ob); /* needed for bone parents */
}
ignore_parent_tx(bmain, scene, ob);
@@ -573,9 +573,9 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
- where_is_object(scene, ob);
- object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
+ BKE_object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
+ BKE_object_where_is_calc(scene, ob);
/* update for any children that may get moved */
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
@@ -750,7 +750,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
else {
/* only bounds support */
INIT_MINMAX(min, max);
- minmax_object_duplis(scene, ob, min, max);
+ BKE_object_minmax_dupli(scene, ob, min, max);
mid_v3_v3v3(cent, min, max);
invert_m4_m4(ob->imat, ob->obmat);
mul_m4_v3(ob->imat, cent);
@@ -772,11 +772,11 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
Mesh *me = ob->data;
if (centermode == ORIGIN_TO_CURSOR) { /* done */ }
- else if (around == V3D_CENTROID) { mesh_center_median(me, cent); }
- else { mesh_center_bounds(me, cent); }
+ else if (around == V3D_CENTROID) { BKE_mesh_center_median(me, cent); }
+ else { BKE_mesh_center_bounds(me, cent); }
negate_v3_v3(cent_neg, cent);
- mesh_translate(me, cent_neg, 1);
+ BKE_mesh_translate(me, cent_neg, 1);
tot_change++;
me->id.flag |= LIB_DOIT;
@@ -854,8 +854,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
arm->id.flag |= LIB_DOIT;
/* do_inverse_offset= TRUE; */ /* docenter_armature() handles this */
- where_is_object(scene, ob);
- where_is_pose(scene, ob); /* needed for bone parents */
+ BKE_object_where_is_calc(scene, ob);
+ BKE_pose_where_is(scene, ob); /* needed for bone parents */
ignore_parent_tx(bmain, scene, ob);
@@ -867,11 +867,11 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
MetaBall *mb = ob->data;
if (centermode == ORIGIN_TO_CURSOR) { /* done */ }
- else if (around == V3D_CENTROID) { BKE_metaball_center_median(mb, cent); }
- else { BKE_metaball_center_bounds(mb, cent); }
+ else if (around == V3D_CENTROID) { BKE_mball_center_median(mb, cent); }
+ else { BKE_mball_center_bounds(mb, cent); }
negate_v3_v3(cent_neg, cent);
- BKE_metaball_translate(mb, cent_neg);
+ BKE_mball_translate(mb, cent_neg);
tot_change++;
mb->id.flag |= LIB_DOIT;
@@ -893,9 +893,9 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
mul_mat3_m4_v3(ob->obmat, centn); /* ommit translation part */
add_v3_v3(ob->loc, centn);
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
if (ob->type == OB_ARMATURE) {
- where_is_pose(scene, ob); /* needed for bone parents */
+ BKE_pose_where_is(scene, ob); /* needed for bone parents */
}
ignore_parent_tx(bmain, scene, ob);
@@ -915,9 +915,9 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
mul_mat3_m4_v3(ob_other->obmat, centn); /* ommit translation part */
add_v3_v3(ob_other->loc, centn);
- where_is_object(scene, ob_other);
+ BKE_object_where_is_calc(scene, ob_other);
if (ob_other->type == OB_ARMATURE) {
- where_is_pose(scene, ob_other); /* needed for bone parents */
+ BKE_pose_where_is(scene, ob_other); /* needed for bone parents */
}
ignore_parent_tx(bmain, scene, ob_other);
}