Getting HDA object or its path from within OnCreate Python script

   4632   3   1
User Avatar
Member
654 posts
Joined: Aug. 2014
Offline
Hi guys.
How can I get the HDA object (or a path to it) from within the OnCreate python script? I need to change some parameters in the HDA (wireframe color, to be specific - for some reason I cannot set its defaults through Type Properties) right after my HDA is created in the network. I could swear I've done it before, but now I cannot remember how to do it, nor find any info about it.
Edited by ajz3d - June 19, 2016 19:21:34
User Avatar
Member
654 posts
Joined: Aug. 2014
Offline
I think I got it:
node = kwargs
node['node'].path()
Is there a more elegant or simpler way of doing it?
Edited by ajz3d - June 19, 2016 19:35:22
User Avatar
Member
1926 posts
Joined: Nov. 2006
Offline
Nope, getting the node instance from the kwargs dict is the right way to go about it!
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
654 posts
Joined: Aug. 2014
Offline
Cool. Thanks, Graham.
  • Quick Links