Passing object name into the frame extension

I have 100 objects, named p001-p100 where I want to have them all assigned the same shader, but to have each object with an offset to the frame extension based on its individual id, sort of like a sprite on particle. That way I can just change the initial offset and repath the sequence as needed. I have to port this to scenes with various numbers of objects, and I have coded a good WORKAROUND but I know renderman can pass obj name into strings but how to do this in Maya...???
thanks
Gil

If I understand you correctly, you'll need to do something like the following...
//----------------START
//get a list of all the objects
string $objects[]=ls -type mesh;

//now you can go through each one and construct your string
string $myString;
for($i=0;$i < size($objects);$i++)
{
$myString=$objects[$i];
// then what ever you want to do with this information
}
//------------------------END

This is pretty rough, but without knowing what you want to do, this should at leaste get you started.

Hope that helps
--g

so then in my frame extension expression would I then use this as a wrapping for a foreach loop to cycle through the objects using thier number as the start frame value??

ps thanks...this one hurts my brain on no sleep