Config paths
What are CommandLine Files?[an error occurred while processing this directive]In this part of the tutorial, we're going to show you how to relocate your Config Files (Preferences) to somewhere more sensible. Although not directly related to network rendering, this involves getting togrips with cmdLine files, which will play an important role in settingup LWSN a little later.
Each application that composes your LightWave installation has a CmdLine File:- LightWave (App)--LightWave cmdLine (text file)
- Modeler (App)--Modeler cmdLine (text file)
- Hub (App)--Hub cmdLine (text file)
- LWSN (App)--LWSN cmdLine (text file)
Each cmdLine file consists of a single line of code, informing its associated application where Config files relevant to its operation can be found on the computer.
Fig. 3.1 shows this chain and shows all the Config files that LightWave, Modeler, the Hub and LWSN need to know the location of.

Fig. 3.1--Each program associated with LightWave has its own cmdLine file. These are all found in the [Programs] folder within your LightWave installation. They point to the location of Config files.
How do CmdLine Files Work?
So, how does a cmdLine file tell its associated application where tolook for Config files? Well, let's have a look at a cmdLine file.
(LightWave cmdLine)
-c"WOA_System:Users:AdminWorm:Library:Preferences"
-p"WOA_System:Users:AdminWorm:Library:Preferences"
If you open up the default LightWave cmdLine file in TextEdit, you'llsee something similar to the above text (displayed in orange). The abovefile shows LightWave the path through the system to the location it designatedfor Config files when we first installed it. Yours would look slightlydifferent, but conform to the format shown below:
-c"yourHardDiskName:Users:yourUserName:Library:Preferences"
-p"yourHardDiskName:Users:yourUserName:Library:Preferences"
There are actually two paths contained in this code:
"-c" points to LightWave's main Config file.This Config file is called [LightWave Layout 3 Prefs] and if you
look in your equivalent of the above location, you'll find it there.
"-p" points to a separate Plugin Config File.This Config file is called [LightWave Extensions 3 Prefs]).
As of version 7.x, LightWave also creates a Config file called [Spreadsheet.cfg]which will be located on the "-p" path.
IMPORTANT: when editing these files in TextEdit, make sure that theapplication doesn't automatically add a .txt extension when you saveit. This can be disabled in TextEdit -> Preferences.
We're now going to alter our cmdLine files on the Host machine...
Altering CmdLine Files
LightWave works fine with the default setup. However, because adaptingLightWave's file handling requires some fiddly and rather boring codetyping (as you'll really see later!) we want to create a completely portableLightWave folder; something that we can pick up and move to another systemsafe in the knowledge that everything we need came with it, correctlyformatted. With Config files located way outside our LightWave installationfolder, our much loved and tinkered with Preferences won't do this atthe moment. That's why it's good to relocate them within LightWave'smain folder.
Once you understand what a cmdLine file is telling you, alteringit is really not too difficult. Here's how we altered the cmdLine forour installation of the LightWave app (LightWave cmdLine).
-c"WOA_System:Applications:LightWave 3D 7.5:Configs"
-p"WOA_System:Applications:LightWave 3D 7.5:Configs"
The above file now paths directly to our LightWave folder called [LightWave3D 7.5]. We had to create a folder called [Configs] as there isn't one bydefault in that location, but you can simply create an equivalent on yourown system.
- Before you go ahead and start retyping the cmdLine files, writedown on a piece of paper the path through your system to the folder youwant Config files to be stored. Each new folder should be delimited by a colon ":" as above.
- After placing a duplicate of your default cmdLine files in the folder [Backup Configs] (for peace of mind), go ahead and alter your firstthree cmdLine files [LightWave cmdLine], [Modeler cmdLine] and [Hub cmdLine]. They should allbe the same, as we want all our Configs in the same location.
The [LWSN cmdline] file we'll be altering later, as it is slightly different from the first three.
Config Paths--Testing and Moving
Right, we've created this empty Config folder inside the LightWave installationand we've pathed our cmdLine files to it. But what happens next?
Well, like most applications, if you run LightWave, Modeler and the Hub and they don't find Preferences where they're expecting them, they'll create a new set with default settings. This is a really good way of testing whether or not our cmdLine files are working. So, go ahead and run each of these applications in turn. The Hub will probably run automatically when you run LightWave orModeler.
- LightWave is unusual on the Mac as it doesn't actually write any changes to Config files until the relevant application has quit. Somake sure you quitLightWave, Modeler and the Hub immediately.
- Now look in your new Config folder and you should see a collection of newly created Config files. If this has happened, great! If it hasn't then simplyre-check your cmdLine files. There will be a mistake in them somewhere.
- As you've probably spent ages previously getting LightWave and Modeler to lookjust right for you, you'll want to keep on using your original Config filesrather than start again with the blank ones just created. So go back to youroriginal Config path [yourHardDiskName :Users :yourUserName :Library:Preferences]and move them across to the new Config Folder. Well done!