well you might not think so but i do . History is everything, As long as no-one deletes history of course. But thing is history is the same record you just made, if you save out it as a ma file you will notice thats just exactly what maya does. (trick you can get the history in mel code form the ma file!)
its just that recording all changes is harder than reading the history. Your in essence trying to mimic history but the awkward way.
let us suppose the involved shape:
CODE
// lets make a new file
file -f -new;
constructionHistory -toggle true;
//leyts create some history to work on
polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1;
polyExtrudeFacet -constructionHistory 1 -keepFacesTogether 0
-pvx 0 -pvy 0.5 -ltz 10 -pvz 0 -divisions 1 -twist 0 -taper 1 -off 0
-smoothingAngle 30 pCube1.f[0:5];
scale -r -p 0 0 0 6 6 6 pCube1.vtx[0:7];
polySmooth -mth 0 -dv 2 -c 1 -kb 1 -ksb 1 -khe 0
-kt 1 -kmb 1 -suv 1 -sl 1 -dpe 1 -ps 0.1 -ro 1 -ch 1 pCube1;
polyExtrudeFacet -constructionHistory 1 -keepFacesTogether 1 -pvx 0 -pvy 0
-ltz 1 -pvz 0 -divisions 1 -twist 0 -taper 1 -off 0.3
-smoothingAngle 30
pCube1.f[140] pCube1.f[143] pCube1.f[146] pCube1.f[149] pCube1.f[152]
pCube1.f[155] pCube1.f[158] pCube1.f[161] pCube1.f[164] pCube1.f[167]
pCube1.f[170] pCube1.f[173] pCube1.f[176] pCube1.f[179] pCube1.f[182]
pCube1.f[185] pCube1.f[188] pCube1.f[191] pCube1.f[194] pCube1.f[197]
pCube1.f[200] pCube1.f[203] pCube1.f[206] pCube1.f[209] pCube1.f[266]
pCube1.f[275] pCube1.f[284] pCube1.f[293] pCube1.f[302] pCube1.f[311]
pCube1.f[320] pCube1.f[329] pCube1.f[338] pCube1.f[347] pCube1.f[356]
pCube1.f[365] pCube1.f[374] pCube1.f[383] pCube1.f[392] pCube1.f[401]
pCube1.f[410] pCube1.f[419] pCube1.f[428] pCube1.f[437] pCube1.f[446]
pCube1.f[455] pCube1.f[464] pCube1.f[473];
now let us suppose for a minute i didnt see the artist doing it and i never saw the code above, can i recreate the steps? Well it so happens i can its all there as part of history (and in case of point movenments in tweaks of the shape itself, but thats overcourse, but they can be recorderd too)
Now i can playback the entire history without knowing the above (watchh thy viewport):
CODE
//play back history stepnby step on ANY
//maya object with history
{//protect variable pollution
string $historyChain=listHistory pCube1
;
for ($i=1;$i<size($historyChain)-1;$i++){
setAttr ($historyChain[$i]+".nodeState") 1;
refresh;
pause -sec 1;
}
}
NOTE: if you wish you could save the scene now, exit maya and still get it to work on next steps or any of them
and resume it back.
CODE
{//protect variable pollution
string $historyChain[]=listHistory pCube1
;
for ($i=size($historyChain)-1;$i>0;$i--){
setAttr ($historyChain[$i]+".nodeState") 0;
refresh;
pause -sec 1;
}
}
now lets assume i want to go to the stage before the last extrude and do some changes, id need to inject a tweak node or a shape node to contain the changes.
So assuming the same scene (if you investigated steps thisfar start over):
CODE
//assuming scene created earlier
{//protect variable pollution
setAttr ("polyExtrudeFace2.nodeState") 1;
$mesh=createNode mesh
;
connectAttr -f polySmoothFace1.output ($mesh+".inMesh");
$a=listRelatives -p $mesh
;
//lets hide the changer its not essential
setAttr ($a[0]+".intermediateObject") 1;
move -r -os -wd 0 3 0 ($a[0]+".vtx[165]");
connectAttr -f ($mesh+".outMesh") polyExtrudeFace2.inputPolymesh;
refresh;
pause -sec 1;
setAttr ("polyExtrudeFace2.nodeState") 0;
}
Now above code works much more versatilely on anything.
Ok, now the power trick the intermediate shape is actually part of the history but you can tweak it interactively. Let us assume you didn't change anything in the run for simplicity (as i have limited time):
CODE
setAttr ("polySurface1.intermediateObject") 0;
move -r -os -wd 20 0 0 polySurface1;
now see this mesh has no surface as its just a history ghost of the shape however move the points in this shape and see that the future updates. And that was point number 2.
This offcourse you should know since you use it in smooths and animation all the time.
NOTE 2: theres much more to history than this, it can even branch in any manner you like use the hyper graph to investigate it
NOTE 3: yes you can change the affected faces of a history node later if you wish and duplicate longer parts of chain to different parts of a object.
PS all was tested in maya 8.5 but should work on everything else.
PPS hope you undertand my drift and maya better now.