Exporting a tree with multiple name types

I have not seen a GEDCOM annotation for Patronymic. Gramps stores this in the “Origin”.

From Perplexity:

In GEDCOM 5.x
No standard NAME subtag means “this is patronymic.”
Common practice is to place it in the surname portion for compatibility with other genealogy software.
Some programs add custom tags or internal metadata, but those are not portable standards.

In GEDCOM X
Patronymic can be represented explicitly with a name-part qualifier.
That makes it much clearer semantically than legacy GEDCOM.

For a legacy GEDCOM file, the safest approach is usually to enter the patronymic in the surname slot and add a note or custom tag if your software supports it.

So if your script can add a custom tag, you could transmit it that way. Gramps will preserve all unrecognized tags as Notes. So you could run a post-processing SuperTool script to set the origins.

Or you could rely on the ben/bat/bar to be a marker and use a SuperTool script to set the origin. (An example of a script to set surname Origin to “Patrilineal” or “Taken” (and Type to “Birth Name” or “Married Name”) based on contextual matches to the Father and Groom surnames is shown in the article: “Tree vivisection experiments with the Isotammi SuperTool”)