Page 1 of 1

Material exporter

Posted: Wed Nov 20, 2024 10:01 am
by J.C
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?

Re: Material exporter

Posted: Wed Nov 20, 2024 1:03 pm
by jobigoud
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`.

Re: Material exporter

Posted: Thu Nov 21, 2024 10:00 am
by J.C
Thanks for the info.