Jump to content

"magic Of Houdini" Question


Recommended Posts

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

Link to comment
Share on other sites

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] :)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...