Loading...
Searching...
No Matches
filesystemDiscovery.h
Go to the documentation of this file.
1//
2// Copyright 2025 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7
8#ifndef PXR_USD_SDR_FILESYSTEM_DISCOVERY_H
9#define PXR_USD_SDR_FILESYSTEM_DISCOVERY_H
10
12
13#include "pxr/pxr.h"
15#include "pxr/usd/sdr/api.h"
17#include <functional>
18
19PXR_NAMESPACE_OPEN_SCOPE
20
22
46public:
50 using Filter = std::function<bool(SdrShaderNodeDiscoveryResult&)>;
51
53 SDR_API
55
59 SDR_API
61
63 SDR_API
65
68 SDR_API
69 SdrShaderNodeDiscoveryResultVec DiscoverShaderNodes(
70 const Context&) override;
71
73 SDR_API
74 const SdrStringVec& GetSearchURIs() const override { return _searchPaths; }
75
76private:
78 SdrStringVec _searchPaths;
79
83 SdrStringVec _allowedExtensions;
84
86 bool _followSymlinks;
87
88 // The filter to run on the results.
89 Filter _filter;
90};
91
92PXR_NAMESPACE_CLOSE_SCOPE
93
94#endif // PXR_USD_SDR_FILESYSTEM_DISCOVERY_H
Discovers shader nodes on the filesystem.
SDR_API SdrShaderNodeDiscoveryResultVec DiscoverShaderNodes(const Context &) override
Discover all of the nodes that appear within the the search paths provided and match the extensions p...
SDR_API _SdrFilesystemDiscoveryPlugin(Filter filter)
DiscoverShaderNodes() will pass each result to the given function for modification.
std::function< bool(SdrShaderNodeDiscoveryResult &)> Filter
A filter for discovered nodes.
SDR_API _SdrFilesystemDiscoveryPlugin()
Constructor.
SDR_API const SdrStringVec & GetSearchURIs() const override
Gets the paths that this plugin is searching for nodes in.
SDR_API ~_SdrFilesystemDiscoveryPlugin()
Destructor.
A context for discovery.
Interface for discovery plugins for finding shader nodes.
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
Definition: declarePtrs.h:72
Provides utilities that the default filesystem discovery plugin uses.
Represents the raw data of a node, and some other bits of metadata, that were determined via a SdrDis...