pxr-plug-dev 25.8__tar.gz → 26.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/.gitignore +10 -7
  2. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/CMakeLists.txt +9 -13
  3. pxr_plug_dev-26.8/NOTICE.txt +12 -0
  4. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/PKG-INFO +10 -10
  5. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/README.md +2 -2
  6. pxr_plug_dev-26.8/cmake/pxr-plug-config.cmake.in +17 -0
  7. pxr_plug_dev-26.8/conanfile.py +107 -0
  8. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/pyproject-dev.toml +17 -16
  9. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/pyproject.toml +17 -16
  10. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/CMakeLists.txt +9 -1
  11. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/api.h +3 -4
  12. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/debugCodes.cpp +3 -4
  13. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/debugCodes.h +5 -6
  14. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/info.cpp +4 -4
  15. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/info.h +5 -6
  16. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/initConfig.cpp +14 -9
  17. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/interfaceFactory.cpp +2 -3
  18. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/interfaceFactory.h +5 -6
  19. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/moduleDeps.cpp +3 -3
  20. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/notice.cpp +3 -3
  21. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/notice.h +6 -7
  22. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/pch.h +10 -6
  23. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/plugin.cpp +9 -5
  24. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/plugin.h +6 -7
  25. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/pxr.h.in +27 -5
  26. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/registry.cpp +53 -8
  27. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/registry.h +16 -9
  28. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/staticInterface.cpp +6 -7
  29. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/staticInterface.h +8 -9
  30. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/thisPlugin.h +6 -7
  31. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/python/CMakeLists.txt +15 -5
  32. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/python/__init__.py +1 -2
  33. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/python/module.cpp +1 -1
  34. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/python/wrapNotice.cpp +1 -1
  35. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/python/wrapPlugin.cpp +1 -1
  36. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/python/wrapRegistry.cpp +1 -1
  37. pxr_plug_dev-25.8/NOTICE.txt +0 -8
  38. pxr_plug_dev-25.8/cmake/pxr-plug-config.cmake.in +0 -17
  39. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/LICENSE.txt +0 -0
  40. {pxr_plug_dev-25.8 → pxr_plug_dev-26.8}/src/pxr/plug/overview.dox +0 -0
@@ -47,6 +47,9 @@ build/
47
47
  # CMake
48
48
  cmake-build-*/
49
49
 
50
+ # Conan
51
+ CMakeUserPresets.json
52
+
50
53
  # Python byte-compiled / optimized / DLL files
51
54
  __pycache__/
52
55
  *.py[cod]
@@ -82,10 +85,10 @@ wheelhouse/
82
85
  .benchmarks/
83
86
 
84
87
  # Environments
85
- .env
86
- .venv
87
- env/
88
- venv/
89
- ENV/
90
- env.bak/
91
- venv.bak/
88
+ /.env
89
+ /.venv
90
+ /env/
91
+ /venv/
92
+ /ENV/
93
+ /env.bak/
94
+ /venv.bak/
@@ -1,18 +1,14 @@
1
- cmake_minimum_required(VERSION 3.23...4.1)
1
+ cmake_minimum_required(VERSION 3.23...4.2)
2
2
 
3
3
  # Default build type value.
4
4
  set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the build type")
5
5
 
6
6
  project(pxr-plug
7
- VERSION 0.25.8
7
+ VERSION 0.26.8
8
8
  HOMEPAGE_URL "https://github.com/untwine/pxr-plug"
9
9
  LANGUAGES C CXX
10
10
  )
11
11
 
12
- if (NOT "${CMAKE_CXX_STANDARD}")
13
- set(CMAKE_CXX_STANDARD 17 CACHE STRING "Default C++ standard")
14
- endif()
15
-
16
12
  set(CMAKE_CXX_STANDARD_REQUIRED ON)
17
13
  set(CMAKE_CXX_EXTENSIONS OFF)
18
14
 
@@ -48,16 +44,16 @@ if (WIN32)
48
44
  set(CMAKE_CXX_FLAGS "/wd4003 ${CMAKE_CXX_FLAGS}")
49
45
  endif()
50
46
 
51
- find_package(pxr-arch 0.25.8 REQUIRED)
52
- find_package(pxr-tf 0.25.8 REQUIRED)
53
- find_package(pxr-js 0.25.8 REQUIRED)
54
- find_package(pxr-trace 0.25.8 REQUIRED)
55
- find_package(pxr-work 0.25.8 REQUIRED)
47
+ find_package(pxr-arch 0.26.8 EXACT REQUIRED)
48
+ find_package(pxr-tf 0.26.8 EXACT REQUIRED)
49
+ find_package(pxr-js 0.26.8 EXACT REQUIRED)
50
+ find_package(pxr-trace 0.26.8 EXACT REQUIRED)
51
+ find_package(pxr-work 0.26.8 EXACT REQUIRED)
56
52
  find_package(TBB 2017.0 REQUIRED)
57
53
 
58
54
  if(BUILD_PYTHON_BINDINGS)
59
55
  add_compile_definitions(PXR_PYTHON_SUPPORT_ENABLED=1)
60
- find_package(pxr-boost 0.25.8 REQUIRED)
56
+ find_package(pxr-boost 0.26.8 EXACT REQUIRED)
61
57
 
62
58
  if (NOT CMAKE_INSTALL_PYTHON_LIBDIR)
63
59
  set(py_version "${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}")
@@ -76,7 +72,7 @@ if (BUILD_TESTS)
76
72
  find_package(Pytest)
77
73
 
78
74
  # Pxr-Gf is used within the tests
79
- find_package(pxr-gf 0.25.8 REQUIRED)
75
+ find_package(pxr-gf 0.26.8 EXACT REQUIRED)
80
76
 
81
77
  enable_testing()
82
78
  add_subdirectory(test)
