# class
Texture
Texture describes a texture object, containing either image data or a path that is referenced by texture nodes in materials.
# Properties
Property | Description |
---|---|
FilePath | The file path of the texture. This path has two meanings: It can point to an existing file to use as image data for the texture if the image data object is not set. If the image data object is set on the texture, it is the path to where the image should be saved if the owning scene is exported. If you run a pipeline through the batch tool and Simplygon Grid, the returned texture object will have the image data embedded in the texture objects and this path indicates where it should be saved if the texture are to be stored separately. Use ExportImageData() to write out embedded data to the file path, then use GetFilePath() to get the final path for the texture image file. |
ImageData | Set/Get a named texture image data. If this is defined, it will be used instead of the texture file defined in GetFilePath/SetFilePath(). See the help for GetFilePath() for additional information regarding the file path meaning in conjunction with embedded image data objects. |
Name | The name of the Texture object. (Inherited from Object) |
# Methods
Method | Description |
---|---|
AddObserver | Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object) |
ChangeTexturePrefixPath | Changes the prefix path (drive, directory) in the texture, with the new one, if the current path matches the current_path_prefix. This method is useful when external textures are placed in a specific folder, which needs to be moved. |
ExportImageData | Write out the embedded image data to the file indicated by the set file path. Once this method returns, use GetFilePath() to get the potentially updated final file path used to write the image data file. |
GetClass | Get the name of the Texture class. (Inherited from Object) |
IsA | Returns true if Texture is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
IsNull | Returns true if the Texture object is invalid. (Inherited from Object) |
IsSameObjectAs | Returns true if the Texture object is valid. (Inherited from Object) |
NonNull | Returns true if the Texture object is valid. (Inherited from Object) |
PrintInfo | Prints the content/info of the Texture object to the log. (Inherited from Object) |
RemoveObserver | Removes a previously added observer object. (Inherited from Object) |
# Static methods
Method | Description |
---|---|
IsClassA | Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
SafeCast | SafeCast makes sure the input object is of a class that can be cast into spTexture, and if this is the case, returns the object cast into spTexture. (Inherited from Object) |
# Properties details
# FilePath
The file path of the texture. This path has two meanings: It can point to an existing file to use as image data for the texture if the image data object is not set. If the image data object is set on the texture, it is the path to where the image should be saved if the owning scene is exported. If you run a pipeline through the batch tool and Simplygon Grid, the returned texture object will have the image data embedded in the texture objects and this path indicates where it should be saved if the texture are to be stored separately. Use ExportImageData() to write out embedded data to the file path, then use GetFilePath() to get the final path for the texture image file.
# ImageData
Set/Get a named texture image data. If this is defined, it will be used instead of the texture file defined in GetFilePath/SetFilePath(). See the help for GetFilePath() for additional information regarding the file path meaning in conjunction with embedded image data objects.
# Name
The name of the Texture object. (Inherited from Object)
# Methods details
# AddObserver
Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
# ChangeTexturePrefixPath
Changes the prefix path (drive, directory) in the texture, with the new one, if the current path matches the current_path_prefix. This method is useful when external textures are placed in a specific folder, which needs to be moved.
# ExportImageData
Write out the embedded image data to the file indicated by the set file path. Once this method returns, use GetFilePath() to get the potentially updated final file path used to write the image data file.
# GetClass
Get the name of the Texture class. (Inherited from Object)
# IsA
Returns true if Texture is a or is a descendant of the class named as the type parameter. (Inherited from Object)
# IsNull
Returns true if the Texture object is invalid. (Inherited from Object)
# IsSameObjectAs
Returns true if the Texture object is valid. (Inherited from Object)
# NonNull
Returns true if the Texture object is valid. (Inherited from Object)
# PrintInfo
Prints the content/info of the Texture object to the log. (Inherited from Object)
# RemoveObserver
Removes a previously added observer object. (Inherited from Object)
# Static methods details
# IsClassA
Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
# SafeCast
SafeCast makes sure the input object is of a class that can be cast into spTexture, and if this is the case, returns the object cast into spTexture. (Inherited from Object)