CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 09-17-2013, 04:35 PM   #1
Lord of the posts
mlager8's Avatar
Matthew Lager
3D artist
Oceanside, USA
Join Date: Nov 2008
Posts: 875
snap object to every vertex?

Is there a way to snap an object to every vertex of a model? Basically I need to snap a smoothed cube to every vertex of a ribbon to give it a beaded grip look. I have absolutely no mel experience whatsoever but was hoping someone here could help me out a bit

Old 09-17-2013, 06:27 PM   #2
Argiri's Avatar
Anargyros Kotsaris
Join Date: May 2013
Posts: 68
If understood correctly this should help out. It's Python but it should get the job done. Just select the object you want snapped to the verts, then select the target object, then run the script.

from pymel.core import * obj, target = selected() for v in target.vtx: dupObj = duplicate(obj)[0] dupObj.t.set(pointPosition(v))

Let me know if this worked for you!
Old 09-17-2013, 06:52 PM   #3
Lord of the posts
mlager8's Avatar
Matthew Lager
3D artist
Oceanside, USA
Join Date: Nov 2008
Posts: 875
worked like a charm! Thanks a ton, saved me a lot of time today!

Old 10-09-2013, 01:24 AM   #4
strarup's Avatar
Alex V. U. Strarup
Join Date: Jan 2003
Posts: 382

on the second page of this thread, are some mel scripts, on how to snap/constraning something to vertices. :-)

if you e.g. will have it to follow the vertices in a animation. not sure if it will be helpful in your request. :-)

kind regards

Alex V. U. Strarup
Mel script monkey
Facebook LinkedIn

one mistake can ruin it all... :)
Old 10-09-2013, 01:24 AM   #5
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,479
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 01:33 AM.

Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.