3ds Max USD API Reference
Loading...
Searching...
No Matches
MaxUsd.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 <USDComponentVersionNumber.h>
12
13// MaxUsd public namespace string will never change.
14#define MAXUSD_NS maxUsd
15// C preprocessor trickery to expand arguments.
16#define MAXUSD_CONCAT(A, B) MAXUSD_CONCAT_IMPL(A, B)
17#define MAXUSD_CONCAT_IMPL(A, B) A##B
18// Versioned namespace includes the major version number.
19#define MAXUSD_VERSIONED_NS MAXUSD_CONCAT(MAXUSD_NS, MAXUSD_CONCAT(_v,COMPONENT_VERSION_MAJOR))
20
21namespace MAXUSD_VERSIONED_NS {}
22
23// With a using namespace declaration, pull in the versioned namespace into the
24// MaxUsd public namespace, to allow client code to use the plain MaxUsd
25// namespace, e.g. maxUsd::Class.
26namespace MAXUSD_NS {
27 using namespace MAXUSD_VERSIONED_NS;
28}
29
30// Macro to place the MaxUsd symbols in the versioned namespace, which is how
31// they will appear in the shared library, e.g. MaxUsd_v1::Class.
32#ifdef DOXYGEN
33#define MAXUSD_NS_DEF MAXUSD_NS
34#else
35#define MAXUSD_NS_DEF MAXUSD_VERSIONED_NS
36#endif