+static inline void get_affine( affine_t *affine, mlt_transition this, float position )
+{
+ mlt_properties properties = MLT_TRANSITION_PROPERTIES( this );
+ int keyed = mlt_properties_get_int( properties, "keyed" );
+ affine_init( affine->matrix );
+
+ if ( keyed == 0 )
+ {
+ float fix_rotate_x = mlt_properties_get_double( properties, "fix_rotate_x" );
+ float fix_rotate_y = mlt_properties_get_double( properties, "fix_rotate_y" );
+ float fix_rotate_z = mlt_properties_get_double( properties, "fix_rotate_z" );
+ float rotate_x = mlt_properties_get_double( properties, "rotate_x" );
+ float rotate_y = mlt_properties_get_double( properties, "rotate_y" );
+ float rotate_z = mlt_properties_get_double( properties, "rotate_z" );
+ float fix_shear_x = mlt_properties_get_double( properties, "fix_shear_x" );
+ float fix_shear_y = mlt_properties_get_double( properties, "fix_shear_y" );
+ float fix_shear_z = mlt_properties_get_double( properties, "fix_shear_z" );
+ float shear_x = mlt_properties_get_double( properties, "shear_x" );
+ float shear_y = mlt_properties_get_double( properties, "shear_y" );
+ float shear_z = mlt_properties_get_double( properties, "shear_z" );
+ float ox = mlt_properties_get_double( properties, "ox" );
+ float oy = mlt_properties_get_double( properties, "oy" );
+
+ affine_rotate_x( affine->matrix, fix_rotate_x + rotate_x * position );
+ affine_rotate_y( affine->matrix, fix_rotate_y + rotate_y * position );
+ affine_rotate_z( affine->matrix, fix_rotate_z + rotate_z * position );
+ affine_shear( affine->matrix,
+ fix_shear_x + shear_x * position,
+ fix_shear_y + shear_y * position,
+ fix_shear_z + shear_z * position );
+ affine_offset( affine->matrix, ox, oy );
+ }
+ else
+ {
+ float rotate_x = composite_calculate_key( this, "rotate_x", "rotate_x_info", 360, position );
+ float rotate_y = composite_calculate_key( this, "rotate_y", "rotate_y_info", 360, position );
+ float rotate_z = composite_calculate_key( this, "rotate_z", "rotate_z_info", 360, position );
+ float shear_x = composite_calculate_key( this, "shear_x", "shear_x_info", 360, position );
+ float shear_y = composite_calculate_key( this, "shear_y", "shear_y_info", 360, position );
+ float shear_z = composite_calculate_key( this, "shear_z", "shear_z_info", 360, position );
+
+ affine_rotate_x( affine->matrix, rotate_x );
+ affine_rotate_y( affine->matrix, rotate_y );
+ affine_rotate_z( affine->matrix, rotate_z );
+ affine_shear( affine->matrix, shear_x, shear_y, shear_z );
+ }
+}
+