Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / How to link attributes for FACES and VERTICES in MEL?
  RSS 2.0 ATOM  

How to link attributes for FACES and VERTICES in MEL?
Rate this thread
 
49376
 
Permlink of this thread  
avatar
  • Total Posts: 3
  • Joined: 13 November 2010 12:48 AM

Hi,

I’m trying to link attributes of a face or vertex of one object to another using mel. I can easily link the full object by using this simple script:

pSphere1.translateX = pSolid2.translateX

or

pSphere1.rotateX = pSolid2.rotateX

SIMPLE! But when I try doing it with one of the FACES or vertices such as:

pSphere1.f[46].translateX = pSolid2.rotateX

Is this possible to do with a polygon or even nurb?

The final goal is to have the translation of multiple locators affect the shape of one object by setting each locator to a different face or vertices.

Been struggling with this one for weeks now.

Thanks!
Matt



Replies: 0
avatar
  • THNKR
  • Posted: 13 November 2010 01:54 AM

Components don’t have transform attributes. You can provide them by creating a cluster, which iyou can think of as a transform node for a set of components. [Animation] Create Deformers->Cluster



Replies: 1
/img/forum/dark/default_avatar.png

Hey THNKR,

Thanks so much for the fast response.  So I tried the cluster and it totally worked in terms of being able to have 1 vertex of an object be moved by another. However it didn’t seem to be able to parent itself to a face or to multiple vertex’s nor was it able to affect scale or rotation. I’m using this effect in a non traditional sorta fashion. To explain:

I’m trying to create a dynamic visualization by emitting particles from an object being warped and effected by the xyz coordinates of various locators which move dynamically in XYZ.

For instance:  I’ve been able to set ONE of the locators to the scaleX of a WHOLE sphere (making the sphere warp and blob) and then I emit particles, hide the sphere, and the visualization looks cool, but I’d love to set the 10 different locators to each it’s own face or group of faces.

So I would need to find a way to have the scaleX or translateX of group of FACES = one of the these locaters.

Make any sense? Ha. Hope so. Any further help would be greatly appreciated.

Thanks,
Matt

Author: momentollogy

Replied: 13 November 2010 08:50 AM  
avatar
  • THNKR
  • Posted: 13 November 2010 12:58 PM

You can do what you want, jut not in the way you imagined. You really need to give up on the idea that a face or a vertex has a transform attribute. vertices only have positions, that’s all. Anything else doesn’t exist, so you must create it yourself somehow. There is no parenting of faces or vertices, ONLY transforms can do that, and you do have access to those, though clusters.



Replies: 1
/img/forum/dark/default_avatar.png

Yeah I figured I was looking at it wrong. Thanks again for the advice. I’ll give it a shot with clusters.

Best.
Matt

Author: momentollogy

Replied: 15 November 2010 04:46 AM