I browsed the developer section of online document and searched, just only a few example using it, no description.
I want to know is this an property of the mesh object? Where is its document?
Thanks!
I browsed the developer section of online document and searched, just only a few example using it, no description.
I want to know is this an property of the mesh object? Where is its document?
Thanks!
The nodeal info is described in the API manual, node reference and getAttr/setAttr commands but basicaly whie you can edit/read this in mel its not designed as beingf part of mel repertoare. So it would eb a hack anyway, tehts aleo why its not dofcumented properly
QUOTE(pinxue @ 09/07/06, 11:44 AM) [snapback]247050[/snapback]
I want to know is this an property of the mesh object? Where is its document?
a .vtxFace is not a real mesh attribute, in the sense that it doesn't actually exist like a normal attr does. It is a conceptual component, a combination of a mesh's vertex and face. I have no idea how maya deals with them internally, but I've never needed to know that to use it in any scripts or functions..
The only documentation I could find is this:
http://localhost:4449/Maya7.0/en\_US/APIGui....html#wp1029613
what exactly do you want to know about it?
:nathaN
Firstly, thanks for you guys attension.
In fact , I am reading the MEL script from http://homepage.sunrise.ch/mysunrise/dschl...mel-export.html
There are lines in the script looks like:
$temp = $obj+".vtxFace["+$faceVertices[$iter*3]+"]["+$iter+"]";
select -r $temp;
$normal = polyNormalPerVertex -q -xyz;
$iter is the face index.
All I want to know are:
1. I cannot find mesh or any other polygonal object has attribute named vtxFace, then who owns the attribute.
2. What does the two dimension means? It seems the first dimension is the vertex index and it is nature. The second dimension looks like faces the vertex belongs to, how is this dimension organized? Why does the code snipt use face index as the offset of the second dimension.
As I have guessed, the code should iterate the .vtxFace[] to find the face id equals to the $iter.
3. And of cause, how can I find the mysterious .vtx, .vtxFace or other useful things if I write my own script. I tried listAttr, but all these things are not in the list.
I have read the document you mentioned.
QUOTE(Joojaa @ 09/08/06, 04:51 PM) [snapback]247076[/snapback]
The nodeal info is described in the API manual, node reference and getAttr/setAttr commands but basicaly whie you can edit/read this in mel its not designed as beingf part of mel repertoare. So it would eb a hack anyway, tehts aleo why its not dofcumented properly
I saw many .vtx/vtxFace usage in examples of official document, so that I guess it is the only way for MEL to retrieve related information?
Its a convinence mapping to the coresponding internal shape, look into the node refernce for mesh. The shape holds tha data. but no such datahandle exsist that lets you manipulate this data directly. Its multiple pieces of data in many places.
Its actualy mapped to many places in the mesh. Offhand (no maya at hand), its the [veretxNumber][faceconnected to that vertex Index]
Its not that the indexing itself is official way to describe the selection. its just a a convinience notation for you to use to select those vertexfaces. It does not realy exist. its just a way to manage selections for commads that manuipulate thet data. Its no attribute you can querry!
Same applies to the nurbs notations and other vertex selection notations. They only apply to selection lists. They are no real attributes. Thus theres no explanation what they are because you allway do them interactively. Even when you dont, yoru actualy asumed to do so. Also the tools themselves manage wich attribute they should act uppon.
For example
pSphere1.vtx[301]
does not exsist either its the same kind of naming shortcut for the selection. the real value is in the shape. So it only works for selections. Eeverything taht works aon a selection list can interpret the data but its NOT the source. THis is why you cant querry it because its only a label not a container.
QUOTE(pinxue @ 09/08/06, 12:44 PM) [snapback]247081[/snapback]
$temp = $obj+".vtxFace["+$faceVertices[$iter*3]+"]["+$iter+"]";
select -r $temp;
$normal = polyNormalPerVertex -q -xyz;
this is oviously described in polyNormalPerVertex commands reference. IN all actuality since the mapping does not tell what attribute it should affect you cant know, but in this instance it goes and querries the:
$shape.npvx.vn[$faceVertices[$iter*3]].vfnl[$iter].fnxy
$shape is of $obj's relevant shape Child. but you cant know what arrey ity affects by reasing thet you rweference .vtxFace but reather of the context here wich is polyNormalPerVertex So saying asking what .vtxFace means is moot sicne it emans only something to polyNormalPerVertex internaly, nothing to you the user, except a selection list.
but yeas you could querry them ALL at onece by issuing a getAttr call to shapes .npvx.vn.vfnl.fnxy
Ok perhaps I can answer your questions with more simplicity. I use vtxFace's a lot when I writing scripts to change an objects vertex coloring because it alows you to access a certain corner of a face. The two dimensions as you've guessed refer to a vertex index and then a face index, they are depended on each other(not so much one specifically on the other) as long as you choose a vertex index that's part of the face index you choose it will work.
"3. And of cause, how can I find the mysterious .vtx, .vtxFace or other useful things if I write my own script. I tried listAttr, but all these things are not in the list."
Ok, there's two things you might be trying to find, a currently selected vert, face, vxtFace you check with the "ls" command.
If you're looking for how many verts, faces, vxtFace and object has all you need to do it have the object selected and use the "polyEvaluate" command, for example:
$facecount = polyEvaluate -f;
or
$vertcount = polyEvaluate -v;
*Note this with return an array so when you check it, check $facecount[0]
Now to find all the verts associated with a face or to find the faces associated with a vert for using vxtFace, you want the "polyListComponentConversion" command
string $verts[] = polyListComponentConversion -ff -tv "object.f[#]";
or
string $faces[] = polyListComponentConversion -fv -tf "object.vxt[#]";
So there you go, I hope that explains everything, I apologise if my terminaligy is funny, I'm only a self-taught programmer ![]()