I got the point!
I had to pick point selection/edit from the left menu when using the Edit SOP.
This other thread helped me figuring this out:
https://www.sidefx.com/forum/topic/350/ [www.sidefx.com]
Found 4 posts.
Search results Show results as topic list.
Houdini Indie and Apprentice » How do i edit curve points ?
- antoniosouza3d
- 4 posts
- Offline
Houdini Indie and Apprentice » How do i edit curve points ?
- antoniosouza3d
- 4 posts
- Offline
I have a similar issue.
The problem is I want to edit my curve inside the SOP context.
My curve was imported into a SOP from an external source.
I thought I could achieve this using the Edit SOP, but I coundn't.
The Edit SOP shows the bezier curve CVs along the curve, but I neither can select nor transform them.
Curve SOP also doesn't work.
How do I edit a curve inside a SOP if I don't have access to it's creation nodes?
The problem is I want to edit my curve inside the SOP context.
My curve was imported into a SOP from an external source.
I thought I could achieve this using the Edit SOP, but I coundn't.
The Edit SOP shows the bezier curve CVs along the curve, but I neither can select nor transform them.
Curve SOP also doesn't work.
How do I edit a curve inside a SOP if I don't have access to it's creation nodes?
Edited by antoniosouza3d - 2019年2月17日 13:37:39
Houdini Indie and Apprentice » VEX: nested loops doesn't work as espected
- antoniosouza3d
- 4 posts
- Offline
Man, this is a superb solution! haha
I learned three things I wish never forget!
I badly forgot nearpoint()! :O
Thanks, Tomas!
I learned three things I wish never forget!
I badly forgot nearpoint()! :O
Thanks, Tomas!
Houdini Indie and Apprentice » VEX: nested loops doesn't work as espected
- antoniosouza3d
- 4 posts
- Offline
Hi!
I have a VEX program to connect those yellow points (grouped as “loosepts”) to its closest point in the mesh.
And it cannot be connected to another yellow point “loosepts”, nor to any of those points outside the red circle (“outerpts” point
group).
So, to prevent those situations, I added a simple if() statement inside the for() loop that searches for the closest point.
The problem is that this code never finds a closest point, and never changes the “closestpt” variable, so it never runs the connection algorythm.
What have I done wrong?
The question is also if VEX nested loops and if() statements run in a particular way I'm not aware of
I'm having problem with this kind of code since weeks ago and can't find help
I have a VEX program to connect those yellow points (grouped as “loosepts”) to its closest point in the mesh.
And it cannot be connected to another yellow point “loosepts”, nor to any of those points outside the red circle (“outerpts” point
group).
So, to prevent those situations, I added a simple if() statement inside the for() loop that searches for the closest point.
int pts = npoints(0); int closestpt = -1; float mindist = 0.0; for(int i = 0; i< pts; i++){//run over all pts int isouterpts = inpointgroup(0,"outerpts",i); int isloosepts = inpointgroup(0,"loosepts",i); //filter some points if(i == @ptnum || isouterpts==1 || isloosepts==1){ continue; } //vars vector cP = point(0,"P",i); float curdist = distance(@P,cP); if(i == 0){//assign mindist mindist = curdist; closestpt = i; } else if(curdist < mindist){ mindist = curdist; closestpt = i; } } printf("mindist: %f\nclosestpt: %d\n\n", mindist,closestpt); if(closestpt != -1){ //connect current point to closestpt int newprim = addprim(0,"polyline"); addvertex(0,newprim, @ptnum); addvertex(0,newprim, closestpt); }
The problem is that this code never finds a closest point, and never changes the “closestpt” variable, so it never runs the connection algorythm.
What have I done wrong?
The question is also if VEX nested loops and if() statements run in a particular way I'm not aware of
I'm having problem with this kind of code since weeks ago and can't find help
-
- Quick Links