3ds Max USD API Reference
Loading...
Searching...
No Matches
WriteJobContext.h
1#pragma once
2//**************************************************************************/
3// Copyright (c) 2022 Autodesk, Inc.
4// All rights reserved.
5//
6// Use of this software is subject to the terms of the Autodesk license
7// agreement provided at the time of installation or download, or which
8// otherwise accompanies this software in either electronic or hard copy form.
9//**************************************************************************/
10
11#include "MaxUsd/Builders/USDSceneBuilderOptions.h"
12
13PXR_NAMESPACE_OPEN_SCOPE
14
15class MaxUsd_MaterialWriteJob;
16
19{
20public:
25 UsdStageRefPtr stage,
26 const std::string& filename,
27 const USDSceneBuilderOptions& args);
28
32 MaxUSDAPI ~MaxUsdWriteJobContext() = default;
33
38 const USDSceneBuilderOptions& GetArgs() const { return args; }
39
44 const UsdStageRefPtr& GetUsdStage() const { return stage; }
45
50 const std::string& GetFilename() const { return filename; }
51
56 void SetNodesToPrimsMap(const std::map<INode*, SdfPath>& nodesToPrims);
57
62 const std::map<INode*, SdfPath>& GetNodesToPrimsMap() const { return maxNodesToPrims; }
63
64protected:
65 // Args for the export (any & all export options).
66 const USDSceneBuilderOptions& args;
67
68 // Stage used to write out USD file
69 UsdStageRefPtr stage;
70 // Filename for the USD file
71 std::string filename;
72 // Max nodes being exported and their prims
73 std::map<INode*, SdfPath> maxNodesToPrims;
74};
75
76PXR_NAMESPACE_CLOSE_SCOPE
Provides basic functionality and access to shared data for prim and shader writers.
Definition: WriteJobContext.h:19
const UsdStageRefPtr & GetUsdStage() const
The USD Stage we are inthe process of building.
Definition: WriteJobContext.h:44
const USDSceneBuilderOptions & GetArgs() const
Returns the export arguments.
Definition: WriteJobContext.h:38
MaxUSDAPI ~MaxUsdWriteJobContext()=default
Destructor.
MaxUSDAPI MaxUsdWriteJobContext(UsdStageRefPtr stage, const std::string &filename, const USDSceneBuilderOptions &args)
Constructor.
const std::string & GetFilename() const
Gets the file we are exporting to.
Definition: WriteJobContext.h:50
void SetNodesToPrimsMap(const std::map< INode *, SdfPath > &nodesToPrims)
Sets the current nodes being exported and their respective paths.
const std::map< INode *, SdfPath > & GetNodesToPrimsMap() const
Returns the nodes being exported and their respective prim paths.
Definition: WriteJobContext.h:62
USD Scene Build configuration options.
Definition: USDSceneBuilderOptions.h:49