With a filter similar to this one - Baptism: Godfather or Godmother not linked to the event (Baptême: Parrain ou Marraine non liés à l’événement) - based on supertool (it uses my ST_filters_init.py library):
In French Parrain means Godfather and Marraine Godmother, Baptême means Baptism.
Same filters from custom_filters.xml file:
Persons section:
<filter name="08. Check: Baptême; Parrain ou Marraine non liés à l'événement - 507p" function="and" comment="507p (I08.507p) - Filtre == [E87.547p] -">
<rule class="MatchesEventFilter" use_regex="False" use_case="False">
<arg value="87. Type['Baptême'] & Type['Baptême', Participants.Role=('Parrain' | 'Marraine')].length(eq.0) - 547p"/>
</rule>
<rule class="HasEvent" use_regex="False" use_case="False">
<arg value="Baptism"/>
<arg value=""/>
<arg value=""/>
<arg value=""/>
<arg value=""/>
<arg value="1"/>
</rule>
</filter>
Events section:
<filter name="87. Type['Baptême'] & Type['Baptême', Participants.Role=('Parrain' | 'Marraine')].length(eq.0) - 547p" function="or" comment="547p (E87.547p) - Filter(|) == [E88.545p, E88.546p]">
<rule class="MatchesFilter" use_regex="False" use_case="False">
<arg value="88. Type['Baptême'] & Type['Baptême', Participants.Role='Marraine'].length(eq.0) - 545p"/>
</rule>
<rule class="MatchesFilter" use_regex="False" use_case="False">
<arg value="88. Type['Baptême'] & Type['Baptême', Participants.Role='Parrain'].length(eq.0) - 546p"/>
</rule>
</filter>
<filter name="88. Type['Baptême'] & Type['Baptême', Participants.Role='Marraine'].length(eq.0) - 545p" function="and" comment="545p (E88.545p) - Filter(&) == [E90.544i]">
<rule class="HasEventBasePlus" use_regex="False" use_case="False">
<arg value="Baptism"/>
<arg value=""/>
<arg value=""/>
<arg value=""/>
<arg value=""/>
</rule>
<rule class="MatchesFilter" use_regex="False" use_case="False">
<arg value="90. Type['Baptême', Participants.Role='Marraine'] - 544i"/>
</rule>
</filter>
<filter name="88. Type['Baptême'] & Type['Baptême', Participants.Role='Parrain'].length(eq.0) - 546p" function="and" comment="546p (E88.546p) - Filter(&) == [E90.543i]">
<rule class="HasEventBasePlus" use_regex="False" use_case="False">
<arg value="Baptism"/>
<arg value=""/>
<arg value=""/>
<arg value=""/>
<arg value=""/>
</rule>
<rule class="MatchesFilter" use_regex="False" use_case="False">
<arg value="90. Type['Baptême', Participants.Role='Parrain'] - 543i"/>
</rule>
</filter>
<filter name="90. Type['Baptême', Participants.Role='Marraine'] - 544i" function="and" invert="1" comment="544i (E90.544i)">
<rule class="MatchesFilter" use_regex="False" use_case="False">
<arg value="90. Type['Baptême', Participants.Role='Marraine'] - 544p"/>
</rule>
</filter>
<filter name="90. Type['Baptême', Participants.Role='Marraine'] - 544p" function="and" comment="544p (E90.544p) - - Supertool">
<rule class="GenericFilterRule_Event" use_regex="False" use_case="False">
<arg value="gramps_id in rtypeRole.gid"/>
<arg value="@include ST_filters_init.py<br><br>rtypeRole = STF_participant_role(<br> # Valeurs modifiables - début<br> event_type = "Baptism",<br> participant_role = "Marraine"<br> # Valeurs modifiables - fin<br>)"/>
<arg value="rtypeRole.recherche(namespace=namespace, gramps_id=gramps_id, participants=participants, type=type, objet=obj)"/>
</rule>
</filter>
<filter name="90. Type['Baptême', Participants.Role='Parrain'] - 543i" function="and" invert="1" comment="543i (E90.543i)">
<rule class="MatchesFilter" use_regex="False" use_case="False">
<arg value="90. Type['Baptême', Participants.Role='Parrain'] - 543p"/>
</rule>
</filter>
<filter name="90. Type['Baptême', Participants.Role='Parrain'] - 543p" function="and" comment="543p (E90.543p) - - Supertool">
<rule class="GenericFilterRule_Event" use_regex="False" use_case="False">
<arg value="gramps_id in rtypeRole.gid"/>
<arg value="@include ST_filters_init.py<br><br>rtypeRole = STF_participant_role(<br> # Valeurs modifiables - début<br> event_type = "Baptism",<br> participant_role = "Parrain"<br> # Valeurs modifiables - fin<br>)"/>
<arg value="rtypeRole.recherche(namespace=namespace, gramps_id=gramps_id, participants=participants, type=type, objet=obj)"/>
</rule>
</filter>
You need to make some changes to both level 90 event filters to make the whole filter work in English, probably you just need to replace Parrain/Marraine with Godfather/Godmother in Supertool Initial statements (untested)
The Supertool filter STF_participant_role from my library searches for events of the indicated type and whose references (Persons or Families) are of a particular role