Fixed the idiotic use of non-existent materials.
Reused python's internal bytes representation, avoiding a malloc and copy.