What is the proper way to duplicate nodes as instances/references.

   7548   8   2
User Avatar
Member
27 posts
Joined: Oct. 2015
Offline
I have a bunch of nodes which I want to duplicate, but I want to have them “linked” to the original nodes. So any changes made to the nodes will propogate accross all the copies of that node.
What is a good way to do this?
Edited by soma wheels - Sept. 2, 2018 17:07:52
User Avatar
Member
2038 posts
Joined: Sept. 2015
Offline
Selected Desired Nodes > Right Click on One of Them > Actions > Create Reference Copy
User Avatar
Member
27 posts
Joined: Oct. 2015
Offline
Thanks! perfect

Edit: Not quite perfect actually. When i reference copy a subnet, the contents of the subnet are not referenced, is there a way around that?
Edited by soma wheels - Sept. 2, 2018 20:14:14
User Avatar
Member
2038 posts
Joined: Sept. 2015
Offline
Sorry…don't think there is a simple way for that, other than writting out your own Python script.
User Avatar
Member
387 posts
Joined: Nov. 2008
Offline
If you have to instance the whole subnet it's better to make HDA out of that subnet.
User Avatar
Member
5 posts
Joined: March 2017
Offline
I meet exactly the same problem. I think there should be a method to achieve this, like ‘local function’ in programming which only be used in a very small context.
However, I'm quite new in Houdini. I'm not sure if it's correct to use a programming brain thinking network in Houdini.
User Avatar
Member
224 posts
Joined: June 2009
Offline
As pezetko said, HDA is the way to do this. HDA stands for Houdini Digital Asset.

You right click your subnet and select “Create Digital Asset”.

You instance your Digital Asset multiple times in your network.

Then if you need to edit it, you right click any of them and select “Allow editing of contents”, then edit it, and then right click again and “Save node type”.

All instances will then be updated. In all files that use this Digital Asset.
Patrick
User Avatar
Member
7747 posts
Joined: Sept. 2011
Offline
The invoke SOP is probably the most similar to the concept of a function in Houdini. You can define a compiled node network, and invoke it with different inputs elsewhere in the scene.

However, most of the time an HDA is the correct approach for what OP is after.
User Avatar
Member
5 posts
Joined: March 2017
Offline
Thnak you, friends~~

I just realized that the HDA can be embedded into a hip file… they do fit the concept of ‘local function’!
(I tried ‘invoke’ node while some nodes aren't supoort compiling)

thanks~
  • Quick Links