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
20
class
Mtl;
21
22
PXR_NAMESPACE_OPEN_SCOPE
23
29
class
MaxUsdShaderWriter
31
{
32
public
:
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
79
protected
:
82
MaxUSDAPI
void
SetUsdPrim(
const
UsdPrim& usdPrim);
83
85
MaxUSDAPI
const
USDSceneBuilderOptions
& GetExportArgs()
const
;
86
87
UsdPrim usdPrim;
88
MaxUsdWriteJobContext
& writeJobCtx;
89
private
:
90
Mtl* material;
91
SdfPath usdPath;
92
};
93
94
typedef
std::shared_ptr<MaxUsdShaderWriter> MaxUsdShaderWriterSharedPtr;
95
96
PXR_NAMESPACE_CLOSE_SCOPE
MaxUsdShaderWriter
The ShaderWriter base class from which material writers need to inherit from. A ShaderWriter instance...
Definition:
ShaderWriter.h:31
MaxUsdShaderWriter::ContextSupport
ContextSupport
Definition:
ShaderWriter.h:47
MaxUsdShaderWriter::ContextSupport::Fallback
@ Fallback
‍Material type is supported
MaxUsdWriteJobContext
Provides basic functionality and access to shared data for prim and shader writers.
Definition:
WriteJobContext.h:19
USDSceneBuilderOptions
USD Scene Build configuration options.
Definition:
USDSceneBuilderOptions.h:49
maxusd
include
maxUsd
Translators
ShaderWriter.h
Generated by
1.9.5