I am trying to get a vert by position is there a way to do this in maya?

15 views
Skip to first unread message

I73

unread,
Sep 22, 2016, 5:00:38 PM9/22/16
to Python Programming for Autodesk Maya
Here is my problem, I have a list of verts and they are very close to another objects verts, I would like to be able to use (object A) list of verts to grab (object B) list of verts I don't want to iterate through (object B) verts because I want the code to act on any verts regardless of what object they are attached to. I don't want to have to select 2 objects for it to work, just the edge loop and see what's verts are closest. 

Is it possible to do this without looping through ever single vert in the scene and comparing the world position?

Thanks! 

yury nedelin

unread,
Sep 22, 2016, 5:31:12 PM9/22/16
to python_in...@googlegroups.com

Can you use objects names ?

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/0a2a338b-bfff-48c8-bd08-ad285d27c827%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I73

unread,
Sep 22, 2016, 5:44:37 PM9/22/16
to Python Programming for Autodesk Maya
No, the reason being is I don't want to have a reference to anything. I want to just be able to select the verts and check if anything is close. 
I am currently trying with a 'Point Hash' but if you guys can think of anything else I am all ears. 

yury nedelin

unread,
Sep 22, 2016, 10:21:45 PM9/22/16
to python_in...@googlegroups.com

As far as I know only components know where they are in world space. I doubt there is anything like a table you can just look up quickly. You might come up with some algorithms that will reduce number of verts needed for test by maybe eliminating some objects first based on the distance. I think if you have to deal with thousands of verts in runtime you might have to use at least python API to get reasonable performance, if not c++.
What exactly are you trying to do ? Is that some sort of deformer or mesh retopology tool?

On Sep 22, 2016 4:44 PM, "I73" <wesley....@iugome.com> wrote:
No, the reason being is I don't want to have a reference to anything. I want to just be able to select the verts and check if anything is close. 
I am currently trying with a 'Point Hash' but if you guys can think of anything else I am all ears. 


On Thursday, September 22, 2016 at 2:31:12 PM UTC-7, ynedelin wrote:

Can you use objects names ?

On Sep 22, 2016 4:00 PM, "I73" <wesley....@iugome.com> wrote:
Here is my problem, I have a list of verts and they are very close to another objects verts, I would like to be able to use (object A) list of verts to grab (object B) list of verts I don't want to iterate through (object B) verts because I want the code to act on any verts regardless of what object they are attached to. I don't want to have to select 2 objects for it to work, just the edge loop and see what's verts are closest. 

Is it possible to do this without looping through ever single vert in the scene and comparing the world position?

Thanks! 

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages