Samples/MaterialAndTexture/LayeredTexture.py
15 from pyfbsdk
import FBSystem, FBModel, FBModelPlane, FBMaterial, FBTexture, FBLayeredTexture, FBVector3d, FBColor, FBMaterialTextureType, FBTextureBlendMode
25 lTexture1 =
FBTexture( os.path.abspath(os.path.join(
FBSystem().ApplicationPath,
"../system/material_background.tif" ) ) )
26 lTexture2 =
FBTexture( os.path.abspath(os.path.join(
FBSystem().ApplicationPath,
"../system/actor-picture.tif" )) )
30 lLayeredTexture.Layers.append(lTexture2)
31 lLayeredTexture.Layers.append(lTexture1)
33 lTexture2.BlendMode = FBTextureBlendMode.kFBTextureBlendTranslucent
37 lLayeredTexture.HardSelect()
41 lMaterial.SetTexture(lLayeredTexture, FBMaterialTextureType.kFBMaterialTextureDiffuse)
44 lPlane.Materials.append(lMaterial)