IC8 Python API:RLPy RIMaterialComponent

From Reallusion Wiki!
Jump to: navigation, search

Contents

Description

This class is used to manipulate material surface properties. The main material properties are Ambient color, Diffuse color, Specular color, Glossiness value, Self-illumination value, Opacity value, textures, and more. A material is affiliated with an object, therefore, member functions of this class must specify a mesh and material name.

Constructor & Destructor

__init__ (self, *args, **kwargs)

Initializes a new ri material component instance.

Parameters

  • args
  • kwargs

Member Functions

AddAmbientKey (self, kKey, strMeshName, strMaterialName, kColor)

Add an Ambient key for the material according to the time and Transition Type of kKey. See Also: AddDiffuseKey, AddGlossinessKey, AddOpacityKey, AddSelfIlluminationKey, AddSpecularKey, AddTextureWeightKey, AddUvDataKey, AddVideoVolumeKey

Parameters

  • kKey
  • strMeshName
  • strMaterialName
  • kColor

AddDiffuseKey (self, kKey, strMeshName, strMaterialName, kColor)

Add a Diffuse key for the material according to the time and Transition Type of kKey. See Also: AddAmbientKey, AddGlossinessKey, AddOpacityKey, AddSelfIlluminationKey, AddSpecularKey, AddTextureWeightKey, AddUvDataKey, AddVideoVolumeKey

Parameters

  • kKey
  • strMeshName
  • strMaterialName
  • kColor

AddGlossinessKey (self, kKey, strMeshName, strMaterialName, fWeight)

Add a Glossiness key for the material according to the time and Transition Type of kKey. See Also: AddAmbientKey, AddDiffuseKey, AddOpacityKey, AddSelfIlluminationKey, AddSpecularKey, AddTextureWeightKey, AddUvDataKey, AddVideoVolumeKey

Parameters

  • kKey
  • strMeshName
  • strMaterialName
  • fWeight

AddOpacityKey (self, kKey, strMeshName, strMaterialName, fWeight)

Add an Opacity key for the material according to the time and Transition Type of kKey. See Also: AddAmbientKey, AddDiffuseKey, AddGlossinessKey, AddSelfIlluminationKey, AddSpecularKey, AddTextureWeightKey, AddUvDataKey, AddVideoVolumeKey

Parameters

  • kKey
  • strMeshName
  • strMaterialName
  • fWeight

AddReflectionKey (self, kKey, strMeshName, strMaterialName, fWeight)

Adds an reflection key.

Parameters

  • kKey
  • strMeshName
  • strMaterialName
  • fWeight

AddRefractionKey (self, kKey, strMeshName, strMaterialName, fWeight)

Adds an refraction key.

Parameters

  • kKey
  • strMeshName
  • strMaterialName
  • fWeight

AddSelfIlluminationKey (self, kKey, strMeshName, strMaterialName, fWeight)

Add a Self-illumination key for the material according to the time and Transition Type of kKey. See Also: AddAmbientKey, AddDiffuseKey, AddGlossinessKey, AddOpacityKey, AddSpecularKey, AddTextureWeightKey, AddUvDataKey, AddVideoVolumeKey

Parameters

  • kKey
  • strMeshName
  • strMaterialName
  • fWeight

AddSpecularKey (self, *args)

Add a Specular key for the material according to the time and Transition Type of kKey. See Also: AddAmbientKey, AddDiffuseKey, AddGlossinessKey, AddOpacityKey, AddSelfIlluminationKey, AddTextureWeightKey, AddUvDataKey, AddVideoVolumeKey

Parameters

  • args

AddTextureWeightKey (self, kKey, strMeshName, strMaterialName, eChannel, fWeight)

Add a Texture Channel Weight key for the material according to the time and Transition Type of kKey. See Also: AddAmbientKey, AddDiffuseKey, AddGlossinessKey, AddOpacityKey, AddSelfIlluminationKey, AddSpecularKey, AddTextureWeightKey, AddUvDataKey, AddVideoVolumeKey

Parameters

  • kKey
  • strMeshName
  • strMaterialName
  • eChannel
  • fWeight

AddUvDataKey (self, kKey, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate)

Add an UV Texture Coordinates key for the material according to the time and Transition Type of kKey. This key can be used to set the texture channel's UV offset, tile, and rotate values. See Also: AddAmbientKey, AddDiffuseKey, AddGlossinessKey, AddOpacityKey, AddSelfIlluminationKey, AddSpecularKey, AddTextureWeightKey, AddVideoVolumeKey

