Comment Shader Presets
 
 
 

Comment Shader Presets

List of available Comment Shader presets. Comment presets allow you to add comments to document render trees. For example, you can describe what they are supposed to do and how they work.

For more information, see the user guide

Note See Shader Presets for a list of different shader preset types. Also see Alphabetical Listing of All Shader Presets for a complete list of available shaders.
Preset Shaders
Comment\Comment.Preset CommentComment shader preset.

For an example of how to use this preset, see the InstantiateCommentShader Example
Comment\Group_Comment.Preset Group_CommentComment shader preset.

For an example of how to use this preset, see the InstantiateCommentShader Example


InstantiateCommentShader Example

function InstantiateCommentShader( in_preset )
{
        NewScene( null, false );
        var obj = Application.ActiveSceneRoot.AddGeometry( "Sphere", "MeshSurface" );
        Application.Selection.SetAsText(obj);
        var presetpath = XSIUtils.BuildPath( 
                Application.InstallationPath(siFactoryPath),
                "Data", "DSPresets", "Shaders", in_preset
        );
        var oShader = CreateShaderFromPreset(presetpath, "Sources.Materials.DefaultLib.Scene_Material");
        if (!oShader) { return null; }
        return (oShader.Type == "XSICollection") ? oShader(0) : oShader;
}