Difference between revisions of "IC Python API:RLPy RIMaterialComponent"

From Reallusion Wiki!
Jump to: navigation, search
(Created page with "{{TOC}} {{Parent|IC_Python_API:RL_Python_Modules|Modules}} ==Inheritance== This class inherits public member functions from: *RLPy.RIBase ==Detai...")
 
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{TOC}}
 
{{TOC}}
 
{{Parent|IC_Python_API:RL_Python_Modules|Modules}}
 
{{Parent|IC_Python_API:RL_Python_Modules|Modules}}
==Inheritance==
+
{{last_modified}}
This class inherits public member functions from:
+
 
*[[IC_Python_API:RLPy_RIBase|RLPy.RIBase]]
+
== Description ==
==Detailed Description==
+
 
RIMaterialComponent.
+
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.
<span style="background:#ffcccc">( Experimental Class )</span> <syntaxhighlight lang="Python">
+
 
# Get Object mesh and material
+
=== Inheritance ===
 +
 
 +
[[IC_Python_API:RLPy_RIBase|RIBase]] > [[IC_Python_API:RLPy_RIMaterialComponent|RIMaterialComponent]]
 +
 
 +
== 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 ( self, kKey, strMeshName, strMaterialName, kColor )|AddDiffuseKey]],
 +
