ExportShaderTree

Introduced

v9.0 (2011)

Description

Exports a shader tree to a .xsishaders file. A shader tree is a kind of a compound representation of a shader node (similar to the .xsirtcompound file for Render Tree compounds). Shader trees are basically shader compound whithout any exposed ports. The shader tree format replaces shader and material presets.

This is the scripting equivalent of selecting Export Selected from the node context menu in the Render Tree.

Scripting Syntax

oString = ExportShaderTree( [Shaders], FullPath, DisplayName, Category, [ForceEmbedded] );

Return Value

Full path and filename of the new .xsishaders file as a String

Parameters

Parameter Type Description
Shaders String List of shaders to export.

Default Value: Current selection

FullPath String Where to save the shader tree on disk.
DisplayName String The name that appears in the Preset Manager. If the display name is empty, the file won't appear in the Preset Manager.
Category String The category to use in the Preset Manager. If the category is empty, the file won't appear in the Preset Manager.
ForceEmbedded Boolean True to force any nested shader compounds to be embedded inside the same exported .xsirtshaders file, instead of being referenced, as is usually the case.

Note: If any nested shaders have not been exported already (that is, if there is no .xsirtshaders file on disk), they will be embedded, regardless of this setting.

Default Value: False

See Also

ImportShaderTree ReplaceShadersDefinition CreateShaderFromPreset CreateShaderFromCLSID CreateShaderFromProgID CreateShaderCompound NestShaders UnnestShaders AddShaderCompoundPort RemoveShaderCompoundPort MoveShaderCompoundPort RenameShaderCompoundPort ExportShaderCompound ExportShaderCompound ImportShaderTree ExplodeShaderCompound SetShaderCompoundPropertiesEx GetShaderCompoundProperties EditShaderCompoundPPGLogic