I am a very basic blender user, I need to know if there is a add-on or a built in function that could export selected objects model transformation matrix (the matrix that contains the models scaling, rotation and translation information).
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
Alrighty, then this script creates a text file with the transform matrix [see answer here to understand blender's transform matrix format] of the active object as it is represented in blender. Just copy and paste it into a text editor window in Blender, save your blendfile where you want your text file to be created, and run the script:
import bpy from os.path import dirname, join if bpy.context.object and bpy.data.filepath: fname = bpy.context.object.name + ".matrix" fpath = join( dirname( bpy.data.filepath ), fname ) f = open( fpath, "w" ) f.write( str( bpy.context.object.matrix_world ) ) f.close()
You get this result in the generated textfile:
<Matrix 4x4 ( 0.6416, 0.2411, 0.7263, -0.8912) (-0.8174, 0.1801, -1.0416, -2.1409) (-0.8864, 0.0084, 1.4863, 3.1665) ( 0.0000, 0.0000, 0.0000, 1.0000)>
There is this Blender add-on, that allows you to extract transformation matrices from objects and write them on disc.
It also allows you to apply transformation matrices to object - for instance by loading them from disc.