Addon based on this answer, adapted to export all objects in selection to single .mdd files. Make sure 'NewTekk MDD format' add-on is enabled and install the add-on as usual:

batch_mdd_export.py
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
bl_info = {
"name": "Batch export MDD files",
"author": "brockmann",
"version": (0, 1, 0),
"blender": (2, 80, 0),
"location": "File > Import-Export",
"description": "Batch Export Objects in Selection to MDD",
"warning": "",
"wiki_url": "",
"tracker_url": "",
"category": "Import-Export"}
import bpy
import os
from bpy_extras.io_utils import ExportHelper
from bpy.props import (BoolProperty,
FloatProperty,
IntProperty,
StringProperty,
EnumProperty,
CollectionProperty
)
class Batch_MDD_Export(bpy.types.Operator, ExportHelper):
"""Batch export objects to fbx files"""
bl_idname = "export_scene.batch_mdd"
bl_label = "Batch export MDD"
bl_options = {'PRESET', 'UNDO'}
# ExportHelper mixin class uses this
filename_ext = ".mdd"
filter_glob : StringProperty(
default="*.mdd",
options={'HIDDEN'},
)
# List of operator properties, the attributes will be assigned
# to the class instance from the operator setting before calling.
# Context group
use_selection_setting: BoolProperty(
name="Selection Only",
description="Export selected objects only",
default=True,
)
use_rest_frame: BoolProperty(
name="Use Rest Frame",
description="ToDo",
default=False,
)
frames_per_second: FloatProperty(
name="FPS",
description="ToDo",
min=1, max=60,
default=25,
)
frame_start: IntProperty(
name="Frame Start",
description="ToDo",
default=1,
)
frame_end: IntProperty(
name="Frame End",
description="ToDo",
default=250,
)
def execute(self, context):
# get the folder
folder_path = os.path.dirname(self.filepath)
# get objects selected in the viewport
viewport_selection = context.selected_objects
# get export objects
obj_export_list = viewport_selection
if self.use_selection_setting == False:
obj_export_list = [i for i in context.scene.objects]
# deselect all objects
bpy.ops.object.select_all(action='DESELECT')
for item in obj_export_list:
item.select_set(True)
if item.type == 'MESH':
context.view_layer.objects.active = item # Set active object
file_path = os.path.join(folder_path, "{}.mdd".format(item.name))
# MDD settings
bpy.ops.export_shape.mdd(
filepath=file_path,
fps=self.frames_per_second,
frame_start=self.frame_start,
frame_end=self.frame_end
)
item.select_set(False)
# restore viewport selection
for ob in viewport_selection:
ob.select_set(True)
return {'FINISHED'}
Only needed if you want to add into a dynamic menu
def menu_func_import(self, context):
self.layout.operator(Batch_MDD_Export.bl_idname, text="MDD Batch Export (.mdd)")
def register():
bpy.utils.register_class(Batch_MDD_Export)
bpy.types.TOPBAR_MT_file_export.append(menu_func_import)
def unregister():
bpy.utils.unregister_class(Batch_MDD_Export)
bpy.types.TOPBAR_MT_file_export.remove(menu_func_import)
if name == "main":
register()
# test call
#bpy.ops.export_scene.batch_mdd('INVOKE_DEFAULT')
I added all possible arguments of the 'lightwave point cache' operator export_shape.mdd(), see line 117. You can change them or add new properties to the operator, wasn't sure.
export_scene.fbx()operator and all corresponding properties/arguments. – brockmann Dec 20 '20 at 18:06my_batch_mdd.pyfrom the text editor, close blender, start blender, go the user preferences > add-ons, click on Install Add-on, select the file, enable it, done. – brockmann Dec 21 '20 at 10:39