Triple G Posted July 20, 2007 Share Posted July 20, 2007 Hi guys...first post here. I've been going through the Will Cunningham book on the Magic of Houdini, and I've run into something that's puzzling me. In dealing with POPS, on page 158, he mentions in step 10 that "You could even use the npoints() expression so that N would automatically represent the number of points in the grid even if you went back later and changed its number of rows or columns". Strangely, this doesn't seem to work for me. If I input an integer in the field, it works as expected, but when I type in "npoints()" the node errors out with the little red arrow symbol. Any ideas what I might be doing wrong? Thanks! -Gregg Quote Link to comment Share on other sites More sharing options...
michael Posted July 20, 2007 Share Posted July 20, 2007 in the textpot: exhelp npoints returns: float npoints (string name) This function returns the number of points in the SOP. -1 is returned if the SOP cannot be cooked. you have to give the function the name of a sop like npoints("../thisSOP") oh and welcome to od[force] Quote Link to comment Share on other sites More sharing options...
Triple G Posted July 20, 2007 Author Share Posted July 20, 2007 Thanks arctor....works like a charm! (almost forgot the quotes around the SOP name) Slowly but surely, I will tame this program... Quote Link to comment Share on other sites More sharing options...
michael Posted July 20, 2007 Share Posted July 20, 2007 no problem the best idea when first learning to use functios is to use help/exhelp in the textport first...it really helps... 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.