mmSolver.tools.savemarkerfile#

Tool to convert a Maya Camera (and Image Plane) into a file format readable by third-party software (for example, 3DEqualizer).

The aim is to make the tool similar to the Load Markers tool, allowing minimal set-up time for getting data between Maya and 3DEqualizer.

Tool#

The Save Marker File tool.

This tool will save the selected Markers to a .uv file, for loading in third-party software (such as 3DEqualizer).

mmSolver.tools.savemarkerfile.tool.main()#

Library#

The Save Marker File library functions.

Write out a mmSolver Marker node as a .uv file.

mmSolver.tools.savemarkerfile.lib.generate(mkr_list, frame_range)#

Convert all Markers to data that can be written out.

Returns:

List of Markers

Return type:

[Marker]

mmSolver.tools.savemarkerfile.lib.write_file(file_path, data)#
mmSolver.tools.savemarkerfile.lib.write_temp_file(data)#

Write file.

Constants#

Contains constant values for the Save Marker File tool.

The .uv format, resolution independent 2D tracking format.

This file supports only the .uv version 4 format.

The UV coordinate (0.0, 0.0) is the lower-left. The UV coordinate (1.0, 1.0) is the upper-right.

Format version 4:

{
    'version': int,
    'num_points': int,
    'is_undistorted': None,  # Deprecated
    'points': [
        {
            'name': str,
            'id': int,  # or None
            'set_name': str,
            'per_frame': [
                {
                    'frame': int,
                    'pos_dist': (float, float),
                    'pos': (float, float),
                    'weight': float
                },
            ],
           '3d': {
                'x': float, # or None
                'y': float, # or None
                'z': float, # or None
                'x_lock': bool, # or None
                'y_lock': bool, # or None
                'z_lock': bool  # or None
            }
        },
    ],
    'camera': {
        'resolution': (int, int),
        'film_back_cm': (float, float),
        'lens_center_offset_cm': (float, float),
        'per_frame': [
            {
                'frame': int,
                'focal_length_cm': float,
            },
        ],
    }
}