-
Notifications
You must be signed in to change notification settings - Fork 208
Expand file tree
/
Copy pathtest_demofiles.py
More file actions
35 lines (24 loc) · 1.17 KB
/
Copy pathtest_demofiles.py
File metadata and controls
35 lines (24 loc) · 1.17 KB
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
import os
import hou
import unittest
local_dir = os.path.dirname(__file__)
class TestStringMethods(unittest.TestCase):
@classmethod
def setUpClass(cls):
pass
def test_1_test_demoscenes(self):
demo_files = os.listdir(os.path.dirname(local_dir) + "/hip")
for demo_file in demo_files:
if demo_file.endswith(".hip"):
print "opening", demo_file
try:
hou.hipFile.load(os.path.join(os.path.dirname(local_dir), "hip", demo_file).replace("\\", "/"))
GameDevNodeInstances = [x for x in hou.node("/").allSubChildren() if x.type().nameComponents()[1] == "gamedev"]
for node in GameDevNodeInstances:
if node.type().definition().nodeType().name() != hou.nodeType(node.type().definition().nodeTypeCategory(), node.type().definition().nodeTypeName()).namespaceOrder()[0]:
print "Warning... Node instance is using older definition:", node.path()
except Exception, e:
print str(e)
pass
if __name__ == '__main__':
unittest.main()