|
![](/i/fill.gif) |
Yeah, ignore what I said here, it works for calling custom functions but
I forgot that you can simply specify the name of the file to include, no
need to go through this extra function. Go with clipka's reply, just
make sure you do the leading zeros correctly.
CShake wrote:
> I came across a similar problem a while ago while working on macros,
> where I needed to call functions with different names depending on a
> parameter. The way I got it to work, thanks to clipka, was using a
> 'parse literals' function:
> #macro ParseLiteral(s)
> #declare ParseLiteralFile = "ParseLiteral_$$$.inc";
> #fopen ParseLiteral_FD ParseLiteralFile write
> #write (ParseLiteral_FD,s)
> #fclose ParseLiteral_FD
> #include ParseLiteralFile
> #end
>
> This would work for you by calling:
> ParseLiteral(concat("#include mesh", str(MeshNumber,-5,0), ".inc"))
> where 'MeshNum' is your frame number.
>
> If you're looking to output to the animation style sequence of files,
> I'd recommend treating it like an animation with the proper frame usage
> (+KFI, +KFF, etc), and using the current frame number as MeshNumber.
>
> Hope this helps, and if I'm wrong with some of the syntax that you can
> figure out the idea!
>
> CShake
Post a reply to this message
|
![](/i/fill.gif) |