How to setup families with cross dependecies

Hi I am looking for some advice on setting up families for instances and plugins.

I am using Pyblish_Lite and Pyblish_Maya.

I have a Maya Scene with a Rig, the geometry of the rig are variations of the character, it contains a bind skeleton that is shared by all variations. This is driven by an additional skeleton from the Maya control rig. I will call these bind_skeleton and rig_skeleton.

I collect the Rig which contains everything; both skeleton and all geometry variations.
I collect each variation with the bind skeleton, for use in a Game Engine.

Collected:

  • Character_Rig, (Family: CharacterRig)
  • Character_Variation 1, (Families: CharacterVariation, SkeletalMesh)
  • Character_Variation 2, (Families: CharacterVariation, SkeletalMesh)
  • Character_Variation 3, (Families: CharacterVariation, SkeletalMesh)

I validate the Character_Rigwith:

  • CharacterRig Validator (Naming, Controls, Keys, Display Layers ect. )
    I validate each Character_Variation with:
  • CharacterVariation Validator (Naming, Hierarchy)
  • SkeletalMesh Validator (Naming, Skeleton, Skin Clusters, Keys)

The SkeletalMesh Validator is a more generic validator also used for other contexts.

I am struggling with the fact that the Rig Validator would be dependent on the Variation Validations.

The issue comes from the fact that I don’t always want to extract the Variations, but when I extract the Variation I always will also extract the Rig. So there the dependencies are switched around.

So when I extract both I can Validate the Variations, Validate the Rig and also making sure the variations were validated.

When I just want to extract the Rig, I still need the validators for the variations to run.

When I also add the validators to the Rig Family all Variations are validated twice when I extract both the rig and variation. Especially the SkeletalMesh validator is pretty heavy due to all the SkinCluster querying.

How would I go about setting up Validator Dependencies like this between multiple families? Being able to extract the Rig without extracting the variations while still validating the variations?

Thanks!

Soo.

I came up with running the CharacterVariation Collector first, then the CharacterRig Collector. The CharacterRig Collector also stores the instances of family CharacterVariation.

During the Validation of CharacterRig I can query the results of any of the CharacterVariation Instances.

Using the “_has_succeeded” and “_has_failed” flags I can figure out which validators have run already, see which ones have failed, and run the ones that haven’t validated yet.

While I can get a list of plugins by family, I have some trouble splitting them by type, as I would need only the validators.

plugins.registered_plugins() seemed to have this functionality at some point but is now deprecated.

How would I go about at filtering out the validator for this instance family?