SUBSCRIBE
The SideFX mailing list is a great place to make contact with Houdini users. To subscribe, send us an email with no subject and the word subscribe in the body.

3:51 p.m.
I have a vop sop and i am looking to import a list of int point
attributes such as...
closest_pt_curve_

3:58 p.m.
New subject: How would you import multiple attributes into vex... arrays?
VEX is not real happy with int attribs.
convert them to floats, and then (in VEX) you just
#pragma hint hidden closest_pt_curve_
sop
foo(export float closest_pt_curve_)
{
// do stuff here...
}
dunno anything about VOPs, but I guess you could make an inline this way.
Quoting "Robert Kelly" <isstuff at gmail.com>:
I have a vop sop and i am looking to import a list of int point
attributes such as...
closest_pt_curve_
_______________________________________________
Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com
https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
_______________________________________________________
Perfection is achieved when nothing else can be removed
-Yvon Chouinard
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

4:29 p.m.
ok my email got cut off making a more complicated question look simple. This
has happened before. this email should have > 20 lines in it
I have a vop sop and i am looking to import a list of int point
attributes such as...
closest_pt_curve_0
closest_pt_curve_1
closest_pt_curve_2
closest_pt_curve_3
closest_pt_curve_4
closest_pt_curve_?
each attribute is needed to be tested against in a loop so if there are 18
attributes the first loop will need closest_pt_curve_0 and the last
closest_pt_curve_17. the documentation is a bit lite on for vex arrays. I
would probably would need to concatenate "closest_pt_curve_" with a number
too which i am not confident will work ether?
i can turn what ever vex code into a VOP node later but for now i need some
documentation or even someone to propose an answer my guess in pseudo code
(python meets vex)
def importAttribNum( stem="closest_pt_curve_", attribNum=0):
int data = 0
import(stem + attribNum , data, 0)
return data
any ideas
Robert Kelly
2010/1/22 Robert Kelly <isstuff at gmail.com>:
I have a vop sop and i am looking to import a list of int point
attributes such as...
closest_pt_curve_

12:43 p.m.
If the list of points is presented as geometry attributes, then you
simply need to have parameters with matching names, and they'll
automatically be set to the geometry attribute value. Unless you use
arrays, that means 18 extra parameters.
Another approach, now that I think about it (I don't have Houdini in
front of me), is to simply use the import() function just get point/
attribute values.
-- Antoine
On Jan 22, 2010, at 1:29 PM, Robert Kelly wrote:
ok my email got cut off making a more complicated question look
simple. This
has happened before. this email should have > 20 lines in it
I have a vop sop and i am looking to import a list of int point
attributes such as...
closest_pt_curve_0
closest_pt_curve_1
closest_pt_curve_2
closest_pt_curve_3
closest_pt_curve_4
closest_pt_curve_?
each attribute is needed to be tested against in a loop so if there
are 18
attributes the first loop will need closest_pt_curve_0 and the last
closest_pt_curve_17. the documentation is a bit lite on for vex
arrays. I
would probably would need to concatenate "closest_pt_curve_" with a
number
too which i am not confident will work ether?
i can turn what ever vex code into a VOP node later but for now i
need some
documentation or even someone to propose an answer my guess in
pseudo code
(python meets vex)
def importAttribNum( stem="closest_pt_curve_", attribNum=0):
int data = 0
import(stem + attribNum , data, 0)
return data
any ideas
Robert Kelly
2010/1/22 Robert Kelly <isstuff at gmail.com>:
> I have a vop sop and i am looking to import a list of int point
> attributes such as...
>
> closest_pt_curve_
>
_______________________________________________
Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com
https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list

