danw Posted March 9, 2014 Share Posted March 9, 2014 I've got a subnet, which I place a number of geometry objects inside. I'm then using another /obj level geometry object with an Object Merge node, which is set to merge /obj/subnet1/* This works perfectly, any objects inside the subnet are automatically merged together into that main object. The problem is, if I add or remove an object from subnet1, it doesn't force an update on the Object Merge node. I have to manually go and poke at some attributes to force a refresh before it will pick up the new objects. I realise using a wildcard isn't likely to create a dependency that actually detects the addition or removal of entire objects. Is there any way I can force the issue though? Can anyone suggest a way to force a specific node to refresh when a subnet contents change? Or a more elegant way to automatically merge the contents of a subnet of course :-) Quote Link to comment Share on other sites More sharing options...
xray Posted July 8, 2014 Share Posted July 8, 2014 Convert your subnet to an HDA. Under the scripts tab of the HDA, you can add an "on updated" script which will run whenever you update your hda. In the "on updated" script, you can add hscript or python code to force a cook of your target SOP. Quote Link to comment Share on other sites More sharing options...
ChristopherC Posted June 17, 2015 Share Posted June 17, 2015 I've got the same problem when using the `opnchildren` function to retrieve the number of objects in a network. The parameter holding the `opnchildren` expression gets updated as soon I add/remove an object from the network but anything else depending on that parameter doesn't get updated unless I toggle the bypass flag of the problematic nodes. I've atached a simple example scene to illustrate the issue. I would like to avoid having to create a digital asset if possible—is there any other solution? cook_issue.hipnc Quote Link to comment Share on other sites More sharing options...
pbarua Posted June 22, 2015 Share Posted June 22, 2015 Add button to your subnet > change Callback Script language to Python > then put following code in there: for c in hou.pwd().children(): c.cook(force=True, frame_range=(hou.hscriptExpression('$RFSTART'), hou.hscriptExpression('$RFSTART + 1'))) Quote Link to comment Share on other sites More sharing options...
pbarua Posted June 22, 2015 Share Posted June 22, 2015 This will cook 1 frame of children of subnet. So any time you change something, press this button. Quote Link to comment Share on other sites More sharing options...
ChristopherC Posted June 23, 2015 Share Posted June 23, 2015 Thanks pbarua! I ended up using a similar approach but I somehow wished that there would be a way to do this without any user input. I would have expected the nodes to be recooked when the parameters they depend on are being changed but maybe it is a deeper issue than what it looks like. Quote Link to comment Share on other sites More sharing options...
ftaswin Posted June 23, 2015 Share Posted June 23, 2015 Why dont you merge all objects in subnet with merge node (lets call it OUT_GEOS) so your objectmerge path pointed to OUT_GEOS Everytime you add a new object you hook it into OUT_GEOS too? Quote Link to comment Share on other sites More sharing options...
pbarua Posted June 23, 2015 Share Posted June 23, 2015 (edited) Why dont you merge all objects in subnet with merge node (lets call it OUT_GEOS) so your objectmerge path pointed to OUT_GEOS Everytime you add a new object you hook it into OUT_GEOS too? You can't merge objects unless you write your own merge at object level. If you have more than 100 objects inside subnet then it's really painful to fetch them individually using objectmerge sop. So I think using * is better option. Edited June 23, 2015 by pbarua Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.