Matthew here with yet another question :p
Anyway...I found an answer by @zeffi on how to append an object using python, that's all goods, but the trouble is, every time I append that object, it imports the textures in, every time, which means that after about 5 appends, I have 5 copies of every single texture, which slows blender down dramatically, and also increases my file size from 150mb to something like 1gb...sooo, here is what I was thinking, in steps:
Append the object, then check if all the textures imported in with the last 'append' are there already, and if they are, then delete them, otherwise leave them there. It sounds pretty simple but I just don't know how to go about it. Here is the part of code that should concern so far:
class AddMacBook(bpy.types.Operator):
bl_label = "Add MacBook"
bl_idname = "macbook_controller.add_macbook"
def execute(self, context):
item = context.scene.ignit_panel.add()
macbook_path = '/Users/MacBook/Documents/Blender/Blends/MacBook/Macbook.blend'
macbook = 'Macbook'
screen = 'Screen'
Directory = macbook_path + "/Object/"
m_path = Directory + macbook
s_path = Directory + screen
wm = bpy.ops.wm
wm.append(filepath=m_path, filename=macbook, directory=Directory)
wm.append(filepath=s_path, filename=screen, directory=Directory)