KeyShot Forum

Technical discussions => Extending KeyShot => Scripting => Topic started by: rvcanning on June 27, 2018, 08:37:31 AM

Title: Importing a Material File
Post by: rvcanning on June 27, 2018, 08:37:31 AM
I am trying to use Python to import a .mtl file.  I get a "Unsupported file format." error.  I can import it via Keyshot in the Library ->Material menu without issue.  I am using the lux.importFile command.  Do I need to do something else to read in the file?  Is there a way of doing a Material Refresh from a Python?
Title: Re: Importing a Material File
Post by: Morten Kristensen on August 27, 2018, 01:46:52 AM
Hi Robert,

It is not supported to import MTL or KMP files like that. If you want to access new textures in scripting then you can place them in KeyShot's known folder structures so it detects them at startup. Or you can import/open a CAD/KSP/BIP file. Material refresh is not possible via scripting at this time.

Thanks!