7:14 p.m.
In a VOP situation where it was desirable to loop every point against
some arbitrary array of N int attrs (an array), you could create a
second geometry detail in a second SOP that had N points - each of
which had the int attr value. At that point you can create a VOP with
two inputs and loop the points in the first input against the points
in the second input. Use the point count VOP to count the size of the
array coming into the second input, and use that value as the end
input on a for VOP. insode the for VOP wire i into the ptnum input to
get each seperate attr in your array.
Hope that's enough to get you started...
2010/1/22 Robert Kelly <isstuff at gmail.com>:
ok my email got cut off making a more complicated question look
simple. This
has happened before. this email should have > 20 lines in it
I have a vop sop and i am looking to import a list of int point
attributes such as...
closest_pt_curve_0
closest_pt_curve_1
closest_pt_curve_2
closest_pt_curve_3
closest_pt_curve_4
closest_pt_curve_?
each attribute is needed to be tested against in a loop so if there are 18
attributes the first loop will need closest_pt_curve_0 and the last
closest_pt_curve_17. the documentation is a bit lite on for vex arrays. I
would probably would need to concatenate "closest_pt_curve_" with a number
too which i am not confident will work ether?
i can turn what ever vex code into a VOP node later but for now i need some
documentation or even someone to propose an answer my guess in pseudo code
(python meets vex)
def importAttribNum( stem="closest_pt_curve_", ?attribNum=0):
?int data = 0
?import(stem + attribNum , data, 0)
?return data
any ideas
Robert Kelly
2010/1/22 Robert Kelly <isstuff at gmail.com>:
> I have a vop sop and i am looking to import a list of int point
> attributes such as...
>
> closest_pt_curve_
>
_______________________________________________
Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com
https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
--
=======================================
Andrew D Lyons | Digital Artist | http://www.tstex.com
=======================================

11:48 p.m.
http://forums.odforce.net/index.php?/topic/10547-how-would-you-import-mul...
is what i worked out on od[force]
I have stuck with a simple vop that imports the a string attribute with the
inputted int after it. i found that the import function seemed to not update
if its string changed from one point to the next.
i have a shite load of hidden parameters _attrib_1 attrib_2 etc and the
parameters reference one string with the expression `ch("attrib_name")`1
and `ch("attrib_name")`2 etc
the inside of my vop is
if ($attrib_num == 0) $success = import($_attrib_0, $adata,
$input_index, $ptnum);
else if ($attrib_num == 1) $success = import($_attrib_1, $adata,
$input_index, $ptnum);
else if ($attrib_num == 2) $success = import($_attrib_2, $adata,
$input_index, $ptnum);
else if ($attrib_num == 3) $success = import($_attrib_3, $adata,
$input_index, $ptnum);
else if ($attrib_num == 4) $success = import($_attrib_4, $adata,
$input_index, $ptnum);
........
Mario gave some suggestions that i am yet to test accros more than one
point.
I may revamp this in future but for now i must keep chipping away on the
rest of the task
thanks
2010/1/23 Andrew D Lyons <tstexture at gmail.com>
In a VOP situation where it was desirable to loop every point
against
some arbitrary array of N int attrs (an array), you could create a
second geometry detail in a second SOP that had N points - each of
which had the int attr value. At that point you can create a VOP with
two inputs and loop the points in the first input against the points
in the second input. Use the point count VOP to count the size of the
array coming into the second input, and use that value as the end
input on a for VOP. insode the for VOP wire i into the ptnum input to
get each seperate attr in your array.
Hope that's enough to get you started...
2010/1/22 Robert Kelly <isstuff at gmail.com>:
> ok my email got cut off making a more complicated question look simple.
This
> has happened before. this email should have > 20 lines in it
>
>
> I have a vop sop and i am looking to import a list of int point
> attributes such as...
>
> closest_pt_curve_0
> closest_pt_curve_1
> closest_pt_curve_2
> closest_pt_curve_3
> closest_pt_curve_4
> closest_pt_curve_?
>
> each attribute is needed to be tested against in a loop so if there are
18
> attributes the first loop will need closest_pt_curve_0 and the last
> closest_pt_curve_17. the documentation is a bit lite on for vex arrays. I
> would probably would need to concatenate "closest_pt_curve_" with a
number
> too which i am not confident will work ether?
>
> i can turn what ever vex code into a VOP node later but for now i need
some
> documentation or even someone to propose an answer my guess in pseudo
code
> (python meets vex)
>
> def importAttribNum( stem="closest_pt_curve_", attribNum=0):
> int data = 0
> import(stem + attribNum , data, 0)
> return data
>
> any ideas
>
> Robert Kelly
>
> 2010/1/22 Robert Kelly <isstuff at gmail.com>:
>> I have a vop sop and i am looking to import a list of int point
>> attributes such as...
>>
>> closest_pt_curve_
>>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>
--
=======================================
Andrew D Lyons | Digital Artist | http://www.tstex.com
=======================================
_______________________________________________
Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com
https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list