Skip to content
Snippets Groups Projects
  • Alexander Gavrilov's avatar
    011f7afd
    Rigify: refactor feature sets to avoid modifying global path. · 011f7afd
    Alexander Gavrilov authored
    Instead of adding the feature set installation directory
    to the global path, and thus inserting the modules into
    the top level namespace, add an empty rigify.feature_sets
    package and use __path__ to redirect the module loader
    to read its sub-modules from the feature set directory.
    
    Now feature set modules are effectively installed into
    that package and loaded as 'rigify.feature_sets.foo'.
    
    As an aside, clean up loading code to avoid weird path
    manipulations, add more safety checks when installing sets,
    and add a way for sets to expose a user-friendly name.
    011f7afd
    History
    Rigify: refactor feature sets to avoid modifying global path.
    Alexander Gavrilov authored
    Instead of adding the feature set installation directory
    to the global path, and thus inserting the modules into
    the top level namespace, add an empty rigify.feature_sets
    package and use __path__ to redirect the module loader
    to read its sub-modules from the feature set directory.
    
    Now feature set modules are effectively installed into
    that package and loaded as 'rigify.feature_sets.foo'.
    
    As an aside, clean up loading code to avoid weird path
    manipulations, add more safety checks when installing sets,
    and add a way for sets to expose a user-friendly name.