mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-16 17:01:53 +00:00
[qfmdl] Speed up vertex import slightly
Well, not measured, but I expect that python allocates the destination list before executing the loop (I've forgotten the name of that coding form).
This commit is contained in:
parent
bce7d5b832
commit
ef850d97ea
1 changed files with 1 additions and 3 deletions
|
@ -31,15 +31,13 @@ def make_verts(mdl, framenum, subframenum=0):
|
|||
frame = mdl.frames[framenum]
|
||||
if frame.type:
|
||||
frame = frame.frames[subframenum]
|
||||
verts = []
|
||||
s = Vector(mdl.scale)
|
||||
o = Vector(mdl.scale_origin)
|
||||
m = Matrix(((s.x, 0, 0,o.x),
|
||||
( 0,s.y, 0,o.y),
|
||||
( 0, 0,s.z,o.z),
|
||||
( 0, 0, 0, 1)))
|
||||
for v in frame.verts:
|
||||
verts.append(m @ Vector(v.r))
|
||||
verts = [m @ Vector(v.r) for v in frame.verts]
|
||||
return verts
|
||||
|
||||
def make_faces(mdl):
|
||||
|
|
Loading…
Reference in a new issue