Changeset View
Changeset View
Standalone View
Standalone View
io_scene_ms3d/ms3d_import.py
| Context not available. | |||||
| FORMAT_ARMATURE_NLA = "{}.an" | FORMAT_ARMATURE_NLA = "{}.an" | ||||
| ############################################################################### | ############################################################################### | ||||
| class Ms3dImporter(): | class Ms3dImporter: | ||||
| """ | """ | ||||
| Load a MilkShape3D MS3D File | Load a MilkShape3D MS3D File | ||||
| """ | """ | ||||
| Context not available. | |||||
| frame = (translation_key_frames.time * ms3d_model.animation_fps) | frame = (translation_key_frames.time * ms3d_model.animation_fps) | ||||
| matrix_local = Matrix.Translation( | matrix_local = Matrix.Translation( | ||||
| Vector(translation_key_frames.position)) | Vector(translation_key_frames.position)) | ||||
| v = (matrix_local) * Vector() | v = matrix_local * Vector() | ||||
| fcurve_location_x.keyframe_points.insert(frame, -v[0]) | fcurve_location_x.keyframe_points.insert(frame, -v[0]) | ||||
| fcurve_location_y.keyframe_points.insert(frame, v[2]) | fcurve_location_y.keyframe_points.insert(frame, v[2]) | ||||
| fcurve_location_z.keyframe_points.insert(frame, v[1]) | fcurve_location_z.keyframe_points.insert(frame, v[1]) | ||||
| Context not available. | |||||
| rotation_key_frames.rotation[1], 4, 'Z') | rotation_key_frames.rotation[1], 4, 'Z') | ||||
| ) * Matrix.Rotation( | ) * Matrix.Rotation( | ||||
| -rotation_key_frames.rotation[0], 4, 'X') | -rotation_key_frames.rotation[0], 4, 'X') | ||||
| q = (matrix_local_rot).to_quaternion() | q = matrix_local_rot.to_quaternion() | ||||
| fcurve_rotation_w.keyframe_points.insert(frame, q.w) | fcurve_rotation_w.keyframe_points.insert(frame, q.w) | ||||
| fcurve_rotation_x.keyframe_points.insert(frame, q.x) | fcurve_rotation_x.keyframe_points.insert(frame, q.x) | ||||
| fcurve_rotation_y.keyframe_points.insert(frame, q.y) | fcurve_rotation_y.keyframe_points.insert(frame, q.y) | ||||
| Context not available. | |||||