1#usda 1.0
2(
3    "This file describes the USD RenderMan Interface (UsdRi) schemata for code generation."
4    subLayers = [
5        @usd/schema.usda@,
6        @usdShade/schema.usda@,
7    ]
8)
9
10def "GLOBAL" (
11    customData = {
12        string libraryName      = "usdRi"
13        string libraryPath      = "pxr/usd/usdRi"
14        # string libraryPrefix  = "UsdRi"
15        # string tokensPrefix   = "UsdRi"
16        # dictionary libraryTokens = {}
17        dictionary libraryTokens = {
18            dictionary "renderContext" = {
19                string value = "ri"
20                string doc = "UsdShadeMaterial / Hydra render context token for UsdRi"
21            }
22            dictionary spline = {
23                string doc = "UsdSplineAPI - Namespace for spline attributes"
24            }
25            dictionary interpolation = {
26                string doc = "UsdSplineAPI - Interpolation attribute name"
27            }
28            dictionary positions = {
29                string doc = "UsdSplineAPI - Positions attribute name"
30            }
31            dictionary values = {
32                string doc = "UsdSplineAPI - values attribute name"
33            }
34            dictionary linear = {
35                string doc = "UsdSplineAPI - Linear spline interpolation"
36            }
37            dictionary bspline = {
38                string doc = "UsdSplineAPI - BSpline spline interpolation"
39            }
40            dictionary "catmullRom" = {
41                string value = "catmull-rom"
42                string doc = "UsdSplineAPI - Catmull-Rom spline interpolation"
43            }
44            dictionary constant = {
45                string doc = "UsdSplineAPI - Constant-value spline interpolation"
46            }
47        }
48    }
49)
50{
51}
52
53class "StatementsAPI" (
54    inherits = </APISchemaBase>
55    doc = """Container namespace schema for all renderman statements.
56
57    \\note The longer term goal is for clients to go directly to primvar
58    or render-attribute API's, instead of using UsdRi StatementsAPI
59    for inherited attributes.  Anticpating this, StatementsAPI
60    can smooth the way via a few environment variables:
61
62    * USDRI_STATEMENTS_READ_OLD_ENCODING: Causes StatementsAPI to read
63      old-style attributes instead of primvars in the "ri:"
64      namespace.
65    """
66    customData = {
67        string extraIncludes = """
68#include "pxr/usd/usdGeom/primvarsAPI.h"
69"""
70    }
71) {
72}
73
74### Material API common to both RSL and RIS ###
75
76class "RiMaterialAPI" (
77    inherits = </APISchemaBase>
78    doc = """
79    \\deprecated Materials should use UsdShadeMaterial instead.
80    This schema will be removed in a future release.
81
82    This API provides outputs that connect a material prim to prman
83    shaders and RIS objects."""
84    customData = {
85        # We want the class name to be UsdRiMaterialAPI
86        string className = "MaterialAPI"
87        string extraIncludes = """
88#include "pxr/usd/usdShade/input.h"
89#include "pxr/usd/usdShade/output.h"
90#include "pxr/usd/usdShade/material.h"
91"""
92    }
93) {
94    token outputs:ri:surface (
95        displayGroup = "Outputs"
96        customData = {
97            string apiName = "surface"
98        }
99    )
100    token outputs:ri:displacement (
101        displayGroup = "Outputs"
102        customData = {
103            string apiName = "displacement"
104        }
105    )
106    token outputs:ri:volume (
107        displayGroup = "Outputs"
108        customData = {
109            string apiName = "volume"
110        }
111    )
112}
113
114
115########################################################################
116# Lighting API
117
118class "RiSplineAPI" (
119    inherits = </APISchemaBase>
120    doc = """
121    \\deprecated This API schema will be removed in a future release.
122
123    RiSplineAPI is a general purpose API schema used to describe
124    a named spline stored as a set of attributes on a prim.
125
126    It is an add-on schema that can be applied many times to a prim with
127    different spline names. All the attributes authored by the schema
128    are namespaced under "$NAME:spline:", with the name of the
129    spline providing a namespace for the attributes.
130
131    The spline describes a 2D piecewise cubic curve with a position and
132    value for each knot. This is chosen to give straightforward artistic
133    control over the shape. The supported basis types are:
134
135    - linear (UsdRiTokens->linear)
136    - bspline (UsdRiTokens->bspline)
137    - Catmull-Rom (UsdRiTokens->catmullRom)
138    """
139    customData = {
140        string className = "SplineAPI"
141    }
142) {
143}
144
145class "RiTextureAPI" (
146    inherits = </APISchemaBase>
147    doc = """
148    \\deprecated This API schema will be removed in a future release.
149
150    RiTextureAPI is an API schema that provides an interface
151    to add Renderman-specific attributes to adjust textures."""
152    customData = {
153        string className = "TextureAPI"
154    }
155) {
156    float ri:texture:gamma (
157        doc = """Gamma-correct the texture"""
158    )
159    float ri:texture:saturation (
160        doc = """Adjust the texture's saturation"""
161    )
162}
163
164