1 env = Environment() |
1 Import('env') |
2 env.Append(BUILDERS = {'Copy':Builder(action=Copy('$TARGET','$SOURCE'), single_source=True)}) |
2 |
|
3 myenv = Environment() |
|
4 myenv.Append(BUILDERS = {'Copy':Builder(action=Copy('$TARGET','$SOURCE'), single_source=True)}) |
3 files = ['lwo/Nissan300ZX.lwo', 'obj/cube.obj', 'obj/sphere.obj', 'obj/monkey.obj'] |
5 files = ['lwo/Nissan300ZX.lwo', 'obj/cube.obj', 'obj/sphere.obj', 'obj/monkey.obj'] |
4 |
6 |
5 l = [] |
7 l = [] |
6 for file in files: |
8 for file in files: |
7 l.append( env.Copy('#build/models/'+file, file) ) |
9 l.append( myenv.Copy('#build/models/'+file, file) ) |
8 |
10 |
9 env.Alias('local-models', l) |
11 env.Alias('local-models', l) |
10 |
12 |
11 plydir = Dir('#build/models/ply/') |
13 plydir = Dir('#build/models/ply/') |
12 Command(plydir, [], Dir('#models/').abspath+'/download-stanford $TARGET') |
14 import os |
|
15 env.Command(plydir, [], '"'+Dir('#models/').abspath+os.sep+'download-stanford" $TARGET') |
13 Clean(plydir, plydir) |
16 Clean(plydir, plydir) |
14 |
17 |
15 env.Alias('download-models', plydir) |
18 env.Alias('download-models', plydir) |
16 |
19 |
17 env.Alias('models', ['local-models', 'download-models']) |
20 env.Alias('models', ['local-models', 'download-models']) |