This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
tools:opendir [2020/01/24 15:03] – created lightwolf | tools:opendir [2020/01/24 15:09] – lightwolf | ||
---|---|---|---|
Line 4: | Line 4: | ||
By default this will open the settings directory, but can be used in simple scripts to open any directory. | By default this will open the settings directory, but can be used in simple scripts to open any directory. | ||
+ | |||
+ | The following script uses this plugin to open the content directory. | ||
+ | |||
+ | <code python OpenDir.py> | ||
+ | # -*- Mode: Python -*- | ||
+ | # -*- coding: ascii -*- | ||
+ | |||
+ | """ | ||
+ | This is a LightWave Generic plug-in that opens a directory, | ||
+ | in this case the content directory using a magic string | ||
+ | """ | ||
+ | |||
+ | __author__ | ||
+ | __date__ | ||
+ | __copyright__ | ||
+ | __version__ | ||
+ | __maintainer__ = " | ||
+ | __email__ | ||
+ | __status__ | ||
+ | __lwver__ | ||
+ | |||
+ | try: | ||
+ | import lwsdk | ||
+ | except ImportError: | ||
+ | raise Exception(" | ||
+ | |||
+ | ga = lwsdk.GenericAccess() | ||
+ | if ga.valid(): | ||
+ | name = " | ||
+ | ga.evaluate(" | ||
+ | </ | ||
+ | |||
+ | ===== Pre-defined directory names ===== | ||
+ | LightWave 3D uses certain " | ||
+ | If the directory doesn' | ||