I'm in the process of writing an addon that generates buildings based on a group of assets such as bits of wall and roofing.
My current plan is to somehow dynamically save custom assets, including UV coordinate, textures, etc. to an object that I can create using python. (Much in the same way objects are typically created in python, only they would be defined by an object in the scene, rather than pre-defined by another piece of code)
For instance, when I want to create a Monkey with python, (and who wouldn't?) I can just call bpy.ops.mesh.primitive_monkey_add() and viola, I have a monkey. Is there a way to take my active object and dynamically create a function that is able to recreate it?
Feel free to ask further questions on my dilemma, as I feel I may not be explaining it very well!