Parameters

  • kKey
  • strMeshName
  • strMaterialName
  • eChannel
  • kUvOffset
  • kUvTile
  • fUvRotate

AddVideoVolumeKey (self, kKey, strMeshName, strMaterialName, eChannel, fVol, bMute)

Add a Video Volume key for the material according to the time and Transition Type of kKey. This key can be used to set the video material's channel video volume. See Also: AddAmbientKey, AddDiffuseKey, AddGlossinessKey, AddOpacityKey, AddSelfIlluminationKey, AddSpecularKey, AddTextureWeightKey, AddUvDataKey

Parameters

  • kKey
  • strMeshName
  • strMaterialName
  • eChannel
  • fVol
  • bMute

AddWrinkleWeightKey (self, kKey, strMeshName, strMaterialName, uRuleIndex, nWeight)

Adds wrinkle weight key for this ri material component.

Parameters

  • kKey
  • strMeshName
  • strMaterialName
  • uRuleIndex
  • nWeight

CopyMaterial (self, strSrcMeshName, strSrcMaterialName, strDstMeshName, strDstMaterialName)

Copy material.

Parameters

  • strSrcMeshName
  • strSrcMaterialName
  • strDstMeshName
  • strDstMaterialName

GetAmbientColor (self, strMeshName, strMaterialName)

Get the material's Ambient color. See Also: GetDiffuseColor, GetGlossinessWeight, GetMaterialNames, GetOpacity, GetSelfIlluminationWeight, GetSpecularColor, GetSpecularWeight, GetTextureWeights, GetUvData, GetVideoVolume

Parameters

  • strMeshName
  • strMaterialName

GetAttributeValue (self, strMeshName, strMaterialName, strAttributeName)

Returns the attribute value.

Parameters

  • strMeshName
  • strMaterialName
  • strAttributeName

GetDiffuseColor (self, strMeshName, strMaterialName)

Get the material's Diffuse color. See Also: GetAmbientColor, GetGlossinessWeight, GetMaterialNames, GetOpacity, GetSelfIlluminationWeight, GetSpecularColor, GetSpecularWeight, GetTextureWeights, GetUvData, GetVideoVolume

Parameters

  • strMeshName
  • strMaterialName

GetGlossinessWeight (self, strMeshName, strMaterialName)

Get the material's Glossiness weight. See Also: GetMaterialNameParameters

Parameters

  • strMeshName
  • strMaterialName

GetImage (self, strMeshName, strMaterialName, eChannel)

Gets material image from channel.

Parameters

  • strMeshName
  • strMaterialName
  • eChannel

GetImageColor (self, strMeshName, strMaterialName, eChannel)

Gets image color.

Parameters

  • strMeshName
  • strMaterialName
  • eChannel

GetMaterialNames (self, strMeshName)

Get all the material names for the mesh. See Also: GetAmbientColor, GetDiffuseColor, GetGlossinessWeight, GetOpacity, GetSelfIlluminationWeight, GetSpecularColor, GetSpecularWeight, GetTextureWeights, GetUvData, GetVideoVolume

Parameters

  • strMeshName

GetOpacity (self, strMeshName, strMaterialName)

Get the material opacity value. See Also: GetAmbientColor, GetDiffuseColor, GetGlossinessWeight, GetMaterialNames, GetSelfIlluminationWeight, GetSpecularColor, GetSpecularWeight, GetTextureWeights, GetUvData, GetVideoVolume

Parameters

  • strMeshName
  • strMaterialName

GetReflection (self, strMeshName, strMaterialName)

Gets reflection.

Parameters

  • strMeshName
  • strMaterialName

GetRefraction (self, strMeshName, strMaterialName)

Gets refraction.

Parameters

  • strMeshName
  • strMaterialName

GetResourceMapImage (self, strMeshName, strMaterialName, strResourceMapName)

Returns the resource map image.

Parameters

  • strMeshName
  • strMaterialName
  • strResourceMapName

GetSelfIlluminationWeight (self, strMeshName, strMaterialName)

Get the material's self-illumination weight. See Also: GetAmbientColor, GetDiffuseColor, GetGlossinessWeight, GetMaterialNames, GetOpacity, GetSpecularColor, GetSpecularWeight, GetTextureWeights, GetUvData, GetVideoVolume

Parameters

  • strMeshName
  • strMaterialName

GetShader (self, strMeshName, strMaterialName)

Gets shader type of the specify material.

Parameters

  • strMeshName
  • strMaterialName

GetShaderNames (self)

Gets shader names.