@@ -0,0 +1,12 @@
1
+ Universal Scene Description
2
+ Copyright 2016 Pixar
3
+
4
+ All rights reserved.
5
+
6
+ This product includes software developed at:
7
+
8
+ Pixar (http://www.pixar.com/).
9
+
10
+ This repository is a modified, standalone redistribution of the 'plug'
11
+ library from Pixar's OpenUSD, restructured for independent building and
12
+ packaging. See the git history for details of the changes made.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pxr-plug-dev
3
- Version: 25.8
3
+ Version: 26.8
4
4
  Summary: C++ headers and CMake config for developing with pxr-plug
5
5
  Keywords: pixar,open-usd,dev
6
6
  License-File: LICENSE.txt
@@ -12,19 +12,19 @@ Classifier: Operating System :: MacOS :: MacOS X
12
12
  Classifier: Operating System :: Microsoft :: Windows :: Windows 10
13
13
  Project-URL: Repository, https://github.com/untwine/pxr-plug
14
14
  Requires-Python: >=3.8
15
- Requires-Dist: pxr-arch-dev==25.8.*
16
- Requires-Dist: pxr-tf-dev==25.8.*
17
- Requires-Dist: pxr-js-dev==25.8.*
18
- Requires-Dist: pxr-trace-dev==25.8.*
19
- Requires-Dist: pxr-work-dev==25.8.*
20
- Requires-Dist: pxr-boost-dev==25.8.*
21
- Requires-Dist: pxr-tbb-dev==2022.2.0.*
15
+ Requires-Dist: pxr-arch-dev==26.8.*
16
+ Requires-Dist: pxr-tf-dev==26.8.*
17
+ Requires-Dist: pxr-js-dev==26.8.*
18
+ Requires-Dist: pxr-trace-dev==26.8.*
19
+ Requires-Dist: pxr-work-dev==26.8.*
20
+ Requires-Dist: pxr-boost-dev==26.8.*
21
+ Requires-Dist: pxr-tbb-dev==2023.1.0.*
22
22
  Description-Content-Type: text/markdown
23
23
 
24
24
  # Pixar Plug
25
25
 
26
26
  [![PyPi version](https://img.shields.io/pypi/v/pxr-plug.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.python.org/pypi/pxr-plug)
27
- [![CMake](https://img.shields.io/badge/CMake-3.23...4.1-blue.svg?logo=CMake&logoColor=blue)](https://cmake.org)
27
+ [![CMake](https://img.shields.io/badge/CMake-3.23...4.2-blue.svg?logo=CMake&logoColor=blue)](https://cmake.org)
28
28
  [![Linux](https://github.com/untwine/pxr-plug/actions/workflows/linux.yml/badge.svg?branch=main)](https://github.com/untwine/pxr-plug/actions/workflows/linux.yml)
29
29
  [![MacOs](https://github.com/untwine/pxr-plug/actions/workflows/macos.yml/badge.svg?branch=main)](https://github.com/untwine/pxr-plug/actions/workflows/macos.yml)
30
30
  [![Windows](https://github.com/untwine/pxr-plug/actions/workflows/windows.yml/badge.svg?branch=main)](https://github.com/untwine/pxr-plug/actions/workflows/windows.yml)
@@ -40,4 +40,4 @@ It is regularly rebased over the "release" branch of the original
40
40
  [repository](https://github.com/PixarAnimationStudios/OpenUSD) to provide
41
41
  explicit divergence information from the latest updates and is currently
42
42
  synchronized with
43
- [v25.08](https://github.com/PixarAnimationStudios/OpenUSD/releases/tag/v25.08).
43
+ [v26.08](https://github.com/PixarAnimationStudios/OpenUSD/releases/tag/v26.08).
@@ -1,7 +1,7 @@
1
1
  # Pixar Plug
2
2
 
3
3
  [![PyPi version](https://img.shields.io/pypi/v/pxr-plug.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.python.org/pypi/pxr-plug)
4
- [![CMake](https://img.shields.io/badge/CMake-3.23...4.1-blue.svg?logo=CMake&logoColor=blue)](https://cmake.org)
4
+ [![CMake](https://img.shields.io/badge/CMake-3.23...4.2-blue.svg?logo=CMake&logoColor=blue)](https://cmake.org)
5
5
  [![Linux](https://github.com/untwine/pxr-plug/actions/workflows/linux.yml/badge.svg?branch=main)](https://github.com/untwine/pxr-plug/actions/workflows/linux.yml)
6
6
  [![MacOs](https://github.com/untwine/pxr-plug/actions/workflows/macos.yml/badge.svg?branch=main)](https://github.com/untwine/pxr-plug/actions/workflows/macos.yml)
7
7
  [![Windows](https://github.com/untwine/pxr-plug/actions/workflows/windows.yml/badge.svg?branch=main)](https://github.com/untwine/pxr-plug/actions/workflows/windows.yml)
@@ -17,4 +17,4 @@ It is regularly rebased over the "release" branch of the original
17
17
  [repository](https://github.com/PixarAnimationStudios/OpenUSD) to provide
18
18
  explicit divergence information from the latest updates and is currently
19
19
  synchronized with
20
- [v25.08](https://github.com/PixarAnimationStudios/OpenUSD/releases/tag/v25.08).
20
+ [v26.08](https://github.com/PixarAnimationStudios/OpenUSD/releases/tag/v26.08).
@@ -0,0 +1,17 @@
1
+ include(CMakeFindDependencyMacro)
2
+
3
+ @PACKAGE_INIT@
4
+
5
+ find_dependency(pxr-arch 0.26.8 EXACT REQUIRED)
6
+ find_dependency(pxr-tf 0.26.8 EXACT REQUIRED)
7
+ find_dependency(pxr-js 0.26.8 EXACT REQUIRED)
8
+ find_dependency(pxr-trace 0.26.8 EXACT REQUIRED)
9
+ find_dependency(pxr-work 0.26.8 EXACT REQUIRED)
10
+ find_dependency(TBB 2017.0 REQUIRED)
11
+
12
+ set(_with_py_bindings "@BUILD_PYTHON_BINDINGS@")
13
+ if(_with_py_bindings)
14
+ find_dependency(pxr-boost 0.26.8 EXACT REQUIRED)
15
+ endif()
16
+
17
+ include(${CMAKE_CURRENT_LIST_DIR}/pxr-plug-targets.cmake)
@@ -0,0 +1,107 @@
1
+ import os
2
+ import sys
3
+
4
+ from conan import ConanFile
5
+ from conan.errors import ConanInvalidConfiguration
6
+ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
7
+ from conan.tools.files import copy
8
+
9
+
10
+ class PxrPlugConan(ConanFile):
11
+ name = "pxr-plug"
12
+ version = "26.8"
13
+ package_type = "library"
14
+ license = "LicenseRef-TOST-1.0"
15
+ homepage = "https://github.com/untwine/pxr-plug"
16
+ url = "https://github.com/untwine/pxr-plug"
17
+ description = "Plugin Framework used in OpenUSD"
18
+ topics = ("pixar", "open-usd")
19
+
20
+ settings = "os", "compiler", "build_type", "arch"
21
+ options = {
22
+ "shared": [True, False],
23
+ "fPIC": [True, False],
24
+ "build_tests": [True, False],
25
+ "precompiled_headers": [True, False],
26
+ "python_version": ["ANY", None],
27
+ }
28
+ default_options = {
29
+ "shared": True,
30
+ "fPIC": True,
31
+ "build_tests": False,
32
+ "precompiled_headers": False,
33
+ "python_version": None,
34
+ }
35
+
36
+ exports_sources = "CMakeLists.txt", "cmake/*", "src/*", "LICENSE.txt", "NOTICE.txt"
37
+
38
+ def config_options(self):
39
+ if self.settings.os == "Windows":
40
+ del self.options.fPIC
41
+
42
+ def configure(self):
43
+ if self.options.shared:
44
+ self.options.rm_safe("fPIC")
45
+ if self.options.python_version:
46
+ self.options["pxr-tf"].python_version = self.options.python_version
47
+ self.options["pxr-trace"].python_version = self.options.python_version
48
+ self.options["pxr-work"].python_version = self.options.python_version
49
+ self.options["pxr-boost"].python_version = self.options.python_version
50
+ if self.options.build_tests:
51
+ self.options["pxr-gf"].python_version = self.options.python_version
52
+
53
+ def requirements(self):
54
+ self.requires("pxr-arch/26.8")
55
+ self.requires("pxr-tf/26.8")
56
+ self.requires("pxr-js/26.8")
57
+ self.requires("pxr-trace/26.8")
58
+ self.requires("pxr-work/26.8")
59
+ self.requires("onetbb/2023.1.0")
60
+ if self.options.python_version:
61
+ self.requires("pxr-boost/26.8")
62
+
63
+ def build_requirements(self):
64
+ if self.options.build_tests:
65
+ self.test_requires("pxr-gf/26.8")
66
+
67
+ def validate(self):
68
+ if self.options.python_version:
69
+ actual = f"{sys.version_info.major}.{sys.version_info.minor}"
70
+ if str(self.options.python_version) != actual:
71
+ raise ConanInvalidConfiguration(
72
+ f"python_version={self.options.python_version} requested, "
73
+ f"but Conan is running under Python {actual}."
74
+ )
75
+
76
+ def layout(self):
77
+ cmake_layout(self)
78
+
79
+ def generate(self):
80
+ tc = CMakeToolchain(self)
81
+ tc.variables["BUILD_TESTS"] = bool(self.options.build_tests)
82
+ tc.variables["BUILD_PYTHON_BINDINGS"] = bool(self.options.python_version)
83
+ tc.variables["ENABLE_PRECOMPILED_HEADERS"] = bool(self.options.precompiled_headers)
84
+ if self.options.python_version:
85
+ tc.variables["Python_EXECUTABLE"] = sys.executable.replace("\\", "/")
86
+ tc.generate()
87
+ deps = CMakeDeps(self)
88
+ deps.generate()
89
+
90
+ def build(self):
91
+ cmake = CMake(self)
92
+ cmake.configure()
93
+ cmake.build()
94
+
95
+ def package(self):
96
+ copy(self, "LICENSE.txt", self.source_folder,
97
+ os.path.join(self.package_folder, "licenses"))
98
+ copy(self, "NOTICE.txt", self.source_folder,
99
+ os.path.join(self.package_folder, "licenses"))
100
+ cmake = CMake(self)
101
+ cmake.install()
102
+
103
+ def package_info(self):
104
+ self.cpp_info.set_property("cmake_find_mode", "none")
105
+ self.cpp_info.set_property("system_package_version", "0.26.8")
106
+ self.cpp_info.builddirs = ["share/cmake/pxr-plug"]
107
+ self.cpp_info.libs = ["PxrPlug"]
@@ -1,19 +1,19 @@
1
1
  [build-system]
2
2
  requires = [
3
3
  "scikit-build-core",
4
- "pxr-arch-dev==25.8.*",
5
- "pxr-tf-dev==25.8.*",
6
- "pxr-js-dev==25.8.*",
7
- "pxr-trace-dev==25.8.*",
8
- "pxr-work-dev==25.8.*",
9
- "pxr-boost-dev==25.8.*",
10
- "pxr-tbb-dev==2022.2.0.*"
4
+ "pxr-arch-dev==26.8.*",
5
+ "pxr-tf-dev==26.8.*",
6
+ "pxr-js-dev==26.8.*",
7
+ "pxr-trace-dev==26.8.*",
8
+ "pxr-work-dev==26.8.*",
9
+ "pxr-boost-dev==26.8.*",
10
+ "pxr-tbb-dev==2023.1.0.*"
11
11
  ]
12
12
  build-backend = "scikit_build_core.build"
13
13
 
14
14
  [project]
15
15
  name = "pxr-plug-dev"
16
- version = "25.8"
16
+ version = "26.8"
17
17
  description = "C++ headers and CMake config for developing with pxr-plug"
18
18
  readme = "README.md"
19
19
  requires-python = ">=3.8"
@@ -27,25 +27,26 @@ classifiers = [
27
27
  "Operating System :: Microsoft :: Windows :: Windows 10",
28
28
  ]
29
29
  dependencies = [
30
- "pxr-arch-dev==25.8.*",
31
- "pxr-tf-dev==25.8.*",
32
- "pxr-js-dev==25.8.*",
33
- "pxr-trace-dev==25.8.*",
34
- "pxr-work-dev==25.8.*",
35
- "pxr-boost-dev==25.8.*",
36
- "pxr-tbb-dev==2022.2.0.*"
30
+ "pxr-arch-dev==26.8.*",
31
+ "pxr-tf-dev==26.8.*",
32
+ "pxr-js-dev==26.8.*",
33
+ "pxr-trace-dev==26.8.*",
34
+ "pxr-work-dev==26.8.*",
35
+ "pxr-boost-dev==26.8.*",
36
+ "pxr-tbb-dev==2023.1.0.*"
37
37
  ]
38
38
 
39
39
  [project.urls]
40
40
  Repository = "https://github.com/untwine/pxr-plug"
41
41
 
42
42
  [tool.scikit-build]
43
- cmake.version = ">=3.23,<4.2"
43
+ cmake.version = ">=3.23,<4.3"
44
44
  cmake.args = [
45
45
  "-DBUILD_TESTS=OFF",
46
46
  "-DBUILD_SHARED_LIBS=ON",
47
47
  "-DBUILD_PYTHON_BINDINGS=ON",
48
48
  "-DCMAKE_INSTALL_LIBDIR=pxr-plug/lib",
49
+ "-DCMAKE_INSTALL_BINDIR=pxr-plug/lib",
49
50
  "-DCMAKE_INSTALL_INCLUDEDIR=pxr-plug/include",
50
51
  "-DCMAKE_INSTALL_DATAROOTDIR=pxr-plug",
51
52
  "-DCMAKE_INSTALL_PYTHON_LIBDIR=pxr-plug/lib/python",
@@ -1,19 +1,19 @@
1
1
  [build-system]
2
2
  requires = [
3
3
  "scikit-build-core",
4
- "pxr-arch-dev==25.8.*",
5
- "pxr-tf-dev==25.8.*",
6
- "pxr-js-dev==25.8.*",
7
- "pxr-trace-dev==25.8.*",
8
- "pxr-work-dev==25.8.*",
9
- "pxr-boost-dev==25.8.*",
10
- "pxr-tbb-dev==2022.2.0.*"
4
+ "pxr-arch-dev==26.8.*",
5
+ "pxr-tf-dev==26.8.*",
6
+ "pxr-js-dev==26.8.*",
7
+ "pxr-trace-dev==26.8.*",
8
+ "pxr-work-dev==26.8.*",
9
+ "pxr-boost-dev==26.8.*",
10
+ "pxr-tbb-dev==2023.1.0.*"
11
11
  ]
12
12
  build-backend = "scikit_build_core.build"
13
13
 
14
14
  [project]
15
15
  name = "pxr-plug-dev"
16
- version = "25.8"
16
+ version = "26.8"
17
17
  description = "C++ headers and CMake config for developing with pxr-plug"
18
18
  readme = "README.md"
19
19
  requires-python = ">=3.8"
@@ -27,25 +27,26 @@ classifiers = [
27
27
  "Operating System :: Microsoft :: Windows :: Windows 10",
28
28
  ]
29
29
  dependencies = [
30
- "pxr-arch-dev==25.8.*",
31
- "pxr-tf-dev==25.8.*",
32
- "pxr-js-dev==25.8.*",
33
- "pxr-trace-dev==25.8.*",
34
- "pxr-work-dev==25.8.*",
35
- "pxr-boost-dev==25.8.*",
36
- "pxr-tbb-dev==2022.2.0.*"
30
+ "pxr-arch-dev==26.8.*",
31
+ "pxr-tf-dev==26.8.*",
32
+ "pxr-js-dev==26.8.*",
33
+ "pxr-trace-dev==26.8.*",
34
+ "pxr-work-dev==26.8.*",
35
+ "pxr-boost-dev==26.8.*",
36
+ "pxr-tbb-dev==2023.1.0.*"
37
37
  ]
38
38
 
39
39
  [project.urls]
40
40
  Repository = "https://github.com/untwine/pxr-plug"
41
41
 
42
42
  [tool.scikit-build]
43
- cmake.version = ">=3.23,<4.2"
43
+ cmake.version = ">=3.23,<4.3"
44
44
  cmake.args = [
45
45
  "-DBUILD_TESTS=OFF",
46
46
  "-DBUILD_SHARED_LIBS=ON",
47
47
  "-DBUILD_PYTHON_BINDINGS=ON",
48
48
  "-DCMAKE_INSTALL_LIBDIR=pxr-plug/lib",
49
+ "-DCMAKE_INSTALL_BINDIR=pxr-plug/lib",
49
50
  "-DCMAKE_INSTALL_INCLUDEDIR=pxr-plug/include",
50
51
  "-DCMAKE_INSTALL_DATAROOTDIR=pxr-plug",
51
52
  "-DCMAKE_INSTALL_PYTHON_LIBDIR=pxr-plug/lib/python",
@@ -22,6 +22,10 @@ target_include_directories(plug
22
22
  $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
23
23
  )
24
24
 
25
+ # Compile features can only raise the effective standard, so this can't be
26
+ # undercut by a toolchain file that pre-sets CMAKE_CXX_STANDARD lower.
27
+ target_compile_features(plug PUBLIC cxx_std_17)
28
+
25
29
  target_link_libraries(plug
26
30
  PUBLIC
27
31
  pxr::arch
@@ -32,6 +36,10 @@ target_link_libraries(plug
32
36
  TBB::tbb
33
37
  )
34
38
 
39
+ if(NOT WIN32 AND NOT SKBUILD)
40
+ set_target_properties(plug PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
41
+ endif()
42
+
35
43
  if(BUILD_PYTHON_BINDINGS)
36
44
  target_sources(plug
37
45
  PRIVATE
@@ -97,7 +105,7 @@ target_sources(plug
97
105
  install(
98
106
  TARGETS plug EXPORT ${PROJECT_NAME}
99
107
  FILE_SET public_headers
100
- RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
108
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
101
109
  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
102
110
  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
103
111
  )
@@ -1,12 +1,11 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
-
8
- #ifndef PXR_PLUG_API_H
9
- #define PXR_PLUG_API_H
7
+ #ifndef PXR_BASE_PLUG_API_H
8
+ #define PXR_BASE_PLUG_API_H
10
9
 
11
10
  #include <pxr/arch/export.h>
12
11
 
@@ -1,12 +1,11 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
-
8
- #include "pxr/plug/pxr.h"
9
- #include "pxr/plug/debugCodes.h"
7
+ #include <pxr/plug/pxr.h>
8
+ #include <pxr/plug/debugCodes.h>
10
9
  #include <pxr/tf/debug.h>
11
10
  #include <pxr/tf/registryManager.h>
12
11
 
@@ -1,14 +1,13 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
-
8
- #ifndef PXR_PLUG_DEBUG_CODES_H
9
- #define PXR_PLUG_DEBUG_CODES_H
7
+ #ifndef PXR_BASE_PLUG_DEBUG_CODES_H
8
+ #define PXR_BASE_PLUG_DEBUG_CODES_H
10
9
 
11
- #include "pxr/plug/pxr.h"
10
+ #include <pxr/plug/pxr.h>
12
11
  #include <pxr/tf/debug.h>
13
12
 
14
13
  PLUG_NAMESPACE_OPEN_SCOPE
@@ -24,4 +23,4 @@ TF_DEBUG_CODES(
24
23
 
25
24
  PLUG_NAMESPACE_CLOSE_SCOPE
26
25
 
27
- #endif // PXR_PLUG_DEBUG_CODES_H
26
+ #endif // PXR_BASE_PLUG_DEBUG_CODES_H
@@ -1,13 +1,13 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
7
 
8
- #include "pxr/plug/pxr.h"
9
- #include "pxr/plug/info.h"
10
- #include "pxr/plug/debugCodes.h"
8
+ #include <pxr/plug/pxr.h>
9
+ #include <pxr/plug/info.h>
10
+ #include <pxr/plug/debugCodes.h>
11
11
  #include <pxr/js/json.h>
12
12
  #include <pxr/tf/diagnostic.h>
13
13
  #include <pxr/tf/fileUtils.h>
@@ -1,14 +1,13 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
-
8
- #ifndef PXR_PLUG_INFO_H
9
- #define PXR_PLUG_INFO_H
7
+ #ifndef PXR_BASE_PLUG_INFO_H
8
+ #define PXR_BASE_PLUG_INFO_H
10
9
 
11
- #include "pxr/plug/pxr.h"
10
+ #include <pxr/plug/pxr.h>
12
11
  #include <pxr/arch/attributes.h>
13
12
  #include <pxr/js/value.h>
14
13
 
@@ -91,4 +90,4 @@ void Plug_SetPaths(const std::vector<std::string>&,
91
90
 
92
91
  PLUG_NAMESPACE_CLOSE_SCOPE
93
92
 
94
- #endif // PXR_PLUG_INFO_H
93
+ #endif // PXR_BASE_PLUG_INFO_H
@@ -1,12 +1,12 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
7
 
8
- #include "pxr/plug/pxr.h"
9
- #include "pxr/plug/info.h"
8
+ #include <pxr/plug/pxr.h>
9
+ #include <pxr/plug/info.h>
10
10
  #include <pxr/tf/diagnosticLite.h>
11
11
  #include <pxr/tf/getenv.h>
12
12
  #include <pxr/tf/pathUtils.h>
@@ -43,13 +43,18 @@ _AppendPathList(
43
43
  // Anchor all relative paths to the shared library path.
44
44
  const bool isLibraryRelativePath = TfIsRelativePath(path);
45
45
  if (isLibraryRelativePath) {
46
- std::string fullPath = TfStringCatPaths(sharedLibPath, path);
47
- // Re-add trailing slash if necessary
48
- // (https://github.com/PixarAnimationStudios/OpenUSD/issues/3679)
49
- if (TfStringEndsWith(path, "/") && !TfStringEndsWith(fullPath, "/")) {
50
- fullPath += "/";
46
+ std::string libraryRelativePath =
47
+ TfStringCatPaths(sharedLibPath, path);
48
+ // TfStringCatPaths will strip a trailing '/' character in path
49
+ // via ArchNormPath. This can cause the library relative path
50
+ // to be treated as a file path downstream. Here we detect that case
51
+ // and add the trailing '/' back if necessary. Note: trailing '\' is
52
+ // converted to '/' on Windows.
53
+ if (path.back() == '/') {
54
+ libraryRelativePath += path.back();
51
55
  }
52
- result->push_back(fullPath);
56
+
57
+ result->push_back(libraryRelativePath);
53
58
  }
54
59
  else {
55
60
  result->push_back(path);
@@ -1,10 +1,9 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
-
8
7
  /// \file interfaceFactory.cpp
9
8
 
10
- #include "pxr/plug/interfaceFactory.h"
9
+ #include <pxr/plug/interfaceFactory.h>
@@ -1,16 +1,15 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
-
8
- #ifndef PXR_PLUG_INTERFACE_FACTORY_H
9
- #define PXR_PLUG_INTERFACE_FACTORY_H
7
+ #ifndef PXR_BASE_PLUG_INTERFACE_FACTORY_H
8
+ #define PXR_BASE_PLUG_INTERFACE_FACTORY_H
10
9
 
11
10
  /// \file plug/interfaceFactory.h
12
11
 
13
- #include "pxr/plug/pxr.h"
12
+ #include <pxr/plug/pxr.h>
14
13
  #include <pxr/tf/type.h>
15
14
 
16
15
  PLUG_NAMESPACE_OPEN_SCOPE
@@ -58,4 +57,4 @@ TF_REGISTRY_FUNCTION(TfType) \
58
57
 
59
58
  PLUG_NAMESPACE_CLOSE_SCOPE
60
59
 
61
- #endif // PXR_PLUG_INTERFACE_FACTORY_H
60
+ #endif // PXR_BASE_PLUG_INTERFACE_FACTORY_H
@@ -3,10 +3,9 @@
3
3
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
4
  // https://openusd.org/license.
5
5
  //
6
- // Modified by Jeremy Retailleau.
7
6
  ////////////////////////////////////////////////////////////////////////
8
7
 
9
- #include "pxr/plug/pxr.h"
8
+ #include <pxr/plug/pxr.h>
10
9
  #include <pxr/tf/registryManager.h>
11
10
  #include <pxr/tf/scriptModuleLoader.h>
12
11
  #include <pxr/tf/token.h>
@@ -22,7 +21,8 @@ TF_REGISTRY_FUNCTION(TfScriptModuleLoader) {
22
21
  TfToken("tf"),
23
22
  TfToken("js"),
24
23
  TfToken("trace"),
25
- TfToken("work")
24
+ TfToken("work"),
25
+ TfToken("boost-python"),
26
26
  };
27
27
  TfScriptModuleLoader::GetInstance().
28
28
  RegisterLibrary(TfToken("plug"), TfToken("pxr.Plug"), reqs);
@@ -1,12 +1,12 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
7
 
8
- #include "pxr/plug/pxr.h"
9
- #include "pxr/plug/notice.h"
8
+ #include <pxr/plug/pxr.h>
9
+ #include <pxr/plug/notice.h>
10
10
  #include <pxr/tf/type.h>
11
11
  #include <pxr/tf/registryManager.h>
12
12
 
@@ -1,15 +1,14 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
-
8
- #ifndef PXR_PLUG_NOTICE_H
9
- #define PXR_PLUG_NOTICE_H
7
+ #ifndef PXR_BASE_PLUG_NOTICE_H
8
+ #define PXR_BASE_PLUG_NOTICE_H
10
9
 
11
- #include "pxr/plug/pxr.h"
12
- #include "pxr/plug/api.h"
10
+ #include <pxr/plug/pxr.h>
11
+ #include <pxr/plug/api.h>
13
12
  #include <pxr/tf/declarePtrs.h>
14
13
  #include <pxr/tf/notice.h>
15
14
 
@@ -50,4 +49,4 @@ private:
50
49
 
51
50
  PLUG_NAMESPACE_CLOSE_SCOPE
52
51
 
53
- #endif // PXR_PLUG_NOTICE_H
52
+ #endif // PXR_BASE_PLUG_NOTICE_H
@@ -1,12 +1,14 @@
1
+ //
1
2
  // Copyright 2017 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
+ // WARNING: THIS FILE IS GENERATED. DO NOT EDIT.
8
+ //
7
9
 
8
10
  #define TF_MAX_ARITY 7
9
- #include "pxr/plug/pxr.h"
11
+ #include <pxr/plug/pxr.h>
10
12
  #include <pxr/arch/defines.h>
11
13
  #if defined(ARCH_OS_DARWIN)
12
14
  #include <glob.h>
@@ -14,7 +16,6 @@
14
16
  #include <sys/mount.h>
15
17
  #include <sys/param.h>
16
18
  #include <unistd.h>
17
- #include <mach/mach_time.h>
18
19
  #endif
19
20
  #if defined(ARCH_OS_LINUX)
20
21
  #include <glob.h>
@@ -22,7 +23,6 @@
22
23
  #include <sys/param.h>
23
24
  #include <sys/statfs.h>
24
25
  #include <unistd.h>
25
- #include <x86intrin.h>
26
26
  #endif
27
27
  #if defined(ARCH_OS_WINDOWS)
28
28
  #ifndef WIN32_LEAN_AND_MEAN
@@ -32,12 +32,12 @@
32
32
  #include <Windows.h>
33
33
  #include <intrin.h>
34
34
  #include <io.h>
35
- #include <stringapiset.h>
36
35
  #endif
37
36
  #include <algorithm>
38
37
  #include <any>
39
38
  #include <array>
40
39
  #include <atomic>
40
+ #include <chrono>
41
41
  #include <cinttypes>
42
42
  #include <cmath>
43
43
  #include <complex>
@@ -82,13 +82,17 @@
82
82
  #include <unordered_map>
83
83
  #include <unordered_set>
84
84
  #include <utility>
85
+ #include <variant>
85
86
  #include <vector>
86
87
  #include <tbb/blocked_range.h>
87
88
  #include <tbb/cache_aligned_allocator.h>
88
89
  #include <tbb/concurrent_vector.h>
89
90
  #include <tbb/enumerable_thread_specific.h>
91
+ #include <tbb/parallel_for.h>
92
+ #include <tbb/parallel_for_each.h>
93
+ #include <tbb/parallel_reduce.h>
94
+ #include <tbb/parallel_sort.h>
90
95
  #include <tbb/spin_mutex.h>
91
- #include <tbb/spin_rw_mutex.h>
92
96
  #include <tbb/task.h>
93
97
  #include <tbb/task_arena.h>
94
98
  #include <tbb/task_group.h>
@@ -1,14 +1,14 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
7
 
8
- #include "pxr/plug/pxr.h"
9
- #include "pxr/plug/plugin.h"
10
- #include "pxr/plug/debugCodes.h"
11
- #include "pxr/plug/info.h"
8
+ #include <pxr/plug/pxr.h>
9
+ #include <pxr/plug/plugin.h>
10
+ #include <pxr/plug/debugCodes.h>
11
+ #include <pxr/plug/info.h>
12
12
 
13
13
  #include <pxr/arch/threads.h>
14
14
  #include <pxr/arch/library.h>
@@ -323,6 +323,10 @@ PlugPlugin::_LoadWithDependents(_SeenPlugins *seenPlugins)
323
323
  bool
324
324
  PlugPlugin::Load()
325
325
  {
326
+ if (_isLoaded) {
327
+ return true;
328
+ }
329
+
326
330
  static std::recursive_mutex loadMutex;
327
331
 
328
332
  bool result = false;
@@ -1,15 +1,14 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
-
8
- #ifndef PXR_PLUG_PLUGIN_H
9
- #define PXR_PLUG_PLUGIN_H
7
+ #ifndef PXR_BASE_PLUG_PLUGIN_H
8
+ #define PXR_BASE_PLUG_PLUGIN_H
10
9
 
11
- #include "pxr/plug/pxr.h"
12
- #include "pxr/plug/api.h"
10
+ #include <pxr/plug/pxr.h>
11
+ #include <pxr/plug/api.h>
13
12
 
14
13
  #include <pxr/js/types.h>
15
14
  #include <pxr/tf/declarePtrs.h>
@@ -189,4 +188,4 @@ PlugFindPluginResource(const PlugPluginPtr& plugin,
189
188
 
190
189
  PLUG_NAMESPACE_CLOSE_SCOPE
191
190
 
192
- #endif // PXR_PLUG_PLUGIN_H
191
+ #endif // PXR_BASE_PLUG_PLUGIN_H
@@ -3,11 +3,20 @@
3
3
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
4
  // https://openusd.org/license.
5
5
  //
6
- // Modified by Jeremy Retailleau.
7
6
 
8
7
  #ifndef PXR_PLUG_H
9
8
  #define PXR_PLUG_H
10
9
 
10
+ #include <pxr/arch/pxr.h>
11
+ #include <pxr/tf/pxr.h>
12
+ #include <pxr/js/pxr.h>
13
+ #include <pxr/trace/pxr.h>
14
+ #include <pxr/work/pxr.h>
15
+
16
+ #ifdef PXR_PYTHON_SUPPORT_ENABLED
17
+ #include <pxr/boost/python/common.hpp>
18
+ #endif
19
+
11
20
  #define PLUG_MAJOR_VERSION @PROJECT_VERSION_MAJOR@
12
21
  #define PLUG_MINOR_VERSION @PROJECT_VERSION_MINOR@
13
22
  #define PLUG_PATCH_VERSION @PROJECT_VERSION_PATCH@
@@ -16,18 +25,31 @@
16
25
  + PLUG_MINOR_VERSION * 100 \
17
26
  + PLUG_PATCH_VERSION)
18
27
 
19
- #define PLUG_NS pxr
28
+ #define PXR_NS pxr
20
29
  #define PLUG_INTERNAL_NS pxrInternal_v@PROJECT_VERSION_MAJOR@_@PROJECT_VERSION_MINOR@_@PROJECT_VERSION_PATCH@__pxrReserved__
21
- #define PLUG_NS_GLOBAL ::PLUG_NS
30
+ #define PXR_NS_GLOBAL ::PXR_NS
22
31
 
23
32
  namespace PLUG_INTERNAL_NS { }
24
33
 
25
- namespace PLUG_NS {
34
+ namespace PXR_NS {
26
35
  using namespace PLUG_INTERNAL_NS;
27
36
  }
28
37
 
38
+ // Import direct dependencies into plug's internal namespace.
39
+ // This keeps resolution correct if package versions ever drift.
40
+ namespace PLUG_INTERNAL_NS {
41
+ using namespace ARCH_INTERNAL_NS;
42
+ using namespace TF_INTERNAL_NS;
43
+ using namespace JS_INTERNAL_NS;
44
+ using namespace TRACE_INTERNAL_NS;
45
+ using namespace WORK_INTERNAL_NS;
46
+ #ifdef PXR_PYTHON_SUPPORT_ENABLED
47
+ using namespace BOOST_INTERNAL_NS;
48
+ #endif
49
+ }
50
+
29
51
  #define PLUG_NAMESPACE_OPEN_SCOPE namespace PLUG_INTERNAL_NS {
30
52
  #define PLUG_NAMESPACE_CLOSE_SCOPE }
31
- #define PLUG_NAMESPACE_USING_DIRECTIVE using namespace PLUG_NS;
53
+ #define PLUG_NAMESPACE_USING_DIRECTIVE using namespace PXR_NS;
32
54
 
33
55
  #endif // PXR_PLUG_H
@@ -1,17 +1,17 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
7
 
8
- #include "pxr/plug/pxr.h"
9
- #include "pxr/plug/registry.h"
8
+ #include <pxr/plug/pxr.h>
9
+ #include <pxr/plug/registry.h>
10
10
 
11
- #include "pxr/plug/debugCodes.h"
12
- #include "pxr/plug/notice.h"
13
- #include "pxr/plug/info.h"
14
- #include "pxr/plug/plugin.h"
11
+ #include <pxr/plug/debugCodes.h>
12
+ #include <pxr/plug/notice.h>
13
+ #include <pxr/plug/info.h>
14
+ #include <pxr/plug/plugin.h>
15
15
 
16
16
  #include <pxr/arch/attributes.h>
17
17
  #include <pxr/tf/diagnostic.h>
@@ -161,7 +161,7 @@ PlugPluginPtr
161
161
  PlugRegistry::GetPluginForType(TfType t) const
162
162
  {
163
163
  if (t.IsUnknown()) {
164
- TF_CODING_ERROR("Unknown base type");
164
+ TF_CODING_ERROR("Unknown type");
165
165
  return TfNullPtr;
166
166
  }
167
167
  return PlugPlugin::_GetPluginForType(t);
@@ -261,6 +261,51 @@ Plug_SetPaths(const std::vector<std::string>& paths,
261
261
  pathsInfo.pathsAreOrdered = pathsAreOrdered;
262
262
  }
263
263
 
264
+
265
+ PlugPluginPtr
266
+ PlugRegistry::DemandPluginForType(TfType t) const
267
+ {
268
+ auto issueError = [&]() {
269
+ std::string msg;
270
+ PathsInfo &info = Plug_GetPathsInfo();
271
+ msg += TfStringPrintf(
272
+ "Failed to find the plugInfo.json file that declares the "
273
+ "plugin for %s.\n",
274
+ t.IsUnknown() ? "unknown type" : t.GetTypeName().c_str());
275
+ msg += "Check the plugin search path configuration and run with "
276
+ "TF_DEBUG=PLUG_INFO_SEARCH to debug.\n";
277
+ if (info.paths.empty()) {
278
+ msg += "No plugin search paths.\n";
279
+ }
280
+ else {
281
+ msg += "Plugin search paths:\n";
282
+ for (std::string const &dirName: info.paths) {
283
+ msg += TfStringPrintf(" %s\n", dirName.c_str());
284
+ }
285
+ }
286
+ if (!info.debugMessages.empty()) {
287
+ msg += "Plugin debug info:\n";
288
+ for (std::string const &debugMsg: info.debugMessages) {
289
+ // These already have newlines appended, oddly.
290
+ msg += TfStringPrintf(" %s", debugMsg.c_str());
291
+ }
292
+ }
293
+ TF_FATAL_ERROR("%s", msg.c_str());
294
+ };
295
+
296
+ if (t.IsUnknown()) {
297
+ issueError();
298
+ }
299
+ else if (PlugPluginPtr plugin = PlugPlugin::_GetPluginForType(t)) {
300
+ return plugin;
301
+ }
302
+ else {
303
+ issueError();
304
+ }
305
+ return TfNullPtr;
306
+ }
307
+
308
+
264
309
  // This is here so plugin.cpp doesn't have to include info.h or registry.h.
265
310
  void
266
311
  PlugPlugin::_RegisterAllPlugins()
@@ -1,15 +1,14 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
-
8
- #ifndef PXR_PLUG_REGISTRY_H
9
- #define PXR_PLUG_REGISTRY_H
7
+ #ifndef PXR_BASE_PLUG_REGISTRY_H
8
+ #define PXR_BASE_PLUG_REGISTRY_H
10
9
 
11
- #include "pxr/plug/pxr.h"
12
- #include "pxr/plug/api.h"
10
+ #include <pxr/plug/pxr.h>
11
+ #include <pxr/plug/api.h>
13
12
 
14
13
  #include <pxr/js/value.h>
15
14
  #include <pxr/tf/declarePtrs.h>
@@ -413,6 +412,16 @@ public:
413
412
  PLUG_API
414
413
  PlugPluginPtr GetPluginForType(TfType t) const;
415
414
 
415
+ /// Return the plug-in for the given type, or issue a fatal error with
416
+ /// diagnostic information and terminate the program if the plug-in is not
417
+ /// found.
418
+ ///
419
+ /// This is meant for use in cases where it should be guaranteed that \p t's
420
+ /// plugin is present (e.g. it is part of the calling code's library) and it
421
+ /// impossible to continue without the plugin.
422
+ PLUG_API
423
+ PlugPluginPtr DemandPluginForType(TfType t) const;
424
+
416
425
  /// Returns all registered plug-ins. Note that additional plugins may be
417
426
  /// registered during program runtime. \sa \ref Plug_Discovery
418
427
  PLUG_API
@@ -465,8 +474,6 @@ private:
465
474
  std::mutex _mutex;
466
475
  };
467
476
 
468
- PLUG_API_TEMPLATE_CLASS(TfSingleton<PlugRegistry>);
469
-
470
477
  PLUG_NAMESPACE_CLOSE_SCOPE
471
478
 
472
- #endif // PXR_PLUG_REGISTRY_H
479
+ #endif // PXR_BASE_PLUG_REGISTRY_H
@@ -1,17 +1,16 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
-
8
7
  /// \file staticInterface.cpp
9
8
 
10
- #include "pxr/plug/pxr.h"
11
- #include "pxr/plug/staticInterface.h"
12
- #include "pxr/plug/interfaceFactory.h"
13
- #include "pxr/plug/plugin.h"
14
- #include "pxr/plug/registry.h"
9
+ #include <pxr/plug/pxr.h>
10
+ #include <pxr/plug/staticInterface.h>
11
+ #include <pxr/plug/interfaceFactory.h>
12
+ #include <pxr/plug/plugin.h>
13
+ #include <pxr/plug/registry.h>
15
14
  #include <pxr/tf/diagnostic.h>
16
15
  #include <pxr/tf/scoped.h>
17
16
  #include <mutex>
@@ -1,17 +1,16 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
-
8
- #ifndef PXR_PLUG_STATIC_INTERFACE_H
9
- #define PXR_PLUG_STATIC_INTERFACE_H
7
+ #ifndef PXR_BASE_PLUG_STATIC_INTERFACE_H
8
+ #define PXR_BASE_PLUG_STATIC_INTERFACE_H
10
9
 
11
10
  /// \file plug/staticInterface.h
12
11
 
13
- #include "pxr/plug/pxr.h"
14
- #include "pxr/plug/api.h"
12
+ #include <pxr/plug/pxr.h>
13
+ #include <pxr/plug/api.h>
15
14
 
16
15
  #include <atomic>
17
16
  #include <type_traits>
@@ -57,7 +56,7 @@ protected:
57
56
  /// Typical usage is:
58
57
  /// \code
59
58
  /// #include "path/to/SomePlugin.h"
60
- /// #include "pxr/plug/staticInterface.h"
59
+ /// #include <pxr/plug/staticInterface.h>
61
60
  ///
62
61
  /// static PlugStaticInterface<SomePluginInterface> ptr;
63
62
  ///
@@ -113,7 +112,7 @@ protected:
113
112
  /// \c PLUG_REGISTER_INTERFACE_SINGLETON_TYPE:
114
113
  /// \code
115
114
  /// #include "path/to/SomePlugin.h"
116
- /// #include "pxr/plug/interfaceFactory.h"
115
+ /// #include <pxr/plug/interfaceFactory.h>
117
116
  /// #include <iostream>
118
117
  /// class SomePluginImplementation : public SomePluginInterface {
119
118
  /// public:
@@ -201,4 +200,4 @@ private:
201
200
 
202
201
  PLUG_NAMESPACE_CLOSE_SCOPE
203
202
 
204
- #endif // PXR_PLUG_STATIC_INTERFACE_H
203
+ #endif // PXR_BASE_PLUG_STATIC_INTERFACE_H
@@ -1,15 +1,14 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
-
8
- #ifndef PXR_PLUG_THIS_PLUGIN_H
9
- #define PXR_PLUG_THIS_PLUGIN_H
7
+ #ifndef PXR_BASE_PLUG_THIS_PLUGIN_H
8
+ #define PXR_BASE_PLUG_THIS_PLUGIN_H
10
9
 
11
- #include "pxr/plug/pxr.h"
12
- #include "pxr/plug/registry.h"
10
+ #include <pxr/plug/pxr.h>
11
+ #include <pxr/plug/registry.h>
13
12
  #include <pxr/tf/preprocessorUtilsLite.h>
14
13
 
15
14
  PLUG_NAMESPACE_OPEN_SCOPE
@@ -32,4 +31,4 @@ PLUG_NAMESPACE_OPEN_SCOPE
32
31
 
33
32
  PLUG_NAMESPACE_CLOSE_SCOPE
34
33
 
35
- #endif // PXR_PLUG_THIS_PLUGIN_H
34
+ #endif // PXR_BASE_PLUG_THIS_PLUGIN_H
@@ -27,15 +27,25 @@ target_link_libraries(pyPlug
27
27
  pxr::boost-python
28
28
  )
29
29
 
30
- if(SKBUILD AND NOT WIN32)
30
+ if(NOT WIN32)
31
31
  set(_rpath_prefix "$ORIGIN")
32
32
  if(APPLE)
33
33
  set(_rpath_prefix "@loader_path")
34
34
  endif()
35
- set_target_properties(pyPlug
36
- PROPERTIES
37
- INSTALL_RPATH "${_rpath_prefix}/../.libs"
38
- INSTALL_RPATH_USE_LINK_PATH TRUE
35
+
36
+ if(SKBUILD)
37
+ set(_pyPlug_rpath "${_rpath_prefix}/../.libs")
38
+ else()
39
+ file(RELATIVE_PATH _pyPlug_libdir_rel
40
+ "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_PYTHON_LIBDIR}/pxr/Plug"
41
+ "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
42
+ )
43
+ set(_pyPlug_rpath "${_rpath_prefix}/${_pyPlug_libdir_rel}")
44
+ endif()
45
+
46
+ set_target_properties(pyPlug PROPERTIES
47
+ INSTALL_RPATH "${_pyPlug_rpath}"
48
+ INSTALL_RPATH_USE_LINK_PATH TRUE
39
49
  )
40
50
  endif()
41
51
 
@@ -1,10 +1,9 @@
1
+ #
1
2
  # Copyright 2016 Pixar
2
3
  #
3
4
  # Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  # https://openusd.org/license.
5
6
  #
6
- # Modified by Jeremy Retailleau.
7
-
8
7
  """
9
8
  This package defines facilities for dealing with plugins.
10
9
  """
@@ -1,9 +1,9 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
7
 
8
8
  #include <pxr/plug/pxr.h>
9
9
  #include <pxr/tf/pyModule.h>
@@ -1,9 +1,9 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
7
 
8
8
  #include <pxr/plug/pxr.h>
9
9
  #include <pxr/plug/notice.h>
@@ -1,9 +1,9 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
7
 
8
8
  #include <pxr/plug/pxr.h>
9
9
  #include <pxr/plug/plugin.h>
@@ -1,9 +1,9 @@
1
+ //
1
2
  // Copyright 2016 Pixar
2
3
  //
3
4
  // Licensed under the terms set forth in the LICENSE.txt file available at
4
5
  // https://openusd.org/license.
5
6
  //
6
- // Modified by Jeremy Retailleau.
7
7
 
8
8
  #include <pxr/plug/pxr.h>
9
9
  #include <pxr/plug/registry.h>
@@ -1,8 +0,0 @@
1
- Universal Scene Description
2
- Copyright 2016 Pixar
3
-
4
- All rights reserved.
5
-
6
- This product includes software developed at:
7
-
8
- Pixar (http://www.pixar.com/).
@@ -1,17 +0,0 @@
1
- include(CMakeFindDependencyMacro)
2
-
3
- @PACKAGE_INIT@
4
-
5
- find_dependency(pxr-arch 0.25.8 REQUIRED)
6
- find_dependency(pxr-tf 0.25.8 REQUIRED)
7
- find_dependency(pxr-js 0.25.8 REQUIRED)
8
- find_dependency(pxr-trace 0.25.8 REQUIRED)
9
- find_dependency(pxr-work 0.25.8 REQUIRED)
10
- find_dependency(TBB 2017.0 REQUIRED)
11
-
12
- set(_with_py_bindings "@BUILD_PYTHON_BINDINGS@")
13
- if(_with_py_bindings)
14
- find_dependency(pxr-boost 0.25.8 REQUIRED)
15
- endif()
16
-
17
- include(${CMAKE_CURRENT_LIST_DIR}/pxr-plug-targets.cmake)
File without changes