编制导入模式的脚本以合并已设置关键帧的变换

此脚本是 FBX 导入选项主题中的“更新动画(已设置关键帧的变换)”(Update animation (keyed transforms))导入选项的脚本版本,可用于导入 FBX 文件,以避免现有的未设置关键帧的变换被覆盖,并使其保留当前状态。

// Necessary for prompt mode or in cases where plug-in isn't loaded and the commands below are required
	//
	loadPlugin "fbxmaya"

	// Change the import mode to exclusively merge keyed transforms only
	//
	FBXImportMode -v exmergekeyedxforms;

	// Perform the import operation
	//
	FBXImport -f $fileName -importFormat "fbx";