python script "on created" HDA

   4847   2   0
User Avatar
Member
82 posts
Joined: Oct. 2007
Offline
Hello,
I would like to use something like :
hou.pwd().parm(“myParm”).set(666)
The doc says that the on created script is used just after the creation but it doesnt work for me ( 9.5 beta ).
Someone can confirm?
tky.
User Avatar
Member
1926 posts
Joined: Nov. 2006
Offline
hou.pwd() doesn't work as you would expect in scripts attached to digital assets. If you were to just go ‘print hou.pwd()’ it would print the current directory in your scene, probably ‘obj’. You should use the dictionary that is created for python event handlers, kwargs.
You can then go:
kwargs.parm(“myParm”).set(666)

For more info about kwargs, just ‘print kwargs’ in your script.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
82 posts
Joined: Oct. 2007
Offline
Tky Graham,
Actually its documented in the HOM doc…
  • Quick Links