fix bug for MeshCommand materialID generation
Merge pull request #8020 from dabingnn/v3_MaterialIDBug

fix bug for MeshCommand materialID generation