()
| 57 | return frame_data |
| 58 | |
| 59 | def extract_object_data(): |
| 60 | object_data = {} |
| 61 | objects = get_all_objects() |
| 62 | scene = bpy.context.scene |
| 63 | for obj in objects: |
| 64 | scene.frame_set(scene.frame_start) |
| 65 | object_data[obj.name] = [] |
| 66 | start_frame = scene.frame_start |
| 67 | end_frame = scene.frame_end |
| 68 | for frame in range(start_frame, end_frame + 1): |
| 69 | scene.frame_set(frame) |
| 70 | location = list(obj.location) |
| 71 | if obj.rotation_mode == 'QUATERNION': |
| 72 | rotation = list(obj.rotation_quaternion) |
| 73 | else: |
| 74 | quat = obj.rotation_euler.to_quaternion() |
| 75 | rotation = list(quat) |
| 76 | object_data[obj.name].append(rotation + location) |
| 77 | return object_data |
| 78 | |
| 79 | def extract_object_model_data(): |
| 80 | """ |
no test coverage detected