Example #1
0
    def get_format(self, obj, mesh_name, matrix_list):
        if len(matrix_list) > 0:
            matrix = matrix_list[0]
        else:
            matrix = None

        xml_format = {
            'mesh_name': [mesh_name],
            # scale == 1.0 because scale data is included in rot matrix
            'scale': [1.0],
        }

        xml_format.update(exportutil.getTransform(self.scene, obj, matrix))
        xml_format.update(self.get_additional_elements(obj))
        return xml_format
Example #2
0
    def get_format(self, obj, mesh_name, matrix_list):
        xml_format = {
            'mesh_name': [mesh_name],
            # scale == 1.0 because scale data is included in rot matrix
            'scale': [1.0],
        }

        # Add a base static rotation.
        xml_format.update(exportutil.getTransform(self.scene, obj, matrix_list[0][1], xml_format='matrix'))

        if len(matrix_list) > 1:
            # Remove pos, conflicts with keyframes.
            del(xml_format['pos'])
        
            keyframes = exportutil.matrixListToKeyframes(self.scene, obj, matrix_list)
                
            xml_format['keyframe'] = tuple(keyframes)

        xml_format.update(self.get_additional_elements(obj))
        return xml_format