[[#AddGlossinessKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddGlossinessKey]],
 +
[[#AddOpacityKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddOpacityKey]],
 +
[[#AddSelfIlluminationKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSelfIlluminationKey]],
 +
[[#AddSpecularKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSpecularKey]],
 +
[[#AddTextureWeightKey ( self, kKey, strMeshName, strMaterialName, eChannel, fWeight )|AddTextureWeightKey]],
 +
[[#AddUvDataKey ( self, kKey, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate )|AddUvDataKey]],
 +
[[#AddVideoVolumeKey ( self, kKey, strMeshName, strMaterialName, eChannel, fVol, bMute )|AddVideoVolumeKey]]
 +
 
 +
==== Parameters ====
 +
:'''kKey''' [IN] The key for time and transition control - [[IC_Python_API:RLPy_RKey|RKey]]
 +
:'''strMeshName''' [IN] Name of the mesh - string
 +
:'''strMaterialName''' [IN] Name of a mesh material - string
 +
:'''kColor''' [IN] The color of a material’s ambient component - [[IC_Python_API:RLPy_RRgb|RRgb]]
 +
 
 +
==== Returns ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
 +
 
 +
<syntaxhighlight lang="python" line='line'>
 +
# Get object, mesh and material
 
avatar_list = RLPy.RScene.GetAvatars()
 
avatar_list = RLPy.RScene.GetAvatars()
 
avatar = avatar_list[0]
 
avatar = avatar_list[0]
 
material_component = avatar.GetMaterialComponent()
 
material_component = avatar.GetMaterialComponent()
 
 
mesh_list = avatar.GetMeshNames()
 
mesh_list = avatar.GetMeshNames()
 
mesh_name = mesh_list[0]
 
mesh_name = mesh_list[0]
 
 
material_list = material_component.GetMaterialNames(mesh_name)
 
material_list = material_component.GetMaterialNames(mesh_name)
 
material_name = material_list[0]
 
material_name = material_list[0]
 +
# Create a key
 +
key = RLPy.RKey()
 +
key.SetTime(RLPy.RTime(1200))
 +
# Add an ambient key value
 +
material_component.AddAmbientKey(key, mesh_name, material_name, RLPy.RRgb.RED)
 +
</syntaxhighlight>
  
# Modify material light
+
=== AddDiffuseKey ( self, kKey, strMeshName, strMaterialName, kColor ) ===
ambient_color = RLPy.RRgb.RED
+
diffuse_color = RLPy.RRgb.GREEN
+
specular_color = RLPy.RRgb.BLUE
+
  
# Create Key
+
Add a Diffuse key for the material according to the time and Transition Type of '''kKey'''.
 +
 
 +
See Also:
 +
[[#AddAmbientKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddAmbientKey]],
 +
[[#AddGlossinessKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddGlossinessKey]],
 +
[[#AddOpacityKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddOpacityKey]],
 +
[[#AddSelfIlluminationKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSelfIlluminationKey]],
 +
[[#AddSpecularKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSpecularKey]],
 +
[[#AddTextureWeightKey ( self, kKey, strMeshName, strMaterialName, eChannel, fWeight )|AddTextureWeightKey]],
 +
[[#AddUvDataKey ( self, kKey, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate )|AddUvDataKey]],
 +
[[#AddVideoVolumeKey ( self, kKey, strMeshName, strMaterialName, eChannel, fVol, bMute )|AddVideoVolumeKey]]
 +
 
 +
==== Parameters ====
 +
:'''kKey''' [IN] The key to add a diffuse key value - [[IC_Python_API:RLPy_RKey|RKey]]
 +
:'''strMeshName''' [IN] Name of the mesh - string
 +
:'''strMaterialName''' [IN] Name of a mesh material - string
 +
:'''kColor''' [IN] The color for diffuse - [[IC_Python_API:RLPy_RRgb|RRgb]]
 +
 
 +
==== Returns ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
 +
 
 +
<syntaxhighlight lang="python" line='line'>
 +
# Get object, mesh and material
 +
avatar_list = RLPy.RScene.GetAvatars()
 +
avatar = avatar_list[0]
 +
material_component = avatar.GetMaterialComponent()
 +
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Create a key
 
key = RLPy.RKey()
 
key = RLPy.RKey()
 
key.SetTime(RLPy.RTime(1200))
 
key.SetTime(RLPy.RTime(1200))
key.SetTransitionType(RLPy.ETransitionType_Linear)
+
# Add a diffuse key value
key.SetTransitionStrength(50)
+
material_component.AddDiffuseKey(key, mesh_name, material_name, RLPy.RRgb.RED)
 +
</syntaxhighlight>
  
material_component.AddAmbientKey(key, mesh_name, material_name, ambient_color)
+
=== AddGlossinessKey ( self, kKey, strMeshName, strMaterialName, fWeight ) ===
print(material_component.GetAmbientColor(mesh_name, material_name))
+
  
material_component.AddDiffuseKey(key, mesh_name, material_name, diffuse_color)
+
Add a Glossiness key for the material according to the time and Transition Type of '''kKey'''.
print(material_component.GetDiffuseColor(mesh_name, material_name))
+
  
material_component.AddSpecularKey(key, mesh_name, material_name, specular_color)
+
See Also:
print(material_component.GetSpecularColor(mesh_name, material_name))
+
[[#AddAmbientKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddAmbientKey]],
 +
[[#AddDiffuseKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddDiffuseKey]],
 +
[[#AddOpacityKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddOpacityKey]],
 +
[[#AddSelfIlluminationKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSelfIlluminationKey]],
 +
[[#AddSpecularKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSpecularKey]],
 +
[[#AddTextureWeightKey ( self, kKey, strMeshName, strMaterialName, eChannel, fWeight )|AddTextureWeightKey]],
 +
[[#AddUvDataKey ( self, kKey, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate )|AddUvDataKey]],
 +
[[#AddVideoVolumeKey ( self, kKey, strMeshName, strMaterialName, eChannel, fVol, bMute )|AddVideoVolumeKey]]
  
glossiness = 70
+
==== Parameters ====
specular = 300
+
:'''kKey''' [IN] The key for time and transition control - [[IC_Python_API:RLPy_RKey|RKey]]
self_illumination = 60
+
:'''strMeshName''' [IN] Name of the mesh - string
opacity = 45
+
:'''strMaterialName''' [IN] Name of a mesh material - string
material_component.AddGlossinessKey(key, mesh_name, material_name, glossiness)
+
:'''fWeight''' [IN] The weight for glossiness - float [0~100]
print(material_component.GetGlossinessWeight(mesh_name, material_name))
+
  
material_component.AddSpecularKey(key, mesh_name, material_name, specular)
+
==== Returns ====
print(material_component.GetSpecularWeight(mesh_name, material_name))
+
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
  
material_component.AddSelfIlluminationKey(key, mesh_name, material_name, self_illumination)
+
<syntaxhighlight lang="python" line='line'>
print(material_component.GetSelfIlluminationWeight(mesh_name, material_name))
+
# Get object, mesh and material
 +
avatar_list = RLPy.RScene.GetAvatars()
 +
avatar = avatar_list[0]
 +
material_component = avatar.GetMaterialComponent()
 +
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Create a key
 +
key = RLPy.RKey()
 +
key.SetTime(RLPy.RTime(1200))
 +
# Add a glossiness key value
 +
material_component.AddGlossinessKey(key, mesh_name, material_name, 0.5)
 +
</syntaxhighlight>
  
material_component.AddOpacityKey(key, mesh_name, material_name, opacity)
+
=== AddSpecularKey ( self, kKey, strMeshName, strMaterialName, kColor ) ===
print(material_component.GetOpacity(mesh_name, material_name))
+
  
# Modify texture weight
+
Add a Specular key for the material according to the time and Transition Type of '''kKey'''.
texture_channel = RLPy.EMaterialTextureChannel_Diffuse
+
diffuse_weight = 0.0
+
material_component.AddTextureWeightKey(key, mesh_name, material_name,
+
     texture_channel, diffuse_weight)
+
    
+
temp_texture_weight_list = material_component.GetTextureWeights(mesh_name, material_name)
+
print(temp_texture_weight_list[int(texture_channel)])
+
  
# Modify uv data
+
See Also:
texture_channel = RLPy.EMaterialTextureChannel_Bump
+
[[#AddAmbientKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddAmbientKey]],
uv_offset = RLPy.RVector2(0.1, 0)
+
[[#AddDiffuseKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddDiffuseKey]],
uv_tile = RLPy.RVector2(1, 1)
+
[[#AddGlossinessKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddGlossinessKey]],
uv_rotate = 3.14
+
[[#AddOpacityKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddOpacityKey]],
material_component.AddUvDataKey(key, mesh_name, material_name,
+
[[#AddSelfIlluminationKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSelfIlluminationKey]],
     texture_channel, uv_offset, uv_tile, uv_rotate)
+
[[#AddTextureWeightKey ( self, kKey, strMeshName, strMaterialName, eChannel, fWeight )|AddTextureWeightKey]],
    
+
[[#AddUvDataKey ( self, kKey, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate )|AddUvDataKey]],
temp_uv_offset = RLPy.RVector2()
+
[[#AddVideoVolumeKey ( self, kKey, strMeshName, strMaterialName, eChannel, fVol, bMute )|AddVideoVolumeKey]]
temp_uv_tile = RLPy.RVector2()
+
temp_uv_data = material_component.GetUvData(mesh_name, material_name, texture_channel,
+
     temp_uv_offset, temp_uv_tile, uv_rotate)
+
print(temp_uv_data[1]) # uv rotate
+
print(temp_uv_offset) # uv offset
+
print(temp_uv_tile) # uv tile
+
material_component.RemoveUvDataKey(key, mesh_name, material_name, texture_channel)
+
    
+
# Load video to material channel
+
texture_channel = RLPy.EMaterialTextureChannel_Bump
+
video_file = "C://MaterialVideoTest.mp4"
+
video_volume = 50
+
is_mute = False
+
material_component.LoadVideoToTexture(key, mesh_name, material_name,
+
     texture_channel, video_file)
+
material_component.AddVideoVolumeKey(key, mesh_name, material_name,
+
     texture_channel, video_volume, is_mute)
+
    
+
print(material_component.GetVideoVolume(mesh_name, material_name, texture_channel))
+
  
#Load image to material channel
+
==== Parameters ====
texture_channel = RLPy.EMaterialTextureChannel_Diffuse
+
:'''kKey''' [IN] The key for time and transition control - [[IC_Python_API:RLPy_RKey|RKey]]
image_file = "C://diffuse.png"
+
:'''strMeshName''' [IN] Name of the mesh - string
result = material_component.LoadImageToTexture(mesh_name, material_name, texture_channel, image_file)
+
:'''strMaterialName''' [IN] Name of a mesh material - string
</syntaxhighlight>
+
:'''kColor''' [IN] The color for specular - [[IC_Python_API:RLPy_RRgb|RRgb]]
==Member Functions==
+
 
===AddAmbientKey===
+
==== Returns ====
<syntaxhighlight lang="Python">
+
:Success - RLPy.RStatus.Success
RLPy.RIMaterialComponent.AddAmbientKey ( self, kKey, strMeshName, strMaterialName, kColor )
+
:Failure - RLPy.RStatus.Failure
 +
 
 +
<syntaxhighlight lang="python" line='line'>
 +
# Get object, mesh and material
 +
avatar_list = RLPy.RScene.GetAvatars()
 +
avatar = avatar_list[0]
 +
material_component = avatar.GetMaterialComponent()
 +
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Create a key
 +
key = RLPy.RKey()
 +
key.SetTime(RLPy.RTime(1200))
 +
# Add a specular key value
 +
material_component.AddSpecularKey(key, mesh_name, material_name, RLPy.RRgb.RED)
 
</syntaxhighlight>
 
</syntaxhighlight>
Add an ambient color key.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''kKey''' [IN] The key for time and transition control - RLPy.RKey
+
=== AddSelfIlluminationKey ( self, kKey, strMeshName, strMaterialName, kColor )  ===
  
'''strMeshName''' [IN] The name for mesh - string
+
Add a Self-illumination key for the material according to the time and Transition Type of '''kKey'''.
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
See Also:
 +
[[#AddAmbientKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddAmbientKey]],
 +
[[#AddDiffuseKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddDiffuseKey]],
 +
[[#AddGlossinessKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddGlossinessKey]],
 +
[[#AddOpacityKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddOpacityKey]],
 +
[[#AddSpecularKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSpecularKey]],
 +
[[#AddTextureWeightKey ( self, kKey, strMeshName, strMaterialName, eChannel, fWeight )|AddTextureWeightKey]],
 +
[[#AddUvDataKey ( self, kKey, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate )|AddUvDataKey]],
 +
[[#AddVideoVolumeKey ( self, kKey, strMeshName, strMaterialName, eChannel, fVol, bMute )|AddVideoVolumeKey]]
  
'''kColor''' [IN] The color for ambient - RLPy.RRgb
+
==== Parameters ====
</div>
+
:'''kKey''' [IN] The key for time and transition control - [[IC_Python_API:RLPy_RKey|RKey]]
====Return Values====
+
strMeshName [IN] Name of the mesh - string
<div style="margin-left: 2em;">
+
strMaterialName [IN] Name of a mesh material - string
 +
fWeight [IN] The weight for self-illumination - float  [0~100]
  
'''RLPy.RStatus.Success''' Success
+
==== Returns ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
  
'''RLPy.RStatus.Failure''' Fail
+
<syntaxhighlight lang="python" line='line'>
</div>
+
# Get object, mesh and material
-----
+
avatar_list = RLPy.RScene.GetAvatars()
===AddDiffuseKey===
+
avatar = avatar_list[0]
<syntaxhighlight lang="Python">
+
material_component = avatar.GetMaterialComponent()
RLPy.RIMaterialComponent.AddDiffuseKey ( self, kKey, strMeshName, strMaterialName, kColor )
+
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Create a key
 +
key = RLPy.RKey()
 +
key.SetTime(RLPy.RTime(1200))
 +
# Add a self-illumination key value
 +
material_component.AddSelfIlluminationKey(key, mesh_name, material_name, 0.5)
 
</syntaxhighlight>
 
</syntaxhighlight>
Add a diffuse color key.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''kKey''' [IN] The key for time and transition control - RLPy.RKey
+
=== AddOpacityKey ( self, kKey, strMeshName, strMaterialName, fWeight )  ===
  
'''strMeshName''' [IN] The name for mesh - string
+
Add an Opacity key for the material according to the time and Transition Type of '''kKey'''.
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
See Also:
 +
[[#AddAmbientKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddAmbientKey]],
 +
[[#AddDiffuseKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddDiffuseKey]],
 +
[[#AddGlossinessKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddGlossinessKey]],
 +
[[#AddSelfIlluminationKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSelfIlluminationKey]],
 +
[[#AddSpecularKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSpecularKey]],
 +
[[#AddTextureWeightKey ( self, kKey, strMeshName, strMaterialName, eChannel, fWeight )|AddTextureWeightKey]],
 +
[[#AddUvDataKey ( self, kKey, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate )|AddUvDataKey]],
 +
[[#AddVideoVolumeKey ( self, kKey, strMeshName, strMaterialName, eChannel, fVol, bMute )|AddVideoVolumeKey]]
  
'''kColor''' [IN] The color for diffuse - RLPy.RRgb
+
==== Parameters ====
</div>
+
:'''kKey''' [IN] The key for time and transition control - [[IC_Python_API:RLPy_RKey|RKey]]
====Return Values====
+
:'''strMeshName''' [IN] Name of the mesh - string
<div style="margin-left: 2em;">
+
:'''strMaterialName''' [IN] Name of a mesh material - string
 +
:'''fWeight''' [IN] The weight for opacity - float    [0~100]
  
'''RLPy.RStatus.Success''' Success
+
==== Returns ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
  
'''RLPy.RStatus.Failure''' Fail
+
<syntaxhighlight lang="python" line='line'>
</div>
+
# Get object, mesh and material
-----
+
avatar_list = RLPy.RScene.GetAvatars()
===AddGlossinessKey===
+
avatar = avatar_list[0]
<syntaxhighlight lang="Python">
+
material_component = avatar.GetMaterialComponent()
RLPy.RIMaterialComponent.AddGlossinessKey ( self, kKey, strMeshName, strMaterialName, fWeight )
+
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Create a key
 +
key = RLPy.RKey()
 +
key.SetTime(RLPy.RTime(1200))
 +
# Add a opacity key value
 +
material_component.AddOpacityKey(key, mesh_name, material_name, 0.5)
 
</syntaxhighlight>
 
</syntaxhighlight>
Add a glossiness weight key.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''kKey''' [IN] The key for time and transition control - RLPy.RKey
+
=== AddTextureWeightKey ( self, kKey, strMeshName, strMaterialName, eChannel, fWeight ) ===
  
'''strMeshName''' [IN] The name for mesh - string
+
Add a Texture Channel Weight key for the material according to the time and Transition Type of '''kKey'''.
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
See Also:
 +
[[#AddAmbientKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddAmbientKey]],
 +
[[#AddDiffuseKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddDiffuseKey]],
 +
[[#AddGlossinessKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddGlossinessKey]],
 +
[[#AddOpacityKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddOpacityKey]],
 +
[[#AddSelfIlluminationKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSelfIlluminationKey]],
 +
[[#AddSpecularKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSpecularKey]],
 +
[[#AddTextureWeightKey ( self, kKey, strMeshName, strMaterialName, eChannel, fWeight )|AddTextureWeightKey]],
 +
[[#AddUvDataKey ( self, kKey, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate )|AddUvDataKey]],
 +
[[#AddVideoVolumeKey ( self, kKey, strMeshName, strMaterialName, eChannel, fVol, bMute )|AddVideoVolumeKey]]
  
'''fWeight''' [IN] The weight for glossiness - float
+
==== Parameters ====
</div>
+
:'''kKey''' [IN] The key for time and transition control - [[IC_Python_API:RLPy_RKey|RKey]]
====Return Values====
+
:'''strMeshName''' [IN] Name of the mesh - string
<div style="margin-left: 2em;">
+
:'''strMaterialName''' [IN] Name of a mesh material - string
 +
:'''eChannel''' [IN] A material texture channel - RLPy.EMaterialTextureChannel
 +
:*RLPy.EMaterialTextureChannel_Metallic
 +
:*RLPy.EMaterialTextureChannel_Diffuse
 +
:*RLPy.EMaterialTextureChannel_Specular
 +
:*RLPy.EMaterialTextureChannel_Shininess
 +
:*RLPy.EMaterialTextureChannel_Glow
 +
:*RLPy.EMaterialTextureChannel_Displacement
 +
:*RLPy.EMaterialTextureChannel_Opacity
 +
:*RLPy.EMaterialTextureChannel_DiffuseBlend
 +
:*RLPy.EMaterialTextureChannel_Bump
 +
:*RLPy.EMaterialTextureChannel_Reflection
 +
:*RLPy.EMaterialTextureChannel_Refraction
 +
:*RLPy.EMaterialTextureChannel_Cube
 +
:*RLPy.EMaterialTextureChannel_AmbientOcclusion
 +
:*RLPy.EMaterialTextureChannel_Quantity
 +
:'''fWeight''' [IN] The weight for channel - float  [0~100] ui 上是 0~100, 傳到核心沒乘 0.01
  
'''RLPy.RStatus.Success''' Success
+
==== Returns ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
  
'''RLPy.RStatus.Failure''' Fail
+
<syntaxhighlight lang="python" line='line'>
</div>
+
# Get object, mesh and material
-----
+
avatar_list = RLPy.RScene.GetAvatars()
===AddOpacityKey===
+
avatar = avatar_list[0]
<syntaxhighlight lang="Python">
+
material_component = avatar.GetMaterialComponent()
RLPy.RIMaterialComponent.AddOpacityKey ( self, kKey, strMeshName, strMaterialName, fWeight )
+
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Create a key
 +
key = RLPy.RKey()
 +
key.SetTime(RLPy.RTime(1200))
 +
# Modify texture weight
 +
texture_channel = RLPy.EMaterialTextureChannel_Diffuse
 +
diffuse_weight = 0.1
 +
material_component.AddTextureWeightKey(key, mesh_name, material_name,
 +
                                      texture_channel, diffuse_weight)
 
</syntaxhighlight>
 
</syntaxhighlight>
Add an opacity key.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''kKey''' [IN] The key for time and transition control - RLPy.RKey
+
=== AddUvDataKey ( self, kKey, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate ) ===
  
'''strMeshName''' [IN] The name for mesh - string
+
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.
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
See Also:
 +
[[#AddAmbientKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddAmbientKey]],
 +
[[#AddDiffuseKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddDiffuseKey]],
 +
[[#AddGlossinessKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddGlossinessKey]],
 +
[[#AddOpacityKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddOpacityKey]],
 +
[[#AddSelfIlluminationKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSelfIlluminationKey]],
 +
[[#AddSpecularKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSpecularKey]],
 +
[[#AddTextureWeightKey ( self, kKey, strMeshName, strMaterialName, eChannel, fWeight )|AddTextureWeightKey]],
 +
[[#AddVideoVolumeKey ( self, kKey, strMeshName, strMaterialName, eChannel, fVol, bMute )|AddVideoVolumeKey]]
  
'''fWeight''' [IN] The weight for opacity - float
+
==== Parameters ====
</div>
+
:'''kKey''' [IN] The key for time and transition control - [[IC_Python_API:RLPy_RKey|RKey]]
====Return Values====
+
:'''strMeshName''' [IN] Name of the mesh - string
<div style="margin-left: 2em;">
+
:'''strMaterialName''' [IN] Name of a mesh material - string
 +
:'''eChannel''' [IN] A material texture channel - RLPy.EMaterialTextureChannel
 +
:*RLPy.EMaterialTextureChannel_Metallic
 +
:*RLPy.EMaterialTextureChannel_Diffuse
 +
:*RLPy.EMaterialTextureChannel_Specular
 +
:*RLPy.EMaterialTextureChannel_Shininess
 +
:*RLPy.EMaterialTextureChannel_Glow
 +
:*RLPy.EMaterialTextureChannel_Displacement
 +
:*RLPy.EMaterialTextureChannel_Opacity
 +
:*RLPy.EMaterialTextureChannel_DiffuseBlend
 +
:*RLPy.EMaterialTextureChannel_Bump
 +
:*RLPy.EMaterialTextureChannel_Reflection
 +
:*RLPy.EMaterialTextureChannel_Refraction
 +
:*RLPy.EMaterialTextureChannel_Cube
 +
:*RLPy.EMaterialTextureChannel_AmbientOcclusion
 +
:*RLPy.EMaterialTextureChannel_Quantity
 +
:'''kUvOffset''' [IN] The uv's offset for channel - RLPy.RVector2f
 +
:'''kUvTile''' [IN] The uv's tile for channel - RLPy.RVector2f
 +
:'''fUvRotate''' [IN] The uv's rotate for channel ( radians) - float
  
'''RLPy.RStatus.Success''' Success
+
==== Return ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
  
'''RLPy.RStatus.Failure''' Fail
+
<syntaxhighlight lang="python" line='line'>
</div>
+
# Get object, mesh and material
-----
+
avatar_list = RLPy.RScene.GetAvatars()
===AddSelfIlluminationKey===
+
avatar = avatar_list[0]
<syntaxhighlight lang="Python">
+
material_component = avatar.GetMaterialComponent()
RLPy.RIMaterialComponent.AddSelfIlluminationKey ( self, kKey, strMeshName, strMaterialName, fWeight )
+
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Create a key
 +
key = RLPy.RKey()
 +
key.SetTime(RLPy.RTime(1200))
 +
# Modify uv data
 +
texture_channel = RLPy.EMaterialTextureChannel_Bump
 +
uv_offset = RLPy.RVector2(0.1, 0)
 +
uv_tile = RLPy.RVector2(1, 1)
 +
uv_rotate = 3.14
 +
material_component.AddUvDataKey(key, mesh_name, material_name,
 +
                          texture_channel, uv_offset, uv_tile, uv_rotate)
 
</syntaxhighlight>
 
</syntaxhighlight>
Add a self-illumination weight key.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''kKey''' [IN] The key for time and transition control - RLPy.RKey
+
=== AddVideoVolumeKey ( self, kKey, strMeshName, strMaterialName, eChannel, fVol, bMute ) ===
  
'''strMeshName''' [IN] The name for mesh - string
+
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.
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
See Also:
 +
[[#AddAmbientKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddAmbientKey]],
 +
[[#AddDiffuseKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddDiffuseKey]],
 +
[[#AddGlossinessKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddGlossinessKey]],
 +
[[#AddOpacityKey ( self, kKey, strMeshName, strMaterialName, fWeight )|AddOpacityKey]],
 +
[[#AddSelfIlluminationKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSelfIlluminationKey]],
 +
[[#AddSpecularKey ( self, kKey, strMeshName, strMaterialName, kColor )|AddSpecularKey]],
 +
[[#AddTextureWeightKey ( self, kKey, strMeshName, strMaterialName, eChannel, fWeight )|AddTextureWeightKey]],
 +
[[#AddUvDataKey ( self, kKey, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate )|AddUvDataKey]]
  
'''fWeight''' [IN] The weight for self-illumination - float
+
==== Parameters ====
</div>
+
:'''kKey''' [IN] The key for time and transition control - [[IC_Python_API:RLPy_RKey|RKey]]
====Return Values====
+
:'''strMeshName''' [IN] Name of the mesh - string
<div style="margin-left: 2em;">
+
:'''strMaterialName''' [IN] Name of a mesh material - string
 +
:'''eChannel''' [IN] A material texture channel - RLPy.EMaterialTextureChannel
 +
:*RLPy.EMaterialTextureChannel_Metallic
 +
:*RLPy.EMaterialTextureChannel_Diffuse
 +
:*RLPy.EMaterialTextureChannel_Specular
 +
:*RLPy.EMaterialTextureChannel_Shininess
 +
:*RLPy.EMaterialTextureChannel_Glow
 +
:*RLPy.EMaterialTextureChannel_Displacement
 +
:*RLPy.EMaterialTextureChannel_Opacity
 +
:*RLPy.EMaterialTextureChannel_DiffuseBlend
 +
:*RLPy.EMaterialTextureChannel_Bump
 +
:*RLPy.EMaterialTextureChannel_Reflection
 +
:*RLPy.EMaterialTextureChannel_Refraction
 +
:*RLPy.EMaterialTextureChannel_Cube
 +
:*RLPy.EMaterialTextureChannel_AmbientOcclusion
 +
:*RLPy.EMaterialTextureChannel_Quantity
 +
:'''fVol''' [IN] The volume of video ( 0-100 ) - float
 +
:'''bMute''' [IN] mute - bool
  
'''RLPy.RStatus.Success''' Success
+
==== Return ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
  
'''RLPy.RStatus.Failure''' Fail
+
<syntaxhighlight lang="python" line='line'>
</div>
+
# Get object, mesh and material
-----
+
avatar_list = RLPy.RScene.GetAvatars()
===AddSpecularKey===
+
avatar = avatar_list[0]
<syntaxhighlight lang="Python">
+
material_component = avatar.GetMaterialComponent()
RLPy.RIMaterialComponent.AddSpecularKey ( self, args )
+
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Create a key
 +
key = RLPy.RKey()
 +
key.SetTime(RLPy.RTime(1200))
 +
# Load video to material channel
 +
texture_channel = RLPy.EMaterialTextureChannel_Bump
 +
video_file = "C://MaterialVideoTest.mp4"
 +
video_volume = 50
 +
is_mute = False
 +
material_component.LoadVideoToTexture(key, mesh_name, material_name,
 +
                                      texture_channel, video_file)
 +
material_component.AddVideoVolumeKey(key, mesh_name, material_name,
 +
                                    texture_channel, video_volume, is_mute)
 
</syntaxhighlight>
 
</syntaxhighlight>
Add a specular weight key.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''kKey''' [IN] The key for time and transition control - RLPy.RKey
+
=== GetAmbientColor ( self, strMeshName, strMaterialName ) ===
  
'''strMeshName''' [IN] The name for mesh - string
+
Get the material's Ambient color.
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
See Also:
 +
[[#GetDiffuseColor ( self, strMeshName, strMaterialName)|GetDiffuseColor]],
 +
[[#GetGlossinessWeight ( self, strMeshName, strMaterialName)|GetGlossinessWeight]],
 +
[[#GetMaterialNames ( self, strMeshName )|GetMaterialNames]],
 +
[[#GetOpacity ( self, strMeshName, strMaterialName )|GetOpacity]],
 +
[[#GetSelfIlluminationWeight ( self, strMeshName, strMaterialName )|GetSelfIlluminationWeight]],
 +
[[#GetSpecularColor ( self, strMeshName, strMaterialName )|GetSpecularColor]],
 +
[[#GetSpecularWeight ( self, strMeshName, strMaterialName )|GetSpecularWeight]],
 +
[[#GetTextureWeights ( self, strMeshName, strMaterialName )|GetTextureWeights]],
 +
[[#GetUvData ( self, strMeshName, strMaterialName, eChannel, kUvOffest, kUvTile, fUvRotate )|GetUvData]],
 +
[[#GetVideoVolume ( self, strMeshName, strMaterialName, eChannel )|GetVideoVolume]]
  
'''fWeight''' [IN] The weight for specular - float
+
==== Parameters ====
</div>
+
:'''strMeshName''' [IN] Name of the mesh - string
====Return Values====
+
:'''strMaterialName''' [IN] Name of a mesh material - string
<div style="margin-left: 2em;">
+
  
'''RLPy.RStatus.Success''' Success
+
==== Returns ====
 +
:ambient color - [[IC_Python_API:RLPy_RRgb|RRgb]]
  
'''RLPy.RStatus.Failure''' Fail
+
<syntaxhighlight lang="python" line='line'>
</div>
+
# Get object, mesh and material
-----
+
avatar_list = RLPy.RScene.GetAvatars()
===AddTextureWeightKey===
+
avatar = avatar_list[0]
<syntaxhighlight lang="Python">
+
material_component = avatar.GetMaterialComponent()
RLPy.RIMaterialComponent.AddTextureWeightKey ( self, kKey, strMeshName, strMaterialName, eChannel, fWeight )
+
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Get ambient color
 +
print(material_component.GetAmbientColor(mesh_name, material_name))
 
</syntaxhighlight>
 
</syntaxhighlight>
Add a texture weight key.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''kKey''' [IN] The key for time and transition control - RLPy.RKey
+
=== GetDiffuseColor ( self, strMeshName, strMaterialName) ===
  
'''strMeshName''' [IN] The name for mesh - string
+
Get the material's Diffuse color.
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
See Also:
 +
[[#GetAmbientColor ( self, strMeshName, strMaterialName )|GetAmbientColor]],
 +
[[#GetGlossinessWeight ( self, strMeshName, strMaterialName)|GetGlossinessWeight]],
 +
[[#GetMaterialNames ( self, strMeshName )|GetMaterialNames]],
 +
[[#GetOpacity ( self, strMeshName, strMaterialName )|GetOpacity]],
 +
[[#GetSelfIlluminationWeight ( self, strMeshName, strMaterialName )|GetSelfIlluminationWeight]],
 +
[[#GetSpecularColor ( self, strMeshName, strMaterialName )|GetSpecularColor]],
 +
[[#GetSpecularWeight ( self, strMeshName, strMaterialName )|GetSpecularWeight]],
 +
[[#GetTextureWeights ( self, strMeshName, strMaterialName )|GetTextureWeights]],
 +
[[#GetUvData ( self, strMeshName, strMaterialName, eChannel, kUvOffest, kUvTile, fUvRotate )|GetUvData]],
 +
[[#GetVideoVolume ( self, strMeshName, strMaterialName, eChannel )|GetVideoVolume]]
  
'''eChannel''' [IN] The channel of texture - RLPy.EMaterialTextureChannel
+
==== Parameters ====
*'''RLPy.EMaterialTextureChannel_Metallic'''
+
:'''strMeshName''' [IN] Name of the mesh - string
*'''RLPy.EMaterialTextureChannel_Diffuse'''
+
:'''strMaterialName''' [IN] Name of a mesh material - string
*'''RLPy.EMaterialTextureChannel_Specular'''
+
*'''RLPy.EMaterialTextureChannel_Shininess'''
+
*'''RLPy.EMaterialTextureChannel_Glow'''
+
*'''RLPy.EMaterialTextureChannel_Displacement'''
+
*'''RLPy.EMaterialTextureChannel_Opacity'''
+
*'''RLPy.EMaterialTextureChannel_DiffuseBlend'''
+
*'''RLPy.EMaterialTextureChannel_Bump'''
+
*'''RLPy.EMaterialTextureChannel_Reflection'''
+
*'''RLPy.EMaterialTextureChannel_Refraction'''
+
*'''RLPy.EMaterialTextureChannel_Cube'''
+
*'''RLPy.EMaterialTextureChannel_AmbientOcclusion'''
+
*'''RLPy.EMaterialTextureChannel_Quantity'''
+
  
'''fWeight''' [IN] The weight for channel - float
+
==== Returns ====
</div>
+
:diffuse color - [[IC_Python_API:RLPy_RRgb|RRgb]]
====Return Values====
+
<div style="margin-left: 2em;">
+
  
'''RLPy.RStatus.Success''' Success
+
<syntaxhighlight lang="python" line='line'>
 
+
# Get object, mesh and material
'''RLPy.RStatus.Failure''' Fail
+
avatar_list = RLPy.RScene.GetAvatars()
</div>
+
avatar = avatar_list[0]
-----
+
material_component = avatar.GetMaterialComponent()
===AddUvDataKey===
+
mesh_list = avatar.GetMeshNames()
<syntaxhighlight lang="Python">
+
mesh_name = mesh_list[0]
RLPy.RIMaterialComponent.AddUvDataKey ( self, kKey, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate )
+
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Get diffuse color
 +
print(material_component.GetDiffuseColor(mesh_name, material_name))
 
</syntaxhighlight>
 
</syntaxhighlight>
Add an uv data key.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''kKey''' [IN] The key for time and transition control - RLPy.RKey
+
=== GetGlossinessWeight ( self, strMeshName, strMaterialName) ===
  
'''strMeshName''' [IN] The name for mesh - string
+
Get the material's Glossiness weight.
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
See Also: GetMaterialNameParameters
  
'''eChannel''' [IN] The channel of texture - RLPy.EMaterialTextureChannel
+
==== Parameters ====
*'''RLPy.EMaterialTextureChannel_Metallic'''
+
:'''strMeshName''' [IN] Name for the mesh - string
*'''RLPy.EMaterialTextureChannel_Diffuse'''
+
:'''strMaterialName''' [IN] Name of the material on the mesh - string
*'''RLPy.EMaterialTextureChannel_Specular'''
+
*'''RLPy.EMaterialTextureChannel_Shininess'''
+
*'''RLPy.EMaterialTextureChannel_Glow'''
+
*'''RLPy.EMaterialTextureChannel_Displacement'''
+
*'''RLPy.EMaterialTextureChannel_Opacity'''
+
*'''RLPy.EMaterialTextureChannel_DiffuseBlend'''
+
*'''RLPy.EMaterialTextureChannel_Bump'''
+
*'''RLPy.EMaterialTextureChannel_Reflection'''
+
*'''RLPy.EMaterialTextureChannel_Refraction'''
+
*'''RLPy.EMaterialTextureChannel_Cube'''
+
*'''RLPy.EMaterialTextureChannel_AmbientOcclusion'''
+
*'''RLPy.EMaterialTextureChannel_Quantity'''
+
  
'''kUvOffset''' [IN] The uv's offset for channel - RLPy.RVector2f
+
==== Returns ====
 +
:weight of specular - float
  
'''kUvTile''' [IN] The uv's tile for channel - RLPy.RVector2f
+
<syntaxhighlight lang="python" line='line'>
 +
# Get object, mesh and material
 +
avatar_list = RLPy.RScene.GetAvatars()
 +
avatar = avatar_list[0]
 +
material_component = avatar.GetMaterialComponent()
 +
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Get glossiness weight
 +
print(material_component.GetGlossinessWeight(mesh_name, material_name))
 +
</syntaxhighlight>
  
'''fUvRotate''' [IN] The uv's rotate for channel ( -3.14 ~ 3.14 ) - float
+
=== GetMaterialNames ( self, strMeshName ) ===
</div>
+
====Return Values====
+
<div style="margin-left: 2em;">
+
  
'''RLPy.RStatus.Success''' Success
+
Get all the material names for the mesh.
  
'''RLPy.RStatus.Failure''' Fail
+
See Also:
</div>
+
[[#GetAmbientColor ( self, strMeshName, strMaterialName )|GetAmbientColor]],
-----
+
[[#GetDiffuseColor ( self, strMeshName, strMaterialName)|GetDiffuseColor]],
===AddVideoVolumeKey===
+
[[#GetGlossinessWeight ( self, strMeshName, strMaterialName)|GetGlossinessWeight]],
<syntaxhighlight lang="Python">
+
[[#GetOpacity ( self, strMeshName, strMaterialName )|GetOpacity]],
RLPy.RIMaterialComponent.AddVideoVolumeKey ( self, kKey, strMeshName, strMaterialName, eChannel, fVol, bMute )
+
[[#GetSelfIlluminationWeight ( self, strMeshName, strMaterialName )|GetSelfIlluminationWeight]],
</syntaxhighlight>
+
[[#GetSpecularColor ( self, strMeshName, strMaterialName )|GetSpecularColor]],  
Remove an uv key.
+
[[#GetSpecularWeight ( self, strMeshName, strMaterialName )|GetSpecularWeight]],
<span style="background:#ffcccc">( Experimental API )</span>
+
[[#GetTextureWeights ( self, strMeshName, strMaterialName )|GetTextureWeights]],
====Parameters====
+
[[#GetUvData ( self, strMeshName, strMaterialName, eChannel, kUvOffest, kUvTile, fUvRotate )|GetUvData]],
<div style="margin-left: 2em;">
+
[[#GetVideoVolume ( self, strMeshName, strMaterialName, eChannel )|GetVideoVolume]]
  
'''kKey''' [IN] The key for time and transition control - RLPy.RKey
+
==== Parameters ====
 +
:'''strMeshName''' [IN] Name of the mesh - string
  
'''strMeshName''' [IN] The name for mesh - string
+
==== Returns ====
 +
:material names - string list.
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
<syntaxhighlight lang="python" line='line'>
 +
# Get Object mesh and material
 +
avatar_list = RLPy.RScene.GetAvatars()
 +
avatar = avatar_list[0]
 +
material_component = avatar.GetMaterialComponent()
 +
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
</syntaxhighlight>
  
'''eChannel''' [IN] The channel of texture - RLPy.EMaterialTextureChannel
+
=== GetOpacity ( self, strMeshName, strMaterialName ) ===
*'''RLPy.EMaterialTextureChannel_Metallic'''
+
*'''RLPy.EMaterialTextureChannel_Diffuse'''
+
*'''RLPy.EMaterialTextureChannel_Specular'''
+
*'''RLPy.EMaterialTextureChannel_Shininess'''
+
*'''RLPy.EMaterialTextureChannel_Glow'''
+
*'''RLPy.EMaterialTextureChannel_Displacement'''
+
*'''RLPy.EMaterialTextureChannel_Opacity'''
+
*'''RLPy.EMaterialTextureChannel_DiffuseBlend'''
+
*'''RLPy.EMaterialTextureChannel_Bump'''
+
*'''RLPy.EMaterialTextureChannel_Reflection'''
+
*'''RLPy.EMaterialTextureChannel_Refraction'''
+
*'''RLPy.EMaterialTextureChannel_Cube'''
+
*'''RLPy.EMaterialTextureChannel_AmbientOcclusion'''
+
*'''RLPy.EMaterialTextureChannel_Quantity'''
+
  
'''fVol''' [IN] The volume of video ( 0-100 ) - float
+
Get the material opacity value.
</div>
+
====Return Values====
+
<div style="margin-left: 2em;">
+
  
'''RLPy.RStatus.Success''' Success
+
See Also:
 +
[[#GetAmbientColor ( self, strMeshName, strMaterialName )|GetAmbientColor]],
 +
[[#GetDiffuseColor ( self, strMeshName, strMaterialName)|GetDiffuseColor]],
 +
[[#GetGlossinessWeight ( self, strMeshName, strMaterialName)|GetGlossinessWeight]],
 +
[[#GetMaterialNames ( self, strMeshName )|GetMaterialNames]],
 +
[[#GetSelfIlluminationWeight ( self, strMeshName, strMaterialName )|GetSelfIlluminationWeight]],
 +
[[#GetSpecularColor ( self, strMeshName, strMaterialName )|GetSpecularColor]],
 +
[[#GetSpecularWeight ( self, strMeshName, strMaterialName )|GetSpecularWeight]],
 +
[[#GetTextureWeights ( self, strMeshName, strMaterialName )|GetTextureWeights]],
 +
[[#GetUvData ( self, strMeshName, strMaterialName, eChannel, kUvOffest, kUvTile, fUvRotate )|GetUvData]],
 +
[[#GetVideoVolume ( self, strMeshName, strMaterialName, eChannel )|GetVideoVolume]]
  
'''RLPy.RStatus.Failure''' Fail
+
==== Parameters ====
</div>
+
:'''strMeshName''' [IN] Name of the mesh - string
-----
+
:'''strMaterialName''' [IN] Name of a mesh material - string
===GetAmbientColor===
+
<syntaxhighlight lang="Python">
+
RLPy.RIMaterialComponent.GetAmbientColor ( self, strMeshName, strMaterialName )
+
</syntaxhighlight>
+
Get ambient color.
+
<span style="background:#ffcccc">( Experimental API )</span>
+
====Parameters====
+
<div style="margin-left: 2em;">
+
  
'''strMeshName''' [IN] The name for mesh - string
+
==== Returns ====
 +
:weight of opacity - float
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
<syntaxhighlight lang="python" line='line'>
</div>
+
# Get object, mesh and material
====Returns====
+
avatar_list = RLPy.RScene.GetAvatars()
<div style="margin-left: 2em;">Ambient color - RLPy.RRgb
+
avatar = avatar_list[0]
</div>
+
material_component = avatar.GetMaterialComponent()
-----
+
mesh_list = avatar.GetMeshNames()
===GetDiffuseColor===
+
mesh_name = mesh_list[0]
<syntaxhighlight lang="Python">
+
material_list = material_component.GetMaterialNames(mesh_name)
RLPy.RIMaterialComponent.GetDiffuseColor ( self, strMeshName, strMaterialName )
+
material_name = material_list[0]
 +
# Get opacity
 +
print(material_component.GetOpacity(mesh_name, material_name))
 
</syntaxhighlight>
 
</syntaxhighlight>
Get diffuse color.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''strMeshName''' [IN] The name for mesh - string
+
=== GetSelfIlluminationWeight ( self, strMeshName, strMaterialName ) ===
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
Get the material's self-illumination weight.
</div>
+
====Returns====
+
<div style="margin-left: 2em;">Diffuse color - RLPy.RRgb
+
</div>
+
-----
+
===GetGlossinessWeight===
+
<syntaxhighlight lang="Python">
+
RLPy.RIMaterialComponent.GetGlossinessWeight ( self, strMeshName, strMaterialName )
+
</syntaxhighlight>
+
Get glossiness wight.
+
<span style="background:#ffcccc">( Experimental API )</span>
+
====Parameters====
+
<div style="margin-left: 2em;">
+
  
'''strMeshName''' [IN] The name for mesh - string
+
See Also:
 +
[[#GetAmbientColor ( self, strMeshName, strMaterialName )|GetAmbientColor]],
 +
[[#GetDiffuseColor ( self, strMeshName, strMaterialName)|GetDiffuseColor]],
 +
[[#GetGlossinessWeight ( self, strMeshName, strMaterialName)|GetGlossinessWeight]],
 +
[[#GetMaterialNames ( self, strMeshName )|GetMaterialNames]],
 +
[[#GetOpacity ( self, strMeshName, strMaterialName )|GetOpacity]],
 +
[[#GetSpecularColor ( self, strMeshName, strMaterialName )|GetSpecularColor]],
 +
[[#GetSpecularWeight ( self, strMeshName, strMaterialName )|GetSpecularWeight]],
 +
[[#GetTextureWeights ( self, strMeshName, strMaterialName )|GetTextureWeights]],
 +
[[#GetUvData ( self, strMeshName, strMaterialName, eChannel, kUvOffest, kUvTile, fUvRotate )|GetUvData]],
 +
[[#GetVideoVolume ( self, strMeshName, strMaterialName, eChannel )|GetVideoVolume]]
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
==== Parameters ====
</div>
+
:'''strMeshName''' [IN] Name of the mesh - string
====Returns====
+
:'''strMaterialName''' [IN] Name of a mesh material - string
<div style="margin-left: 2em;">Weight of specular - float
+
</div>
+
-----
+
===GetMaterialNames===
+
<syntaxhighlight lang="Python">
+
RLPy.RIMaterialComponent.GetMaterialNames ( self, strMeshName )
+
</syntaxhighlight>
+
Get material names.
+
<span style="background:#ffcccc">( Experimental API )</span>
+
====Parameters====
+
<div style="margin-left: 2em;">
+
  
'''strMeshName''' [IN] The name for mesh - string
+
==== Returns ====
</div>
+
:weight of self-illumination - float
====Return Values====
+
<div style="margin-left: 2em;">
+
  
'''std::vector<''' std::wstring > material namse.
+
<syntaxhighlight lang="python" line='line'>
</div>
+
( Experimental API )
-----
+
# Get object, mesh and material
===GetOpacity===
+
avatar_list = RLPy.RScene.GetAvatars()
<syntaxhighlight lang="Python">
+
avatar = avatar_list[0]
RLPy.RIMaterialComponent.GetOpacity ( self, strMeshName, strMaterialName )
+
material_component = avatar.GetMaterialComponent()
 +
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Get self-illumination weight
 +
print(material_component.GetSelfIlluminationWeight(mesh_name, material_name))
 
</syntaxhighlight>
 
</syntaxhighlight>
Get opacity.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''strMeshName''' [IN] The name for mesh - string
+
=== GetSpecularColor ( self, strMeshName, strMaterialName ) ===
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
Get the material's Specular color.
</div>
+
====Returns====
+
<div style="margin-left: 2em;">Weight of opacity - float
+
</div>
+
-----
+
===GetSelfIlluminationWeight===
+
<syntaxhighlight lang="Python">
+
RLPy.RIMaterialComponent.GetSelfIlluminationWeight ( self, strMeshName, strMaterialName )
+
</syntaxhighlight>
+
Get self-illumination weight.
+
<span style="background:#ffcccc">( Experimental API )</span>
+
====Parameters====
+
<div style="margin-left: 2em;">
+
  
'''strMeshName''' [IN] The name for mesh - string
+
See Also:
 +
[[#GetAmbientColor ( self, strMeshName, strMaterialName )|GetAmbientColor]],
 +
[[#GetDiffuseColor ( self, strMeshName, strMaterialName)|GetDiffuseColor]],
 +
[[#GetGlossinessWeight ( self, strMeshName, strMaterialName)|GetGlossinessWeight]],
 +
[[#GetMaterialNames ( self, strMeshName )|GetMaterialNames]],
 +
[[#GetOpacity ( self, strMeshName, strMaterialName )|GetOpacity]],
 +
[[#GetSelfIlluminationWeight ( self, strMeshName, strMaterialName )|GetSelfIlluminationWeight]],
 +
[[#GetSpecularWeight ( self, strMeshName, strMaterialName )|GetSpecularWeight]],
 +
[[#GetTextureWeights ( self, strMeshName, strMaterialName )|GetTextureWeights]],
 +
[[#GetUvData ( self, strMeshName, strMaterialName, eChannel, kUvOffest, kUvTile, fUvRotate )|GetUvData]],
 +
[[#GetVideoVolume ( self, strMeshName, strMaterialName, eChannel )|GetVideoVolume]]
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
==== Parameters ====
</div>
+
:'''strMeshName''' [IN] Name of the mesh - string
====Returns====
+
:'''strMaterialName''' [IN] Name of a mesh material - string
<div style="margin-left: 2em;">Weight of self-illumination - float
+
</div>
+
-----
+
===GetSpecularColor===
+
<syntaxhighlight lang="Python">
+
RLPy.RIMaterialComponent.GetSpecularColor ( self, strMeshName, strMaterialName )
+
</syntaxhighlight>
+
Get specular color.
+
<span style="background:#ffcccc">( Experimental API )</span>
+
====Parameters====
+
<div style="margin-left: 2em;">
+
  
'''strMeshName''' [IN] The name for mesh - string
+
==== Returns ====
 +
:Specular color - [[IC_Python_API:RLPy_RRgb|RRgb]]
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
<syntaxhighlight lang="python" line='line'>
</div>
+
# Get object, mesh and material
====Returns====
+
avatar_list = RLPy.RScene.GetAvatars()
<div style="margin-left: 2em;">Specular color - RLPy.RRgb
+
avatar = avatar_list[0]
</div>
+
material_component = avatar.GetMaterialComponent()
-----
+
mesh_list = avatar.GetMeshNames()
===GetSpecularWeight===
+
mesh_name = mesh_list[0]
<syntaxhighlight lang="Python">
+
material_list = material_component.GetMaterialNames(mesh_name)
RLPy.RIMaterialComponent.GetSpecularWeight ( self, strMeshName, strMaterialName )
+
material_name = material_list[0]
 +
# Get specular color
 +
print(material_component.GetSpecularColor(mesh_name, material_name))
 
</syntaxhighlight>
 
</syntaxhighlight>
Get specular weight.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''strMeshName''' [IN] The name for mesh - string
+
=== GetSpecularWeight ( self, strMeshName, strMaterialName ) ===
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
Get the material's Specular weight.
</div>
+
====Returns====
+
<div style="margin-left: 2em;">Weight of specular - float
+
</div>
+
-----
+
===GetTextureWeights===
+
<syntaxhighlight lang="Python">
+
RLPy.RIMaterialComponent.GetTextureWeights ( self, strMeshName, strMaterialName )
+
</syntaxhighlight>
+
Get all channels weight of texture.
+
<span style="background:#ffcccc">( Experimental API )</span>
+
====Parameters====
+
<div style="margin-left: 2em;">
+
  
'''strMeshName''' [IN] The name for mesh - string
+
See Also:
 +
[[#GetAmbientColor ( self, strMeshName, strMaterialName )|GetAmbientColor]],
 +
[[#GetDiffuseColor ( self, strMeshName, strMaterialName)|GetDiffuseColor]],
 +
[[#GetGlossinessWeight ( self, strMeshName, strMaterialName)|GetGlossinessWeight]],
 +
[[#GetMaterialNames ( self, strMeshName )|GetMaterialNames]],
 +
[[#GetOpacity ( self, strMeshName, strMaterialName )|GetOpacity]],
 +
[[#GetSelfIlluminationWeight ( self, strMeshName, strMaterialName )|GetSelfIlluminationWeight]],
 +
[[#GetSpecularColor ( self, strMeshName, strMaterialName )|GetSpecularColor]],
 +
[[#GetTextureWeights ( self, strMeshName, strMaterialName )|GetTextureWeights]],
 +
[[#GetUvData ( self, strMeshName, strMaterialName, eChannel, kUvOffest, kUvTile, fUvRotate )|GetUvData]],
 +
[[#GetVideoVolume ( self, strMeshName, strMaterialName, eChannel )|GetVideoVolume]]
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
==== Parameters ====
</div>
+
:'''strMeshName''' [IN] Name of the mesh - string
====Returns====
+
:'''strMaterialName''' [IN] Name of a mesh material - string
<div style="margin-left: 2em;">Weight of opacity - float
+
</div>
+
-----
+
===GetUvData===
+
<syntaxhighlight lang="Python">
+
RLPy.RIMaterialComponent.GetUvData ( self, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate )
+
</syntaxhighlight>
+
Get all channels weight of texture.
+
<span style="background:#ffcccc">( Experimental API )</span>
+
====Parameters====
+
<div style="margin-left: 2em;">
+
  
'''strMeshName''' [IN] The name for mesh - string
+
==== Returns ====
 +
:Specular weight - float
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
<syntaxhighlight lang="python" line='line'>
 +
# Get object, mesh and material
 +
avatar_list = RLPy.RScene.GetAvatars()
 +
avatar = avatar_list[0]
 +
material_component = avatar.GetMaterialComponent()
 +
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Get specular weight
 +
print(material_component.GetSpecularWeight(mesh_name, material_name))
 +
</syntaxhighlight>
  
'''eChannel''' [IN] The channel of texture - RLPy.EMaterialTextureChannel
+
=== GetTextureWeights ( self, strMeshName, strMaterialName ) ===
*'''RLPy.EMaterialTextureChannel_Metallic'''
+
*'''RLPy.EMaterialTextureChannel_Diffuse'''
+
*'''RLPy.EMaterialTextureChannel_Specular'''
+
*'''RLPy.EMaterialTextureChannel_Shininess'''
+
*'''RLPy.EMaterialTextureChannel_Glow'''
+
*'''RLPy.EMaterialTextureChannel_Displacement'''
+
*'''RLPy.EMaterialTextureChannel_Opacity'''
+
*'''RLPy.EMaterialTextureChannel_DiffuseBlend'''
+
*'''RLPy.EMaterialTextureChannel_Bump'''
+
*'''RLPy.EMaterialTextureChannel_Reflection'''
+
*'''RLPy.EMaterialTextureChannel_Refraction'''
+
*'''RLPy.EMaterialTextureChannel_Cube'''
+
*'''RLPy.EMaterialTextureChannel_AmbientOcclusion'''
+
*'''RLPy.EMaterialTextureChannel_Quantity'''
+
  
'''kUvOffset''' [OUT] uv offset - RLPy.RVector2f
+
Get all texture channel weights for the material.
  
'''kUvTile''' [OUT] uv tile - RLPy.RVector2f
+
See Also:
 +
[[#GetAmbientColor ( self, strMeshName, strMaterialName )|GetAmbientColor]],
 +
[[#GetDiffuseColor ( self, strMeshName, strMaterialName)|GetDiffuseColor]],
 +
[[#GetGlossinessWeight ( self, strMeshName, strMaterialName)|GetGlossinessWeight]],
 +
[[#GetMaterialNames ( self, strMeshName )|GetMaterialNames]],
 +
[[#GetOpacity ( self, strMeshName, strMaterialName )|GetOpacity]],
 +
[[#GetSelfIlluminationWeight ( self, strMeshName, strMaterialName )|GetSelfIlluminationWeight]],
 +
[[#GetSpecularColor ( self, strMeshName, strMaterialName )|GetSpecularColor]],
 +
[[#GetSpecularWeight ( self, strMeshName, strMaterialName )|GetSpecularWeight]],
 +
[[#GetUvData ( self, strMeshName, strMaterialName, eChannel, kUvOffest, kUvTile, fUvRotate )|GetUvData]],
 +
[[#GetVideoVolume ( self, strMeshName, strMaterialName, eChannel )|GetVideoVolume]]
  
'''fUvRotate''' [OUT] uv rotate - float
+
==== Parameters ====
</div>
+
:'''strMeshName''' [IN] Name of the mesh - string
====Return Values====
+
:'''strMaterialName''' [IN] Name of a mesh material - string
<div style="margin-left: 2em;">
+
  
'''RLPy.RStatus.Success''' Success.
+
==== Returns ====
 +
:Ordered list of all texture channel weights - float list
  
'''RLPy.RStatus.Failure''' Fail.
+
<syntaxhighlight lang="python" line='line'>
</div>
+
# Get object, mesh and material
-----
+
avatar_list = RLPy.RScene.GetAvatars()
===GetVideoVolume===
+
avatar = avatar_list[0]
<syntaxhighlight lang="Python">
+
material_component = avatar.GetMaterialComponent()
RLPy.RIMaterialComponent.GetVideoVolume ( self, strMeshName, strMaterialName, eChannel )
+
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Get all texture weights
 +
temp_texture_weight_list = material_component.GetTextureWeights(mesh_name, material_name)
 +
print(temp_texture_weight_list)
 
</syntaxhighlight>
 
</syntaxhighlight>
Get volume of video.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''strMeshName''' [IN] The name for mesh - string
+
=== GetUvData ( self, strMeshName, strMaterialName, eChannel, kUvOffest, kUvTile, fUvRotate ) ===
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
Get all texture channel UV coordinates (offset, tiling, rotation) for the material.
  
'''eChannel''' [IN] The channel of texture - RLPy.EMaterialTextureChannel
+
See Also:
*'''RLPy.EMaterialTextureChannel_Metallic'''
+
[[#GetAmbientColor ( self, strMeshName, strMaterialName )|GetAmbientColor]],
*'''RLPy.EMaterialTextureChannel_Diffuse'''
+
[[#GetDiffuseColor ( self, strMeshName, strMaterialName)|GetDiffuseColor]],
*'''RLPy.EMaterialTextureChannel_Specular'''
+
[[#GetGlossinessWeight ( self, strMeshName, strMaterialName)|GetGlossinessWeight]],
*'''RLPy.EMaterialTextureChannel_Shininess'''
+
[[#GetMaterialNames ( self, strMeshName )|GetMaterialNames]],
*'''RLPy.EMaterialTextureChannel_Glow'''
+
[[#GetOpacity ( self, strMeshName, strMaterialName )|GetOpacity]],
*'''RLPy.EMaterialTextureChannel_Displacement'''
+
[[#GetSelfIlluminationWeight ( self, strMeshName, strMaterialName )|GetSelfIlluminationWeight]],
*'''RLPy.EMaterialTextureChannel_Opacity'''
+
[[#GetSpecularColor ( self, strMeshName, strMaterialName )|GetSpecularColor]],
*'''RLPy.EMaterialTextureChannel_DiffuseBlend'''
+
[[#GetSpecularWeight ( self, strMeshName, strMaterialName )|GetSpecularWeight]],
*'''RLPy.EMaterialTextureChannel_Bump'''
+
[[#GetTextureWeights ( self, strMeshName, strMaterialName )|GetTextureWeights]],
*'''RLPy.EMaterialTextureChannel_Reflection'''
+
[[#GetVideoVolume ( self, strMeshName, strMaterialName, eChannel )|GetVideoVolume]]
*'''RLPy.EMaterialTextureChannel_Refraction'''
+
 
*'''RLPy.EMaterialTextureChannel_Cube'''
+
==== Parameters ====
*'''RLPy.EMaterialTextureChannel_AmbientOcclusion'''
+
:'''strMeshName''' [IN] Name of the mesh - string
*'''RLPy.EMaterialTextureChannel_Quantity'''
+
:'''strMaterialName''' [IN] Name of a mesh material - string
</div>
+
:'''eChannel''' [IN] A material texture channel - RLPy.EMaterialTextureChannel
====Returns====
+
:*RLPy.EMaterialTextureChannel_Metallic
<div style="margin-left: 2em;">Video volume - float
+
:*RLPy.EMaterialTextureChannel_Diffuse
</div>
+
:*RLPy.EMaterialTextureChannel_Specular
-----
+
:*RLPy.EMaterialTextureChannel_Shininess
===LoadImageToTexture===
+
:*RLPy.EMaterialTextureChannel_Glow
<syntaxhighlight lang="Python">
+
:*RLPy.EMaterialTextureChannel_Displacement
RLPy.RIMaterialComponent.LoadImageToTexture ( self, strMeshName, strMaterialName, eChannel, strImagePath )
+
:*RLPy.EMaterialTextureChannel_Opacity
 +
:*RLPy.EMaterialTextureChannel_DiffuseBlend
 +
:*RLPy.EMaterialTextureChannel_Bump
 +
:*RLPy.EMaterialTextureChannel_Reflection
 +
:*RLPy.EMaterialTextureChannel_Refraction
 +
:*RLPy.EMaterialTextureChannel_Cube
 +
:*RLPy.EMaterialTextureChannel_AmbientOcclusion
 +
:*RLPy.EMaterialTextureChannel_Quantity
 +
:'''kUvOffset''' [OUT] UV offset - [[IC_Python_API:RLPy_RVector2|RVector2]]
 +
:'''kUvTile''' [OUT] UV tiling - [[IC_Python_API:RLPy_RVector2|RVector2]]
 +
:'''fUvRotate''' [OUT] UV rotation in radians- float
 +
 
 +
==== Returns ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
 +
 
 +
<syntaxhighlight lang="python" line='line'>
 +
# Get object, mesh and material
 +
avatar_list = RLPy.RScene.GetAvatars()
 +
avatar = avatar_list[0]
 +
material_component = avatar.GetMaterialComponent()
 +
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Get UV data
 +
uv_offset = RLPy.RVector2()
 +
uv_tile = RLPy.RVector2()
 +
uv_rotate = 0.0
 +
uv_data = material_component.GetUvData(mesh_name, material_name, texture_channel, uv_offset, uv_tile, uv_rotate)
 +
print(uv_data[0])
 
</syntaxhighlight>
 
</syntaxhighlight>
Loading an image file to a texture.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''strMeshName''' [IN] The name for mesh - string
+
=== GetVideoVolume ( self, strMeshName, strMaterialName, eChannel ) ===
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
Get the video volume for all the video channels of the material.
  
'''eChannel''' [IN] The channel of texture - RLPy.EMaterialTextureChannel
+
See Also:
*'''RLPy.EMaterialTextureChannel_Metallic'''
+
[[#GetAmbientColor ( self, strMeshName, strMaterialName )|GetAmbientColor]],
*'''RLPy.EMaterialTextureChannel_Diffuse'''
+
[[#GetDiffuseColor ( self, strMeshName, strMaterialName)|GetDiffuseColor]],
*'''RLPy.EMaterialTextureChannel_Specular'''
+
[[#GetGlossinessWeight ( self, strMeshName, strMaterialName)|GetGlossinessWeight]],
*'''RLPy.EMaterialTextureChannel_Shininess'''
+
[[#GetMaterialNames ( self, strMeshName )|GetMaterialNames]],
*'''RLPy.EMaterialTextureChannel_Glow'''
+
[[#GetOpacity ( self, strMeshName, strMaterialName )|GetOpacity]],
*'''RLPy.EMaterialTextureChannel_Displacement'''
+
[[#GetSelfIlluminationWeight ( self, strMeshName, strMaterialName )|GetSelfIlluminationWeight]],
*'''RLPy.EMaterialTextureChannel_Opacity'''
+
[[#GetSpecularColor ( self, strMeshName, strMaterialName )|GetSpecularColor]],
*'''RLPy.EMaterialTextureChannel_DiffuseBlend'''
+
[[#GetSpecularWeight ( self, strMeshName, strMaterialName )|GetSpecularWeight]],
*'''RLPy.EMaterialTextureChannel_Bump'''
+
[[#GetTextureWeights ( self, strMeshName, strMaterialName )|GetTextureWeights]],
*'''RLPy.EMaterialTextureChannel_Reflection'''
+
[[#GetUvData ( self, strMeshName, strMaterialName, eChannel, kUvOffest, kUvTile, fUvRotate )|GetUvData]]
*'''RLPy.EMaterialTextureChannel_Refraction'''
+
*'''RLPy.EMaterialTextureChannel_Cube'''
+
*'''RLPy.EMaterialTextureChannel_AmbientOcclusion'''
+
*'''RLPy.EMaterialTextureChannel_Quantity'''
+
  
'''strImagePath''' [IN] The file path of image - string
+
==== Parameters ====
</div>
+
:'''strMeshName''' [IN] Name of the mesh - string
====Return Values====
+
:'''strMaterialName''' [IN] Name of a mesh material - string
<div style="margin-left: 2em;">
+
:'''eChannel''' [IN] A material texture channel - RLPy.EMaterialTextureChannel
 +
:*RLPy.EMaterialTextureChannel_Metallic
 +
:*RLPy.EMaterialTextureChannel_Diffuse
 +
:*RLPy.EMaterialTextureChannel_Specular
 +
:*RLPy.EMaterialTextureChannel_Shininess
 +
:*RLPy.EMaterialTextureChannel_Glow
 +
:*RLPy.EMaterialTextureChannel_Displacement
 +
:*RLPy.EMaterialTextureChannel_Opacity
 +
:*RLPy.EMaterialTextureChannel_DiffuseBlend
 +
:*RLPy.EMaterialTextureChannel_Bump
 +
:*RLPy.EMaterialTextureChannel_Reflection
 +
:*RLPy.EMaterialTextureChannel_Refraction
 +
:*RLPy.EMaterialTextureChannel_Cube
 +
:*RLPy.EMaterialTextureChannel_AmbientOcclusion
 +
:*RLPy.EMaterialTextureChannel_Quantity
  
'''RLPy.RStatus.Success''' Success
+
==== Returns ====
 +
:video volume - float
  
'''RLPy.RStatus.Failure''' Fail
+
<syntaxhighlight lang="python" line='line'>
</div>
+
# Get object, mesh and material
-----
+
avatar_list = RLPy.RScene.GetAvatars()
===LoadVideoToTexture===
+
avatar = avatar_list[0]
<syntaxhighlight lang="Python">
+
material_component = avatar.GetMaterialComponent()
RLPy.RIMaterialComponent.LoadVideoToTexture ( self, kKey, strMeshName, strMaterialName, eChannel, strVideoPath )
+
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Get video volume
 +
texture_channel = RLPy.EMaterialTextureChannel_Bump
 +
print(material_component.GetVideoVolume(mesh_name, material_name, texture_channel))
 
</syntaxhighlight>
 
</syntaxhighlight>
Remove an uv key.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''kKey''' [IN] The key for time and transition control - RLPy.RKey
+
=== LoadImageToTexture ( self, strMeshName, strMaterialName, eChannel, strImagePath ) ===
  
'''strMeshName''' [IN] The name for mesh - string
+
Import an image into a material texture channel.
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
See Also: [[#LoadVideoToTexture ( self, strMeshName, strMaterialName, eChannel, strVideoPath )|LoadVideoToTexture]]
  
'''eChannel''' [IN] The channel of texture - RLPy.EMaterialTextureChannel
+
==== Parameters ====
*'''RLPy.EMaterialTextureChannel_Metallic'''
+
:'''strMeshName''' [IN] Name of the mesh - string
*'''RLPy.EMaterialTextureChannel_Diffuse'''
+
:'''strMaterialName''' [IN] Name of a mesh material - string
*'''RLPy.EMaterialTextureChannel_Specular'''
+
:'''eChannel''' [IN] A material texture channel - RLPy.EMaterialTextureChannel
*'''RLPy.EMaterialTextureChannel_Shininess'''
+
:*RLPy.EMaterialTextureChannel_Metallic
*'''RLPy.EMaterialTextureChannel_Glow'''
+
:*RLPy.EMaterialTextureChannel_Diffuse
*'''RLPy.EMaterialTextureChannel_Displacement'''
+
:*RLPy.EMaterialTextureChannel_Specular
*'''RLPy.EMaterialTextureChannel_Opacity'''
+
:*RLPy.EMaterialTextureChannel_Shininess
*'''RLPy.EMaterialTextureChannel_DiffuseBlend'''
+
:*RLPy.EMaterialTextureChannel_Glow
*'''RLPy.EMaterialTextureChannel_Bump'''
+
:*RLPy.EMaterialTextureChannel_Displacement
*'''RLPy.EMaterialTextureChannel_Reflection'''
+
:*RLPy.EMaterialTextureChannel_Opacity
*'''RLPy.EMaterialTextureChannel_Refraction'''
+
:*RLPy.EMaterialTextureChannel_DiffuseBlend
*'''RLPy.EMaterialTextureChannel_Cube'''
+
:*RLPy.EMaterialTextureChannel_Bump
*'''RLPy.EMaterialTextureChannel_AmbientOcclusion'''
+
:*RLPy.EMaterialTextureChannel_Reflection
*'''RLPy.EMaterialTextureChannel_Quantity'''
+
:*RLPy.EMaterialTextureChannel_Refraction
 +
:*RLPy.EMaterialTextureChannel_Cube
 +
:*RLPy.EMaterialTextureChannel_AmbientOcclusion
 +
:*RLPy.EMaterialTextureChannel_Quantity
 +
:'''strImagePath''' [IN] Image file path - string
  
'''strVideoPath''' [IN] The file path of video - string
+
==== Returns ====
</div>
+
:Success - RLPy.RStatus.Success
====Return Values====
+
:Failure - RLPy.RStatus.Failure
<div style="margin-left: 2em;">
+
  
'''RLPy.RStatus.Success''' Success
+
<syntaxhighlight lang="python" line='line'>
 +
# Get object, mesh and material
 +
avatar_list = RLPy.RScene.GetAvatars()
 +
avatar = avatar_list[0]
 +
material_component = avatar.GetMaterialComponent()
 +
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
#Load image to material channel
 +
texture_channel = RLPy.EMaterialTextureChannel_Diffuse
 +
image_file = "C://diffuse.png"
 +
result = material_component.LoadImageToTexture(mesh_name, material_name, texture_channel, image_file)
 +
</syntaxhighlight>
  
'''RLPy.RStatus.Failure''' Fail
+
=== LoadVideoToTexture ( self, strMeshName, strMaterialName, eChannel, strVideoPath ) ===
</div>
+
 
-----
+
Import a video into a material texture channel.
===RemoveUvDataKey===
+
 
<syntaxhighlight lang="Python">
+
See Also: [[#LoadImageToTexture ( self, strMeshName, strMaterialName, eChannel, strImagePath )|LoadImageToTexture]]
RLPy.RIMaterialComponent.RemoveUvDataKey ( self, kKey, strMeshName, strMaterialName, eChannel )
+
 
 +
==== Parameters ====
 +
:'''kKey''' [IN] The key for time and transition control - [[IC_Python_API:RLPy_RKey|RKey]]
 +
:'''strMeshName''' [IN] Name of the mesh - string
 +
:'''strMaterialName''' [IN] Name of a mesh material - string
 +
:'''eChannel''' [IN] A material texture channel - RLPy.EMaterialTextureChannel
 +
:*RLPy.EMaterialTextureChannel_Metallic
 +
:*RLPy.EMaterialTextureChannel_Diffuse
 +
:*RLPy.EMaterialTextureChannel_Specular
 +
:*RLPy.EMaterialTextureChannel_Shininess
 +
:*RLPy.EMaterialTextureChannel_Glow
 +
:*RLPy.EMaterialTextureChannel_Displacement
 +
:*RLPy.EMaterialTextureChannel_Opacity
 +
:*RLPy.EMaterialTextureChannel_DiffuseBlend
 +
:*RLPy.EMaterialTextureChannel_Bump
 +
:*RLPy.EMaterialTextureChannel_Reflection
 +
:*RLPy.EMaterialTextureChannel_Refraction
 +
:*RLPy.EMaterialTextureChannel_Cube
 +
:*RLPy.EMaterialTextureChannel_AmbientOcclusion
 +
:*RLPy.EMaterialTextureChannel_Quantity
 +
:'''strVideoPath''' [IN] Video file path - string
 +
 
 +
==== Returns ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
 +
 
 +
<syntaxhighlight lang="python" line='line'>
 +
# Get object, mesh and material
 +
avatar_list = RLPy.RScene.GetAvatars()
 +
avatar = avatar_list[0]
 +
material_component = avatar.GetMaterialComponent()
 +
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Create a key
 +
key = RLPy.RKey()
 +
key.SetTime(RLPy.RTime(1200))
 +
# Load video to material channel
 +
texture_channel = RLPy.EMaterialTextureChannel_Bump
 +
video_file = "C://MaterialVideoTest.mp4"
 +
material_component.LoadVideoToTexture(key, mesh_name, material_name, texture_channel, video_file)
 
</syntaxhighlight>
 
</syntaxhighlight>
Remove an uv data key.
 
<span style="background:#ffcccc">( Experimental API )</span>
 
====Parameters====
 
<div style="margin-left: 2em;">
 
  
'''kKey''' [IN] The key for time and transition control - RLPy.RKey
+
=== RemoveUvDataKey ( self, kKey, strMeshName, strMaterialName, eChannel ) ===
  
'''strMeshName''' [IN] The name for mesh - string
+
Remove an UV data key from a material texture channel.
  
'''strMaterialName''' [IN] The name for material of mesh - string
+
See Also: [[#AddUvDataKey ( self, kKey, strMeshName, strMaterialName, eChannel, kUvOffset, kUvTile, fUvRotate )|AddUvDataKey]]
  
'''eChannel''' [IN] The channel of texture - RLPy.EMaterialTextureChannel
+
==== Parameters ====
*'''RLPy.EMaterialTextureChannel_Metallic'''
+
:'''kKey''' [IN] The key for time and transition control - [[IC_Python_API:RLPy_RKey|RKey]]
*'''RLPy.EMaterialTextureChannel_Diffuse'''
+
:'''strMeshName''' [IN] Name of the mesh - string
*'''RLPy.EMaterialTextureChannel_Specular'''
+
:'''strMaterialName''' [IN] Name of a mesh material - string
*'''RLPy.EMaterialTextureChannel_Shininess'''
+
:'''eChannel''' [IN] A material texture channel - RLPy.EMaterialTextureChannel
*'''RLPy.EMaterialTextureChannel_Glow'''
+
:*RLPy.EMaterialTextureChannel_Metallic
*'''RLPy.EMaterialTextureChannel_Displacement'''
+
:*RLPy.EMaterialTextureChannel_Diffuse
*'''RLPy.EMaterialTextureChannel_Opacity'''
+
:*RLPy.EMaterialTextureChannel_Specular
*'''RLPy.EMaterialTextureChannel_DiffuseBlend'''
+
:*RLPy.EMaterialTextureChannel_Shininess
*'''RLPy.EMaterialTextureChannel_Bump'''
+
:*RLPy.EMaterialTextureChannel_Glow
*'''RLPy.EMaterialTextureChannel_Reflection'''
+
:*RLPy.EMaterialTextureChannel_Displacement
*'''RLPy.EMaterialTextureChannel_Refraction'''
+
:*RLPy.EMaterialTextureChannel_Opacity
*'''RLPy.EMaterialTextureChannel_Cube'''
+
:*RLPy.EMaterialTextureChannel_DiffuseBlend
*'''RLPy.EMaterialTextureChannel_AmbientOcclusion'''
+
:*RLPy.EMaterialTextureChannel_Bump
*'''RLPy.EMaterialTextureChannel_Quantity'''
+
:*RLPy.EMaterialTextureChannel_Reflection
</div>
+
:*RLPy.EMaterialTextureChannel_Refraction
====Return Values====
+
:*RLPy.EMaterialTextureChannel_Cube
<div style="margin-left: 2em;">
+
:*RLPy.EMaterialTextureChannel_AmbientOcclusion
 +
:*RLPy.EMaterialTextureChannel_Quantity
  
'''RLPy.RStatus.Success''' Success
+
==== Returns ====
 +
:Success - RLPy.RStatus.Success
 +
:Failure - RLPy.RStatus.Failure
  
'''RLPy.RStatus.Failure''' Fail
+
<syntaxhighlight lang="python" line='line'>
</div>
+
# Get object, mesh and material
 +
avatar_list = RLPy.RScene.GetAvatars()
 +
avatar = avatar_list[0]
 +
material_component = avatar.GetMaterialComponent()
 +
mesh_list = avatar.GetMeshNames()
 +
mesh_name = mesh_list[0]
 +
material_list = material_component.GetMaterialNames(mesh_name)
 +
material_name = material_list[0]
 +
# Create a key
 +
key = RLPy.RKey()
 +
key.SetTime(RLPy.RTime(1200))
 +
# Remove UV data key
 +
texture_channel = RLPy.EMaterialTextureChannel_Bump  test other channel
 +
material_component.RemoveUvDataKey(key, mesh_name, material_name, texture_channel)
 +
</syntaxhighlight>

Latest revision as of 23:58, 14 April 2020

Contents

Main article: Modules.
Last modified: 04/14/2020

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.

Inheritance

RIBase > RIMaterialComponent 

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 [IN] The key for time and transition control - RKey
strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string
kColor [IN] The color of a material’s ambient component - RRgb

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Create a key
10 key = RLPy.RKey()
11 key.SetTime(RLPy.RTime(1200))
12 # Add an ambient key value
13 material_component.AddAmbientKey(key, mesh_name, material_name, RLPy.RRgb.RED)

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 [IN] The key to add a diffuse key value - RKey
strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string
kColor [IN] The color for diffuse - RRgb

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Create a key
10 key = RLPy.RKey()
11 key.SetTime(RLPy.RTime(1200))
12 # Add a diffuse key value
13 material_component.AddDiffuseKey(key, mesh_name, material_name, RLPy.RRgb.RED)

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 [IN] The key for time and transition control - RKey
strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string
fWeight [IN] The weight for glossiness - float [0~100]

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Create a key
10 key = RLPy.RKey()
11 key.SetTime(RLPy.RTime(1200))
12 # Add a glossiness key value
13 material_component.AddGlossinessKey(key, mesh_name, material_name, 0.5)

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

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

kKey [IN] The key for time and transition control - RKey
strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string
kColor [IN] The color for specular - RRgb

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Create a key
10 key = RLPy.RKey()
11 key.SetTime(RLPy.RTime(1200))
12 # Add a specular key value
13 material_component.AddSpecularKey(key, mesh_name, material_name, RLPy.RRgb.RED)

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

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 [IN] The key for time and transition control - RKey

strMeshName [IN] Name of the mesh - string strMaterialName [IN] Name of a mesh material - string fWeight [IN] The weight for self-illumination - float [0~100]

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Create a key
10 key = RLPy.RKey()
11 key.SetTime(RLPy.RTime(1200))
12 # Add a self-illumination key value
13 material_component.AddSelfIlluminationKey(key, mesh_name, material_name, 0.5)

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 [IN] The key for time and transition control - RKey
strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string
fWeight [IN] The weight for opacity - float [0~100]

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Create a key
10 key = RLPy.RKey()
11 key.SetTime(RLPy.RTime(1200))
12 # Add a opacity key value
13 material_component.AddOpacityKey(key, mesh_name, material_name, 0.5)

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 [IN] The key for time and transition control - RKey
strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string
eChannel [IN] A material texture channel - RLPy.EMaterialTextureChannel
  • RLPy.EMaterialTextureChannel_Metallic
  • RLPy.EMaterialTextureChannel_Diffuse
  • RLPy.EMaterialTextureChannel_Specular
  • RLPy.EMaterialTextureChannel_Shininess
  • RLPy.EMaterialTextureChannel_Glow
  • RLPy.EMaterialTextureChannel_Displacement
  • RLPy.EMaterialTextureChannel_Opacity
  • RLPy.EMaterialTextureChannel_DiffuseBlend
  • RLPy.EMaterialTextureChannel_Bump
  • RLPy.EMaterialTextureChannel_Reflection
  • RLPy.EMaterialTextureChannel_Refraction
  • RLPy.EMaterialTextureChannel_Cube
  • RLPy.EMaterialTextureChannel_AmbientOcclusion
  • RLPy.EMaterialTextureChannel_Quantity
fWeight [IN] The weight for channel - float [0~100] ui 上是 0~100, 傳到核心沒乘 0.01

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Create a key
10 key = RLPy.RKey()
11 key.SetTime(RLPy.RTime(1200))
12 # Modify texture weight
13 texture_channel = RLPy.EMaterialTextureChannel_Diffuse
14 diffuse_weight = 0.1
15 material_component.AddTextureWeightKey(key, mesh_name, material_name,
16                                        texture_channel, diffuse_weight)

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 [IN] The key for time and transition control - RKey
strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string
eChannel [IN] A material texture channel - RLPy.EMaterialTextureChannel
  • RLPy.EMaterialTextureChannel_Metallic
  • RLPy.EMaterialTextureChannel_Diffuse
  • RLPy.EMaterialTextureChannel_Specular
  • RLPy.EMaterialTextureChannel_Shininess
  • RLPy.EMaterialTextureChannel_Glow
  • RLPy.EMaterialTextureChannel_Displacement
  • RLPy.EMaterialTextureChannel_Opacity
  • RLPy.EMaterialTextureChannel_DiffuseBlend
  • RLPy.EMaterialTextureChannel_Bump
  • RLPy.EMaterialTextureChannel_Reflection
  • RLPy.EMaterialTextureChannel_Refraction
  • RLPy.EMaterialTextureChannel_Cube
  • RLPy.EMaterialTextureChannel_AmbientOcclusion
  • RLPy.EMaterialTextureChannel_Quantity
kUvOffset [IN] The uv's offset for channel - RLPy.RVector2f
kUvTile [IN] The uv's tile for channel - RLPy.RVector2f
fUvRotate [IN] The uv's rotate for channel ( radians) - float

Return

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Create a key
10 key = RLPy.RKey()
11 key.SetTime(RLPy.RTime(1200))
12 # Modify uv data
13 texture_channel = RLPy.EMaterialTextureChannel_Bump
14 uv_offset = RLPy.RVector2(0.1, 0)
15 uv_tile = RLPy.RVector2(1, 1)
16 uv_rotate = 3.14
17 material_component.AddUvDataKey(key, mesh_name, material_name,
18                           texture_channel, uv_offset, uv_tile, uv_rotate)

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 [IN] The key for time and transition control - RKey
strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string
eChannel [IN] A material texture channel - RLPy.EMaterialTextureChannel
  • RLPy.EMaterialTextureChannel_Metallic
  • RLPy.EMaterialTextureChannel_Diffuse
  • RLPy.EMaterialTextureChannel_Specular
  • RLPy.EMaterialTextureChannel_Shininess
  • RLPy.EMaterialTextureChannel_Glow
  • RLPy.EMaterialTextureChannel_Displacement
  • RLPy.EMaterialTextureChannel_Opacity
  • RLPy.EMaterialTextureChannel_DiffuseBlend
  • RLPy.EMaterialTextureChannel_Bump
  • RLPy.EMaterialTextureChannel_Reflection
  • RLPy.EMaterialTextureChannel_Refraction
  • RLPy.EMaterialTextureChannel_Cube
  • RLPy.EMaterialTextureChannel_AmbientOcclusion
  • RLPy.EMaterialTextureChannel_Quantity
fVol [IN] The volume of video ( 0-100 ) - float
bMute [IN] mute - bool

Return

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Create a key
10 key = RLPy.RKey()
11 key.SetTime(RLPy.RTime(1200))
12 # Load video to material channel
13 texture_channel = RLPy.EMaterialTextureChannel_Bump
14 video_file = "C://MaterialVideoTest.mp4"
15 video_volume = 50
16 is_mute = False
17 material_component.LoadVideoToTexture(key, mesh_name, material_name,
18                                       texture_channel, video_file)
19 material_component.AddVideoVolumeKey(key, mesh_name, material_name,
20                                     texture_channel, video_volume, is_mute)

GetAmbientColor ( self, strMeshName, strMaterialName )

Get the material's Ambient color.

See Also: GetDiffuseColor, GetGlossinessWeight, GetMaterialNames, GetOpacity, GetSelfIlluminationWeight, GetSpecularColor, GetSpecularWeight, GetTextureWeights, GetUvData, GetVideoVolume

Parameters

strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string

Returns

ambient color - RRgb
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Get ambient color
10 print(material_component.GetAmbientColor(mesh_name, material_name))

GetDiffuseColor ( self, strMeshName, strMaterialName)

Get the material's Diffuse color.

See Also: GetAmbientColor, GetGlossinessWeight, GetMaterialNames, GetOpacity, GetSelfIlluminationWeight, GetSpecularColor, GetSpecularWeight, GetTextureWeights, GetUvData, GetVideoVolume

Parameters

strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string

Returns

diffuse color - RRgb
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Get diffuse color
10 print(material_component.GetDiffuseColor(mesh_name, material_name))

GetGlossinessWeight ( self, strMeshName, strMaterialName)

Get the material's Glossiness weight.

See Also: GetMaterialNameParameters

Parameters

strMeshName [IN] Name for the mesh - string
strMaterialName [IN] Name of the material on the mesh - string

Returns

weight of specular - float
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Get glossiness weight
10 print(material_component.GetGlossinessWeight(mesh_name, material_name))

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 [IN] Name of the mesh - string

Returns

material names - string list.
1 # Get Object mesh and material
2 avatar_list = RLPy.RScene.GetAvatars()
3 avatar = avatar_list[0]
4 material_component = avatar.GetMaterialComponent()
5 mesh_list = avatar.GetMeshNames()
6 mesh_name = mesh_list[0]
7 material_list = material_component.GetMaterialNames(mesh_name)
8 material_name = material_list[0]

GetOpacity ( self, strMeshName, strMaterialName )

Get the material opacity value.

See Also: GetAmbientColor, GetDiffuseColor, GetGlossinessWeight, GetMaterialNames, GetSelfIlluminationWeight, GetSpecularColor, GetSpecularWeight, GetTextureWeights, GetUvData, GetVideoVolume

Parameters

strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string

Returns

weight of opacity - float
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Get opacity
10 print(material_component.GetOpacity(mesh_name, material_name))

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 [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string

Returns

weight of self-illumination - float
 1 ( Experimental API )
 2 # Get object, mesh and material
 3 avatar_list = RLPy.RScene.GetAvatars()
 4 avatar = avatar_list[0]
 5 material_component = avatar.GetMaterialComponent()
 6 mesh_list = avatar.GetMeshNames()
 7 mesh_name = mesh_list[0]
 8 material_list = material_component.GetMaterialNames(mesh_name)
 9 material_name = material_list[0]
10 # Get self-illumination weight
11 print(material_component.GetSelfIlluminationWeight(mesh_name, material_name))

GetSpecularColor ( self, strMeshName, strMaterialName )

Get the material's Specular color.

See Also: GetAmbientColor, GetDiffuseColor, GetGlossinessWeight, GetMaterialNames, GetOpacity, GetSelfIlluminationWeight, GetSpecularWeight, GetTextureWeights, GetUvData, GetVideoVolume

Parameters

strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string

Returns

Specular color - RRgb
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Get specular color
10 print(material_component.GetSpecularColor(mesh_name, material_name))

GetSpecularWeight ( self, strMeshName, strMaterialName )

Get the material's Specular weight.

See Also: GetAmbientColor, GetDiffuseColor, GetGlossinessWeight, GetMaterialNames, GetOpacity, GetSelfIlluminationWeight, GetSpecularColor, GetTextureWeights, GetUvData, GetVideoVolume

Parameters

strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string

Returns

Specular weight - float
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Get specular weight
10 print(material_component.GetSpecularWeight(mesh_name, material_name))

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 [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string

Returns

Ordered list of all texture channel weights - float list
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Get all texture weights
10 temp_texture_weight_list = material_component.GetTextureWeights(mesh_name, material_name)
11 print(temp_texture_weight_list)

GetUvData ( self, strMeshName, strMaterialName, eChannel, kUvOffest, 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 [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string
eChannel [IN] A material texture channel - RLPy.EMaterialTextureChannel
  • RLPy.EMaterialTextureChannel_Metallic
  • RLPy.EMaterialTextureChannel_Diffuse
  • RLPy.EMaterialTextureChannel_Specular
  • RLPy.EMaterialTextureChannel_Shininess
  • RLPy.EMaterialTextureChannel_Glow
  • RLPy.EMaterialTextureChannel_Displacement
  • RLPy.EMaterialTextureChannel_Opacity
  • RLPy.EMaterialTextureChannel_DiffuseBlend
  • RLPy.EMaterialTextureChannel_Bump
  • RLPy.EMaterialTextureChannel_Reflection
  • RLPy.EMaterialTextureChannel_Refraction
  • RLPy.EMaterialTextureChannel_Cube
  • RLPy.EMaterialTextureChannel_AmbientOcclusion
  • RLPy.EMaterialTextureChannel_Quantity
kUvOffset [OUT] UV offset - RVector2
kUvTile [OUT] UV tiling - RVector2
fUvRotate [OUT] UV rotation in radians- float

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Get UV data
10 uv_offset = RLPy.RVector2()
11 uv_tile = RLPy.RVector2()
12 uv_rotate = 0.0
13 uv_data = material_component.GetUvData(mesh_name, material_name, texture_channel, uv_offset, uv_tile, uv_rotate)
14 print(uv_data[0])

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 [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string
eChannel [IN] A material texture channel - RLPy.EMaterialTextureChannel
  • RLPy.EMaterialTextureChannel_Metallic
  • RLPy.EMaterialTextureChannel_Diffuse
  • RLPy.EMaterialTextureChannel_Specular
  • RLPy.EMaterialTextureChannel_Shininess
  • RLPy.EMaterialTextureChannel_Glow
  • RLPy.EMaterialTextureChannel_Displacement
  • RLPy.EMaterialTextureChannel_Opacity
  • RLPy.EMaterialTextureChannel_DiffuseBlend
  • RLPy.EMaterialTextureChannel_Bump
  • RLPy.EMaterialTextureChannel_Reflection
  • RLPy.EMaterialTextureChannel_Refraction
  • RLPy.EMaterialTextureChannel_Cube
  • RLPy.EMaterialTextureChannel_AmbientOcclusion
  • RLPy.EMaterialTextureChannel_Quantity

Returns

video volume - float
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Get video volume
10 texture_channel = RLPy.EMaterialTextureChannel_Bump
11 print(material_component.GetVideoVolume(mesh_name, material_name, texture_channel))

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

Import an image into a material texture channel.

See Also: LoadVideoToTexture

Parameters

strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string
eChannel [IN] A material texture channel - RLPy.EMaterialTextureChannel
  • RLPy.EMaterialTextureChannel_Metallic
  • RLPy.EMaterialTextureChannel_Diffuse
  • RLPy.EMaterialTextureChannel_Specular
  • RLPy.EMaterialTextureChannel_Shininess
  • RLPy.EMaterialTextureChannel_Glow
  • RLPy.EMaterialTextureChannel_Displacement
  • RLPy.EMaterialTextureChannel_Opacity
  • RLPy.EMaterialTextureChannel_DiffuseBlend
  • RLPy.EMaterialTextureChannel_Bump
  • RLPy.EMaterialTextureChannel_Reflection
  • RLPy.EMaterialTextureChannel_Refraction
  • RLPy.EMaterialTextureChannel_Cube
  • RLPy.EMaterialTextureChannel_AmbientOcclusion
  • RLPy.EMaterialTextureChannel_Quantity
strImagePath [IN] Image file path - string

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 #Load image to material channel
10 texture_channel = RLPy.EMaterialTextureChannel_Diffuse
11 image_file = "C://diffuse.png"
12 result = material_component.LoadImageToTexture(mesh_name, material_name, texture_channel, image_file)

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

Import a video into a material texture channel.

See Also: LoadImageToTexture

Parameters

kKey [IN] The key for time and transition control - RKey
strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string
eChannel [IN] A material texture channel - RLPy.EMaterialTextureChannel
  • RLPy.EMaterialTextureChannel_Metallic
  • RLPy.EMaterialTextureChannel_Diffuse
  • RLPy.EMaterialTextureChannel_Specular
  • RLPy.EMaterialTextureChannel_Shininess
  • RLPy.EMaterialTextureChannel_Glow
  • RLPy.EMaterialTextureChannel_Displacement
  • RLPy.EMaterialTextureChannel_Opacity
  • RLPy.EMaterialTextureChannel_DiffuseBlend
  • RLPy.EMaterialTextureChannel_Bump
  • RLPy.EMaterialTextureChannel_Reflection
  • RLPy.EMaterialTextureChannel_Refraction
  • RLPy.EMaterialTextureChannel_Cube
  • RLPy.EMaterialTextureChannel_AmbientOcclusion
  • RLPy.EMaterialTextureChannel_Quantity
strVideoPath [IN] Video file path - string

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Create a key
10 key = RLPy.RKey()
11 key.SetTime(RLPy.RTime(1200))
12 # Load video to material channel
13 texture_channel = RLPy.EMaterialTextureChannel_Bump
14 video_file = "C://MaterialVideoTest.mp4"
15 material_component.LoadVideoToTexture(key, mesh_name, material_name, texture_channel, video_file)

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

Remove an UV data key from a material texture channel.

See Also: AddUvDataKey

Parameters

kKey [IN] The key for time and transition control - RKey
strMeshName [IN] Name of the mesh - string
strMaterialName [IN] Name of a mesh material - string
eChannel [IN] A material texture channel - RLPy.EMaterialTextureChannel
  • RLPy.EMaterialTextureChannel_Metallic
  • RLPy.EMaterialTextureChannel_Diffuse
  • RLPy.EMaterialTextureChannel_Specular
  • RLPy.EMaterialTextureChannel_Shininess
  • RLPy.EMaterialTextureChannel_Glow
  • RLPy.EMaterialTextureChannel_Displacement
  • RLPy.EMaterialTextureChannel_Opacity
  • RLPy.EMaterialTextureChannel_DiffuseBlend
  • RLPy.EMaterialTextureChannel_Bump
  • RLPy.EMaterialTextureChannel_Reflection
  • RLPy.EMaterialTextureChannel_Refraction
  • RLPy.EMaterialTextureChannel_Cube
  • RLPy.EMaterialTextureChannel_AmbientOcclusion
  • RLPy.EMaterialTextureChannel_Quantity

Returns

Success - RLPy.RStatus.Success
Failure - RLPy.RStatus.Failure
 1 # Get object, mesh and material
 2 avatar_list = RLPy.RScene.GetAvatars()
 3 avatar = avatar_list[0]
 4 material_component = avatar.GetMaterialComponent()
 5 mesh_list = avatar.GetMeshNames()
 6 mesh_name = mesh_list[0]
 7 material_list = material_component.GetMaterialNames(mesh_name)
 8 material_name = material_list[0]
 9 # Create a key
10 key = RLPy.RKey()
11 key.SetTime(RLPy.RTime(1200))
12 # Remove UV data key
13 texture_channel = RLPy.EMaterialTextureChannel_Bump  test other channel
14 material_component.RemoveUvDataKey(key, mesh_name, material_name, texture_channel)