Loading...
Searching...
No Matches
matfiltResolveVstructs.h
1//
2// Copyright 2019 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef EXT_RMANPKG_25_0_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_MATFILT_RESOLVE_VSTRUCTS_H
8#define EXT_RMANPKG_25_0_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_MATFILT_RESOLVE_VSTRUCTS_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hd/material.h"
12#include "pxr/imaging/hd/materialNetworkInterface.h"
13#include "pxr/usd/ndr/declare.h"
14
15#include <memory>
16
17PXR_NAMESPACE_OPEN_SCOPE
18
21void MatfiltResolveVstructs(
22 HdMaterialNetworkInterface *networkInterface,
23 bool enableConditions = true);
24
25class MatfiltVstructConditionalEvaluatorImpl;
26
33{
34public:
35 typedef std::shared_ptr<MatfiltVstructConditionalEvaluator> Ptr;
36
38
39 static Ptr Parse(const std::string &inputExpr);
40
49 const TfToken &nodeId,
50 const TfToken &nodeInputId,
51 const TfToken &upstreamNodeId,
52 const TfToken &upstreamNodeOutput,
53 const NdrTokenVec &shaderTypePriority,
54 HdMaterialNetworkInterface *networkInterface) const;
55private:
57
58 MatfiltVstructConditionalEvaluatorImpl *_impl = nullptr;
59};
60
61PXR_NAMESPACE_CLOSE_SCOPE
62
63#endif // EXT_RMANPKG_25_0_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_MATFILT_RESOLVE_VSTRUCTS_H
Abstract interface for querying and mutating a material network.
Parses and evaluates a single expression of "virtual struct conditional grammar".
void Evaluate(const TfToken &nodeId, const TfToken &nodeInputId, const TfToken &upstreamNodeId, const TfToken &upstreamNodeOutput, const NdrTokenVec &shaderTypePriority, HdMaterialNetworkInterface *networkInterface) const
Runs the conditional actions specified by the parsed inputExpr.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
Common typedefs that are used throughout the NDR library.