POV-Ray : Newsgroups : povray.animations : scene language question : scene language question Server Time
27 Sep 2024 18:25:50 EDT (-0400)
  scene language question  
From: Peter MacMurchy
Date: 30 Jan 2004 15:56:56
Message: <401AD39D.6DBA11D3@cpsc.ucalgary.ca>
I am generating an animation which involves loading a different mesh
each frame.  The mesh is in an include file and i can compute the names
of the include file and the mesh object from the frame number.  

How can i instantiate an object from a string whose contents are the
text of the object's identifier?

ie

#declare OBJECTNAME = concat("mesh", str(frame_number,0,0));

and there's an included file with 
#declare MYMESH1 = mesh2 { ... }

(for the next frame, it'd be
#declare MYMESH2 = mesh2 { ... }
)

i'd like to say:
object { OBJECTNAME
...
}

but this doesn't work because OBJECTNAME is a string identifier... how
to achieve the effect of object{} reading the contents of the string as
the identifier?

thanks,
peter


Post a reply to this message

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