MQShaderNode class

MQShaderNode has shader parameters in a material.

Property

get set Type Name Description
x string shaderFilename shader's filename

Method

Member Description
getOptionValue Get an option value defined in a shader .xml file.
getParameterNum Get a number of parameters.
getParameterName Get a parameter's name.
getParameterOptionValue Get a parameter's option value defined in a shader .xml file.
getParameterValueType Get a type of values in a parameter specified by an index or a name.
getParameterArraySize Get a number of an array in a parameter specified by an index or a name.
getParameterBoolValue Get a value as bool value in a parameter specified by an index or a name.
getParameterIntValue Get a value as int value in a parameter specified by an index or a name.
getParameterFloatValue Get a value as float value in a parameter specified by an index or a name.
getParameterColorValue Get a value as MQColor value in a parameter specified by an index or a name.
getParameterStringValue Get a value as string value in a parameter specified by an index or a name.
setParameterBoolValue Set a value by bool value in a parameter specified by an index or a name.
setParameterIntValue Set a value by int value in a parameter specified by an index or a name.
setParameterFloatValue Set a value by float value in a parameter specified by an index or a name.
setParameterColorValue Set a value by MQColor value in a parameter specified by an index or a name.
setParameterStringValue Set a value by string value in a parameter specified by an index or a name.
getMappingNum Get a number of mappings.
getMappingName Get a mapping's name.
getMappingOptionValue Get a mapping's option value defined in a shader .xml file.
getMappingFilename Get a mapping's filename.
setMappingFilename Set a mapping's filename.
getMappingUVChannel Get a mapping's UV channel name.
setMappingUVChannel Set a mapping's UV channel name.
getMappingConnectedNodeID Get a connected node ID to the mapping.
setMappingConnectedNodeID Get a connected node ID to the mapping.
getMappingConnectedNode Get a connected shader node.
getMappingParameterNum Get a mapping's filename.
getMappingParameterName Get a mapping parameter's name.
getMappingParameterValueType Get a type of values in a mapping parameter specified by an index or a name.
getMappingParameterArraySize Get a number of an array in a mapping parameter specified by an index or a name.
getMappingParameterBoolValue Get a value as bool value in a mapping parameter specified by an index or a name.
getMappingParameterIntValue Get a value as int value in a mapping parameter specified by an index or a name.
getMappingParameterFloatValue Get a value as float value in a mapping parameter specified by an index or a name.
getMappingParameterColorValue Get a value as MQColor value in a mapping parameter specified by an index or a name.
getMappingParameterStringValue Get a value by string value in a mapping parameter specified by an index or a name.
setMappingParameterBoolValue Set a value by bool value in a mapping parameter specified by an index or a name.
setMappingParameterIntValue Set a value by int value in a mapping parameter specified by an index or a name.
setMappingParameterFloatValue Set a value by float value in a mapping parameter specified by an index or a name.
setMappingParameterColorValue Set a value by MQColor value in a mapping parameter specified by an index or a name.
setMappingParameterStringValue Set a value by string value in a mapping parameter specified by an index or a name.
getOutputParameterNum Get a number of output parameters defined in a shader .xml file.
getOutputParameterName Get an output parameter's defined in a shader .xml file.
getOutputParameterOptionValue Get an output parameter's option value defined in a shader .xml file.
getOutputParameterValueType Get a type of values in an output parameter specified by an index or a name.

getOptionValue(option_name)

Get an option value defined in a shader .xml file.

Parameters:
string option_name - An option's name
Return value:
string - An option value

getParameterNum

Get a number of parameters.

Return value:
int - A number of parameters

getParameterName(index)

Get a parameter's name.

Parameters:
int index - An index of a parameter
Return value:
string - A name

getParameterOptionValue(parameter_index_or_name, option_name)

Get a parameter's option value defined in a shader .xml file.

Parameters:
int / string parameter_index_or_name - An index of a parameter, or a parameter's name
string option_name - An option's name
Return value:
string - An option value

getParameterValueType(parameter_index_or_name)

Get a type of values in a parameter specified by an index or a name.

Parameters:
int / string parameter_index_or_name - An index of a parameter, or a parameter's name
Return value:
string - An option value
["bool"] bool (True or False)
["int"] int
["float"] float
["color"] MQColor
["string"] string

getParameterArraySize(parameter_index_or_name)

Get a number of an array in a parameter specified by an index or a name.

Parameters:
int / string parameter_index_or_name - An index of a parameter, or a parameter's name
Return value:
int - A number of an array

