@opinput1_P access to individual componenets

   17221   28   2
User Avatar
Member
85 posts
Joined: Aug. 2010
Offline
ah yes thanks!

apologies i missed that part of the snippet page
Sam Swift-Glasman
Art Director
Five AI
User Avatar
Member
4515 posts
Joined: Feb. 2012
Offline
getattribute VEX function also doesn't allow integers for input parameter but rather string only which is also pretty limiting, given it's a useful function.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
keyframe
@y = v@opinput1_P.y works.
Hi
If i enter this in an Attribute Wrangle it doesn't produce any errors but doesn't return any values other than 0.0 either. Regardless of input geo.

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Staff
6205 posts
Joined: July 2005
Offline
getattribute() is supposed to be replaced by getattrib(). Is there some what in which getattrib() is not working for you? getattrib() is new in 15.0 specifically to hopefully end the reign of getattribute().

I just tried
@y = v@opinput1_P.y;
and it works in 15.0.346 with a default file sop. Do you have the second input wired on the attribute wrangle?
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Tried with a null connected to input 2 and then it works.
Is that the expected behaviour?

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Staff
6205 posts
Joined: July 2005
Offline
@opinput1_P, as mentioned upthread, is meant to read from the second input. So, yes, it is expected behaviour.
User Avatar
Member
4515 posts
Joined: Feb. 2012
Offline
jlait
getattribute() is supposed to be replaced by getattrib(). Is there some what in which getattrib() is not working for you? getattrib() is new in 15.0 specifically to hopefully end the reign of getattribute().

Thanks Jeff, getattrib seems to do what I need exactly. I am wondering if it can be used with setattrib to modify, float, int attributes whether it's a single value, vector, or an array of any size?

I just tried reading them using getattrib and it seems to return the values correctly so I assume it should work. Just wanted to hear your take on it.

I will update my tools in this case where some of them are still stuck in PointWrangle because of getattribute/setattribute.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
jlait
@opinput1_P, as mentioned upthread, is meant to read from the second input. So, yes, it is expected behaviour.
Ups, didn't see that
It continued to work for me on input 1 even after i had disconnected everything from input 2

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Staff
6205 posts
Joined: July 2005
Offline
pusat
Thanks Jeff, getattrib seems to do what I need exactly. I am wondering if it can be used with setattrib to modify, float, int attributes whether it's a single value, vector, or an array of any size?

I just tried reading them using getattrib and it seems to return the values correctly so I assume it should work. Just wanted to hear your take on it.

I will update my tools in this case where some of them are still stuck in PointWrangle because of getattribute/setattribute.

The intent is very much to allow you to finally move out of the old SOP context into all CVEX. So please let us know if there is still some behaviour blocking it….
  • Quick Links