KeyShot Forum

Technical discussions => Materials => Topic started by: RX7_Mark on February 08, 2019, 12:27:38 PM

Title: Auto Apply Material Template with Import Plug-in - Creo
Post by: RX7_Mark on February 08, 2019, 12:27:38 PM
Hi everyone,

I am trying to auto apply a material template I already have defined.

When I import a model from Creo4 with the KS plugin, it pulls the file over to KS, and I can go to Window ->Material templates -> select my template-> apply to scene... How can I set it up to where I don't have to do that?

Ideally it comes from Creo4 and automatically applies the template to save me a few clicks. Is this possible to setup? I can't find any "import" rules in Preferences.
Title: Re: Auto Apply Material Template with Import Plug-in - Creo
Post by: INNEO_MWo on February 09, 2019, 01:27:38 AM
A script would do this.
And I am sure that an example is already available in the scripting section of this forum.
The script would open the bip and apply the template.

Hope this starts the impulse for the right solution.


Cheers
Marco
Title: Re: Auto Apply Material Template with Import Plug-in - Creo
Post by: RX7_Mark on February 10, 2019, 09:07:00 PM
Thanks for the reply MWo.

I have been playing around with scripts, but I don't see it as a solution unless I am missing something. My current understanding of using scripts would only add more steps and not automate this.

My workflow is almost always:

Design part in Creo, live link direct import from Creo to KS using plug-in, manually apply material template, tweak render settings, create my renders, then save a .bip if I ever need to create new renders...

So what I am looking for is when the files are brought over via the plug-in, it automatically applies a material template.

Title: Re: Auto Apply Material Template with Import Plug-in - Creo
Post by: INNEO_MWo on February 11, 2019, 12:09:09 AM
Hello.

There are several cool scripts out there, where you can automate these workflows. I am no scripting expert, but the attached script should work in the right direction. Perhaps the code needs an update, so the render doesn't start but keeps the scene.

In the blog section you'll find a very cool breakdown for scripting with an example scene - made from Dries Vervoort and Will Gibbons (if I don't miss something).
https://blog.keyshot.com/keyshot-scripting-tutorial-automate-your-rendering (https://blog.keyshot.com/keyshot-scripting-tutorial-automate-your-rendering)

And I guess that in the scripting section of this forum, you'll find a helping hand!


Hope that helps to find the right track.

Cheers
Marco