Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions lua/prop2mesh/cl_meshlab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ local coroutine_yield = coroutine.yield
local a90 = Angle(0, -90, 0)
local YIELD_THRESHOLD = 30

local devcvar = GetConVar("developer")
local cvar = CreateClientConVar("prop2mesh_render_disable_obj", 0, true, false)
local disable_obj = cvar:GetBool()

Expand Down Expand Up @@ -865,7 +866,10 @@ local function getVertsFromOBJ(custom, partnext, meshtex, meshbump, vmins, vmaxs
local smooth = partnext.vsmooth
local parseErr, errChar, errLine = tryParseObj(modelobj, vmesh, vlook, vmins, vmaxs, pos, ang, scale, invert, meshtex)
if parseErr then
ErrorNoHalt("Prop2Mesh getVertsFromOBJ failure at line " .. errLine .. ", char " .. errChar .. ": " .. tostring(parseErr) .. "\n")
if devcvar:GetBool() then
ErrorNoHalt("Prop2Mesh getVertsFromOBJ failure at line " .. errLine .. ", char " .. errChar .. ": " .. tostring(parseErr) .. "\n")
end

coroutine_yield(false)
end

Expand Down Expand Up @@ -1093,7 +1097,10 @@ hook.Add("Think", "prop2mesh_meshlab", function()
local ok, err, mdata = coroutine.resume(lab.coro, lab.data, lab.uniqueID)

if not ok then
ErrorNoHaltWithStack("Prop2Mesh Meshlab error: " .. (tostring(err) or "<nil>"))
if devcvar:GetBool() then
ErrorNoHaltWithStack("Prop2Mesh Meshlab error: " .. (tostring(err) or "<nil>"))
end

meshlabs[key] = nil
break
end
Expand Down