Hi I have a python script to create hda
now my doubt is that.if the user clicks the shelf tool 2 or more than 2times.
I want the hda to be created twice or n times in the obj context
obj = hou.node('/obj')
creategeo=obj.createNode('geo','geo1')
geo=hou.node('/obj').children()
s=obj.collapseIntoSubnet(geo)
subnet=hou.node('/obj/subnet1')
myhda=subnet.createDigitalAsset(name='myHDA')
python shelf tool doubt
2519 6 0- helloworld
- Member
- 55 posts
- Joined: 10月 2011
- Offline
- tmdag
- Member
- 168 posts
- Joined:
- Offline
- helloworld
- Member
- 55 posts
- Joined: 10月 2011
- Offline
tmdaghi thank you for the reply.
I'm not sure if I understood You correctly but you should also properly provide new subnet name to make it work
for eg
subnet=hou.node('/obj/' + str(s))
for eg.
i want to behave it a point light shelf tool,when user ctrl clicks it twice i needed to place it everytime in the obj context.
Basically I tried to place several nodes in the same obj context.but for me its getting places inside the the hda.
I provided a new name for the subnet and appended str(s) as you said.
- tmdag
- Member
- 168 posts
- Joined:
- Offline
- helloworld
- Member
- 55 posts
- Joined: 10月 2011
- Offline
- tmdag
- Member
- 168 posts
- Joined:
- Offline
- helloworld
- Member
- 55 posts
- Joined: 10月 2011
- Offline
-
- Quick Links