POV-Ray : Newsgroups : povray.general : Sequence of images but not animation : Re: Sequence of images but not animation Server Time
30 Jul 2024 08:20:47 EDT (-0400)
  Re: Sequence of images but not animation  
From: CShake
Date: 18 Jun 2009 14:53:38
Message: <4a3a8d32@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.