lisux Posted January 24, 2007 Share Posted January 24, 2007 Hi everybody. I have created and HDA and put it into an OTL, but this time this HDA have something special I use some embeeded scripts (into the HDA) that modifies connections and some flags of nodes contained into the HDA itself. So when the user use the HDA he/she is modifying it's internals connections and flags from the ui. My problem is that to be abe to do this I have to save the HDA unlocked, otherwise is impossible to change the internal connections from the HDA ui. This is a potential problem and is a mess because open HDA (unlocked) don't update by default, if I change the original HDA and save into the OTL the existing ones don't refresh. So is there any way to save an HDA locked and at the same some scripts from the HDA can change the internals of the HDA? Thanks Quote Link to comment Share on other sites More sharing options...
michael Posted January 24, 2007 Share Posted January 24, 2007 yes and no you'll have to use switches and other creative ways to make these changes... any specific issues just let us know...we shoudl be able to figure it out Quote Link to comment Share on other sites More sharing options...
SpencerL Posted January 24, 2007 Share Posted January 24, 2007 yeah, I agree switches, spare channels and null nodes are the way to go and use those to drive your scripts. Basically anything that has a keyable parameter works best. Quote Link to comment Share on other sites More sharing options...
michael Posted January 24, 2007 Share Posted January 24, 2007 I'd stay far away from spare channels in HDAs you can use invisible parameters, nulls etc instead Quote Link to comment Share on other sites More sharing options...
SpencerL Posted January 24, 2007 Share Posted January 24, 2007 I'd stay far away from spare channels in HDAsyou can use invisible parameters, nulls etc instead What is wrong with Spare Channels? Quote Link to comment Share on other sites More sharing options...
michael Posted January 24, 2007 Share Posted January 24, 2007 well..nothing really...I just don't like them...they feel like a hack... if you're building an HDA - a tool - it should be designed and built properly, as few hacks as possible, and since HDAs have the ability to hold parameters that can do the same things as a spare channel - with added flexibilty, I think it's best to stick with that... just a philisophical difference I guess...but that said, in the time I've used Houdini in production I've never used spare channels...as far as I can remember anyway.... Quote Link to comment Share on other sites More sharing options...
SpencerL Posted January 24, 2007 Share Posted January 24, 2007 I see and that makes sense. When I use spare channels, I usually put them all in a single Null SOP and channel reference parameters somewhere deep inside the HDA to those spare channels. That way if I need to change something, I can just go to that Null SOP and change the Spare Channel instead of remembering where the parameter exists. Its more of an organizational thing for me. But with that being said, does channel referencing take more processing time to compute? Quote Link to comment Share on other sites More sharing options...
rdg Posted January 24, 2007 Share Posted January 24, 2007 That way if I need to change something, I can just go to that Null SOP and change the Spare Channel instead of remembering where the parameter exists. Are spare channels the same thing as spare parameters? I cannot change spare parameters And my houdini crashes if i delete one of them to make a new one. (But this can be caused be the way I use them in a addSOP ...) I will try to see what you mean with this: invisible parameters, nulls etc instead Georg Quote Link to comment Share on other sites More sharing options...
edward Posted January 25, 2007 Share Posted January 25, 2007 This is a potential problem and is a mess because open HDA (unlocked) don't update by default, if I change the original HDA and save into the OTL the existing ones don't refresh. Even if there was a way, how do you expect it to refresh? You've changed connections. How do you determine which connections to keep? I think that it's easy to think of what you want in specific cases, but extremely hard to do in general. Quote Link to comment Share on other sites More sharing options...
lisux Posted January 25, 2007 Author Share Posted January 25, 2007 Thanks for the replies. The problem is thenext I ma using a couple os blendShapes ans sequenceBlends whose parameters are controlled by en expression that use opninputs("."). I connects several File SOP to the blends, and this blends works in function of the operators connected to every of them. So, if the user add a geo file from the HDA ui it's File OP is connected to the blend. I can't have all the files connected or I am going to have errors. I have used the switch solution in other parts of the tool but when you have to control the connection of 50 File SOP to different blend operators then scripting is more easy but it needs to change connections and here is the problems. I think that using spare parameters or switch operators is not practical in this case. This is the onternal look of the HDA with some connections. Only File SOP with a valid file path are connected to their blend, otherwise it is manteined unconnected. Hope this clearify something. Quote Link to comment Share on other sites More sharing options...
B.Walters Posted January 25, 2007 Share Posted January 25, 2007 Aren't there two commands, one to unlock an HDA, and another to relock it (w/o saving)? So you could unlock your HDA, rewire the internals / add your File SOP, etc - then lock it? Also, would it be such a bad thing if your HDA remained unlocked (i.e. are you planning on distributing this to a bunch of artists, or is it for personal use)? Quote Link to comment Share on other sites More sharing options...
lisux Posted January 25, 2007 Author Share Posted January 25, 2007 (edited) Aren't there two commands, one to unlock an HDA, and another to relock it (w/o saving)?So you could unlock your HDA, rewire the internals / add your File SOP, etc - then lock it? Also, would it be such a bad thing if your HDA remained unlocked (i.e. are you planning on distributing this to a bunch of artists, or is it for personal use)? Yes? what are these commands? I have dive in the help and I haven't found them. And the HDA is for a personal excersise, ideally it should be closed as in a production environment. Edited January 25, 2007 by lisux Quote Link to comment Share on other sites More sharing options...
michael Posted January 25, 2007 Share Posted January 25, 2007 otsync and otunsync but these WILL NOT do what you're after an 'unlocked' HDA can be edited - BUT unless you save those changes to the definition (overriting the currend definition) simply using otsync will lock the HDA to the old definition your screen grab helps but I think there may be a better way to do what you're after or wire everything to gether and use lookup tables to do your switching...but that can get complicated... more info would help Quote Link to comment Share on other sites More sharing options...
fxrod Posted January 25, 2007 Share Posted January 25, 2007 Yes? what are these commands? I have dive in the help and I haven't found them.And the HDA is for a personal excersise, ideally it should be closed as in a production environment. The process actually involves unsyncing, saving the otl, then syncing again using the otsync command. If you simply unsync , make changes, then resync, you will have lost your changes. So, in order to do that. otsync -u /obj/myOtl Make Changes to network otwrite obj/myOtl myCustomLibrary.otl otsync /obj/myOtl -Francisco Rodriguez Quote Link to comment Share on other sites More sharing options...
lisux Posted January 26, 2007 Author Share Posted January 26, 2007 The process actually involves unsyncing, saving the otl, then syncing again using the otsync command. If you simply unsync , make changes, then resync, you will have lost your changes. So, in order to do that. otsync -u /obj/myOtl Make Changes to network otwrite obj/myOtl myCustomLibrary.otl otsync /obj/myOtl -Francisco Rodriguez Thanks for the replies. Hey francisco great to hear about you again! Well the otsync/unsync I think that is not the way to go because it saves the operator in an inconsistent state, I mean in the current state for this shot, but waht happens if then anybody loads the HDA, he/she is going to get "your HDA" not the default state of the HDA. Arctor, what do you refer about lookup table, at the end I need to enable/disable connections, otherwise blendShape SOP and sequenceBlend SOP, the goal of the connections, fails. If a empty File SOP is connected to a blend you get an error, the only way is to disconnect and connect only when the user selects a file. This is the reason because in the HDA I have a callback script called in every file I have promoted, when the use selects a file the internal File SOP is connected to the blend, if the user modifies the file and set it to blank then is disconnected. Quote Link to comment Share on other sites More sharing options...
edward Posted January 26, 2007 Share Posted January 26, 2007 What about adding a Switch SOP and Null SOP combo for each File SOP? In the expression of the Switch SOP, do something like: strlen(findfiles(chs("../filename"), " ")) == 0 EDIT: You could create your own special FileIgnoreError SOP HDA for this as well. Quote Link to comment Share on other sites More sharing options...
lisux Posted January 26, 2007 Author Share Posted January 26, 2007 What about adding a Switch SOP and Null SOP combo for each File SOP? In the expression of the Switch SOP, do something like: strlen(findfiles(chs("../filename"), " ")) == 0 EDIT: You could create your own special FileIgnoreError SOP HDA for this as well. Great edward! this seems a perfect solution to avoise the blens error when the file is empty. Now the only problem is that it makes the seqblend expression a little more complex because I need to test first what connections are using the file and what are using the null and the instead of usinf opninputs() use the results of the previous test to use the real connections only. But the trick make sense and seems a prefect solution. Thanks! 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.