-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopymachine.py
81 lines (72 loc) · 4.2 KB
/
copymachine.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import shutil
def replace_text(file_name, original, replacement):
f = open(file_name, 'r')
filedata = f.read()
f.close()
newdata = filedata.replace(original, replacement)
f = open(file_name, 'w')
f.write(newdata)
f.close()
for i in range(4, 5):
shutil.copyfile("C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_albedo_{}.pbrt".format(str(i)),
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_depth_{}.pbrt".format(str(i)))
replace_text("C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_depth_{}.pbrt".format(str(i)),
'Integrator "albedo"', 'Integrator "depth"')
replace_text("C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_depth_{}.pbrt".format(str(i)),
'"string filename" [ "test_albedo_{}.exr" ]'.format(str(i)), '"string filename" [ "test_depth_{}.exr" ]'.format(str(i)))
shutil.copyfile(
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_albedo_{}.pbrt".format(
str(i)),
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_normal_{}.pbrt".format(
str(i)))
replace_text(
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_normal_{}.pbrt".format(
str(i)),
'Integrator "albedo"', 'Integrator "normal"')
replace_text(
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_normal_{}.pbrt".format(
str(i)),
'"string filename" [ "test_albedo_{}.exr" ]'.format(str(i)),
'"string filename" [ "test_normal_{}.exr" ]'.format(str(i)))
shutil.copyfile(
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_albedo_{}.pbrt".format(
str(i)),
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_direct_{}.pbrt".format(
str(i)))
replace_text(
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_direct_{}.pbrt".format(
str(i)),
'Integrator "albedo"', 'Integrator "directlighting"')
replace_text(
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_direct_{}.pbrt".format(
str(i)),
'"string filename" [ "test_albedo_{}.exr" ]'.format(str(i)),
'"string filename" [ "test_direct_{}.exr" ]'.format(str(i)))
shutil.copyfile(
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_albedo_{}.pbrt".format(
str(i)),
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_gt_{}.pbrt".format(
str(i)))
replace_text(
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_gt_{}.pbrt".format(
str(i)),
'Integrator "albedo"', 'Integrator "path" "integer maxdepth" [ 65 ]')
replace_text(
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_gt_{}.pbrt".format(
str(i)),
'"string filename" [ "test_albedo_{}.exr" ]'.format(str(i)),
'"string filename" [ "test_gt_{}.exr" ]'.format(str(i)))
shutil.copyfile(
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_albedo_{}.pbrt".format(
str(i)),
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_indirect_{}.pbrt".format(
str(i)))
replace_text(
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_indirect_{}.pbrt".format(
str(i)),
'Integrator "albedo"', 'Integrator "indirectlighting" "integer maxdepth" [ 65 ]')
replace_text(
"C:\\Users\\Michi\\PycharmProjects\\DeepIllumination\\scenefiles\\test_setups\\test_indirect_{}.pbrt".format(
str(i)),
'"string filename" [ "test_albedo_{}.exr" ]'.format(str(i)),
'"string filename" [ "test_indirect_{}.exr" ]'.format(str(i)))