Quick question...

   463   4   0
User Avatar
Member
80 posts
Joined: May 2015
Offline
How do i write the geometry file name of a sop? im using detail function in a wrangle and i want to get info from another sop not connected to the wrangle im work on. Is it possible?
User Avatar
Member
1886 posts
Joined: June 2008
Offline
Sure, connect the other sop to the second input of the wrangle, and you can fetch data from that input as well.
Using Houdini Indie

Windows 7 32GB AMD FX8370 @ 4.1Ghz
nVidia 1070GTX 8BG RAM. Driver: 397.31
User Avatar
Member
80 posts
Joined: May 2015
Offline
Enivob
Sure, connect the other sop to the second input of the wrangle, and you can fetch data from that input as well.

I dont want to connect the wrangle with any other sop.

<type> detail(<geometry>geometry, string attribute_name, int ignored=0)

Alternatively, the argument can be a string specifying a geometry file (for example, a .bgeo) to read from. When running inside Houdini, this can be an oppath/to/sop reference.

http://www.sidefx.com/docs/houdini/vex/functions/detail.html [www.sidefx.com]
Edited by Shadowjonny - June 12, 2019 08:42:37
User Avatar
Staff
2526 posts
Joined: July 2005
Offline
vex functions opfullpath()and relativepath() return paths to nodes.

http://www.sidefx.com/docs/houdini/vex/functions/opfullpath.html [www.sidefx.com]
http://www.sidefx.com/docs/houdini/vex/functions/relativepath.html [www.sidefx.com]

Here's one way to use opfullpath to return a string node name:
s@pathfull = opfullpath("../timeshift1");
s[]@pathsplit = split(s@pathfull, "/");
s@nodename = s[]@pathsplit[-1];
Just replace the s@pathfull and s@pathsplit to internal variables to avoid attribute bloat. Just exposed for clarity.


Now I have to ask, what are you doing?
It isn't that efficient to fetch a single node name for all the data/points you are ripping through.
If you have unique nodes to apply to different items you are processing, sure. But strings aren't the most efficient method through vex for lots of data processing.

It may be better to put a local spare parameter on the node and build out the string once as a set of parameters when the node cooks.
Python is very powerful at string manipulation while in vex it is somewhat limited…
There's at least one school like the old school!
User Avatar
Member
80 posts
Joined: May 2015
Offline
old_school
vex functions opfullpath()and relativepath() return paths to nodes.

http://www.sidefx.com/docs/houdini/vex/functions/opfullpath.html [www.sidefx.com]
http://www.sidefx.com/docs/houdini/vex/functions/relativepath.html [www.sidefx.com]

Here's one way to use opfullpath to return a string node name:
s@pathfull = opfullpath("../timeshift1");
s[]@pathsplit = split(s@pathfull, "/");
s@nodename = s[]@pathsplit[-1];
Just replace the s@pathfull and s@pathsplit to internal variables to avoid attribute bloat. Just exposed for clarity.


Now I have to ask, what are you doing?
It isn't that efficient to fetch a single node name for all the data/points you are ripping through.
If you have unique nodes to apply to different items you are processing, sure. But strings aren't the most efficient method through vex for lots of data processing.

It may be better to put a local spare parameter on the node and build out the string once as a set of parameters when the node cooks.
Python is very powerful at string manipulation while in vex it is somewhat limited…

Thank you for the reply. What im trying to do is get a point number from a another wrangle and store it onto another wrangle cause the ones being stored is connected to another wrangle that needs that information to move onto the next point.

Tried using the Forloop Sop but couldnt find a way to store a value into the metadata. And also when i added a value to a array inside the loop it didnt work. So i reworked it outside the Forloop sop and it worked now im at this step where i need the info of the second wrangle to do the loop again inside the first wrangle with the value of the second wrangle. Since i see ones u set a group and try to find it within the same wrangle it doesnt get anything.

Ill add the File.

Attachments:
LoopStorePoint.hipnc (249.3 KB)

  • Quick Links