Implementing FD based frame censoring in SPM12

Dear experts,

I’m running a first-level analysis on task-based fMRI data in SPM via a MATLAB script. Preprocessing was done with fMRIPrep. I’m currently including the six motion regressors converted from fMRIPrep with Remi Gau’s script (https://gist.github.com/Remi-Gau/06ace1387dcf9359f6abab663bceff3 — thanks for providing it).

I’d now like to add motion censoring based on an FD threshold, but I’m uncertain about the practical implementation in SPM12. Can I simply add a column to the motion-regressor file with 0 for kept frames and 1 for censored frames, or does SPM expect a different file, specific header or similar?

Any pointers on the recommended approach (and any SPM-specific caveats) would be much appreciated. Thank you!