![]() |
|
Discovers shader nodes on the filesystem. More...
#include <filesystemDiscovery.h>
Inherits SdrDiscoveryPlugin.
Public Types | |
| using | Filter = std::function< bool(SdrShaderNodeDiscoveryResult &)> |
| A filter for discovered nodes. | |
Public Member Functions | |
| SDR_API | _SdrFilesystemDiscoveryPlugin () |
| Constructor. | |
| SDR_API | _SdrFilesystemDiscoveryPlugin (Filter filter) |
| DiscoverNodes() will pass each result to the given function for modification. | |
| SDR_API | ~_SdrFilesystemDiscoveryPlugin () |
| Destructor. | |
| SDR_API SdrShaderNodeDiscoveryResultVec | DiscoverShaderNodes (const Context &) override |
| Discover all of the nodes that appear within the the search paths provided and match the extensions provided. | |
| SDR_API const SdrStringVec & | GetSearchURIs () const override |
| Gets the paths that this plugin is searching for nodes in. | |
Discovers shader nodes on the filesystem.
The provided search paths are walked to find files that have certain extensions. If a file with a matching extension is found, it is turned into a SdrShaderNodeDiscoveryResult and will be parsed into a node when its information is accessed.
Parameters for this plugin are specified via environment variables (which must be set before the library is loaded):
PXR_SDR_FS_PLUGIN_SEARCH_PATHS - The paths that should be searched, recursively, for files that represent nodes. Paths should be separated by either a ':' or a ';' depending on your platform (it should mimic the PATH env var on your platform). See ARCH_PATH_LIST_SEP.
PXR_SDR_FS_PLUGIN_ALLOWED_EXTS - The extensions on files that define nodes. Do not include the leading ".". Extensions should be separated by a colon.
PXR_SDR_FS_PLUGIN_FOLLOW_SYMLINKS - Whether symlinks should be followed while walking the search paths. Set to "true" (case sensitive) if they should be followed.
Definition at line 50 of file filesystemDiscovery.h.
| using Filter = std::function<bool(SdrShaderNodeDiscoveryResult&)> |
A filter for discovered nodes.
If the function returns false then the discovered node is discarded. Otherwise the function can modify the discovery result.
Definition at line 55 of file filesystemDiscovery.h.
| SDR_API _SdrFilesystemDiscoveryPlugin | ( | ) |
Constructor.
| SDR_API _SdrFilesystemDiscoveryPlugin | ( | Filter | filter | ) |
DiscoverNodes() will pass each result to the given function for modification.
If the function returns false then the result is discarded.
|
inline |
Destructor.
Definition at line 69 of file filesystemDiscovery.h.
|
override |
Discover all of the nodes that appear within the the search paths provided and match the extensions provided.
|
inlineoverridevirtual |
Gets the paths that this plugin is searching for nodes in.
Implements NdrDiscoveryPlugin.
Definition at line 79 of file filesystemDiscovery.h.