How to link attributes for FACES and VERTICES in MEL?

How to link attributes for FACES and VERTICES in MEL?

Anonymous
Not applicable
376 Views
4 Replies
Message 1 of 5

How to link attributes for FACES and VERTICES in MEL?

Anonymous
Not applicable
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.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
0 Likes
377 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
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. Create Deformers->Cluster
0 Likes
Message 3 of 5

Anonymous
Not applicable
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
0 Likes
Message 4 of 5

Anonymous
Not applicable
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.
0 Likes
Message 5 of 5

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

Best.
Matt
0 Likes