Strip unneeded zero weights

This commit is contained in:
Lars Mueller 2021-02-01 13:29:00 +01:00
parent 81793819a3
commit 12826a7840

@ -193,7 +193,11 @@ function read(stream)
while content() do
local vertex_id = id()
assert(not bone[vertex_id], "duplicate vertex weight")
bone[vertex_id] = float()
local weight = float()
if weight > 0 then
-- Many exporters include unneeded zero weights
bone[vertex_id] = weight
end
end
return bone
end,