Entity colors in DModelPanel

Ingame, my playermodel looks like this

http://i.imgur.com/N9lDpnX.png[/t]

However, when I try and create a simulation of my player in a DModelPanel, it looks like this: ( this when I call DModelPanel.Entity:SetColor( col ) )
[t]http://i.imgur.com/i8RwcPW.png[/t]

But when I call the other function, DModelPanel:SetColor( col ) I get this:
[t]http://i.imgur.com/HEHGSIf.png

Basically I want to color the playermodel in the DModelPanel without coloring all my hats and accessories.
The hats are ClientsideModels which are drawn by setting their position+angle to the corresponding values on the DModelPanel, and then calling m:DrawModel() ( they had m:SetNoDraw( true ) ). This is done in the DModelPanel:DrawModel() hook.

Is it possible to set the playermodel’s color without affecting the ClientsideModels that are drawn along with it?

Thanks in advance.


if (IsValid(modelpanel.Entity)) then
function modelpanel.Entity:GetPlayerColor()
return LocalPlayer():GetPlayerColor()
end
end

This basically replaces the code that gets the model panel’s player color with the function that gets the local player’s player color.

I believe that’s only for playermodels which have colorable submaterials, like Kleiner’s lab coat or alyx’s jacket. This uses GetPlayerColor which returns a vector which stores the color.

What I wanted to do was be able to get the same effect as calling ply:SetColor( Color(R,G,B) ) (using color objects) on the DModelPanel.