Author Topic: Auto Apply Material Template with Import Plug-in - Creo  (Read 1163 times)

0 Members and 1 Guest are viewing this topic.

Offline RX7_Mark

  • Newbie
  • *
  • Posts: 15
Auto Apply Material Template with Import Plug-in - Creo
« 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.

Offline MWo

  • Hero Member
  • *****
  • Posts: 875
  • Senior Technical Consultant @ INNEO (Germany)
    • german KeyShot page from INNEO Solutions
Re: Auto Apply Material Template with Import Plug-in - Creo
« Reply #1 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

Offline RX7_Mark

  • Newbie
  • *
  • Posts: 15
Re: Auto Apply Material Template with Import Plug-in - Creo
« Reply #2 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.


Offline MWo

  • Hero Member
  • *****
  • Posts: 875
  • Senior Technical Consultant @ INNEO (Germany)
    • german KeyShot page from INNEO Solutions
Re: Auto Apply Material Template with Import Plug-in - Creo
« Reply #3 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

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