Jump to content

Getting the last point for a Transform SOP doesn't work as it does


magneto

Recommended Posts

So I am watching the 3dbuzz videos and in one of the videos, they show how to transform the last point using the Transform SOP and writing this into the group field:

`$NPT-1`

but when I do it in H11, it says "Undefined variable (group)". Right now I created a group to do this, so it works but how are they able to do this in 9.5? Is something changed since then?

Also I set the Group Type to "Points" like in the video:

aqY5M.png

Thanks :)

Link to comment
Share on other sites

I pasted the same expression you posted into PivotY (py), and then looked up the current value and it was the correct number. Then wrote this into the group:

`chs("py")`

and it worked.

So this is a bug then?

In fact, writing it as:

`ch("py")`

automatically turns it into:

`chs("py")`

Thanks :)

Link to comment
Share on other sites

I get invalid group but as a warning and transforming doesn't do anything.

So not sure what's going on :)

Works for me.

Funny thing is that, even if i leave the back tick at the end, it evaluates as string.

Is it something expected ?

EDIT- Though as a good procedural hygiene i will never use something like that in group filed for any op.

In group sop i trust. :)

post-6162-132903746334_thumb.jpg

Edited by vectorblur
Link to comment
Share on other sites

Wow I am surprised, I tried `eval("$NPT-1")` but still same result. My build is in the 70s though, but axebeak said he is using 11.0, so not sure.

Also is using this technique not procedural? I thought it's just some expression :)

Indeed it is. :)

But the point i was trying to make was more of a standard practice used with the large scripts or tool built for others.

True it is just an expression and most of the sops which have group field will work with it.

Yes its handy too if you quickly want to do a test on specific selection.

For me, Its more of a organizing work flow, commenting script so its easy to read, debug and edit not only for me, but for others too.

And with group sop, one can rest assured that selection will be available further down the chain at any point.

In the end Houdini gives freedom so use it as you like. B)

Cheers,

Edited by vectorblur
  • Like 1
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...