def load_preset(self):
        """
        Loads preset if it is specified in the .frigg.yml
        """
        if 'preset' in self.settings.preview:
            with open(os.path.join(os.path.dirname(__file__), 'presets.yaml')) as f:
                presets = yaml.load(f.read())

            if self.settings.preview['preset'] in presets:
                self.preset = presets[self.settings.preview['preset']]
            return self.preset
def load_preset ( self ) : if 'preset' in self . settings . preview : with open ( os . path . join ( os . path . dirname ( __file__ ) , 'presets.yaml' ) ) as f : presets = yaml . load ( f . read ( ) ) if self . settings . preview [ 'preset' ] in presets : self . preset = presets [ self . settings . preview [ 'preset' ] ] return self . preset
Loads preset if it is specified in the .frigg.yml