3ds Max USD API Reference
Loading...
Searching...
No Matches
ShaderWriter.h
1#pragma once
2//**************************************************************************/
3// Copyright (c) 2022 Autodesk, Inc.
4// All rights reserved.
5//
6// These coded instructions, statements, and computer programs contain
7// unpublished proprietary information written by Autodesk, Inc., and are
8// protected by Federal copyright law. They may not be disclosed to third
9// parties or copied or duplicated in any form, in whole or in part, without
10// the prior written consent of Autodesk, Inc.
11//**************************************************************************/
12
13#include "WriteJobContext.h"
14
15#include <pxr/base/tf/refBase.h>
16#include <pxr/base/tf/registryManager.h>
17#include <pxr/usd/usd/common.h>
18#include <pxr/usd/usd/timeCode.h>
19
20class Mtl;
21
22PXR_NAMESPACE_OPEN_SCOPE
23
31{
32public:
33 MaxUSDAPI MaxUsdShaderWriter(
34 Mtl* material,
35 const SdfPath& usdPath,
36 MaxUsdWriteJobContext& jobCtx);
37
38 virtual ~MaxUsdShaderWriter() =default;
39
46 enum class ContextSupport
47 {
48 Unsupported, //> Material type is not supported
49 Supported,
50 Fallback //> Material type is not supported, use the fallback (default) writer
51 };
52
60
62 MaxUSDAPI virtual void Write() {};
63
65 MaxUSDAPI const UsdStageRefPtr& GetUsdStage() const;
66
68 MaxUSDAPI const SdfPath& GetUsdPath() const;
69
71 MaxUSDAPI const UsdPrim& GetUsdPrim() const;
72
74 MaxUSDAPI Mtl* GetMaterial() const;
75
77 MaxUSDAPI const std::string& GetFilename() const;
78
79protected:
82 MaxUSDAPI void SetUsdPrim(const UsdPrim& usdPrim);
83
85 MaxUSDAPI const USDSceneBuilderOptions& GetExportArgs() const;
86
87 UsdPrim usdPrim;
88 MaxUsdWriteJobContext& writeJobCtx;
89private:
90 Mtl* material;
91 SdfPath usdPath;
92};
93
94typedef std::shared_ptr<MaxUsdShaderWriter> MaxUsdShaderWriterSharedPtr;
95
96PXR_NAMESPACE_CLOSE_SCOPE
The ShaderWriter base class from which material writers need to inherit from. A ShaderWriter instance...
Definition: ShaderWriter.h:31
ContextSupport
Definition: ShaderWriter.h:47
@ Fallback
‍Material type is supported
Provides basic functionality and access to shared data for prim and shader writers.
Definition: WriteJobContext.h:19
USD Scene Build configuration options.
Definition: USDSceneBuilderOptions.h:49