Samples/MaterialAndTexture/MaterialAndTexture.py
12 from pyfbsdk
import FBSystem, FBModel, FBModelCube, FBMaterial, FBTexture, FBVector3d, FBColor, FBMaterialTextureType
28 lMaterial.HardSelect()
31 lMaterial.Diffuse =
FBColor(1, 0, 0)
32 lMaterial.Ambient =
FBColor(0.5, 0.5, 0)
35 lTexture =
FBTexture(os.path.abspath(os.path.join(
FBSystem().ApplicationPath,
"../system/actor-picture.tif" )))
38 lMaterial.SetTexture(lTexture, FBMaterialTextureType.kFBMaterialTextureDiffuse)
41 lCube.Materials.append(lMaterial)