Skip to content

Commit 00ddb6c

Browse files
committed
updated Lecture2 for 2023 build
1 parent 0fb9bab commit 00ddb6c

23 files changed

+26
-36
lines changed

Lecture3Lighting/AOV/HairAOV.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
from __future__ import print_function
33
import sys, subprocess
44

Lecture3Lighting/Composite/MatchVRAY/MatchVRAY.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
from __future__ import print_function
33
import prman, os, sys, subprocess
44

Lecture3Lighting/Composite/MultipleFiles/MultipleFiles.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
from __future__ import print_function
33
import prman, os, sys, subprocess
44

Lecture3Lighting/Composite/ReLight/ReLight.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
from __future__ import print_function
33
import prman, os, sys, subprocess
44

Lecture3Lighting/CryptoMatte.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/python
2-
from __future__ import print_function
1+
#!/usr/bin/env python
32
import prman, os
43
import subprocess
54
import ProcessCommandLine as cl

Lecture3Lighting/Denoise/Denoise.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
from __future__ import print_function
33
import prman, os, sys, subprocess
44

Lecture3Lighting/DistantLight.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
from __future__ import print_function
33
import prman
44
import ProcessCommandLine as cl
@@ -99,7 +99,8 @@ def main(
9999
# ri.Rotate(35,0,1,0)
100100
To = [0, 0, 0]
101101
From = [1, 1.5, -15]
102-
direction = map(lambda x, y: x - y, To, From)
102+
#direction = map(lambda x, y: x - y, To, From)
103+
direction = [x-y for x,y in zip( To,From)]
103104
AimZ(ri, direction)
104105

105106
ri.Light("PxrDistantLight", "distantLight", {"float intensity": 10000, "float exposure": 2.0})

Lecture3Lighting/EnvDayLight.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/python
2-
from __future__ import print_function
1+
#!/usr/bin/env python
32
import prman
43

54
# import the python functions

Lecture3Lighting/EnvDomeLight.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/python
2-
from __future__ import print_function
1+
#!/usr/bin/env python
32
import prman
43

54
# import the python functions

Lecture3Lighting/Gobo.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/python
2-
from __future__ import print_function
1+
#!/usr/bin/env python
32
import sys
43

54
sys.path.append("../common")

Lecture3Lighting/Hair.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/python
2-
from __future__ import print_function
1+
#!/usr/bin/env python
32
import sys
43

54
sys.path.append("../common")

Lecture3Lighting/HairRot.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/python
2-
from __future__ import print_function
1+
#!/usr/bin/env python
32
import sys
43

54
sys.path.append("../common")

Lecture3Lighting/Layers/CheckerLayer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
from __future__ import print_function
33
import prman
44

Lecture3Lighting/MeshLight.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/python
2-
from __future__ import print_function
1+
#!/usr/bin/env python
32
import prman, os
43
import ProcessCommandLine as cl
54

Lecture3Lighting/PortalLight.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
import prman
33

44
# import the python functions

Lecture3Lighting/PortalRoom.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/python
2-
from __future__ import print_function
1+
#!/usr/bin/env python
32
import prman
43
import ProcessCommandLine as cl
54

Lecture3Lighting/RectLight.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/python
2-
from __future__ import print_function
1+
#!/usr/bin/env python
32
import prman, os
43
import ProcessCommandLine as cl
54

Lecture3Lighting/SphereLight.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
from __future__ import print_function
33

44
import os.path

Lecture3Lighting/Volume.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
import prman
33

44
# import the python functions

Lecture3Lighting/basicScene.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/python
2-
from __future__ import print_function
1+
#!/usr/bin/env python
32
import prman
43
import ProcessCommandLine as cl
54

Lecture3Lighting/diskLight.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/python
2-
from __future__ import print_function
1+
#!/usr/bin/env python
32
import prman, os
43
import subprocess
54
import ProcessCommandLine as cl

Lecture3Lighting/surfaces.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
import prman
33

44
# import the python functions

common/Mat4.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import math, operator
1+
import math, operator,functools
22

33
""" simple 4x4 matrix class some code modified from here
44
http://code.activestate.com/recipes/578131-a-simple-matrix-class/
@@ -71,7 +71,7 @@ def getTranspose(self):
7171
return mat
7272

7373
def getMatrix(self):
74-
return reduce(operator.concat, self.m)
74+
return functools.reduce(operator.concat, self.m)
7575

7676
def __mul__(self, rhs):
7777
mat_t = rhs.getTranspose()

0 commit comments

Comments
 (0)