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:
authorCampbell Barton <ideasman42@gmail.com>2013-12-17 15:13:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-12-17 16:04:36 +0400
commitf5076d54cb3a95ab583cddb7de07ed746d2e2be6 (patch)
tree421505d1a20dcb53fd8bfeb97e67e9a97a30566a /source/blender/editors/metaball
parentdb795b66fa865ad99bc52fb3c9b053b9bb332f9b (diff)
'Transform' Python Function for armature, curve and lattice.
patch by Paolo Acampora with some edits.
Diffstat (limited to 'source/blender/editors/metaball')
-rw-r--r--source/blender/editors/metaball/mball_edit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index 3daffe9bb37..26008694b3c 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -751,18 +751,17 @@ void undo_push_mball(bContext *C, const char *name)
undo_editmode_push(C, name, get_data, free_undoMball, undoMball_to_editMball, editMball_to_undoMball, NULL);
}
-/* matrix is 4x4 */
-void ED_mball_transform(MetaBall *mb, float *mat)
+void ED_mball_transform(MetaBall *mb, float mat[4][4])
{
MetaElem *me;
float quat[4];
- const float scale = mat4_to_scale((float (*)[4])mat);
+ const float scale = mat4_to_scale(mat);
const float scale_sqrt = sqrtf(scale);
- mat4_to_quat(quat, (float (*)[4])mat);
+ mat4_to_quat(quat, mat);
for (me = mb->elems.first; me; me = me->next) {
- mul_m4_v3((float (*)[4])mat, &me->x);
+ mul_m4_v3(mat, &me->x);
mul_qt_qtqt(me->quat, quat, me->quat);
me->rad *= scale;
/* hrmf, probably elems shouldn't be
@@ -774,4 +773,5 @@ void ED_mball_transform(MetaBall *mb, float *mat)
mul_v3_fl(&me->expx, scale_sqrt);
}
}
+ DAG_id_tag_update(&mb->id, 0);
}