Re: Insane frame naming conventions

Date : Thu, 27 Jul 2006 10:01:20 +0200
To : XSI(at)Softimage.COM
From : Christian Götzinger <cg(at)pension-goetzinger.de>
Subject : Re: Insane frame naming conventions
Hi Andy,

thanks for that tip, I worked it out using the FileSystemObject. The script became quite long, but the renaming has become a snatch :)

Cheers


Andy Nicholas wrote:
Hi Chris,

The way I'd tackle it, would be to use a standard JScript to do the job.
You would just use the Windows FileSystemObject. As an example:

var fso = new ActiveXObject("Scripting.FileSystemObject");

var file = fso.GetFile("c:\\test.txt");
if(file)
{
    file.Move("c:\\renamed_test.txt");
}

You'd just put that in a loop to do the renaming to whatever spec you
needed. You could run this script in XSI, or just by double clicking on
the icon in windows explorer.

BTW, documentation on the FSO is available in the Windows scripting help
file which can be found at msdn.microsoft.com

Andy



  
Hi list,

I'm working on a pretty big project that involves rendering out hundreds
of frames per scene. The problem: These frames are not for animation,
each and every frame is an individual image. And these images need a
certain naming convention so they can be properly used inside a Flash
application.
Here's what my scene renders out (just one example of just one scene):

couch_s_0.png
couch_s_1.png
couch_s_2.png
[...]
couch_s_107.png
couch_e_108.png
couch_e_109.png
[...]
couch_e_206.png
couch_w_207.png
couch_w_208.png
[...]
couch_w_303.png

Since the scenes are entirely set up through a script, I just split it
up into three passes, thus getting the "s", "e" and "w" into the name
already. However, the numbering cannot be simply incremental, it needs
to be more sophisticated. I need it to be:

couch_s_1_1_1
couch_s_1_1_2
couch_s_1_1_3
[...]
couch_s_1_1_9
couch_s_2_1_1
couch_s_2_1_2
couch_s_2_1_3
[...]
couch_s_12_1_8
couch_s_12_1_9

Repeat for "e" and "w".

Do you guys have any suggestion as for what would be the best way to do
this? Normal batch renaming tools really don't help me all that much,
because I need two separate iterations (sometimes three, because the
middle number can change too).
Also, everything needs to be fully flexible. In my example above, the
first number goes from 1 to 12, and the last number goes from 1 to 9.
These are not fixed values - for other scenes they might go from 1 to 15
and from 1 to 6 or something.

It would be great if there was a way to do this from within XSI, but
then again, the entire script is going to be translated over to Max, so
maybe an external renaming solution would be better. I'm not a
programmer, so any help is really appreciated.

Thanks,
Chris
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi

    


---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi

  


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.