diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-01-31 15:03:15 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2020-01-31 15:03:15 +0300 |
commit | 53d805abcbf0a68155025a186d8a3c60de4af374 (patch) | |
tree | 1855ef1e13c34af39d2cbc5fe8e3f0c7ee75619d /source/blender/usd | |
parent | 6ab359e525204e476cfa9c772e80d37d3d2c5014 (diff) | |
parent | c82b8c5944d85a24fcb1b6552e970accb4628c9d (diff) |
Merge branch 'blender-v2.82-release'
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 |