Modo Scripts
(401) Project Directory Structure
Posted by on Sunday, June 21, 2009 (GST)
mm_ProjectDirectory v1.00
 
 
Last Update: 22/06/09
 
 
What is it?
 
Script and set of commands for creating and managing a custom project directory structure similar to those used by other 3D applications such as maya or Houdini.
 
The exact directory structure, location and names of subdirectories/folders is fully configurable to individual needs via the settings file stored alongside the main script in the user scripts directory (see below for details).
 
 
Installation:
 
Choose 'Run Script' from the 'System' menu (Shift-F5)
 
 
 
 
Navigate to where you've unzipped the zip file and double click on 'install.py'
 
 
 
 
In the next dialog, you need to navigate back to the same directory so that the install script can find the files it needs to install.
 
 
 
 
If the install is successfull, a dialog should pop up.
 
 
 
 
Restart modo.
 
 
 
Usage:
 
After installation you will find some new entries in modo's file menu for creating, setting, clearing a project directory setup:
 
 
 
 
And a new entry in the images (clips) list menu that allows copying images in the clips list that are loaded from external directories into the project directory:
 
 
 
 
The operation of the script and final structure of the project directory heirarchy revolves around the settings stored in the configuration file 'mm_ProjectDirs.ini' which is stored alongside the main script in the user scripts directory. Depending on the platform, that will be in one of the following locations:
 
OSX: /Users/YourUserName/Library/Application Support/Luxology/Scripts
 
Windows XP: C:\Documents and Settings\YourUserName\Application Data\Luxology\Scripts
Windows Vista: C:\Users\YourUserName\AppData\Roaming\Luxology\Scripts
 
The configuration file follows the Windows ini file standard and defines two 'sections' - '[Aliases]' and '[Dirs]'.
 
the [Dirs] section contains a list of entries, each of which is a directory (or sibdirectory path) that will be created under the main project directory. For example, in the settings file that ships with the script, the [Dirs] section has the following entries:
 
[Dirs]
Scenes
Images
Images\Floor
Images\Fabric
Images\Wood
IES
This creates in a project directory directory structure like this:
 
ProjectDir
    IES
    Images
        Fabric
        Floor
        Wood
    Scenes
 
 
The [Aliases] section of the settings file contains a set of directory alias definitions for the new (modo 401) path aliases system. Setting up the aliases allows you to seamlessly move projects around machines. as long as each machine has the same set of aliases pointing at relevent directories, modo will find all the files in the project. Aliases can point to any directory or subdirectory under the project structure. For example, using the above project directory heirarchy a setting of:
 
Lights = IES
 
means that the modo path alias 'Lights' would point at 'ProjectDirectory\IES' and a setting of
 
Wood = Images\Wood
 
means that the modo alias 'Wood'' will point at ProjectDirectory\Images\Wood' etc.
 
 
Creating a Project Directory:
 
from modo's file menu, select 'Project Management\Create Project Directory'. A dialog will open asking for a name for the project, this will become the name of the project root directory on disk.
 
 
 
Entering a name and clicking 'OK' brings up a directory browser to choose a location for the project directory.
 
 
 
 
The structure as defined in the settings file will be created at that location.
 
 
 
 
If you open the preferences window (System menu\Preferences) and click on 'Data\Path Aliases', you will see the aliases that have been set up by the script:
 
 
 
 
Modo will retain both the current project and path alias settings between sessions. To clear the settings and remove the path aliases, use the 'File menu\Project Management\Clear Project Settings' menu entry.
 
To point modo at a different (existing) project directory, use the 'File menu\Project Management\set Project Settings' menu entry. All paths and path aliases will be reset to point at the new project directory structure.
 
To open the project directory in Finder or Explorere us the 'File menu\Project Management\Open Project Settings' menu entry.
 
 
 
Comments:

Update 22/06/09
By Gwynne on Monday, June 22, 2009 (GST)
Fixed an issue in OSX.
 
Added 'Edit Project Definition' command to main menu. Opens the project definition/settings file in the system default text editor so you can define the project directory structure from within modo rather than having to dig the file out of the user scripts directory.