GetShaderParameter (self, strMeshName, strMaterialName, strParameter)

Gets the value of the shader parameter.

Parameters

  • strMeshName
  • strMaterialName
  • strParameter

GetShaderParameterNames (self, strMeshName, strMaterialName)

Gets parameter name list of the specify shader.

Parameters

  • strMeshName
  • strMaterialName

GetShaderTextureNames (self, strMeshName, strMaterialName)

Returns the shader texture names for the specified mesh and material.

Parameters

  • strMeshName
  • strMaterialName

GetSpecularColor (self, strMeshName, strMaterialName)

Get the material's Specular color. See Also: GetAmbientColor, GetDiffuseColor, GetGlossinessWeight, GetMaterialNames, GetOpacity, GetSelfIlluminationWeight, GetSpecularWeight, GetTextureWeights, GetUvData, GetVideoVolume

Parameters

  • strMeshName
  • strMaterialName

GetSpecularWeight (self, strMeshName, strMaterialName)

Get the material's Specular weight. See Also: GetAmbientColor, GetDiffuseColor, GetGlossinessWeight, GetMaterialNames, GetOpacity, GetSelfIlluminationWeight, GetSpecularColor, GetTextureWeights, GetUvData, GetVideoVolume

Parameters

  • strMeshName
  • strMaterialName

GetTextureWeights (self, strMeshName, strMaterialName)

Get all texture channel weights for the material. See Also: GetAmbientColor, GetDiffuseColor, GetGlossinessWeight, GetMaterialNames, GetOpacity, GetSelfIlluminationWeight, GetSpecularColor, GetSpecularWeight, GetUvData, GetVideoVolume

Parameters

  • strMeshName
  • strMaterialName

GetUvData (self, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate)

Get all texture channel UV coordinates (offset, tiling, rotation) for the material. See Also: GetAmbientColor, GetDiffuseColor, GetGlossinessWeight, GetMaterialNames, GetOpacity, GetSelfIlluminationWeight, GetSpecularColor, GetSpecularWeight, GetTextureWeights, GetVideoVolume

Parameters

  • strMeshName
  • strMaterialName
  • eChannel
  • kUvOffset
  • kUvTile
  • fUvRotate

GetVideoVolume (self, strMeshName, strMaterialName, eChannel)

Get the video volume for all the video channels of the material. See Also: GetAmbientColor, GetDiffuseColor, GetGlossinessWeight, GetMaterialNames, GetOpacity, GetSelfIlluminationWeight, GetSpecularColor, GetSpecularWeight, GetTextureWeights, GetUvData

Parameters

  • strMeshName
  • strMaterialName
  • eChannel

HasImage (self, strMeshName, strMaterialName, eChannel)

Checks whether the specified material channel has an image.

Parameters

  • strMeshName
  • strMaterialName
  • eChannel

IsReflectionEnable (self, strMeshName, strMaterialName)

Gets the state of the reflection.

Parameters

  • strMeshName
  • strMaterialName

IsRefractionEnable (self, strMeshName, strMaterialName)

Gets the state of the refraction.

Parameters

  • strMeshName
  • strMaterialName

IsTwoSidedMaterial (self, strMeshName, strMaterialName)

Gets the Boolean that specifies if the material is set to two sides.

Parameters

  • strMeshName
  • strMaterialName

IsUnique (self, strMeshName, strMaterialName)

Checks whether a material is uniquely referenced in the scene.

Parameters

  • strMeshName
  • strMaterialName

LoadImageToTexture (self, strMeshName, strMaterialName, eChannel, strImagePath)

Import an image into a material texture channel. See Also: LoadVideoToTexture

Parameters

  • strMeshName
  • strMaterialName
  • eChannel
  • strImagePath

LoadMaterial (self, strMeshName, strMaterialName, strFilePath)

Loads the iMaterial file into the specified material.

Parameters

  • strMeshName
  • strMaterialName
  • strFilePath

LoadShaderTexture (self, strMeshName, strMaterialName, strName, strTexturePath)

Loads the texture from the specified file path into the named shader texture slot.

Parameters

  • strMeshName
  • strMaterialName
  • strName
  • strTexturePath

LoadVideoToTexture (self, kKey, strMeshName, strMaterialName, eChannel, strVideoPath)

Import a video into a material texture channel. See Also: LoadImageToTexture

Parameters

  • kKey
  • strMeshName
  • strMaterialName
  • eChannel
  • strVideoPath

MakeUnique (self, strMeshName, strMaterialName)

Make material unique.

Parameters

  • strMeshName
  • strMaterialName

