There’s no hierarchy of that sort in Maya, it’s all based upon the dependency graph (DG) nodes. So maya is a bit trickier to navigate in that sense…
create a poly cube select it, and then goto the window->hypergraph: connections menu item. In max you’d see one object, $Box01. In Maya you’ll see it’s split into 3,
pCube1: the transform
polyCube1: the poly creator
pCubeShape1: the cached mesh result to be rendered
If you select a face on the mesh then delete it, you’ll see that the DG gets an additional deleteComponents node. The idea is that the mesh data is passed (as an attribute connection) down through the DG to the end result, and modified along the way. Unlike max, it’s not a linear stack, but a graph. (though with referencing you can almost duplicate some of the flexibility of maya). In maya you can still go and select the input nodes and modify their params as needed.
The mesh node has an input attr, “inMesh”, on which you can use the listConnections command to find out it’s inputs (and recurse to find all inputs to those inputs etc).
Anyhow, select the mesh, and select the edit->delete by type->history. This will remove all of the input nodes to the mesh, and leave you with a single object. Basically this is maya’s equivalent of “convert to editable poly”.
Anyhow, select the mesh and goto the create deformers menu (hit F2 if you can’t see it), and create a nonLinearDeformer->bend. Erm, you might notice that the DG now looks a little bit more complex than the max modifier stack…
Anyhow, if you apply a few of those to the mesh, then right click on it and select from the menu Inputs->All Inputs, you will see the nearest thing to the max modifier stack (and you can use middle mouse button to drag the deformers to change their order - implemented via the reorderDeformers mel command).
And so to your original question, you can’t really create custom meshes directly in mel in the same way as a SimpleObject script plugin (you can, but it’s not recommended), but there are some commands that generate the basic network for polyCube’s etc. The name of the command is normally the same as the poly creator node type it creates, eg polyCube, polySphere etc. The same is also true of all the deformers (eg, blendShape, cluster etc). So, to put it all together, so something like this:
// create the cube
string $polyThings = `polyCube`;
// just to demo what gets returned...
string $transform = $polyThings;
string $creator = $polyThings;
// if you want the mesh node, use listRelatives -c $transform
// just going to modify the poly Creator slightly....
setAttr ($creator + ".subdivisionsHeight") 15;
// apply the deformer to the selected object
select -r $transform;
nonLinear -type bend -curvature 0.9;
If you are not sure what a node in the hypergraph is, then execute the following mel:
You can then look it up in the node & attr reference in the mel help. That will give you the list of attributes you can set via the setAttr mel command (and getAttr if you need to get the data). Some commands will support the edit flag to modify params (eg, polyCube -edit), but you can set ALL data via setAttr, so most people just use that…