getParameterBoolValue(parameter_index_or_name[, array_index])

Get a value as bool value in a parameter specified by an index or a name.

Parameters:
int / string parameter_index_or_name - An index of a parameter, or a parameter's name
int array_index - An index in an array
Return value:
bool - A value

getParameterIntValue(parameter_index_or_name[, array_index])

Get a value as int value in a parameter specified by an index or a name.

Parameters:
int / string parameter_index_or_name - An index of a parameter, or a parameter's name
int array_index - An index in an array
Return value:
int - A value

getParameterFloatValue(parameter_index_or_name[, array_index])

Get a value as float value in a parameter specified by an index or a name.

Parameters:
int / string parameter_index_or_name - An index of a parameter, or a parameter's name
int array_index - An index in an array
Return value:
float - A value

getParameterColorValue(parameter_index_or_name[, array_index])

Get a value as MQColor value in a parameter specified by an index or a name.

Parameters:
int / string parameter_index_or_name - An index of a parameter, or a parameter's name
int array_index - An index in an array
Return value:
MQColor - A value

getParameterStringValue(parameter_index_or_name[, array_index])

Get a value as string value in a parameter specified by an index or a name.

Parameters:
int / string parameter_index_or_name - An index of a parameter, or a parameter's name
int array_index - An index in an array
Return value:
string - A value

setParameterBoolValue(parameter_index_or_name[, array_index], value)

Set a value by bool value in a parameter specified by an index or a name.

Parameters:
int / string parameter_index_or_name - An index of a parameter, or a parameter's name
int array_index - An index in an array
bool value - A value

setParameterIntValue(parameter_index_or_name[, array_index], value)

Set a value by int value in a parameter specified by an index or a name.

Parameters:
int / string parameter_index_or_name - An index of a parameter, or a parameter's name
int array_index - An index in an array
int value - A value

setParameterFloatValue(parameter_index_or_name[, array_index], value)

Set a value by float value in a parameter specified by an index or a name.

Parameters:
int / string parameter_index_or_name - An index of a parameter, or a parameter's name
int array_index - An index in an array
float value - A value

setParameterColorValue(parameter_index_or_name[, array_index], value)

Set a value by MQColor value in a parameter specified by an index or a name.

Parameters:
int / string parameter_index_or_name - An index of a parameter, or a parameter's name
int array_index - An index in an array
MQColor value - A value

setParameterStringValue(parameter_index_or_name[, array_index], value)

Set a value by string value in a parameter specified by an index or a name.

Parameters:
int / string parameter_index_or_name - An index of a parameter, or a parameter's name
int array_index - An index in an array
string value - A value

getMappingNum

Get a number of mappings.

Return value:
int - A number of mappings

getMappingName(index)

Get a mapping's name.

Parameters:
int index - An index of a mapping
Return value:
string - A name

getMappingOptionValue(mapping_index_or_name, option_name)

Get a mapping's option value defined in a shader .xml file.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
string option_name - An option's name
Return value:
string - An option value

getMappingFilename(mapping_index_or_name)

Get a mapping's filename.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
Return value:
string - A filename

setMappingFilename(mapping_index_or_name, filename)

Set a mapping's filename.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
string filename - A filename

getMappingUVChannel(mapping_index_or_name)

Get a mapping's UV channel name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
Return value:
int - An UV channel ID

setMappingUVChannel(mapping_index_or_name, channel)

Set a mapping's UV channel name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int channel - An UV channel ID

getMappingConnectedNodeID(mapping_index_or_name)

Get a connected node ID to the mapping.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
Return value:
list[string,string] - A list of a sub shader node ID and an output parameter's name

setMappingConnectedNodeID(mapping_index_or_name, shader_node_id, output)

Get a connected node ID to the mapping.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
string shader_node_id - A sub shader node ID
string output - An output parameter's name

getMappingConnectedNode(mapping_index_or_name)

Get a connected shader node.

Parameters:
int / string mapping_index_or_name - A list of a shader node ID and an output parameter's name
Return value:
MQShaderNode - A sub shader node

getMappingParameterNum(mapping_index_or_name)

Get a mapping's filename.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
Return value:
int - A number of parameters

getMappingParameterName(mapping_index_or_name, index)

Get a mapping parameter's name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int index - An index of a mapping
Return value:
string - A parameter's name

getMappingParameterValueType(mapping_index_or_name, parameter_index_or_name)

Get a type of values in a mapping parameter specified by an index or a name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int / string parameter_index_or_name - An index of a mapping parameter, or a mapping parameter's name
Return value:
string - An option value
["bool"] bool (True or False)
["int"] int
["float"] float
["color"] MQColor
["string"] string

getMappingParameterArraySize(mapping_index_or_name, parameter_index_or_name)

Get a number of an array in a mapping parameter specified by an index or a name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int / string parameter_index_or_name - An index of a mapping parameter, or a mapping parameter's name
Return value:
int - A number of an array

getMappingParameterBoolValue(mapping_index_or_name, parameter_index_or_name[, array_index])

Get a value as bool value in a mapping parameter specified by an index or a name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int / string parameter_index_or_name - An index of a mapping parameter, or a mapping parameter's name
int array_index - An index in an array
Return value:
bool - A value

getMappingParameterIntValue(mapping_index_or_name, parameter_index_or_name[, array_index])

Get a value as int value in a mapping parameter specified by an index or a name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int / string parameter_index_or_name - An index of a mapping parameter, or a mapping parameter's name
int array_index - An index in an array
Return value:
int - A value

getMappingParameterFloatValue(mapping_index_or_name, parameter_index_or_name[, array_index])

Get a value as float value in a mapping parameter specified by an index or a name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int / string parameter_index_or_name - An index of a mapping parameter, or a mapping parameter's name
int array_index - An index in an array
Return value:
float - A value

getMappingParameterColorValue(mapping_index_or_name, parameter_index_or_name[, array_index])

Get a value as MQColor value in a mapping parameter specified by an index or a name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int / string parameter_index_or_name - An index of a mapping parameter, or a mapping parameter's name
int array_index - An index in an array
Return value:
MQColor - A value

getMappingParameterStringValue(mapping_index_or_name, parameter_index_or_name[, array_index], value)

Get a value by string value in a mapping parameter specified by an index or a name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int / string parameter_index_or_name - An index of a mapping parameter, or a mapping parameter's name
int array_index - An index in an array
string value - A value

setMappingParameterBoolValue(mapping_index_or_name, parameter_index_or_name[, array_index], value)

Set a value by bool value in a mapping parameter specified by an index or a name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int / string parameter_index_or_name - An index of a mapping parameter, or a mapping parameter's name
int array_index - An index in an array
bool value - A value

setMappingParameterIntValue(mapping_index_or_name, parameter_index_or_name[, array_index], value)

Set a value by int value in a mapping parameter specified by an index or a name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int / string parameter_index_or_name - An index of a mapping parameter, or a mapping parameter's name
int array_index - An index in an array
int value - A value

setMappingParameterFloatValue(mapping_index_or_name, parameter_index_or_name[, array_index], value)

Set a value by float value in a mapping parameter specified by an index or a name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int / string parameter_index_or_name - An index of a mapping parameter, or a mapping parameter's name
int array_index - An index in an array
float value - A value

setMappingParameterColorValue(mapping_index_or_name, parameter_index_or_name[, array_index], value)

Set a value by MQColor value in a mapping parameter specified by an index or a name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int / string parameter_index_or_name - An index of a mapping parameter, or a mapping parameter's name
int array_index - An index in an array
MQColor value - A value

setMappingParameterStringValue(mapping_index_or_name, parameter_index_or_name[, array_index], value)

Set a value by string value in a mapping parameter specified by an index or a name.

Parameters:
int / string mapping_index_or_name - An index of a mapping, or a mapping's name
int / string parameter_index_or_name - An index of a mapping parameter, or a mapping parameter's name
int array_index - An index in an array
string value - A value

getOutputParameterNum

Get a number of output parameters defined in a shader .xml file.

Return value:
int - A number of output parameters

getOutputParameterName(index)

Get an output parameter's defined in a shader .xml file.

Parameters:
int index - An index of an output parameter
Return value:
string - A name

getOutputParameterOptionValue(parameter_index_or_name, option_name)

Get an output parameter's option value defined in a shader .xml file.

Parameters:
int / string parameter_index_or_name - An index of an output parameter, or an output parameter's name
string option_name - An option's name
Return value:
string - An option value

getOutputParameterValueType(parameter_index_or_name)

Get a type of values in an output parameter specified by an index or a name.

Parameters:
int / string parameter_index_or_name - An index of an output parameter, or an output parameter's name
Return value:
string - An option value
["bool"] bool (True or False)
["int"] int
["float"] float
["color"] MQColor
["string"] string