MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / processPatch

Function processPatch

install/scripts/commands/ase_export.py:90–111  ·  view source on GitHub ↗
(patchnode)

Source from the content-addressed store, hash-verified

88 return
89
90 def processPatch(patchnode):
91 verts = []
92 faces = []
93
94 shader = patchnode.getShader()
95
96 # Tels: skip if caulk and no caulk should be exported
97 if shader == 'textures/common/caulk' and int(GlobalRegistry.get('user/scripts/aseExport/exportcaulk')) == 0:
98 return
99
100 if not shader in shaderlist:
101 shaderlist.append(shader)
102 mesh = patchnode.getTesselatedPatchMesh()
103 for x in mesh.vertices:
104 verts.append([x.vertex.x(), x.vertex.y(), x.vertex.z(), x.texcoord.x(), x.texcoord.y() * -1, x.normal.x(), x.normal.y(), x.normal.z()])
105 tris = skinmatrix([x for x in range(len(verts))], mesh.width, mesh.height)
106 for x in tris:
107 x.append(shaderlist.index(shader))
108 faces.append(x)
109
110 geomlist.append([verts, faces])
111 return
112
113 # Branch on primitive nodes
114 def processPrimitive(scenenode):

Callers 2

processPrimitiveFunction · 0.70
preMethod · 0.70

Calls 10

rangeFunction · 0.85
lenFunction · 0.85
getShaderMethod · 0.80
xMethod · 0.80
yMethod · 0.80
zMethod · 0.80
skinmatrixFunction · 0.70
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected