Garry's Mod Wiki

DModelPanel:GetAmbientLight

  table DModelPanel:GetAmbientLight()

Description

Returns the ambient lighting used on the rendered entity.

Returns

1 table
The color of the ambient lighting.

Example

Prints out the default ambient lighting used on models.

local mdl = vgui.Create("DModelPanel") mdl:SetPos(20, 20) mdl:SetSize(200, 200) mdl:SetModel("models/props_junk/watermelon01.mdl") print(mdl:GetAmbientLight())
Output: 50 50 50 255