Substance : textureMap
Substance - superclass: textureMap; super-superclass:material - 13:2 - classID: #(-1503541249, 1756066509)
This class implements the Substance loader as 3ds Max textureMap.
When a Substance package is loaded, a Substance_Output textureMap is connected automatically to it to serve as output channel selector.
Available in 3ds Max 2012 and higher.
Constructors:
Substance ... SubstanceTexture ...
Properties:
Substance.SubstanceFilename String default: "" -- filename; Substance_filename
Get/set the Substance filename.
Substance.rolloutStates Integer default: 2 -- integer; Lock_aspect_ratio
Get/set the opened state of the UI Rollouts of the Substance texture map in the Compact Material Editor.
The value is an integer where bits control the rolled out state of a rollout as follows:
bit 1 - when set, the "Global Substance Settings" rollout will be rolled out.
bit 2 - when set, the "Substance Package Browser" rollout will be rolled out, e.g. a value of 2 (default) opens only this rollout and rolls up the others.
bit 3 - not used.
bit 4 - when set, the "Texture Size" rollout will be rolled out, e.g. a value of 16 opens only this rollout, a value of 18 opens this and the previous rollout, a value of 19 opens all three rollouts.
The rollouts "Information", "Coordinates" and "Noise" cannot be controlled.
To refresh the samples in the Compact Material Editor, you can use
activeMeditSlot = activeMeditSlot
whis sets the active material slot to its current value and as a sifd effect updates the rollouts.
Global Texture Settings group of controls
Substance.globalTextureWidth Integer default: 512 -- integer; Global_texture_width
Get/set the state of the Global Texture Width drop-down list.
Possible values are: 32, 64, 128, 256, 512, 1024, 2048
Any other values will cause a run-time error.
Substance.globalTextureHeight Integer default: 512 -- integer; Global_texture_height
Get/set the state of the Global Texture Height drop-down list.
Possible values are: 32, 64, 128, 256, 512, 1024, 2048
Any other values will cause a run-time error.
Substance.globalModeScale Integer default: 2 -- integer; Edition_Mode_Scale
Get/set the state of the "Preview Resolution" drop-down list.
Possible values are:
1 - 1x
2 - 1/2 (default)
3 - 1/4
4 - 1/8
Any other values will cause a run-time error.
Texture Size rollout
Substance.lockAspectRatio Integer default: 0 -- integer; Lock_aspect_ratio
Get/set the state of the "Lock Aspect Ratio" checkbox.
Substance.localMode Integer default: 0 -- integer
Get/set the state of the Texture Size mode radio button.
Possible values are:
0 - Relative (default)
1 - Absolute
Substance.localRelativeTextureWidth Integer default: 7 -- integer; localTextureWidth
Get/set the state of the Relative Width drop-down list.
Substance.localRelativeTextureHeight Integer default: 7 -- integer; localTextureHeight
Get/set the state of the Relative Height drop-down list.
Substance.localAbsoluteTextureWidth Integer default: 512 -- integer; localTextureWidth
Get/set the state of the Absolute Width drop-down list.
Substance.localAbsoluteTextureHeight Integer default: 512 -- integer; localTextureHeight
Get/set the state of the Absolute Height drop-down list.
Substance.numIMultipleOutputChannels Integer default: 0 -- integer; read-only
Get the number of output channels generated by the current substance.
Substance.coords StandardUVGen default: MtlBase:Placement -- maxObject; Coordinates; SubAnim
Get/set the UV Coordinates generator.
Substance.Output StandardTextureOutput default: MtlBase:Output -- read-only; SubAnim
Get the StandardTextureOutput instance controlling the output of the textureMap.
Substance interfaces:
Interface: bitmapTex
Methods:
<void>reload()
Reloads the file.
<void>viewImage()
Open the texture image for viewing.
Interface: ISBS
Methods:
<string>Substance.getCurrentPackageName()
Returns the name of the currently selected package.
<string>Substance.getCurrentGraphName()
Returns the name of the currently selected graph.
<string>Substance.getCurrentOutputName()
Returns the name of the currently selected output.
<string array>Substance.getOutputsNamesFromCurrentGraph()
Returns an array of names representing the available output names from the current graph.
<boolean>Substance.setPackageAndGraphNames <string>packageName <string>graphName
Sets the package and graph name using the two by-reference arguments, returns true on success or false on failure.
<boolean>Substance.setCurrentOutputName <string>outputName
Sets the current output name to the string passed by-reference as argument. Returns true on success, false on failure.
<void>Substance.selectGraph()
Interface: iMultipleOutputChannelsWithValues
Properties:
Substance.numIMultipleOutputChannels : integer : Read
Get the number of output channels defined in the textureMap.
Methods:
<string>Substance.getIMultipleOutputChannelLocalizedName <index>index
Returns the localized name of the indexed output channel.
<string>Substance.getIMultipleOutputChannelName <index>index
Returns the name of the indexed output channel.
<enum>Substance.getIMultipleOutputChannelType <index>index
getIMultipleOutputChannelType enums: {#float | #integer | #rgb | #point3 | #string | #filename | #material | #texturemap | #bitmap | #node | #maxObject | #matrix3 | #paramblock2 | #point4 | #frgba }
Returns the type of the indexed output channel.
<value>Substance.getIMultipleOutputChannelValue <index>index time:<time>
time default value: 0f
Returns the value of the indexed output channel.
If the optional time:
argument is supplied, the value will be evaluated at the specified time. Otherwise, the current time will be used.
Interface: IMtlRender_Compability_MtlBase
Properties:
No properties exposed.
Methods:
No methods exposed.
Actions:
No actions exposed.