snap object to every vertex?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  09 September 2013
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

  09 September 2013
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]

Let me know if this worked for you!
  09 September 2013
worked like a charm! Thanks a ton, saved me a lot of time today!

  10 October 2013

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... :)
  10 October 2013
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

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 03:36 PM.

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