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 CLOSED
 
Thread Tools Search this Thread 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]
    dupObj.t.set(pointPosition(v))


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
Hi,

on the second page of this thread, are some mel scripts, on how to snap/constraning something to vertices. :-)
http://forums.cgsociety.org/showthr...87&page=2&pp=15

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
__________________
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 05:41 AM.


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