OTL initialization script problem

   2580   3   0
User Avatar
Member
678 posts
Joined: July 2005
Offline
If I create initialization script for a nullSOP, called “nul.py”, it's get called properly.
If I create initialization script for a explodeviewSOP, called “explodeview.py”, it's ignored.
NullSOP is a pure node, while explodevieSOP is an OTL.

If I create initialization script for my custom OTL, it's also ignored.

So I suppose that means that we need to place initialization script for OTLs in different place than in “scripts/sop” folder to make it work for OTLs too, right?
User Avatar
Member
229 posts
Joined: May 2006
Offline
you can add a OnCreated.py script into the /scripts folder and do some checking in there, if the created node kwargs is of type explodedView and run your code.


Seb
User Avatar
Member
678 posts
Joined: July 2005
Offline
Yes, I know about event scripts. But there must be a reason why initialization script doesn't work with OTLs and I would like to know it.
User Avatar
Staff
4441 posts
Joined: July 2005
Offline
It's because that script is already defined inside the OTL. If you use “hotl -x” to expand your OTL, each asset will contain a file called “CreateScript”. When looking for the initialization script, Houdini will find this CreateScript first, and therefore not even look in the scripts/sop directory.

Mark
  • Quick Links