From: Greg Ercolano <erco@(email surpressed)>
Subject: Re: Title as scene name
   Date: Tue, 07 Feb 2006 21:26:08 -0500
Msg# 1217
View Complete Thread (3 articles) | All Threads
Last Next
Stefan Andersson wrote:
never mind, it was just a matter of adjusting the submit script.

here is what made it work for me (from the default xsi submit script)


         if ( $in{JobTitle} eq "" )
         {
             # PARSE TITLE FROM FIRST 25 CHARACTERS OF MAX FILENAME
             if ( $in{Database} =~ m%/([^/]*)\.scn$%i )
             {
                 $in{JobTitle} = substr($1, 0, 25);      # first 25 chars
                 $in{JobTitle} =~ s/\..*//;              # "foo.db" -> "foo"
             }
         }

    Yes, it's a regex bug that's apparently been in that script for a while now,
    and I never noticed it. That should work fine.

    FWIW, here's the 'fix' I applied recently which is in "102.42a1";
    the regex (db|scn) is used so it can handle both db or scn files:

        if ( $in{JobTitle} eq "-" || $in{JobTitle} eq "" )
        {
            # PARSE TITLE FROM FIRST 25 CHARACTERS OF MAX FILENAME
            if ( $in{Database} =~ m%/([^/]*)\.(db|scn)$%i )     # <-- CHANGE IS HERE
            {
                $in{JobTitle} = substr($1, 0, 25);      # first 25 chars
                $in{JobTitle} =~ tr/[a-z]/[A-Z]/;       # uppercase
            }
        }


Last Next