For sometime the 'p4-plugin' has used it's own path/file filters when Jenkins checks out the Jenkinsfile into the ...@script directory. I can't find the old JIRA issue that had a fairly lengthy discussion, but wondered if you came to any resolution and perhaps added support into the `scm-api-plugin`?
BackGround: Some Perforce users have repositories of many TB and syncing all that to the master's @script directory is a bit expensive to just get the 'Jenkinsfile'. JENKINS-45999
Kind regards,
Paul