Skip to content

SurfaceDefinition

Canonical path: NemAll_Python_BasisElements.SurfaceDefinition

Surface resource definition

AbsolutePath property writable

AbsolutePath: str

get the absolute path of the surface, outside from the design path

AlphaFromTextureStatus property writable

AlphaFromTextureStatus: bool

get the flag for using alpha channel from the color bitmap

BumpAmplitude property writable

BumpAmplitude: float

get bump mapping amplitude

ColorKey property writable

ColorKey: ARGB

get the color key color

ColorKeyStatus property writable

ColorKeyStatus: bool

get the flag for using color key

ColorKeyTolerance property writable

ColorKeyTolerance: int

get the color key tolerance 0-255

ColorMixingFactor property writable

ColorMixingFactor: int

get the color mixing factor, 0 - 100

ColorMixingMode property writable

ColorMixingMode: int

get the color mixing mode.

DiffuseColor property writable

DiffuseColor: ARGB

get the diffuse color

DiffuseReflectivity property writable

DiffuseReflectivity: int

get the diffuse color intensity

Emission property writable

Emission: float

get the color emission intensity

MetricStatus property writable

MetricStatus: bool

get the flag for texture scale dependency from the object size. true - texture is scaled independently from the object size

MultiToneFactor property writable

MultiToneFactor: float

get the coating reflection intensity

NormalMapStatus property writable

NormalMapStatus: bool

get the flag for using normal map texture in bump map, otherwise it will be height map

NotFound property writable

NotFound: bool

get the flag for not found surface file

ParallaxOffset property writable

ParallaxOffset: float

get the parallax offset

ParallaxSamples property writable

ParallaxSamples: int

get parallax samples

Reflection property writable

Reflection: int

get the reflection amplitude

Refraction property writable

Refraction: float

get the IOR

RelativeName property writable

RelativeName: str

get the relative path and name of the surface, under the design folder

RepeatStatus property writable

RepeatStatus: bool

get the flag for texture repeating

Rotation property writable

Rotation: float

get the texture rotation angle in degrees

Roughness property writable

Roughness: float

get the roughness amplitude

Transparency property writable

Transparency: int

get the transparency intensity

eSurfaceTextureID

Canonical path: NemAll_Python_BasisElements.SurfaceDefinition.eSurfaceTextureID

Bases: Enum

__getitem__

__getitem__(key: str | int | float) -> eSurfaceTextureID

get the item for a key

Parameters:

  • key (str | int | float) –

    value key

Returns:

CompareData

CompareData(ldef: SurfaceDefinition) -> bool

compare the surface properties

CopyData

CopyData(pSrcSurface: SurfaceDefinition, bCopyName: bool = True)

copy the data from an other surface

Create staticmethod

Create() -> SurfaceDefinition

Create a surface definition

Dump

Dump(deep: bool)

Dumps content of the resource

GetDiffuseFactor

GetDiffuseFactor() -> float

get the diffuse factor calculated from diffuse color intensity, reflection intensity and the transparency intensity

GetHash

GetHash() -> int

get the hash of the surface definition data

GetReflectionFactor

GetReflectionFactor() -> float

calculate the reflection factor from transparency and reflection intensity

GetScaleU

GetScaleU() -> float

get the texture u scale factor

GetScaleV

GetScaleV() -> float

get the texture v scale factor

GetSeasonStatus

GetSeasonStatus() -> bool

get the surface season flag , true - not all color texture are the same

GetSurfaceName

GetSurfaceName() -> str

get the surface name

GetTextureID

GetTextureID(tex: eSurfaceTextureID) -> int

get the bitmap id of the texture

GetTranslateU

GetTranslateU() -> float

get the texture u offset

GetTranslateV

GetTranslateV() -> float

get the texture v offset

IsDefault

IsDefault() -> bool

check whether the surface properties has default values

LoadSurfaceData

LoadSurfaceData(surfacePath: str)

load surface properties only

PreviewCalculationSkipped

PreviewCalculationSkipped() -> bool

Save

Save(
    surfacePath: str, bitmapDict: Dict[eSurfaceTextureID, BitmapDefinition]
) -> bool

Create a surface definition

Returns:

  • bool

    Creation successful state

Parameters:

  • surfacePath (str) –

    Path of the bitmap

  • bitmapDefinitions

    Dict with the bitmap definitions

SetScale

SetScale(u: float, v: float)

set the texture scaling factors -10000 to 10000

SetTextureID

SetTextureID(tex: eSurfaceTextureID, bitmapID: int)

set the bitmapID for one texture

SetTranslate

SetTranslate(u: float, v: float)

set the texture offset -INT_MAX to INT_MAX

Placeholder