MaterialTexture

Returns or modifies a material's texture bitmap filename.

Syntax

rhinoscriptsyntax.MaterialTexture (material_index, filename=None)

rhinoscript.material.MaterialTexture (material_index, filename=None)

Parameters

material_index

Required.  Number.  The zero-based source material index.

filename

Optional.  String.  The texture bitmap filename.

Returns

String

If filename is not specified, the current texture bitmap filename if successful.

String

If filename is specified, the previous texture bitmap filename if successful.

None

It not successful, or on error.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select object")

if obj:

    index = rs.ObjectMaterialIndex(obj)

    if index>-1:

        rs.MaterialTexture( index, "C:\\Users\\Steve\\Desktop\\textureimage.png" )

Also See

MaterialBump

MaterialColor

MaterialName

MaterialReflectiveColor

MaterialShine

MaterialTransparency