Hi,
I load models with the material automatically with LoadModel("....").
After the model is correctly loaded I try to change the material of this model (a modeller complaint about blurred textures - looks like I've to change the texture filter). The problem is that I can't get access to the material itself but not one of this commands returns a valid material:
mat0=player.material
mat1=player:GetChild(1).material
mat2=GetEntityMaterial(player)
mat3=GetEntityMaterial(player:GetChild(1))
If I use
material=LoadMaterial("abstract::cobblestones.mat")
ground=CreateCube()
ground:SetScale(Vec3(100.0,1.0,100.0))
ground:SetPosition(Vec3(0.0,-2.0,0.0))
ground:Paint(material)
the commands
mat0=ground.material
mat2=GetEntityMaterial(ground)
are returning the correct value.
Do I undestand something or do I've just found a bug?
What I want to do is creating a look to set the texture filter for each material with PIXEL instead of MIPMAP:
Thanks,
Stefan