MergeMaterialUV (self, *args)

Merge material.

Parameters

  • args

RemoveMaterialTexture (self, strMeshName, strMaterialName, eChannel)

Removes material texture from the specified material.

Parameters

  • strMeshName
  • strMaterialName
  • eChannel

RemoveUvDataKey (self, kKey, strMeshName, strMaterialName, eChannel)

Remove an UV data key from a material texture channel. See Also: AddUvDataKey

Parameters

  • kKey
  • strMeshName
  • strMaterialName
  • eChannel

SetAttributeValue (self, strMeshName, strMaterialName, strAttributeName, fValue)

Sets the value of material attributes.

Parameters

  • strMeshName
  • strMaterialName
  • strAttributeName
  • fValue

SetImage (self, spImage, strMeshName, strMaterialName, eChannel)

Sets material image to channel.

Parameters

  • spImage
  • strMeshName
  • strMaterialName
  • eChannel

SetImageColor (self, strMeshName, strMaterialName, eChannel, fSoftness, kHsbc, kCmy)

Sets image color.

Parameters

  • strMeshName
  • strMaterialName
  • eChannel
  • fSoftness
  • kHsbc
  • kCmy

SetMaterialName (self, strMeshName, strOrgMatName, strNewMatName)

Sets material name.

Parameters

  • strMeshName
  • strOrgMatName
  • strNewMatName

SetMaterialSettings (self, kOptions, strMeshName, strMaterialName)

Sets material settings as ui.

Parameters

  • kOptions
  • strMeshName
  • strMaterialName

SetReflectionEnable (self, strMeshName, strMaterialName, bEnable)

Sets the state of the reflection.

Parameters

  • strMeshName
  • strMaterialName
  • bEnable

SetRefractionEnable (self, strMeshName, strMaterialName, bEnable)

Sets the state of the refraction.

Parameters

  • strMeshName
  • strMaterialName
  • bEnable

SetShader (self, strMeshName, strMaterialName, strShader)

Sets shader type of the specify material.

Parameters

  • strMeshName
  • strMaterialName
  • strShader

SetShaderParameter (self, strMeshName, strMaterialName, strParameter, kValue)

Sets the value of the shader parameter.

Parameters

  • strMeshName
  • strMaterialName
  • strParameter
  • kValue

SetTwoSidedMaterial (self, strMeshName, strMaterialName, bEnable)

Enable or disable two sided material.

Parameters

  • strMeshName
  • strMaterialName
  • bEnable

SetWrinkleActionToRule (self, strMeshName, strMaterialName, strActionName, strRuleName, strRuleRangeMin, strRuleRangeMax)

Sets the wrinkle action to rule.

Parameters

  • strMeshName
  • strMaterialName
  • strActionName
  • strRuleName
  • strRuleRangeMin
  • strRuleRangeMax

SetWrinkleDetailParameters (self, eWrinkleFacePart, eWrinkleLayerType, fStrength)

Sets strength of wrinkle AoCrease, Redness, NormalStrength.

Parameters

  • eWrinkleFacePart
  • eWrinkleLayerType
  • fStrength

SetWrinkleDetailStrength (self, eWrinkleFacePart, fStrength)

Sets total wrinkle strength.

Parameters

  • eWrinkleFacePart
  • fStrength

SetWrinkleFlattenTexture (self, eChannel, strImagePath)

Sets texture for all wrinkle channel.

Parameters

  • eChannel
  • strImagePath

SetWrinkleMaskFilePath (self, strMeshName, strMaterialName, strMaskPath, uMaskIndex)

Sets the wrinkle mask file path.

Parameters

  • strMeshName
  • strMaterialName
  • strMaskPath
  • uMaskIndex

SetWrinkleRule (self, strMeshName, strMaterialName, strRelateName, uMaskValueIndex, uMaskTextureIndex, strMaskChannel, fWeight)

Sets the wrinkle rule.

Parameters

  • strMeshName
  • strMaterialName
  • strRelateName
  • uMaskValueIndex
  • uMaskTextureIndex
  • strMaskChannel
  • fWeight

SetWrinkleTextureFilePath (self, strMeshName, strMaterialName, strDiffusePath, strNormalPath, strRoughnessPath, uWrinkleImageIndex)

Sets the wrinkle texture file path.

Parameters

  • strMeshName
  • strMaterialName
  • strDiffusePath
  • strNormalPath
  • strRoughnessPath
  • uWrinkleImageIndex

Properties

thisown

Indicates whether this SWIG proxy owns the underlying C++ object.