# Export material from Cycles for Cycles?

I saw this question and learned it's very tricky to export material from Cycles for other applications' use. So let me clarify: I only work with Blender.

Previously while I was working with BI, I can export a plane as a .obj file specifying the geometry and an accompanying .mtl specifying the material, such as specular and diffuse colors, etc. If I import this .obj file back to BI, I get every setting back.

Now I switch to Cycles. I create a glossy material for my cube and export it as usual. Now if I re-import this .obj file back to Cycles, my material settings are all gone.

Before exporting

After re-importing

What is the proper way of exporting a Cycles material?

P.S.: It would be wonderful if the answer could be given from the Python API perspective. :-)

• If you only work with blender, why not simply save as blend file? – lbalazscs Dec 27 '16 at 2:05
• I don't want other things in the blend file (such as lighting, rendering settings, etc.) to carry over. Basically, I only want use the final blend file to collect all the objects and their material. Maybe even in this case, saving as blend file is still the best solution? Could you elaborate? Should I just build the objects in a newly opened blend file, just save it, and then append this blend file to the final blend file? Thanks! – Sibbs Gambling Dec 27 '16 at 2:09
• If you export to other formats (like .obj and mtl) you need to bake your cycles materials/textures. Note that by doing so when you re-import them into cycles they will no longer retain the original shaders that you had created. – cegaton Dec 27 '16 at 3:20