def attach_material(self, name=DEFAULT_MATERIAL_NAME, effect=DEFAULT_EFFECT_NAME,
                        technique=None, parameters=None, meta=None, raw=None):
        if raw:
            if 'stages' in raw:
                num_stages = len(raw['stages'])
            else:
                num_stages = 0
            LOG.debug("materials:%s:elements:%i:stages:%i", name, len(raw.keys()), num_stages)
            self.asset['materials'][name] = raw
        else:
            LOG.debug("materials:%s:effect:%s", name, effect)
            material = { }
            if effect is not None:
                material['effect'] = effect
            if technique is not None:
                material['technique'] = technique
            if parameters is not None:
                material['parameters'] = parameters
            if meta is not None:
                material['meta'] = meta
            self.asset['materials'][name] = material
Get the photos of a user and display them
dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/tools/asset2json.py/JsonAsset.attach_material--crossover with--dataset/ETHPy150Open amarandon/smeuhsocial/apps/photos/views.py/user_photos