def ingest_hover(protein):
    defaultHover = {
            'max-found':256,
            'min_zoom':1.0,
            'glyph': 'sluice/sharkmouth.png'
            }
    protein.update_ingests(hover=defaultHover)
    return
def ingest_attributes(protein, kinds):
    attributes = []
    #Make this customizable
    attributes.append(build_enable_menu())
    #Make this customizable
    attributes.append(build_opacity())

    attributes.append(build_enabled_kinds(protein, kinds))

    protein.update_ingests(attributes=attributes)
    return
def ingest_default_shaders(protein):
    defaultShaders = {
            'path': {
                'fragment':'ribbons.frag',
                'vertex':'ribbons.vert'
                },
            'point': {
                'fragment':'network.frag',
                'vertex':'network.vert'
                }
            }

    protein.update_ingests(default_shaders=defaultShaders) 
    return
def update_inculcators(protein, pigments, resources):
    inculcators = protein.ingests()['inculcators']

    for kind, resource in resources.iteritems():
        for icon in resource:
            iconName, fileExt = os.path.splitext(os.path.basename(icon))
            inculcatorName = iconName + '_inc'
            if(not any(d['name'] == inculcatorName for d in inculcators)):
                inculcator = {
                        'name': inculcatorName, 
                        'kinds': [ kind ],
                        'pigment': iconName,
                        'jstest' : "parseInt(observation(n, 'Coins', t)) == " + iconName.split('-')[-1]
                        }
                inculcators.append(inculcator)
    protein.update_ingests(inculcators=inculcators)
    return
def ingest_boilerplate(protein, name):
    #protein.update_ingests(**{'display-text':'{ ' + name + ' }'})
    protein.update_ingests(**{'display-text':name})
    protein.update_ingests(name=name.replace(' ', '-').lower())

    #Make this customizable
    protein.update_ingests(icon='mutualVision/images/loanicon.png')

    #Make this customizable
    protein.update_ingests(type='network')


    ingest_default_shaders(protein)
    ingest_hover(protein)
    return
def ingest_pigments(protein, pigments):
    protein.update_ingests(pigments=pigments)
    return
def ingest_kinds(protein, kinds):
    protein.update_ingests(kinds=kinds)
    return