Material exporter

Forum for OctaneRender Lua scripting examples, discussion and support.
Post Reply
J.C
Licensed Customer
Posts: 1843
Joined: Thu May 13, 2010 6:35 pm
Location: Wrocław

Hi,
I'm looking forward to create a way to share materials between different DCCs. The current solution using LocalDB is bit slow and clumsy.

is it possible to write a script that takes all or selected materials from a scene and exports it to json or xml file?
CPU – i9 13900KF, 128GB RAM, GPU – RTX 4090
System – Windows 11
My Behance portfolio, Blender plugin FB support group
User avatar
jobigoud
OctaneRender Team
Posts: 243
Joined: Sat Aug 15, 2015 1:28 pm

Yes it should be possible but do you have Lua on the import side as well?

Have the material already in a group / nodegraph, or create a new nodegraph and duplicate the selection inside it.
Then you can use `octane.nodegraph.exportToFile` (.orbx or .ocs) or `octane.nodegraph.exportToString` (raw xml string).

On the import side, `octane.nodegraph.importFromFile` or `octane.nodegraph.importFromString`.
J.C
Licensed Customer
Posts: 1843
Joined: Thu May 13, 2010 6:35 pm
Location: Wrocław

Thanks for the info.
CPU – i9 13900KF, 128GB RAM, GPU – RTX 4090
System – Windows 11
My Behance portfolio, Blender plugin FB support group
Post Reply

Return to “Lua Scripting”