PDA

View Full Version : export object sequence from layout?



smok3
09-09-2004, 02:10 AM
i did an endomorphed animation in layout with subdivisioned object - subd order set to last.

is there a way to export that as object sequence (or 'bake') ?

faulknermano
09-10-2004, 03:17 AM
warnings 0
generic
{
startFrame = integer(recall("startFrame",1));
endFrame = integer(recall("endFrame",60));
outputDir = getdir("Objects");
prefix = string(recall("prefix","Object_"));


defFile = outputDir + "\\[None]";

reqbegin("Save Transformed Sequence");

c0 = ctlfilename("Output Dir",defFile,50,1);
c1 = ctlinteger("Start Frame",startFrame);
c2 = ctlinteger("End Frame",endFrame);
c3 = ctlstring("Prefix",prefix);

return if(!reqpost());

outputDir = getvalue(c0);
sf = getvalue(c1);
ef = getvalue(c2);
prefix = getvalue(c3);

od = split(outputDir);

outputDir = od[1] + od[2];


startFrame = min(sf,ef);
endFrame = max(sf,ef);


e = string(endFrame);
padding = e.size();

store("startFrame",sf);
store("endFrame",ef);
store("prefix",prefix);
s = Scene().firstSelect();
if(!s)
error("No selection.");


for(i=startFrame;i<=endFrame;i++)
{
stri = padThis(i,padding);
GoToFrame(i);
s = string(outputDir,prefix,stri,".lwo");
SaveTransformed(s);

}

}
padThis: num, padding
{
n = string(num);
ne = n.size();

for(i=ne;i<padding;i++)
{
n = string("0",n);

}
return(n);

}

Red_Oddity
09-10-2004, 04:51 AM
Interialabs has one aswell : http://www.interialabs.de/lw/lscript/index.html (scroll to the bottom, and choose the Save Transformed Sequence plugin

smok3
09-13-2004, 03:12 AM
well, tnx to both, unfortunatelly none of this scripts would work :\ (i get the sequence of the same basic object - no matter what i do, deform order has no influence on output either..., (iam using morphmixer 'deformer'))

any other ideas? (unfortunatelly i cant do lscript, so i have no idea on how to recode that to make it work.)

faulknermano
09-13-2004, 07:53 AM
well, tnx to both, unfortunatelly none of this scripts would work :\ (i get the sequence of the same basic object - no matter what i do, deform order has no influence on output either..., (iam using morphmixer 'deformer'))

any other ideas? (unfortunatelly i cant do lscript, so i have no idea on how to recode that to make it work.)


the lscript (and i think the d|ver's plug) above simply executes a native LW save transform command. so the error, i think, is how you set it up. i dont know exactly what you're trying to achieve.... maybe turning subpatch division to 0 will help?