# Passing object name into the frame extension

**URL:** https://forum.highend3d.com/t/passing-object-name-into-the-frame-extension/5864
**Category:** Maya
**Tags:** mel
**Created:** [September 6, 2002, 5:57pm UTC](https://forum.highend3d.com/t/passing-object-name-into-the-frame-extension/5864 "2002-09-06T17:57:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![gilbaron](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/g/9fc29f/32.png) [@gilbaron](https://forum.highend3d.com/u/gilbaron)
#### Post date: [September 6, 2002, 5:57pm UTC](https://forum.highend3d.com/t/passing-object-name-into-the-frame-extension/5864/1 "2002-09-06T17:57:35Z")

</div>

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

---

<div class="post-metadata">

### Author: ![gdc](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/g/898d66/32.png) [@gdc](https://forum.highend3d.com/u/gdc)
#### Post date: [September 7, 2002, 1:25am UTC](https://forum.highend3d.com/t/passing-object-name-into-the-frame-extension/5864/2 "2002-09-07T01:25:48Z")

</div>

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

---

<div class="post-metadata">

### Author: ![gilbaron](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/g/9fc29f/32.png) [@gilbaron](https://forum.highend3d.com/u/gilbaron)
#### Post date: [September 9, 2002, 10:40pm UTC](https://forum.highend3d.com/t/passing-object-name-into-the-frame-extension/5864/3 "2002-09-09T22:40:00Z")

</div>

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
