Loading...
Searching...
No Matches
instanceProxySchema.h
Go to the documentation of this file.
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
8
9/* ************************************************************************** */
10/* ** ** */
11/* ** This file is generated by a script. ** */
12/* ** ** */
13/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
14/* ** Edit hdSchemaDefs.py instead to make changes. ** */
15/* ** ** */
16/* ************************************************************************** */
17
18#ifndef PXR_IMAGING_HD_INSTANCE_PROXY_SCHEMA_H
19#define PXR_IMAGING_HD_INSTANCE_PROXY_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
24#include "pxr/imaging/hd/schemaTypeDefs.h"
25
26#include "pxr/imaging/hd/schema.h"
27
28// --(BEGIN CUSTOM CODE: Includes)--
29// --(END CUSTOM CODE: Includes)--
30
31PXR_NAMESPACE_OPEN_SCOPE
32
33// --(BEGIN CUSTOM CODE: Declares)--
34// --(END CUSTOM CODE: Declares)--
35
36#define HD_INSTANCE_PROXY_SCHEMA_TOKENS \
37 (instanceProxy) \
38 (pathToPrimInPrototype) \
39 (instancingContext) \
40
41TF_DECLARE_PUBLIC_TOKENS(HdInstanceProxySchemaTokens, HD_API,
42 HD_INSTANCE_PROXY_SCHEMA_TOKENS);
43
44//-----------------------------------------------------------------------------
45
46
58{
59public:
62
63 HdInstanceProxySchema(HdContainerDataSourceHandle container)
64 : HdSchema(container) {}
65
71 HD_API
73 const HdContainerDataSourceHandle &fromParentContainer);
74
76
77// --(BEGIN CUSTOM CODE: Schema Methods)--
78// --(END CUSTOM CODE: Schema Methods)--
79
82
86 HD_API
87 HdPathDataSourceHandle GetPathToPrimInPrototype() const;
88
92 HD_API
94
96
99
102 HD_API
103 static const TfToken &GetSchemaToken();
104
107 HD_API
109
111
114
122 HD_API
123 static HdContainerDataSourceHandle
125 const HdPathDataSourceHandle &pathToPrimInPrototype,
126 const HdVectorDataSourceHandle &instancingContext
127 );
128
135 class Builder
136 {
137 public:
138 HD_API
139 Builder &SetPathToPrimInPrototype(
140 const HdPathDataSourceHandle &pathToPrimInPrototype);
141 HD_API
142 Builder &SetInstancingContext(
143 const HdVectorDataSourceHandle &instancingContext);
144
146 HD_API
147 HdContainerDataSourceHandle Build();
148
149 private:
150 HdPathDataSourceHandle _pathToPrimInPrototype;
151 HdVectorDataSourceHandle _instancingContext;
152
153 };
154
156};
157
158PXR_NAMESPACE_CLOSE_SCOPE
159
160#endif
Represents an object that can identify the location of a data source.
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
A schema for marking a prim as an instance proxy.
HD_API HdPathDataSourceHandle GetPathToPrimInPrototype() const
The path to the prim in the propagated prototype hierarchy that this instance proxy prim corresponds ...
static HD_API HdInstanceProxySchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
Retrieves a container data source with the schema's default name token "instanceProxy" from the paren...
HD_API HdInstanceVectorSchema GetInstancingContext() const
Starting from the outer most, lists the instancer, prototype index and instance index for each level ...
static HD_API HdContainerDataSourceHandle BuildRetained(const HdPathDataSourceHandle &pathToPrimInPrototype, const HdVectorDataSourceHandle &instancingContext)
static HD_API const TfToken & GetSchemaToken()
Returns a token where the container representing this schema is found in a container by default.
static HD_API const HdDataSourceLocator & GetDefaultLocator()
Returns an HdDataSourceLocator (relative to the prim-level data source) where the container represent...
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition schema.h:26
Template class wrapping a vector data source whose children are container data source conforming to a...
Token for efficient comparison, assignment, and hashing of known strings.
Definition token.h:71
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.