anyKode Marilou
Folders and files path

Folders and resources files path store.

Some resources like textures, sounds or 3D-meshes are read from files. Depending to project location or Marilou installation folder, resource path have to be managed intelligently. That's why, in most case, Marilou stores resources paths with two paths: 


The absolute path:

The path is stored with an absolute path like c:\xxxx. If the absolute path is under the Marilou directory, it starts with %MARILOU_INSTALL_DIR%. 


The relative path:

The path is stored relative to the document that use the resource. A texture for exemple is stored relative to the PHX document that is using the texture. 


Resource type 
Relative from 
PHX file 
PHX file 
PHX File 
Materials XML files 
PHX file 
Devices XML files 
PHX file 
PHX file 
PHX parent file or Project file 

Marilou install dir is C:\Program Files\Marilou2009 

You are working in a PHX document located at c:\myprojects\project1\myrobot.mphx 

Your texture1 is located in c:\myprojects\project1\mytextures\texture1.jpg 

Your texture2 is located in C:\Program Files\Marilou2009\RenderModels\Texture\texture2.jpg 

Your texture3 is located in C:\myimages\texture3.jpg 


Generated Paths:


Absolute Path=c:\myprojects\project1\mytextures\texture1.jpg 




Absolute Path=%MARILOU_INSTALLDIR%\RenderModels\Texture\texture2.jpg (in this case, absolute path is relative to Marilou install dir) 

RelativePath=..\..\Program Files\Marilou2009\RenderModels\Texture\texture2.jpg 



Absolute Path=C:\myimages\texture3.jpg 



When loading resources, and according to the 2 paths, Marilou searches the required file starting with the relative path then the absolute one.

Documentation v4.7 (18/01/2015), Copyright (c) 2015 anyKode. All rights reserved.
What do you think about this topic? Send feedback!