HDA python help!

   993   3   1
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
Hi, I have this HDA (PT_Droplet) and what I want to happen is that whenever an instance of this node gets created I want it to also automatically create the attribpaint SOP and connect it into the first input as shown in image. How could I use python to accomplish this? Is there an on create node event or so and where in the 'Edit type operator properties' would I put the script?

Thanks in advance.

Attachments:
Screenshot 2021-07-17 184037.jpg (10.7 KB)

hou.f*ckatdskmaya().forever()
User Avatar
Staff
31 posts
Joined: June 2018
Offline
I don't have houdini in front of me, but I know that you can create an "on created" python script. I believe it's on the scripts tab. I think there's a menu at the bottom that will create the section for you.
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
lucap1
I don't have houdini in front of me, but I know that you can create an "on created" python script. I believe it's on the scripts tab. I think there's a menu at the bottom that will create the section for you.

Thanks @lucap1 Now I have an issue, I can't get the paint attrib node to connect to the first input! It throws an error. Any idea why (see image for code).

Attachments:
Screenshot 2021-07-17 230137.jpg (58.4 KB)

hou.f*ckatdskmaya().forever()
User Avatar
Member
355 posts
Joined: Nov. 2015
Offline
miccetro
lucap1
I don't have houdini in front of me, but I know that you can create an "on created" python script. I believe it's on the scripts tab. I think there's a menu at the bottom that will create the section for you.

Thanks @lucap1 Now I have an issue, I can't get the paint attrib node to connect to the first input! It throws an error. Any idea why (see image for code).
oh no worries, It's because the 'moveToGoodPosition' doesn't create a hou.Node but a vector object! My poor mistake lol.
hou.f*ckatdskmaya().forever()
  • Quick Links