diff options
Diffstat (limited to 'source/blender/usd')
-rw-r--r-- | source/blender/usd/intern/usd_capi.cc | 15 | ||||
-rw-r--r-- | source/blender/usd/usd.h | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/usd/intern/usd_capi.cc b/source/blender/usd/intern/usd_capi.cc index f8391700324..83e11cd7bf3 100644 --- a/source/blender/usd/intern/usd_capi.cc +++ b/source/blender/usd/intern/usd_capi.cc @@ -20,6 +20,7 @@ #include "usd.h" #include "usd_hierarchy_iterator.h" +#include <pxr/pxr.h> #include <pxr/usd/usd/stage.h> #include <pxr/usd/usdGeom/tokens.h> @@ -216,3 +217,17 @@ bool USD_export(bContext *C, return export_ok; } + +int USD_get_version(void) +{ + /* USD 19.11 defines: + * + * #define PXR_MAJOR_VERSION 0 + * #define PXR_MINOR_VERSION 19 + * #define PXR_PATCH_VERSION 11 + * #define PXR_VERSION 1911 + * + * So the major version is implicit/invisible in the public version number. + */ + return PXR_VERSION; +} diff --git a/source/blender/usd/usd.h b/source/blender/usd/usd.h index c8e559c59f5..8a5575d53cf 100644 --- a/source/blender/usd/usd.h +++ b/source/blender/usd/usd.h @@ -54,6 +54,8 @@ bool USD_export(struct bContext *C, const struct USDExportParams *params, bool as_background_job); +int USD_get_version(void); + #ifdef __cplusplus } #endif |