Auto Apply Material Template with Import Plug-in - Creo

Started by RX7_Mark, February 08, 2019, 12:27:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RX7_Mark

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.

INNEO_MWo

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

RX7_Mark

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.


INNEO_MWo

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

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