Message 1 of 3
Use MEL Script to Create Cubes That Make Up Model?
Not applicable
03-07-2016
09:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I'm really new to Maya and I'm trying to use MEL script to create cubes so that the 3D model is made up of cubes instead (imagine creating a model using Lego).
My object is called polySurface1, but I have no idea how to construct my script.
I guess I have to first get the positons of the vertices and then create the cubes at those positions, but it seems like I keep getting 0 0 0 no matter what. Here is an example of the code I used (my model has 5366 vertices):
vector $pos = `getAttr polySurface1.vtx[3]`; print ($pos);
Thank you in advance!