Is there way to access animation-nodes attribute in object-material with OSL script?
I don't think Blender allows such use of properties, see Add custom object properties as usable attributes. For alternative methods. See the Coloring Objects section of this answer.