Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

Author Topic: Absolute file name for materials  (Read 1019 times)

camille.rufu

  • Newbie
  • *
  • Posts: 3
    • View Profile
Absolute file name for materials
« on: April 01, 2015, 08:07:26 am »

Hello,
Is there a way to have relative file names for materials instead absolute ones ?  Even modified in text file (replace by .\\xxx), Animator renamed it...
Best regards.
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1450
    • View Profile
Re: Absolute file name for materials
« Reply #1 on: April 01, 2015, 10:56:17 am »

Not sure which version of Anim8or you're using but if you're using the latest development release...

If you have just a '.' in File->Configure for the texture directory, then it checks the original absolute directory, and it searches the directory that the .an8 file is located in and its subdirectories. If you have a texture directory specified in File->Configure, then it'll only do the search in that specified directory and it'll search in the root directory that the .an8 file is located in (no subdirectories). So if you want to be absolutely safe when transporting/packaging your files, you can keep all the textures in the same directory as the .an8 file (not in any subdirectories), and it'll load it even if the user specified a texture directory in their configuration.
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1547
    • View Profile
Re: Absolute file name for materials
« Reply #2 on: April 01, 2015, 04:53:22 pm »

Here's how Anim8or searches for texture files:

$FILENAME = ($DIR, $ROOT, $EXT), i.e. for

D:\user\steve\mytextures\bricks.png

$DIR = "D:\user\steve\mytextures\",
$ROOT = "bricks", and
$EXT = ".png"

$PROJECT_DIR = directory that the project file is in.
$TEXTURE_DIR = texture directory (see File->Configure dialog)

1. $PROJECT_DIR + $ROOT + $EXT
2. $TEXTURE_DIR + $ROOT + $EXT
3. $FILENAME_DIR + $ROOT + $EXT -- uses absolute path in specified file name
4. Searching sub-directories of texture directory: $TEXTURE_DIR/*/ + $ROOT + $EXT

I had thought about swapping the order of #3 and #4.  It can be a paint when the absolute $FILENAME is on a drive that doesn't exist (such as when you download a project from some other computer) so I moved it later in the list. The is especially true for if the device is a CD drive on your local computer.
Logged