OK guys, heres the Renamer snippet I promised.

Tweaked it a bit so now it will work on almost any object type,
BMAP,TEXT, ENTITY, etc.

Code:
   ...
   // example usages
   Rename_Link(Model.link, "New_Name1");
   ...
   STRING* tmpName = str_create("Test_Name_two");
   Rename_Link(Model2.link, tmpName);
   ...

function Rename_Link( C_LINK* Link, STRING* NewName )
{  // Either INSERTS or REPLACES the C_LINK.name field with supplied NewName.chars
   // If C_LINK* is NULL,  function will just exit
   // If STRING* is NULL,  function will replace C_LINK.name with NULL
   //
   if(Link==NULL)      return;      //Cant process UNDEFINED object
   if(Link.name!=0)    free(Link.name);   //Erase existing
   Link.name=0;                           //   Link Name
   if(NewName==NULL)   return;   //Leave Link name empty as requested
   Link.name = (char*)malloc((long)str_len(NewName)+1);   //create Name space
   memcpy(Link.name,_chr(NewName),str_len(NewName)+1);    // & copy Name into space
}

Any questions or problems, let me know.
Enjoy.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial