Learn R Programming

LumReader (version 0.1.0)

export_Material: Function to export a Material

Description

This function exports a Material as a .Material file.

Usage

export_Material(object, file.name)

Arguments

object
Material to export
file.name
character name of the .FLT file that will contain the Material properties.

Value

The function creates a new txt file containing the Material properties.

Examples

Run this code
example <- default_Material('example')
file.name <- 'example'

## Not run: 
# export_Material(example, file.name)  # uncomment
# ## End(Not run)

# There is now an 'example.TL' and an 'example.OSL' file in the 'working directory'.
# These file are classical .txt files despite the extensions.

file.TL <- paste(getwd(),'/', file.name,'.TL', sep="")
print(file.TL)
# readLines(file.TL)

file.OSL <- paste(getwd(),'/', file.name,'.OSL', sep="")
print(file.OSL)
# readLines(file.OSL)

Run the code above in your browser using DataLab