|
|
On Fri, 30 Jan 2004 13:58:53 -0800, Peter MacMurchy <pet### [at] cpscucalgaryca>
wrote:
>How can i instantiate an object from a string whose contents are the
>text of the object's identifier?
It could be the extension, I often use incriminatingly named meshes generated by
Poser. Here is my method, please excuse the strange variable names, also there
is a bit of "logic" from when I used the clock variable and there was a problem
going from 9 to 10.
#declare Cycle01_Max = 120; // Number of
frames in the cycle.
#declare F_Name = "nene_bal1303a_" ; // incriminating mesh 1
#declare F_Name2 = "Suit_Bal1303a_" ; // incriminating mesh 2
#if (frame_number < 1 )
#declare Cycle01Pos = 0;
#declare
Material_clock1=concat(F_Name,str(int(Cycle01Pos+0),-1,0),"_o.inc")
#declare
Material_clock2=concat(F_Name2,str(int(Cycle01Pos+0),-1,0),"_o.inc")
#else
#declare Cycle01Pos = mod (frame_number-1, Cycle01_Max);
#declare
Material_clock1=concat(F_Name,str(int(Cycle01Pos-0),-1,0),"_o.inc")
#declare
Material_clock2=concat(F_Name2,str(int(Cycle01Pos-0),-1,0),"_o.inc")
#end
//#include "nene_bal1303a_0_p.inc" // This is the original line generated
by Moray.
#include "Nene_Bal1303a_0_moray_mat.inc"
// This uses the same material map (UV mapping) for each mesh
#include Material_clock1 // This is the incriminating mesh
Regards
Stephen
Post a reply to this message
|
|