Loading...
Searching...
No Matches
displayColorSpaceSceneIndexPlugin.h
1//
2// Copyright 2026 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_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_DISPLAY_COLOR_SPACE_SCENE_INDEX_PLUGIN_H
8#define EXT_RMANPKG_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_DISPLAY_COLOR_SPACE_SCENE_INDEX_PLUGIN_H
9
10#include "pxr/pxr.h"
11#if PXR_VERSION >= 2308
12
13#include "pxr/imaging/hd/sceneIndexPlugin.h"
14#include "hdPrman/api.h"
15
16PXR_NAMESPACE_OPEN_SCOPE
17
29class HdPrman_DisplayColorSpaceSceneIndexPlugin :
31{
32public:
33 HdPrman_DisplayColorSpaceSceneIndexPlugin();
34
35 // Callback to allow for remapping of any custom color space names to ones
36 // the ColorSpaceAPI and GfColorSpace can recognize. See GfColorSpace to
37 // see the Color Space names suppored by the ColorSpaceAPI and Gf.
38 using ColorSpaceRemappingCallback = TfToken (*) (const TfToken& csName);
39 static void
40 RegisterColorSpaceRemappingCallback(
41 const ColorSpaceRemappingCallback& callback);
42 static TfToken RemapColorSpaceName(const TfToken& csName);
43
44 // Callback should return true if the color space transformation applied by
45 // this scene index should be disabled. Otherwise it should return false.
46 using DisableTransformCallback = bool (*) (const HdSceneIndexBaseRefPtr &si);
47 static void
48 RegisterDisableTransformCallback(
49 const DisableTransformCallback& callback);
50 static bool DisableTransform(const HdSceneIndexBaseRefPtr& si);
51
52
53protected:
54 HdSceneIndexBaseRefPtr _AppendSceneIndex(
55 const HdSceneIndexBaseRefPtr &inputScene,
56 const HdContainerDataSourceHandle &inputArgs) override;
57};
58
59PXR_NAMESPACE_CLOSE_SCOPE
60
61#endif // PXR_VERSION >= 2308
62
63#endif //EXT_RMANPKG_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_DISPLAY_COLOR_SPACE_SCENE_INDEX_PLUGIN_H
A scene index plugin bundles one or more (typically filtering) scene indices together and enables the...
virtual HD_API HdSceneIndexBaseRefPtr _AppendSceneIndex(const HdSceneIndexBaseRefPtr &inputScene, const HdContainerDataSourceHandle &inputArgs)
Subclasses implement this to instantiate one or more scene indicies which take the provided scene as ...
Token for efficient comparison, assignment, and hashing of known strings.
Definition token.h:71