add usd-21-11-win64_py39
This commit is contained in:
1 parent
41d23e71ba
commit
ba5e1f7e67
15684 files changed
+3069957
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,140 @@
|
||||
# Copyright 2019 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# This CMake configuration file, installed as part of the Boost build
|
||||
# and installation procedure done by `b2 install`, provides support
|
||||
# for find_package(Boost).
|
||||
#
|
||||
# It's roughly, but not perfectly, compatible with the behavior
|
||||
# of find_package(Boost) as provided by FindBoost.cmake.
|
||||
#
|
||||
# A typical use might be
|
||||
#
|
||||
# find_package(Boost 1.70 REQUIRED COMPONENTS filesystem regex PATHS C:/Boost)
|
||||
#
|
||||
# On success, the above invocation would define the targets Boost::headers,
|
||||
# Boost::filesystem and Boost::regex. Boost::headers represents all
|
||||
# header-only libraries. An alias, Boost::boost, for Boost::headers is
|
||||
# provided for compatibility.
|
||||
#
|
||||
# Since Boost libraries can coexist in many variants - 32/64 bit,
|
||||
# static/dynamic runtime, debug/release, the following variables can be used
|
||||
# to control which variant is chosen:
|
||||
#
|
||||
# Boost_USE_DEBUG_LIBS: When OFF, disables debug libraries.
|
||||
# Boost_USE_RELEASE_LIBS: When OFF, disables release libraries.
|
||||
# Boost_USE_STATIC_LIBS: When ON, uses static Boost libraries; when OFF,
|
||||
# uses shared Boost libraries; when not set, the
|
||||
# default is to use shared when BUILD_SHARED_LIBS is
|
||||
# ON, static otherwise.
|
||||
# Boost_USE_STATIC_RUNTIME: When ON, uses Boost libraries linked against the
|
||||
# static runtime. The default is shared runtime.
|
||||
# Boost_USE_DEBUG_RUNTIME: When ON, uses Boost libraries linked against the
|
||||
# debug runtime. When OFF, against the release
|
||||
# runtime. The default is to use either.
|
||||
# Boost_COMPILER: The compiler that has been used to build Boost,
|
||||
# such as vc141, gcc7, clang37. The default is
|
||||
# determined from CMAKE_CXX_COMPILER_ID.
|
||||
|
||||
message(STATUS "Found Boost ${Boost_VERSION} at ${Boost_DIR}")
|
||||
|
||||
# Output requested configuration (f.ex. "REQUIRED COMPONENTS filesystem")
|
||||
|
||||
if(Boost_FIND_QUIETLY)
|
||||
set(_BOOST_CONFIG "${_BOOST_CONFIG} QUIET")
|
||||
endif()
|
||||
|
||||
if(Boost_FIND_REQUIRED)
|
||||
set(_BOOST_CONFIG "${_BOOST_CONFIG} REQUIRED")
|
||||
endif()
|
||||
|
||||
foreach(__boost_comp IN LISTS Boost_FIND_COMPONENTS)
|
||||
if(${Boost_FIND_REQUIRED_${__boost_comp}})
|
||||
list(APPEND _BOOST_COMPONENTS ${__boost_comp})
|
||||
else()
|
||||
list(APPEND _BOOST_OPTIONAL_COMPONENTS ${__boost_comp})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(_BOOST_COMPONENTS)
|
||||
set(_BOOST_CONFIG "${_BOOST_CONFIG} COMPONENTS ${_BOOST_COMPONENTS}")
|
||||
endif()
|
||||
|
||||
if(_BOOST_OPTIONAL_COMPONENTS)
|
||||
set(_BOOST_CONFIG "${_BOOST_CONFIG} OPTIONAL_COMPONENTS ${_BOOST_OPTIONAL_COMPONENTS}")
|
||||
endif()
|
||||
|
||||
if(_BOOST_CONFIG)
|
||||
message(STATUS " Requested configuration:${_BOOST_CONFIG}")
|
||||
endif()
|
||||
|
||||
unset(_BOOST_CONFIG)
|
||||
unset(_BOOST_COMPONENTS)
|
||||
unset(_BOOST_OPTIONAL_COMPONENTS)
|
||||
|
||||
# find_dependency doesn't forward arguments until 3.9, so we have to roll our own
|
||||
|
||||
macro(boost_find_dependency dep req)
|
||||
|
||||
set(_BOOST_QUIET)
|
||||
if(Boost_FIND_QUIETLY)
|
||||
set(_BOOST_QUIET QUIET)
|
||||
endif()
|
||||
|
||||
set(_BOOST_REQUIRED)
|
||||
if(${req} AND Boost_FIND_REQUIRED)
|
||||
set(_BOOST_REQUIRED REQUIRED)
|
||||
endif()
|
||||
|
||||
get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE)
|
||||
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "BoostConfig: find_package(boost_${dep} ${Boost_VERSION} EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HINTS ${_BOOST_CMAKEDIR})")
|
||||
endif()
|
||||
find_package(boost_${dep} ${Boost_VERSION} EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HINTS ${_BOOST_CMAKEDIR})
|
||||
|
||||
string(TOUPPER ${dep} _BOOST_DEP)
|
||||
set(Boost_${_BOOST_DEP}_FOUND ${boost_${dep}_FOUND})
|
||||
|
||||
unset(_BOOST_REQUIRED)
|
||||
unset(_BOOST_QUIET)
|
||||
unset(_BOOST_CMAKEDIR)
|
||||
unset(_BOOST_DEP)
|
||||
|
||||
endmacro()
|
||||
|
||||
# Find boost_headers
|
||||
|
||||
boost_find_dependency(headers 1)
|
||||
|
||||
if(NOT boost_headers_FOUND)
|
||||
|
||||
set(Boost_FOUND 0)
|
||||
set(Boost_NOT_FOUND_MESSAGE "A required dependency, boost_headers, has not been found.")
|
||||
|
||||
return()
|
||||
|
||||
endif()
|
||||
|
||||
# Find components
|
||||
|
||||
foreach(__boost_comp IN LISTS Boost_FIND_COMPONENTS)
|
||||
|
||||
boost_find_dependency(${__boost_comp} ${Boost_FIND_REQUIRED_${__boost_comp}})
|
||||
|
||||
endforeach()
|
||||
|
||||
# Compatibility targets
|
||||
|
||||
if(NOT TARGET Boost::boost)
|
||||
|
||||
add_library(Boost::boost INTERFACE IMPORTED)
|
||||
set_property(TARGET Boost::boost APPEND PROPERTY INTERFACE_LINK_LIBRARIES Boost::headers)
|
||||
|
||||
# All Boost:: targets already disable autolink
|
||||
add_library(Boost::diagnostic_definitions INTERFACE IMPORTED)
|
||||
add_library(Boost::disable_autolinking INTERFACE IMPORTED)
|
||||
add_library(Boost::dynamic_linking INTERFACE IMPORTED)
|
||||
|
||||
endif()
|
||||
@@ -0,0 +1,12 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
set(PACKAGE_VERSION 1.70.0)
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,156 @@
|
||||
# Copyright 2017-2019 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
|
||||
string(REGEX MATCHALL "[0-9]+" _BOOST_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION})
|
||||
|
||||
list(GET _BOOST_COMPILER_VERSION 0 _BOOST_COMPILER_VERSION_MAJOR)
|
||||
list(GET _BOOST_COMPILER_VERSION 1 _BOOST_COMPILER_VERSION_MINOR)
|
||||
|
||||
if(BORLAND)
|
||||
|
||||
# Borland is unversioned
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "bcb")
|
||||
|
||||
set(_BOOST_COMPILER_VERSION_MAJOR)
|
||||
set(_BOOST_COMPILER_VERSION_MINOR)
|
||||
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "clang-darwin")
|
||||
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
|
||||
if(MSVC)
|
||||
set(BOOST_DETECTED_TOOLSET "clangw")
|
||||
else()
|
||||
set(BOOST_DETECTED_TOOLSET "clang")
|
||||
endif()
|
||||
|
||||
if(_BOOST_COMPILER_VERSION_MAJOR GREATER 3)
|
||||
set(_BOOST_COMPILER_VERSION_MINOR)
|
||||
endif()
|
||||
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
|
||||
if(WIN32)
|
||||
|
||||
# Intel-Win is unversioned
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "iw")
|
||||
|
||||
set(_BOOST_COMPILER_VERSION_MAJOR)
|
||||
set(_BOOST_COMPILER_VERSION_MINOR)
|
||||
|
||||
else()
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "il")
|
||||
|
||||
endif()
|
||||
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MIPSpro")
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "mp")
|
||||
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "sun")
|
||||
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "IBM XL")
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "xlc")
|
||||
|
||||
elseif(MINGW)
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "mgw")
|
||||
|
||||
if(_BOOST_COMPILER_VERSION_MAJOR GREATER 4)
|
||||
set(_BOOST_COMPILER_VERSION_MINOR)
|
||||
endif()
|
||||
|
||||
elseif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
if(APPLE)
|
||||
set(BOOST_DETECTED_TOOLSET "xgcc")
|
||||
else()
|
||||
set(BOOST_DETECTED_TOOLSET "gcc")
|
||||
endif()
|
||||
|
||||
if(_BOOST_COMPILER_VERSION_MAJOR GREATER 4)
|
||||
set(_BOOST_COMPILER_VERSION_MINOR)
|
||||
endif()
|
||||
|
||||
elseif(MSVC)
|
||||
|
||||
if((MSVC_VERSION GREATER 1919) AND (MSVC_VERSION LESS 1930))
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "vc142")
|
||||
|
||||
elseif((MSVC_VERSION GREATER 1909) AND (MSVC_VERSION LESS 1920))
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "vc141")
|
||||
|
||||
elseif(MSVC_VERSION EQUAL 1900)
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "vc140")
|
||||
|
||||
elseif(MSVC_VERSION EQUAL 1800)
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "vc120")
|
||||
|
||||
elseif(MSVC_VERSION EQUAL 1700)
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "vc110")
|
||||
|
||||
elseif(MSVC_VERSION EQUAL 1600)
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "vc100")
|
||||
|
||||
elseif(MSVC_VERSION EQUAL 1500)
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "vc90")
|
||||
|
||||
elseif(MSVC_VERSION EQUAL 1400)
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "vc80")
|
||||
|
||||
elseif(MSVC_VERSION EQUAL 1310)
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "vc71")
|
||||
|
||||
elseif(MSVC_VERSION EQUAL 1300)
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "vc7")
|
||||
|
||||
elseif(MSVC_VERSION EQUAL 1200)
|
||||
|
||||
set(BOOST_DETECTED_TOOLSET "vc6")
|
||||
|
||||
endif()
|
||||
|
||||
set(_BOOST_COMPILER_VERSION_MAJOR)
|
||||
set(_BOOST_COMPILER_VERSION_MINOR)
|
||||
|
||||
endif()
|
||||
|
||||
# Add version
|
||||
|
||||
if(BOOST_DETECTED_TOOLSET)
|
||||
set(BOOST_DETECTED_TOOLSET ${BOOST_DETECTED_TOOLSET}${_BOOST_COMPILER_VERSION_MAJOR}${_BOOST_COMPILER_VERSION_MINOR})
|
||||
endif()
|
||||
|
||||
unset(_BOOST_COMPILER_VERSION)
|
||||
unset(_BOOST_COMPILER_VERSION_MAJOR)
|
||||
unset(_BOOST_COMPILER_VERSION_MINOR)
|
||||
|
||||
if("${BOOST_DETECTED_TOOLSET}" STREQUAL "")
|
||||
|
||||
# Unknown toolset
|
||||
message(STATUS "Boost toolset is unknown (compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION})")
|
||||
|
||||
elseif(Boost_DEBUG)
|
||||
|
||||
message(STATUS "Boost toolset is ${BOOST_DETECTED_TOOLSET} (${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION})")
|
||||
|
||||
endif()
|
||||
@@ -0,0 +1,12 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
set(PACKAGE_VERSION 1.70.0)
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,98 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
if(TARGET Boost::atomic)
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "Found boost_atomic ${boost_atomic_VERSION} at ${boost_atomic_DIR}")
|
||||
|
||||
# Compute the include and library directories relative to this file.
|
||||
get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE)
|
||||
get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../include/boost-1_70/" ABSOLUTE)
|
||||
get_filename_component(_BOOST_LIBDIR "${_BOOST_CMAKEDIR}/../" ABSOLUTE)
|
||||
|
||||
# Create imported target Boost::atomic
|
||||
add_library(Boost::atomic UNKNOWN IMPORTED)
|
||||
|
||||
set_target_properties(Boost::atomic PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_BOOST_INCLUDEDIR}"
|
||||
INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB"
|
||||
)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../BoostDetectToolset-1.70.0.cmake)
|
||||
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "Scanning ${CMAKE_CURRENT_LIST_DIR}/libboost_atomic-variant*.cmake")
|
||||
endif()
|
||||
|
||||
file(GLOB __boost_variants "${CMAKE_CURRENT_LIST_DIR}/libboost_atomic-variant*.cmake")
|
||||
|
||||
macro(_BOOST_SKIPPED fname reason)
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS " ... skipped ${fname} (${reason})")
|
||||
endif()
|
||||
list(APPEND __boost_skipped "${fname} (${reason})")
|
||||
endmacro()
|
||||
|
||||
foreach(f IN LISTS __boost_variants)
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS " Including ${f}")
|
||||
endif()
|
||||
include(${f})
|
||||
endforeach()
|
||||
|
||||
unset(_BOOST_LIBDIR)
|
||||
unset(_BOOST_INCLUDEDIR)
|
||||
unset(_BOOST_CMAKEDIR)
|
||||
|
||||
get_target_property(__boost_configs Boost::atomic IMPORTED_CONFIGURATIONS)
|
||||
|
||||
if(__boost_variants AND NOT __boost_configs)
|
||||
message(STATUS "No suitable boost_atomic variant has been identified!")
|
||||
if(NOT Boost_DEBUG)
|
||||
foreach(s IN LISTS __boost_skipped)
|
||||
message(STATUS " ${s}")
|
||||
endforeach()
|
||||
endif()
|
||||
set(boost_atomic_FOUND 0)
|
||||
set(boost_atomic_NOT_FOUND_MESSAGE "No suitable build variant has been found.")
|
||||
unset(__boost_skipped)
|
||||
unset(__boost_configs)
|
||||
unset(__boost_variants)
|
||||
unset(_BOOST_ATOMIC_DEPS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
unset(__boost_skipped)
|
||||
unset(__boost_configs)
|
||||
unset(__boost_variants)
|
||||
|
||||
if(_BOOST_ATOMIC_DEPS)
|
||||
list(REMOVE_DUPLICATES _BOOST_ATOMIC_DEPS)
|
||||
message(STATUS "Adding boost_atomic dependencies: ${_BOOST_ATOMIC_DEPS}")
|
||||
endif()
|
||||
|
||||
foreach(dep_boost_atomic IN LISTS _BOOST_ATOMIC_DEPS)
|
||||
set(_BOOST_QUIET)
|
||||
if(boost_atomic_FIND_QUIETLY)
|
||||
set(_BOOST_QUIET QUIET)
|
||||
endif()
|
||||
set(_BOOST_REQUIRED)
|
||||
if(boost_atomic_FIND_REQUIRED)
|
||||
set(_BOOST_REQUIRED REQUIRED)
|
||||
endif()
|
||||
get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE)
|
||||
find_package(boost_${dep_boost_atomic} 1.70.0 EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HINTS ${_BOOST_CMAKEDIR})
|
||||
set_property(TARGET Boost::atomic APPEND PROPERTY INTERFACE_LINK_LIBRARIES Boost::${dep_boost_atomic})
|
||||
unset(_BOOST_QUIET)
|
||||
unset(_BOOST_REQUIRED)
|
||||
unset(_BOOST_CMAKEDIR)
|
||||
if(NOT boost_${dep_boost_atomic}_FOUND)
|
||||
set(boost_atomic_FOUND 0)
|
||||
set(boost_atomic_NOT_FOUND_MESSAGE "A required dependency, boost_${dep_boost_atomic}, has not been found.")
|
||||
unset(_BOOST_ATOMIC_DEPS)
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
unset(_BOOST_ATOMIC_DEPS)
|
||||
@@ -0,0 +1,72 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
# address-model=64
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
_BOOST_SKIPPED("boost_atomic-vc142-mt-x64-1_70.lib" "64 bit, need 32")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# layout=versioned
|
||||
|
||||
# toolset=vc142
|
||||
|
||||
if(Boost_COMPILER AND NOT Boost_COMPILER STREQUAL "vc142")
|
||||
_BOOST_SKIPPED("boost_atomic-vc142-mt-x64-1_70.lib" "vc142, Boost_COMPILER=${Boost_COMPILER}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(BOOST_DETECTED_TOOLSET AND NOT BOOST_DETECTED_TOOLSET STREQUAL "vc142")
|
||||
_BOOST_SKIPPED("boost_atomic-vc142-mt-x64-1_70.lib" "vc142, detected ${BOOST_DETECTED_TOOLSET}, set Boost_COMPILER to override")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# link=shared
|
||||
|
||||
if(NOT "${Boost_USE_STATIC_LIBS}" STREQUAL "" AND Boost_USE_STATIC_LIBS)
|
||||
_BOOST_SKIPPED("boost_atomic-vc142-mt-x64-1_70.lib" "shared, Boost_USE_STATIC_LIBS=${Boost_USE_STATIC_LIBS}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
_BOOST_SKIPPED("boost_atomic-vc142-mt-x64-1_70.lib" "shared, BUILD_SHARED_LIBS not ON, set Boost_USE_STATIC_LIBS=OFF to override")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# runtime-link=shared
|
||||
|
||||
if(Boost_USE_STATIC_RUNTIME)
|
||||
_BOOST_SKIPPED("boost_atomic-vc142-mt-x64-1_70.lib" "shared runtime, Boost_USE_STATIC_RUNTIME=${Boost_USE_STATIC_RUNTIME}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# runtime-debugging=off
|
||||
|
||||
if(Boost_USE_DEBUG_RUNTIME)
|
||||
_BOOST_SKIPPED("boost_atomic-vc142-mt-x64-1_70.lib" "release runtime, Boost_USE_DEBUG_RUNTIME=${Boost_USE_DEBUG_RUNTIME}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# threading=multi
|
||||
|
||||
# variant=release
|
||||
|
||||
if(NOT "${Boost_USE_RELEASE_LIBS}" STREQUAL "" AND NOT Boost_USE_RELEASE_LIBS)
|
||||
_BOOST_SKIPPED("boost_atomic-vc142-mt-x64-1_70.lib" "release, Boost_USE_RELEASE_LIBS=${Boost_USE_RELEASE_LIBS}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS " boost_atomic-vc142-mt-x64-1_70.lib")
|
||||
|
||||
# Target file name: boost_atomic-vc142-mt-x64-1_70.lib
|
||||
set_property(TARGET Boost::atomic APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(Boost::atomic PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE CXX
|
||||
IMPORTED_LOCATION_RELEASE "${_BOOST_LIBDIR}/boost_atomic-vc142-mt-x64-1_70.lib"
|
||||
)
|
||||
|
||||
set_target_properties(Boost::atomic PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "BOOST_ATOMIC_DYN_LINK"
|
||||
)
|
||||
|
||||
list(APPEND _BOOST_ATOMIC_DEPS headers)
|
||||
@@ -0,0 +1,12 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
set(PACKAGE_VERSION 1.70.0)
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,20 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
if(TARGET Boost::headers)
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "Found boost_headers ${boost_headers_VERSION} at ${boost_headers_DIR}")
|
||||
|
||||
# Compute the include and library directories relative to this file.
|
||||
get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE)
|
||||
get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../include/boost-1_70/" ABSOLUTE)
|
||||
get_filename_component(_BOOST_LIBDIR "${_BOOST_CMAKEDIR}/../" ABSOLUTE)
|
||||
|
||||
# Create imported target Boost::headers
|
||||
add_library(Boost::headers INTERFACE IMPORTED)
|
||||
|
||||
set_target_properties(Boost::headers PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_BOOST_INCLUDEDIR}"
|
||||
INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB"
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
set(PACKAGE_VERSION 1.70.0)
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,98 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
if(TARGET Boost::numpy)
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "Found boost_numpy ${boost_numpy_VERSION} at ${boost_numpy_DIR}")
|
||||
|
||||
# Compute the include and library directories relative to this file.
|
||||
get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE)
|
||||
get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../include/boost-1_70/" ABSOLUTE)
|
||||
get_filename_component(_BOOST_LIBDIR "${_BOOST_CMAKEDIR}/../" ABSOLUTE)
|
||||
|
||||
# Create imported target Boost::numpy
|
||||
add_library(Boost::numpy UNKNOWN IMPORTED)
|
||||
|
||||
set_target_properties(Boost::numpy PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_BOOST_INCLUDEDIR}"
|
||||
INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB"
|
||||
)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../BoostDetectToolset-1.70.0.cmake)
|
||||
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "Scanning ${CMAKE_CURRENT_LIST_DIR}/libboost_numpy-variant*.cmake")
|
||||
endif()
|
||||
|
||||
file(GLOB __boost_variants "${CMAKE_CURRENT_LIST_DIR}/libboost_numpy-variant*.cmake")
|
||||
|
||||
macro(_BOOST_SKIPPED fname reason)
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS " ... skipped ${fname} (${reason})")
|
||||
endif()
|
||||
list(APPEND __boost_skipped "${fname} (${reason})")
|
||||
endmacro()
|
||||
|
||||
foreach(f IN LISTS __boost_variants)
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS " Including ${f}")
|
||||
endif()
|
||||
include(${f})
|
||||
endforeach()
|
||||
|
||||
unset(_BOOST_LIBDIR)
|
||||
unset(_BOOST_INCLUDEDIR)
|
||||
unset(_BOOST_CMAKEDIR)
|
||||
|
||||
get_target_property(__boost_configs Boost::numpy IMPORTED_CONFIGURATIONS)
|
||||
|
||||
if(__boost_variants AND NOT __boost_configs)
|
||||
message(STATUS "No suitable boost_numpy variant has been identified!")
|
||||
if(NOT Boost_DEBUG)
|
||||
foreach(s IN LISTS __boost_skipped)
|
||||
message(STATUS " ${s}")
|
||||
endforeach()
|
||||
endif()
|
||||
set(boost_numpy_FOUND 0)
|
||||
set(boost_numpy_NOT_FOUND_MESSAGE "No suitable build variant has been found.")
|
||||
unset(__boost_skipped)
|
||||
unset(__boost_configs)
|
||||
unset(__boost_variants)
|
||||
unset(_BOOST_NUMPY_DEPS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
unset(__boost_skipped)
|
||||
unset(__boost_configs)
|
||||
unset(__boost_variants)
|
||||
|
||||
if(_BOOST_NUMPY_DEPS)
|
||||
list(REMOVE_DUPLICATES _BOOST_NUMPY_DEPS)
|
||||
message(STATUS "Adding boost_numpy dependencies: ${_BOOST_NUMPY_DEPS}")
|
||||
endif()
|
||||
|
||||
foreach(dep_boost_numpy IN LISTS _BOOST_NUMPY_DEPS)
|
||||
set(_BOOST_QUIET)
|
||||
if(boost_numpy_FIND_QUIETLY)
|
||||
set(_BOOST_QUIET QUIET)
|
||||
endif()
|
||||
set(_BOOST_REQUIRED)
|
||||
if(boost_numpy_FIND_REQUIRED)
|
||||
set(_BOOST_REQUIRED REQUIRED)
|
||||
endif()
|
||||
get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE)
|
||||
find_package(boost_${dep_boost_numpy} 1.70.0 EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HINTS ${_BOOST_CMAKEDIR})
|
||||
set_property(TARGET Boost::numpy APPEND PROPERTY INTERFACE_LINK_LIBRARIES Boost::${dep_boost_numpy})
|
||||
unset(_BOOST_QUIET)
|
||||
unset(_BOOST_REQUIRED)
|
||||
unset(_BOOST_CMAKEDIR)
|
||||
if(NOT boost_${dep_boost_numpy}_FOUND)
|
||||
set(boost_numpy_FOUND 0)
|
||||
set(boost_numpy_NOT_FOUND_MESSAGE "A required dependency, boost_${dep_boost_numpy}, has not been found.")
|
||||
unset(_BOOST_NUMPY_DEPS)
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
unset(_BOOST_NUMPY_DEPS)
|
||||
@@ -0,0 +1,61 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
# address-model=64
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# layout=versioned
|
||||
|
||||
# toolset=vc142
|
||||
|
||||
if(Boost_COMPILER AND NOT Boost_COMPILER STREQUAL "vc142")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(BOOST_DETECTED_TOOLSET AND NOT BOOST_DETECTED_TOOLSET STREQUAL "vc142")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# link=shared
|
||||
|
||||
if(NOT "${Boost_USE_STATIC_LIBS}" STREQUAL "" AND Boost_USE_STATIC_LIBS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# runtime-link=shared
|
||||
|
||||
if(Boost_USE_STATIC_RUNTIME)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# runtime-debugging=off
|
||||
|
||||
if(Boost_USE_DEBUG_RUNTIME)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# threading=multi
|
||||
|
||||
# variant=release
|
||||
|
||||
if(NOT "${Boost_USE_RELEASE_LIBS}" STREQUAL "" AND NOT Boost_USE_RELEASE_LIBS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
||||
set_property(TARGET Boost::numpy APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(Boost::numpy PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE CXX
|
||||
)
|
||||
|
||||
set_target_properties(Boost::numpy PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "BOOST_NUMPY_DYN_LINK"
|
||||
)
|
||||
|
||||
list(APPEND _BOOST_NUMPY_DEPS headers)
|
||||
@@ -0,0 +1,12 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
set(PACKAGE_VERSION 1.70.0)
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,98 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
if(TARGET Boost::program_options)
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "Found boost_program_options ${boost_program_options_VERSION} at ${boost_program_options_DIR}")
|
||||
|
||||
# Compute the include and library directories relative to this file.
|
||||
get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE)
|
||||
get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../include/boost-1_70/" ABSOLUTE)
|
||||
get_filename_component(_BOOST_LIBDIR "${_BOOST_CMAKEDIR}/../" ABSOLUTE)
|
||||
|
||||
# Create imported target Boost::program_options
|
||||
add_library(Boost::program_options UNKNOWN IMPORTED)
|
||||
|
||||
set_target_properties(Boost::program_options PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_BOOST_INCLUDEDIR}"
|
||||
INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB"
|
||||
)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../BoostDetectToolset-1.70.0.cmake)
|
||||
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "Scanning ${CMAKE_CURRENT_LIST_DIR}/libboost_program_options-variant*.cmake")
|
||||
endif()
|
||||
|
||||
file(GLOB __boost_variants "${CMAKE_CURRENT_LIST_DIR}/libboost_program_options-variant*.cmake")
|
||||
|
||||
macro(_BOOST_SKIPPED fname reason)
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS " ... skipped ${fname} (${reason})")
|
||||
endif()
|
||||
list(APPEND __boost_skipped "${fname} (${reason})")
|
||||
endmacro()
|
||||
|
||||
foreach(f IN LISTS __boost_variants)
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS " Including ${f}")
|
||||
endif()
|
||||
include(${f})
|
||||
endforeach()
|
||||
|
||||
unset(_BOOST_LIBDIR)
|
||||
unset(_BOOST_INCLUDEDIR)
|
||||
unset(_BOOST_CMAKEDIR)
|
||||
|
||||
get_target_property(__boost_configs Boost::program_options IMPORTED_CONFIGURATIONS)
|
||||
|
||||
if(__boost_variants AND NOT __boost_configs)
|
||||
message(STATUS "No suitable boost_program_options variant has been identified!")
|
||||
if(NOT Boost_DEBUG)
|
||||
foreach(s IN LISTS __boost_skipped)
|
||||
message(STATUS " ${s}")
|
||||
endforeach()
|
||||
endif()
|
||||
set(boost_program_options_FOUND 0)
|
||||
set(boost_program_options_NOT_FOUND_MESSAGE "No suitable build variant has been found.")
|
||||
unset(__boost_skipped)
|
||||
unset(__boost_configs)
|
||||
unset(__boost_variants)
|
||||
unset(_BOOST_PROGRAM_OPTIONS_DEPS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
unset(__boost_skipped)
|
||||
unset(__boost_configs)
|
||||
unset(__boost_variants)
|
||||
|
||||
if(_BOOST_PROGRAM_OPTIONS_DEPS)
|
||||
list(REMOVE_DUPLICATES _BOOST_PROGRAM_OPTIONS_DEPS)
|
||||
message(STATUS "Adding boost_program_options dependencies: ${_BOOST_PROGRAM_OPTIONS_DEPS}")
|
||||
endif()
|
||||
|
||||
foreach(dep_boost_program_options IN LISTS _BOOST_PROGRAM_OPTIONS_DEPS)
|
||||
set(_BOOST_QUIET)
|
||||
if(boost_program_options_FIND_QUIETLY)
|
||||
set(_BOOST_QUIET QUIET)
|
||||
endif()
|
||||
set(_BOOST_REQUIRED)
|
||||
if(boost_program_options_FIND_REQUIRED)
|
||||
set(_BOOST_REQUIRED REQUIRED)
|
||||
endif()
|
||||
get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE)
|
||||
find_package(boost_${dep_boost_program_options} 1.70.0 EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HINTS ${_BOOST_CMAKEDIR})
|
||||
set_property(TARGET Boost::program_options APPEND PROPERTY INTERFACE_LINK_LIBRARIES Boost::${dep_boost_program_options})
|
||||
unset(_BOOST_QUIET)
|
||||
unset(_BOOST_REQUIRED)
|
||||
unset(_BOOST_CMAKEDIR)
|
||||
if(NOT boost_${dep_boost_program_options}_FOUND)
|
||||
set(boost_program_options_FOUND 0)
|
||||
set(boost_program_options_NOT_FOUND_MESSAGE "A required dependency, boost_${dep_boost_program_options}, has not been found.")
|
||||
unset(_BOOST_PROGRAM_OPTIONS_DEPS)
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
unset(_BOOST_PROGRAM_OPTIONS_DEPS)
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
# address-model=64
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
_BOOST_SKIPPED("boost_program_options-vc142-mt-x64-1_70.lib" "64 bit, need 32")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# layout=versioned
|
||||
|
||||
# toolset=vc142
|
||||
|
||||
if(Boost_COMPILER AND NOT Boost_COMPILER STREQUAL "vc142")
|
||||
_BOOST_SKIPPED("boost_program_options-vc142-mt-x64-1_70.lib" "vc142, Boost_COMPILER=${Boost_COMPILER}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(BOOST_DETECTED_TOOLSET AND NOT BOOST_DETECTED_TOOLSET STREQUAL "vc142")
|
||||
_BOOST_SKIPPED("boost_program_options-vc142-mt-x64-1_70.lib" "vc142, detected ${BOOST_DETECTED_TOOLSET}, set Boost_COMPILER to override")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# link=shared
|
||||
|
||||
if(NOT "${Boost_USE_STATIC_LIBS}" STREQUAL "" AND Boost_USE_STATIC_LIBS)
|
||||
_BOOST_SKIPPED("boost_program_options-vc142-mt-x64-1_70.lib" "shared, Boost_USE_STATIC_LIBS=${Boost_USE_STATIC_LIBS}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
_BOOST_SKIPPED("boost_program_options-vc142-mt-x64-1_70.lib" "shared, BUILD_SHARED_LIBS not ON, set Boost_USE_STATIC_LIBS=OFF to override")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# runtime-link=shared
|
||||
|
||||
if(Boost_USE_STATIC_RUNTIME)
|
||||
_BOOST_SKIPPED("boost_program_options-vc142-mt-x64-1_70.lib" "shared runtime, Boost_USE_STATIC_RUNTIME=${Boost_USE_STATIC_RUNTIME}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# runtime-debugging=off
|
||||
|
||||
if(Boost_USE_DEBUG_RUNTIME)
|
||||
_BOOST_SKIPPED("boost_program_options-vc142-mt-x64-1_70.lib" "release runtime, Boost_USE_DEBUG_RUNTIME=${Boost_USE_DEBUG_RUNTIME}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# threading=multi
|
||||
|
||||
# variant=release
|
||||
|
||||
if(NOT "${Boost_USE_RELEASE_LIBS}" STREQUAL "" AND NOT Boost_USE_RELEASE_LIBS)
|
||||
_BOOST_SKIPPED("boost_program_options-vc142-mt-x64-1_70.lib" "release, Boost_USE_RELEASE_LIBS=${Boost_USE_RELEASE_LIBS}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS " boost_program_options-vc142-mt-x64-1_70.lib")
|
||||
|
||||
# Target file name: boost_program_options-vc142-mt-x64-1_70.lib
|
||||
set_property(TARGET Boost::program_options APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(Boost::program_options PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE CXX
|
||||
IMPORTED_LOCATION_RELEASE "${_BOOST_LIBDIR}/boost_program_options-vc142-mt-x64-1_70.lib"
|
||||
)
|
||||
|
||||
set_target_properties(Boost::program_options PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "BOOST_PROGRAM_OPTIONS_DYN_LINK"
|
||||
)
|
||||
|
||||
list(APPEND _BOOST_PROGRAM_OPTIONS_DEPS headers)
|
||||
@@ -0,0 +1,12 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
set(PACKAGE_VERSION 1.70.0)
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,98 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
if(TARGET Boost::python)
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "Found boost_python ${boost_python_VERSION} at ${boost_python_DIR}")
|
||||
|
||||
# Compute the include and library directories relative to this file.
|
||||
get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE)
|
||||
get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../include/boost-1_70/" ABSOLUTE)
|
||||
get_filename_component(_BOOST_LIBDIR "${_BOOST_CMAKEDIR}/../" ABSOLUTE)
|
||||
|
||||
# Create imported target Boost::python
|
||||
add_library(Boost::python UNKNOWN IMPORTED)
|
||||
|
||||
set_target_properties(Boost::python PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_BOOST_INCLUDEDIR}"
|
||||
INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB"
|
||||
)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../BoostDetectToolset-1.70.0.cmake)
|
||||
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "Scanning ${CMAKE_CURRENT_LIST_DIR}/libboost_python-variant*.cmake")
|
||||
endif()
|
||||
|
||||
file(GLOB __boost_variants "${CMAKE_CURRENT_LIST_DIR}/libboost_python-variant*.cmake")
|
||||
|
||||
macro(_BOOST_SKIPPED fname reason)
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS " ... skipped ${fname} (${reason})")
|
||||
endif()
|
||||
list(APPEND __boost_skipped "${fname} (${reason})")
|
||||
endmacro()
|
||||
|
||||
foreach(f IN LISTS __boost_variants)
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS " Including ${f}")
|
||||
endif()
|
||||
include(${f})
|
||||
endforeach()
|
||||
|
||||
unset(_BOOST_LIBDIR)
|
||||
unset(_BOOST_INCLUDEDIR)
|
||||
unset(_BOOST_CMAKEDIR)
|
||||
|
||||
get_target_property(__boost_configs Boost::python IMPORTED_CONFIGURATIONS)
|
||||
|
||||
if(__boost_variants AND NOT __boost_configs)
|
||||
message(STATUS "No suitable boost_python variant has been identified!")
|
||||
if(NOT Boost_DEBUG)
|
||||
foreach(s IN LISTS __boost_skipped)
|
||||
message(STATUS " ${s}")
|
||||
endforeach()
|
||||
endif()
|
||||
set(boost_python_FOUND 0)
|
||||
set(boost_python_NOT_FOUND_MESSAGE "No suitable build variant has been found.")
|
||||
unset(__boost_skipped)
|
||||
unset(__boost_configs)
|
||||
unset(__boost_variants)
|
||||
unset(_BOOST_PYTHON_DEPS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
unset(__boost_skipped)
|
||||
unset(__boost_configs)
|
||||
unset(__boost_variants)
|
||||
|
||||
if(_BOOST_PYTHON_DEPS)
|
||||
list(REMOVE_DUPLICATES _BOOST_PYTHON_DEPS)
|
||||
message(STATUS "Adding boost_python dependencies: ${_BOOST_PYTHON_DEPS}")
|
||||
endif()
|
||||
|
||||
foreach(dep_boost_python IN LISTS _BOOST_PYTHON_DEPS)
|
||||
set(_BOOST_QUIET)
|
||||
if(boost_python_FIND_QUIETLY)
|
||||
set(_BOOST_QUIET QUIET)
|
||||
endif()
|
||||
set(_BOOST_REQUIRED)
|
||||
if(boost_python_FIND_REQUIRED)
|
||||
set(_BOOST_REQUIRED REQUIRED)
|
||||
endif()
|
||||
get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE)
|
||||
find_package(boost_${dep_boost_python} 1.70.0 EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HINTS ${_BOOST_CMAKEDIR})
|
||||
set_property(TARGET Boost::python APPEND PROPERTY INTERFACE_LINK_LIBRARIES Boost::${dep_boost_python})
|
||||
unset(_BOOST_QUIET)
|
||||
unset(_BOOST_REQUIRED)
|
||||
unset(_BOOST_CMAKEDIR)
|
||||
if(NOT boost_${dep_boost_python}_FOUND)
|
||||
set(boost_python_FOUND 0)
|
||||
set(boost_python_NOT_FOUND_MESSAGE "A required dependency, boost_${dep_boost_python}, has not been found.")
|
||||
unset(_BOOST_PYTHON_DEPS)
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
unset(_BOOST_PYTHON_DEPS)
|
||||
@@ -0,0 +1,72 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
# address-model=64
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
_BOOST_SKIPPED("boost_python39-vc142-mt-x64-1_70.lib" "64 bit, need 32")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# layout=versioned
|
||||
|
||||
# toolset=vc142
|
||||
|
||||
if(Boost_COMPILER AND NOT Boost_COMPILER STREQUAL "vc142")
|
||||
_BOOST_SKIPPED("boost_python39-vc142-mt-x64-1_70.lib" "vc142, Boost_COMPILER=${Boost_COMPILER}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(BOOST_DETECTED_TOOLSET AND NOT BOOST_DETECTED_TOOLSET STREQUAL "vc142")
|
||||
_BOOST_SKIPPED("boost_python39-vc142-mt-x64-1_70.lib" "vc142, detected ${BOOST_DETECTED_TOOLSET}, set Boost_COMPILER to override")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# link=shared
|
||||
|
||||
if(NOT "${Boost_USE_STATIC_LIBS}" STREQUAL "" AND Boost_USE_STATIC_LIBS)
|
||||
_BOOST_SKIPPED("boost_python39-vc142-mt-x64-1_70.lib" "shared, Boost_USE_STATIC_LIBS=${Boost_USE_STATIC_LIBS}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
_BOOST_SKIPPED("boost_python39-vc142-mt-x64-1_70.lib" "shared, BUILD_SHARED_LIBS not ON, set Boost_USE_STATIC_LIBS=OFF to override")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# runtime-link=shared
|
||||
|
||||
if(Boost_USE_STATIC_RUNTIME)
|
||||
_BOOST_SKIPPED("boost_python39-vc142-mt-x64-1_70.lib" "shared runtime, Boost_USE_STATIC_RUNTIME=${Boost_USE_STATIC_RUNTIME}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# runtime-debugging=off
|
||||
|
||||
if(Boost_USE_DEBUG_RUNTIME)
|
||||
_BOOST_SKIPPED("boost_python39-vc142-mt-x64-1_70.lib" "release runtime, Boost_USE_DEBUG_RUNTIME=${Boost_USE_DEBUG_RUNTIME}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# threading=multi
|
||||
|
||||
# variant=release
|
||||
|
||||
if(NOT "${Boost_USE_RELEASE_LIBS}" STREQUAL "" AND NOT Boost_USE_RELEASE_LIBS)
|
||||
_BOOST_SKIPPED("boost_python39-vc142-mt-x64-1_70.lib" "release, Boost_USE_RELEASE_LIBS=${Boost_USE_RELEASE_LIBS}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS " boost_python39-vc142-mt-x64-1_70.lib")
|
||||
|
||||
# Target file name: boost_python39-vc142-mt-x64-1_70.lib
|
||||
set_property(TARGET Boost::python APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(Boost::python PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE CXX
|
||||
IMPORTED_LOCATION_RELEASE "${_BOOST_LIBDIR}/boost_python39-vc142-mt-x64-1_70.lib"
|
||||
)
|
||||
|
||||
set_target_properties(Boost::python PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "BOOST_PYTHON_DYN_LINK"
|
||||
)
|
||||
|
||||
list(APPEND _BOOST_PYTHON_DEPS headers)
|
||||
@@ -0,0 +1,12 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
set(PACKAGE_VERSION 1.70.0)
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,98 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
if(TARGET Boost::regex)
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "Found boost_regex ${boost_regex_VERSION} at ${boost_regex_DIR}")
|
||||
|
||||
# Compute the include and library directories relative to this file.
|
||||
get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE)
|
||||
get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../include/boost-1_70/" ABSOLUTE)
|
||||
get_filename_component(_BOOST_LIBDIR "${_BOOST_CMAKEDIR}/../" ABSOLUTE)
|
||||
|
||||
# Create imported target Boost::regex
|
||||
add_library(Boost::regex UNKNOWN IMPORTED)
|
||||
|
||||
set_target_properties(Boost::regex PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_BOOST_INCLUDEDIR}"
|
||||
INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB"
|
||||
)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../BoostDetectToolset-1.70.0.cmake)
|
||||
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS "Scanning ${CMAKE_CURRENT_LIST_DIR}/libboost_regex-variant*.cmake")
|
||||
endif()
|
||||
|
||||
file(GLOB __boost_variants "${CMAKE_CURRENT_LIST_DIR}/libboost_regex-variant*.cmake")
|
||||
|
||||
macro(_BOOST_SKIPPED fname reason)
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS " ... skipped ${fname} (${reason})")
|
||||
endif()
|
||||
list(APPEND __boost_skipped "${fname} (${reason})")
|
||||
endmacro()
|
||||
|
||||
foreach(f IN LISTS __boost_variants)
|
||||
if(Boost_DEBUG)
|
||||
message(STATUS " Including ${f}")
|
||||
endif()
|
||||
include(${f})
|
||||
endforeach()
|
||||
|
||||
unset(_BOOST_LIBDIR)
|
||||
unset(_BOOST_INCLUDEDIR)
|
||||
unset(_BOOST_CMAKEDIR)
|
||||
|
||||
get_target_property(__boost_configs Boost::regex IMPORTED_CONFIGURATIONS)
|
||||
|
||||
if(__boost_variants AND NOT __boost_configs)
|
||||
message(STATUS "No suitable boost_regex variant has been identified!")
|
||||
if(NOT Boost_DEBUG)
|
||||
foreach(s IN LISTS __boost_skipped)
|
||||
message(STATUS " ${s}")
|
||||
endforeach()
|
||||
endif()
|
||||
set(boost_regex_FOUND 0)
|
||||
set(boost_regex_NOT_FOUND_MESSAGE "No suitable build variant has been found.")
|
||||
unset(__boost_skipped)
|
||||
unset(__boost_configs)
|
||||
unset(__boost_variants)
|
||||
unset(_BOOST_REGEX_DEPS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
unset(__boost_skipped)
|
||||
unset(__boost_configs)
|
||||
unset(__boost_variants)
|
||||
|
||||
if(_BOOST_REGEX_DEPS)
|
||||
list(REMOVE_DUPLICATES _BOOST_REGEX_DEPS)
|
||||
message(STATUS "Adding boost_regex dependencies: ${_BOOST_REGEX_DEPS}")
|
||||
endif()
|
||||
|
||||
foreach(dep_boost_regex IN LISTS _BOOST_REGEX_DEPS)
|
||||
set(_BOOST_QUIET)
|
||||
if(boost_regex_FIND_QUIETLY)
|
||||
set(_BOOST_QUIET QUIET)
|
||||
endif()
|
||||
set(_BOOST_REQUIRED)
|
||||
if(boost_regex_FIND_REQUIRED)
|
||||
set(_BOOST_REQUIRED REQUIRED)
|
||||
endif()
|
||||
get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" ABSOLUTE)
|
||||
find_package(boost_${dep_boost_regex} 1.70.0 EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HINTS ${_BOOST_CMAKEDIR})
|
||||
set_property(TARGET Boost::regex APPEND PROPERTY INTERFACE_LINK_LIBRARIES Boost::${dep_boost_regex})
|
||||
unset(_BOOST_QUIET)
|
||||
unset(_BOOST_REQUIRED)
|
||||
unset(_BOOST_CMAKEDIR)
|
||||
if(NOT boost_${dep_boost_regex}_FOUND)
|
||||
set(boost_regex_FOUND 0)
|
||||
set(boost_regex_NOT_FOUND_MESSAGE "A required dependency, boost_${dep_boost_regex}, has not been found.")
|
||||
unset(_BOOST_REGEX_DEPS)
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
unset(_BOOST_REGEX_DEPS)
|
||||
@@ -0,0 +1,72 @@
|
||||
# Generated by Boost 1.70.0
|
||||
|
||||
# address-model=64
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
_BOOST_SKIPPED("boost_regex-vc142-mt-x64-1_70.lib" "64 bit, need 32")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# layout=versioned
|
||||
|
||||
# toolset=vc142
|
||||
|
||||
if(Boost_COMPILER AND NOT Boost_COMPILER STREQUAL "vc142")
|
||||
_BOOST_SKIPPED("boost_regex-vc142-mt-x64-1_70.lib" "vc142, Boost_COMPILER=${Boost_COMPILER}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(BOOST_DETECTED_TOOLSET AND NOT BOOST_DETECTED_TOOLSET STREQUAL "vc142")
|
||||
_BOOST_SKIPPED("boost_regex-vc142-mt-x64-1_70.lib" "vc142, detected ${BOOST_DETECTED_TOOLSET}, set Boost_COMPILER to override")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# link=shared
|
||||
|
||||
if(NOT "${Boost_USE_STATIC_LIBS}" STREQUAL "" AND Boost_USE_STATIC_LIBS)
|
||||
_BOOST_SKIPPED("boost_regex-vc142-mt-x64-1_70.lib" "shared, Boost_USE_STATIC_LIBS=${Boost_USE_STATIC_LIBS}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
_BOOST_SKIPPED("boost_regex-vc142-mt-x64-1_70.lib" "shared, BUILD_SHARED_LIBS not ON, set Boost_USE_STATIC_LIBS=OFF to override")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# runtime-link=shared
|
||||
|
||||
if(Boost_USE_STATIC_RUNTIME)
|
||||
_BOOST_SKIPPED("boost_regex-vc142-mt-x64-1_70.lib" "shared runtime, Boost_USE_STATIC_RUNTIME=${Boost_USE_STATIC_RUNTIME}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# runtime-debugging=off
|
||||
|
||||
if(Boost_USE_DEBUG_RUNTIME)
|
||||
_BOOST_SKIPPED("boost_regex-vc142-mt-x64-1_70.lib" "release runtime, Boost_USE_DEBUG_RUNTIME=${Boost_USE_DEBUG_RUNTIME}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# threading=multi
|
||||
|
||||
# variant=release
|
||||
|
||||
if(NOT "${Boost_USE_RELEASE_LIBS}" STREQUAL "" AND NOT Boost_USE_RELEASE_LIBS)
|
||||
_BOOST_SKIPPED("boost_regex-vc142-mt-x64-1_70.lib" "release, Boost_USE_RELEASE_LIBS=${Boost_USE_RELEASE_LIBS}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS " boost_regex-vc142-mt-x64-1_70.lib")
|
||||
|
||||
# Target file name: boost_regex-vc142-mt-x64-1_70.lib
|
||||
set_property(TARGET Boost::regex APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(Boost::regex PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE CXX
|
||||
IMPORTED_LOCATION_RELEASE "${_BOOST_LIBDIR}/boost_regex-vc142-mt-x64-1_70.lib"
|
||||
)
|
||||
|
||||
set_target_properties(Boost::regex PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS "BOOST_REGEX_DYN_LINK"
|
||||
)
|
||||
|
||||
list(APPEND _BOOST_REGEX_DEPS headers)
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
"""
|
||||
Camera utilities.
|
||||
|
||||
"""
|
||||
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
"""
|
||||
garch
|
||||
|
||||
"""
|
||||
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
"""
|
||||
Graphics Foundation
|
||||
This package defines classes for fundamental graphics types and operations.
|
||||
"""
|
||||
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
"""
|
||||
glf
|
||||
|
||||
"""
|
||||
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
"""Python bindings for libKind"""
|
||||
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
#
|
||||
# Copyright 2018 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
"""Python bindings for libNdr"""
|
||||
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
"""
|
||||
This package defines facilities for dealing with plugins.
|
||||
"""
|
||||
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# Copyright 2019 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
"""
|
||||
Pixar OSD implementation.
|
||||
"""
|
||||
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,82 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
|
||||
def Find(layerFileName, scenePath=None):
|
||||
'''Find(layerFileName, scenePath) -> object
|
||||
|
||||
layerFileName: string
|
||||
scenePath: Path
|
||||
|
||||
If given a single string argument, returns the menv layer with
|
||||
the given filename. If given two arguments (a string and a Path), finds
|
||||
the menv layer with the given filename and returns the scene object
|
||||
within it at the given path.'''
|
||||
layer = Layer.Find(layerFileName)
|
||||
if (scenePath is None): return layer
|
||||
return layer.GetObjectAtPath(scenePath)
|
||||
|
||||
|
||||
# Test utilities
|
||||
def _PathElemsToPrefixes(absolute, elements):
|
||||
if absolute:
|
||||
string = "/"
|
||||
else:
|
||||
string = ""
|
||||
|
||||
lastElemWasDotDot = False
|
||||
didFirst = False
|
||||
|
||||
for elem in elements:
|
||||
if elem == Path.parentPathElement:
|
||||
# dotdot
|
||||
if didFirst:
|
||||
string = string + "/"
|
||||
else:
|
||||
didFirst = True
|
||||
string = string + elem
|
||||
lastElemWasDotDot = True
|
||||
elif elem[0] == ".":
|
||||
# property
|
||||
if lastElemWasDotDot:
|
||||
string = string + "/"
|
||||
string = string + elem
|
||||
lastElemWasDotDot = False
|
||||
elif elem[0] == "[":
|
||||
# rel attr or sub-attr indices, don't care which
|
||||
string = string + elem
|
||||
lastElemWasDotDot = False
|
||||
else:
|
||||
if didFirst:
|
||||
string = string + "/"
|
||||
else:
|
||||
didFirst = True
|
||||
string = string + elem
|
||||
lastElemWasDotDot = False
|
||||
if not string:
|
||||
return []
|
||||
path = Path(string)
|
||||
return path.GetPrefixes()
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
#
|
||||
# Copyright 2018 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
"""Python bindings for libSdr"""
|
||||
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,611 @@
|
||||
#!/pxrpythonsubst
|
||||
#
|
||||
# Copyright 2018 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
|
||||
"""
|
||||
Common utilities that shader-based parser plugins can use in their tests.
|
||||
|
||||
This is mostly focused on dealing with OSL and Args files. This may need to be
|
||||
expanded/generalized to accommodate other types in the future.
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from pxr import Ndr
|
||||
from pxr import Sdr
|
||||
from pxr.Sdf import ValueTypeNames as SdfTypes
|
||||
from pxr import Tf
|
||||
|
||||
|
||||
def IsNodeOSL(node):
|
||||
"""
|
||||
Determines if the given node has an OSL source type.
|
||||
"""
|
||||
|
||||
return node.GetSourceType() == "OSL"
|
||||
|
||||
# XXX Maybe rename this to GetSdfType (as opposed to the Sdr type)
|
||||
def GetType(property):
|
||||
"""
|
||||
Given a property (SdrShaderProperty), return the SdfValueTypeName type.
|
||||
"""
|
||||
sdfTypeIndicator = property.GetTypeAsSdfType()
|
||||
sdfValueTypeName = sdfTypeIndicator[0]
|
||||
tfType = sdfValueTypeName.type
|
||||
|
||||
return tfType
|
||||
|
||||
def TestBasicProperties(node):
|
||||
"""
|
||||
Test the correctness of the properties on the specified node (only the
|
||||
non-shading-specific aspects).
|
||||
"""
|
||||
|
||||
isOSL = IsNodeOSL(node)
|
||||
|
||||
# Data that varies between OSL/Args
|
||||
# --------------------------------------------------------------------------
|
||||
metadata = {
|
||||
"widget": "number",
|
||||
"label": "inputA label",
|
||||
"page": "inputs1",
|
||||
"help": "inputA help message",
|
||||
"uncategorized": "1"
|
||||
}
|
||||
|
||||
if not isOSL:
|
||||
metadata["name"] = "inputA"
|
||||
metadata["default"] = "0.0"
|
||||
metadata["type"] = "float"
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
|
||||
properties = {
|
||||
"inputA": node.GetInput("inputA"),
|
||||
"inputB": node.GetInput("inputB"),
|
||||
"inputC": node.GetInput("inputC"),
|
||||
"inputD": node.GetInput("inputD"),
|
||||
"inputF2": node.GetInput("inputF2"),
|
||||
"inputStrArray": node.GetInput("inputStrArray"),
|
||||
"resultF": node.GetOutput("resultF"),
|
||||
"resultI": node.GetOutput("resultI"),
|
||||
}
|
||||
|
||||
assert properties["inputA"].GetName() == "inputA"
|
||||
assert properties["inputA"].GetType() == "float"
|
||||
assert properties["inputA"].GetDefaultValue() == 0.0
|
||||
assert not properties["inputA"].IsOutput()
|
||||
assert not properties["inputA"].IsArray()
|
||||
assert not properties["inputA"].IsDynamicArray()
|
||||
assert properties["inputA"].GetArraySize() == 0
|
||||
assert properties["inputA"].GetInfoString() == "inputA (type: 'float'); input"
|
||||
assert properties["inputA"].IsConnectable()
|
||||
assert properties["inputA"].CanConnectTo(properties["resultF"])
|
||||
assert not properties["inputA"].CanConnectTo(properties["resultI"])
|
||||
assert properties["inputA"].GetMetadata() == metadata
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Check some array variations
|
||||
# --------------------------------------------------------------------------
|
||||
assert properties["inputD"].IsDynamicArray()
|
||||
assert properties["inputD"].GetArraySize() == 1 if isOSL else -1
|
||||
assert properties["inputD"].IsArray()
|
||||
assert list(properties["inputD"].GetDefaultValue()) == [1]
|
||||
|
||||
assert not properties["inputF2"].IsDynamicArray()
|
||||
assert properties["inputF2"].GetArraySize() == 2
|
||||
assert properties["inputF2"].IsArray()
|
||||
assert not properties["inputF2"].IsConnectable()
|
||||
assert list(properties["inputF2"].GetDefaultValue()) == [1.0, 2.0]
|
||||
|
||||
assert properties["inputStrArray"].GetArraySize() == 4
|
||||
assert list(properties["inputStrArray"].GetDefaultValue()) == \
|
||||
["test", "string", "array", "values"]
|
||||
|
||||
|
||||
def TestShadingProperties(node):
|
||||
"""
|
||||
Test the correctness of the properties on the specified node (only the
|
||||
shading-specific aspects).
|
||||
"""
|
||||
|
||||
isOSL = IsNodeOSL(node)
|
||||
|
||||
properties = {
|
||||
"inputA": node.GetShaderInput("inputA"),
|
||||
"inputB": node.GetShaderInput("inputB"),
|
||||
"inputC": node.GetShaderInput("inputC"),
|
||||
"inputD": node.GetShaderInput("inputD"),
|
||||
"inputF2": node.GetShaderInput("inputF2"),
|
||||
"inputF3": node.GetShaderInput("inputF3"),
|
||||
"inputF4": node.GetShaderInput("inputF4"),
|
||||
"inputF5": node.GetShaderInput("inputF5"),
|
||||
"inputInterp": node.GetShaderInput("inputInterp"),
|
||||
"inputOptions": node.GetShaderInput("inputOptions"),
|
||||
"inputPoint": node.GetShaderInput("inputPoint"),
|
||||
"inputNormal": node.GetShaderInput("inputNormal"),
|
||||
"inputStruct": node.GetShaderInput("inputStruct"),
|
||||
"inputAssetIdentifier": node.GetShaderInput("inputAssetIdentifier"),
|
||||
"resultF": node.GetShaderOutput("resultF"),
|
||||
"resultF2": node.GetShaderOutput("resultF2"),
|
||||
"resultF3": node.GetShaderOutput("resultF3"),
|
||||
"resultI": node.GetShaderOutput("resultI"),
|
||||
"vstruct1": node.GetShaderOutput("vstruct1"),
|
||||
"vstruct1_bump": node.GetShaderOutput("vstruct1_bump"),
|
||||
"outputPoint": node.GetShaderOutput("outputPoint"),
|
||||
"outputNormal": node.GetShaderOutput("outputNormal"),
|
||||
"outputColor": node.GetShaderOutput("outputColor"),
|
||||
"outputVector": node.GetShaderOutput("outputVector"),
|
||||
}
|
||||
|
||||
assert properties["inputA"].GetLabel() == "inputA label"
|
||||
assert properties["inputA"].GetHelp() == "inputA help message"
|
||||
assert properties["inputA"].GetPage() == "inputs1"
|
||||
assert properties["inputA"].GetWidget() == "number"
|
||||
assert properties["inputA"].GetHints() == {
|
||||
"uncategorized": "1"
|
||||
}
|
||||
assert properties["inputA"].GetOptions() == []
|
||||
assert properties["inputA"].GetVStructMemberOf() == ""
|
||||
assert properties["inputA"].GetVStructMemberName() == ""
|
||||
assert not properties["inputA"].IsVStructMember()
|
||||
assert not properties["inputA"].IsVStruct()
|
||||
assert properties["inputA"].IsConnectable()
|
||||
assert properties["inputA"].GetValidConnectionTypes() == []
|
||||
assert properties["inputA"].CanConnectTo(properties["resultF"])
|
||||
assert not properties["inputA"].CanConnectTo(properties["resultI"])
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Check correct options parsing
|
||||
# --------------------------------------------------------------------------
|
||||
assert set(properties["inputOptions"].GetOptions()) == {
|
||||
("opt1", "opt1val"),
|
||||
("opt2", "opt2val")
|
||||
}
|
||||
|
||||
assert set(properties["inputInterp"].GetOptions()) == {
|
||||
("linear", ""),
|
||||
("catmull-rom", ""),
|
||||
("bspline", ""),
|
||||
("constant", ""),
|
||||
}
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Check cross-type connection allowances
|
||||
# --------------------------------------------------------------------------
|
||||
assert properties["inputPoint"].CanConnectTo(properties["outputNormal"])
|
||||
assert properties["inputNormal"].CanConnectTo(properties["outputPoint"])
|
||||
assert properties["inputNormal"].CanConnectTo(properties["outputColor"])
|
||||
assert properties["inputNormal"].CanConnectTo(properties["outputVector"])
|
||||
assert properties["inputNormal"].CanConnectTo(properties["resultF3"])
|
||||
assert properties["inputF2"].CanConnectTo(properties["resultF2"])
|
||||
assert properties["inputD"].CanConnectTo(properties["resultI"])
|
||||
assert not properties["inputNormal"].CanConnectTo(properties["resultF2"])
|
||||
assert not properties["inputF4"].CanConnectTo(properties["resultF2"])
|
||||
assert not properties["inputF2"].CanConnectTo(properties["resultF3"])
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Check clean and unclean mappings to Sdf types
|
||||
# --------------------------------------------------------------------------
|
||||
assert properties["inputB"].GetTypeAsSdfType() == (SdfTypes.Int, "")
|
||||
assert properties["inputF2"].GetTypeAsSdfType() == (SdfTypes.Float2, "")
|
||||
assert properties["inputF3"].GetTypeAsSdfType() == (SdfTypes.Float3, "")
|
||||
assert properties["inputF4"].GetTypeAsSdfType() == (SdfTypes.Float4, "")
|
||||
assert properties["inputF5"].GetTypeAsSdfType() == (SdfTypes.FloatArray, "")
|
||||
assert properties["inputStruct"].GetTypeAsSdfType() == \
|
||||
(SdfTypes.Token, Sdr.PropertyTypes.Struct)
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Ensure asset identifiers are detected correctly
|
||||
# --------------------------------------------------------------------------
|
||||
assert properties["inputAssetIdentifier"].IsAssetIdentifier()
|
||||
assert not properties["inputOptions"].IsAssetIdentifier()
|
||||
assert properties["inputAssetIdentifier"].GetTypeAsSdfType() == \
|
||||
(SdfTypes.Asset, "")
|
||||
|
||||
# Nested pages and VStructs are only possible in args files
|
||||
if not isOSL:
|
||||
# ----------------------------------------------------------------------
|
||||
# Check nested page correctness
|
||||
# ----------------------------------------------------------------------
|
||||
assert properties["vstruct1"].GetPage() == "VStructs.Nested"
|
||||
assert properties["vstruct1_bump"].GetPage() == "VStructs.Nested.More"
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Check VStruct correctness
|
||||
# ----------------------------------------------------------------------
|
||||
assert properties["vstruct1"].IsVStruct()
|
||||
assert properties["vstruct1"].GetVStructMemberOf() == ""
|
||||
assert properties["vstruct1"].GetVStructMemberName() == ""
|
||||
assert not properties["vstruct1"].IsVStructMember()
|
||||
|
||||
assert not properties["vstruct1_bump"].IsVStruct()
|
||||
assert properties["vstruct1_bump"].GetVStructMemberOf() == "vstruct1"
|
||||
assert properties["vstruct1_bump"].GetVStructMemberName() == "bump"
|
||||
assert properties["vstruct1_bump"].IsVStructMember()
|
||||
|
||||
|
||||
def TestBasicNode(node, nodeSourceType, nodeDefinitionURI, nodeImplementationURI):
|
||||
"""
|
||||
Test basic, non-shader-specific correctness on the specified node.
|
||||
"""
|
||||
|
||||
# Implementation notes:
|
||||
# ---
|
||||
# The source type needs to be passed manually in order to ensure the utils
|
||||
# do not have a dependency on the plugin (where the source type resides).
|
||||
# The URIs are manually specified because the utils cannot know ahead of
|
||||
# time where the node originated.
|
||||
|
||||
isOSL = IsNodeOSL(node)
|
||||
nodeContext = "OSL" if isOSL else "pattern"
|
||||
|
||||
# Data that varies between OSL/Args
|
||||
# --------------------------------------------------------------------------
|
||||
nodeName = "TestNodeOSL" if isOSL else "TestNodeARGS"
|
||||
numOutputs = 8 if isOSL else 10
|
||||
outputNames = {
|
||||
"resultF", "resultF2", "resultF3", "resultI", "outputPoint",
|
||||
"outputNormal", "outputColor", "outputVector"
|
||||
}
|
||||
metadata = {
|
||||
"category": "testing",
|
||||
"departments": "testDept",
|
||||
"help": "This is the test node",
|
||||
"label": "TestNodeLabel",
|
||||
"primvars": "primvar1|primvar2|primvar3|$primvarNamingProperty|"
|
||||
"$invalidPrimvarNamingProperty",
|
||||
"uncategorizedMetadata": "uncategorized"
|
||||
}
|
||||
|
||||
if not isOSL:
|
||||
metadata.pop("category")
|
||||
metadata.pop("label")
|
||||
metadata.pop("uncategorizedMetadata")
|
||||
|
||||
outputNames.add("vstruct1")
|
||||
outputNames.add("vstruct1_bump")
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
nodeInputs = {propertyName: node.GetShaderInput(propertyName)
|
||||
for propertyName in node.GetInputNames()}
|
||||
|
||||
nodeOutputs = {propertyName: node.GetShaderOutput(propertyName)
|
||||
for propertyName in node.GetOutputNames()}
|
||||
|
||||
assert node.GetName() == nodeName
|
||||
assert node.GetContext() == nodeContext
|
||||
assert node.GetSourceType() == nodeSourceType
|
||||
assert node.GetFamily() == ""
|
||||
assert node.GetResolvedDefinitionURI() == nodeDefinitionURI
|
||||
assert node.GetResolvedImplementationURI() == nodeImplementationURI
|
||||
assert node.IsValid()
|
||||
assert len(nodeInputs) == 17
|
||||
assert len(nodeOutputs) == numOutputs
|
||||
assert nodeInputs["inputA"] is not None
|
||||
assert nodeInputs["inputB"] is not None
|
||||
assert nodeInputs["inputC"] is not None
|
||||
assert nodeInputs["inputD"] is not None
|
||||
assert nodeInputs["inputF2"] is not None
|
||||
assert nodeInputs["inputF3"] is not None
|
||||
assert nodeInputs["inputF4"] is not None
|
||||
assert nodeInputs["inputF5"] is not None
|
||||
assert nodeInputs["inputInterp"] is not None
|
||||
assert nodeInputs["inputOptions"] is not None
|
||||
assert nodeInputs["inputPoint"] is not None
|
||||
assert nodeInputs["inputNormal"] is not None
|
||||
assert nodeOutputs["resultF2"] is not None
|
||||
assert nodeOutputs["resultI"] is not None
|
||||
assert nodeOutputs["outputPoint"] is not None
|
||||
assert nodeOutputs["outputNormal"] is not None
|
||||
assert nodeOutputs["outputColor"] is not None
|
||||
assert nodeOutputs["outputVector"] is not None
|
||||
print(set(node.GetInputNames()))
|
||||
assert set(node.GetInputNames()) == {
|
||||
"inputA", "inputB", "inputC", "inputD", "inputF2", "inputF3", "inputF4",
|
||||
"inputF5", "inputInterp", "inputOptions", "inputPoint", "inputNormal",
|
||||
"inputStruct", "inputAssetIdentifier", "primvarNamingProperty",
|
||||
"invalidPrimvarNamingProperty", "inputStrArray"
|
||||
}
|
||||
assert set(node.GetOutputNames()) == outputNames
|
||||
|
||||
# There may be additional metadata passed in via the NdrNodeDiscoveryResult.
|
||||
# So, ensure that the bits we expect to see are there instead of doing
|
||||
# an equality check.
|
||||
nodeMetadata = node.GetMetadata()
|
||||
for i,j in metadata.items():
|
||||
assert i in nodeMetadata
|
||||
assert nodeMetadata[i] == metadata[i]
|
||||
|
||||
# Test basic property correctness
|
||||
TestBasicProperties(node)
|
||||
|
||||
|
||||
def TestShaderSpecificNode(node):
|
||||
"""
|
||||
Test shader-specific correctness on the specified node.
|
||||
"""
|
||||
|
||||
isOSL = IsNodeOSL(node)
|
||||
|
||||
# Data that varies between OSL/Args
|
||||
# --------------------------------------------------------------------------
|
||||
numOutputs = 8 if isOSL else 10
|
||||
label = "TestNodeLabel" if isOSL else ""
|
||||
category = "testing" if isOSL else ""
|
||||
vstructNames = [] if isOSL else ["vstruct1"]
|
||||
pages = {"", "inputs1", "inputs2", "results"} if isOSL else \
|
||||
{"", "inputs1", "inputs2", "results", "VStructs.Nested",
|
||||
"VStructs.Nested.More"}
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
|
||||
shaderInputs = {propertyName: node.GetShaderInput(propertyName)
|
||||
for propertyName in node.GetInputNames()}
|
||||
|
||||
shaderOutputs = {propertyName: node.GetShaderOutput(propertyName)
|
||||
for propertyName in node.GetOutputNames()}
|
||||
|
||||
assert len(shaderInputs) == 17
|
||||
assert len(shaderOutputs) == numOutputs
|
||||
assert shaderInputs["inputA"] is not None
|
||||
assert shaderInputs["inputB"] is not None
|
||||
assert shaderInputs["inputC"] is not None
|
||||
assert shaderInputs["inputD"] is not None
|
||||
assert shaderInputs["inputF2"] is not None
|
||||
assert shaderInputs["inputF3"] is not None
|
||||
assert shaderInputs["inputF4"] is not None
|
||||
assert shaderInputs["inputF5"] is not None
|
||||
assert shaderInputs["inputInterp"] is not None
|
||||
assert shaderInputs["inputOptions"] is not None
|
||||
assert shaderInputs["inputPoint"] is not None
|
||||
assert shaderInputs["inputNormal"] is not None
|
||||
assert shaderOutputs["resultF"] is not None
|
||||
assert shaderOutputs["resultF2"] is not None
|
||||
assert shaderOutputs["resultF3"] is not None
|
||||
assert shaderOutputs["resultI"] is not None
|
||||
assert shaderOutputs["outputPoint"] is not None
|
||||
assert shaderOutputs["outputNormal"] is not None
|
||||
assert shaderOutputs["outputColor"] is not None
|
||||
assert shaderOutputs["outputVector"] is not None
|
||||
assert node.GetLabel() == label
|
||||
assert node.GetCategory() == category
|
||||
assert node.GetHelp() == "This is the test node"
|
||||
assert node.GetDepartments() == ["testDept"]
|
||||
assert set(node.GetPages()) == pages
|
||||
assert set(node.GetPrimvars()) == {"primvar1", "primvar2", "primvar3"}
|
||||
assert set(node.GetAdditionalPrimvarProperties()) == {"primvarNamingProperty"}
|
||||
assert set(node.GetPropertyNamesForPage("results")) == {
|
||||
"resultF", "resultF2", "resultF3", "resultI"
|
||||
}
|
||||
assert set(node.GetPropertyNamesForPage("")) == {
|
||||
"outputPoint", "outputNormal", "outputColor", "outputVector"
|
||||
}
|
||||
assert set(node.GetPropertyNamesForPage("inputs1")) == {"inputA"}
|
||||
assert set(node.GetPropertyNamesForPage("inputs2")) == {
|
||||
"inputB", "inputC", "inputD", "inputF2", "inputF3", "inputF4", "inputF5",
|
||||
"inputInterp", "inputOptions", "inputPoint", "inputNormal",
|
||||
"inputStruct", "inputAssetIdentifier", "primvarNamingProperty",
|
||||
"invalidPrimvarNamingProperty", "inputStrArray"
|
||||
}
|
||||
assert node.GetAllVstructNames() == vstructNames
|
||||
|
||||
# Test shading-specific property correctness
|
||||
TestShadingProperties(node)
|
||||
|
||||
|
||||
def TestShaderPropertiesNode(node):
|
||||
"""
|
||||
Tests property correctness on the specified shader node, which must be
|
||||
one of the following pre-defined nodes:
|
||||
* 'TestShaderPropertiesNodeOSL'
|
||||
* 'TestShaderPropertiesNodeARGS'
|
||||
* 'TestShaderPropertiesNodeUSD'
|
||||
These pre-defined nodes have a property of every type that Sdr supports.
|
||||
|
||||
Property correctness is defined as:
|
||||
* The shader property has the expected SdrPropertyType
|
||||
* The shader property has the expected SdfValueTypeName
|
||||
* If the shader property has a default value, the default value's type
|
||||
matches the shader property's type
|
||||
"""
|
||||
# This test should only be run on the following allowed node names
|
||||
# --------------------------------------------------------------------------
|
||||
allowedNodeNames = ["TestShaderPropertiesNodeOSL",
|
||||
"TestShaderPropertiesNodeARGS",
|
||||
"TestShaderPropertiesNodeUSD"]
|
||||
|
||||
# If this assertion on the name fails, then this test was called with the
|
||||
# wrong node.
|
||||
assert node.GetName() in allowedNodeNames
|
||||
|
||||
# If we have the correct node name, double check that the source type is
|
||||
# also correct
|
||||
if node.GetName() == "TestShaderPropertiesNodeOSL":
|
||||
assert node.GetSourceType() == "OSL"
|
||||
elif node.GetName() == "TestShaderPropertiesNodeARGS":
|
||||
assert node.GetSourceType() == "RmanCpp"
|
||||
elif node.GetName() == "TestShaderPropertiesNodeUSD":
|
||||
assert node.GetSourceType() == "glslfx"
|
||||
|
||||
nodeInputs = {propertyName: node.GetShaderInput(propertyName)
|
||||
for propertyName in node.GetInputNames()}
|
||||
|
||||
nodeOutputs = {propertyName: node.GetShaderOutput(propertyName)
|
||||
for propertyName in node.GetOutputNames()}
|
||||
|
||||
# For each property, we test that:
|
||||
# * The property has the expected SdrPropertyType
|
||||
# * The property has the expected TfType (from SdfValueTypeName)
|
||||
# * The property's type and default value's type match
|
||||
|
||||
property = nodeInputs["inputInt"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Int
|
||||
assert GetType(property) == Tf.Type.FindByName("int")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputString"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.String
|
||||
assert GetType(property) == Tf.Type.FindByName("string")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputFloat"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Float
|
||||
assert GetType(property) == Tf.Type.FindByName("float")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputColor"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Color
|
||||
assert GetType(property) == Tf.Type.FindByName("GfVec3f")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputPoint"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Point
|
||||
assert GetType(property) == Tf.Type.FindByName("GfVec3f")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputNormal"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Normal
|
||||
assert GetType(property) == Tf.Type.FindByName("GfVec3f")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputVector"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Vector
|
||||
assert GetType(property) == Tf.Type.FindByName("GfVec3f")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputMatrix"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Matrix
|
||||
assert GetType(property) == Tf.Type.FindByName("GfMatrix4d")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
if node.GetName() != "TestShaderPropertiesNodeUSD":
|
||||
# XXX Note that 'struct' and 'vstruct' types are currently unsupported
|
||||
# by the UsdShadeShaderDefParserPlugin, which parses shaders defined in
|
||||
# usd files. Please see UsdShadeShaderDefParserPlugin implementation for
|
||||
# details.
|
||||
property = nodeInputs["inputStruct"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Struct
|
||||
assert GetType(property) == Tf.Type.FindByName("TfToken")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputVstruct"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Vstruct
|
||||
assert GetType(property) == Tf.Type.FindByName("TfToken")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputIntArray"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Int
|
||||
assert GetType(property) == Tf.Type.FindByName("VtArray<int>")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputStringArray"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.String
|
||||
assert GetType(property) == Tf.Type.FindByName("VtArray<string>")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputFloatArray"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Float
|
||||
assert GetType(property) == Tf.Type.FindByName("VtArray<float>")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputColorArray"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Color
|
||||
assert GetType(property) == Tf.Type.FindByName("VtArray<GfVec3f>")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputPointArray"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Point
|
||||
assert GetType(property) == Tf.Type.FindByName("VtArray<GfVec3f>")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputNormalArray"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Normal
|
||||
assert GetType(property) == Tf.Type.FindByName("VtArray<GfVec3f>")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputVectorArray"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Vector
|
||||
assert GetType(property) == Tf.Type.FindByName("VtArray<GfVec3f>")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputMatrixArray"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Matrix
|
||||
assert GetType(property) == Tf.Type.FindByName("VtArray<GfMatrix4d>")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputFloat2"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Float
|
||||
assert GetType(property) == Tf.Type.FindByName("GfVec2f")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputFloat3"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Float
|
||||
assert GetType(property) == Tf.Type.FindByName("GfVec3f")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputFloat4"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Float
|
||||
assert GetType(property) == Tf.Type.FindByName("GfVec4f")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputAsset"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.String
|
||||
assert GetType(property) == Tf.Type.FindByName("SdfAssetPath")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputAssetArray"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.String
|
||||
assert GetType(property) == Tf.Type.FindByName("VtArray<SdfAssetPath>")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputColorRoleNone"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Float
|
||||
assert GetType(property) == Tf.Type.FindByName("GfVec3f")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputPointRoleNone"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Float
|
||||
assert GetType(property) == Tf.Type.FindByName("GfVec3f")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputNormalRoleNone"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Float
|
||||
assert GetType(property) == Tf.Type.FindByName("GfVec3f")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeInputs["inputVectorRoleNone"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Float
|
||||
assert GetType(property) == Tf.Type.FindByName("GfVec3f")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
property = nodeOutputs["outputSurface"]
|
||||
assert property.GetType() == Sdr.PropertyTypes.Terminal
|
||||
assert GetType(property) == Tf.Type.FindByName("TfToken")
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
# Specific test of implementationName feature, we can skip type-tests
|
||||
property = nodeInputs["normal"]
|
||||
assert property.GetImplementationName() == "aliasedNormalInput"
|
||||
assert Ndr._ValidateProperty(node, property)
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
#
|
||||
# Copyright 2019 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
# This file makes this module importable from python, which avoids a warning
|
||||
# when initializing the SdrRegistry.
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,246 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
"""
|
||||
Tf -- Tools Foundation
|
||||
"""
|
||||
|
||||
# Type to help handle DLL import paths on Windows with python interpreters v3.8
|
||||
# and newer. These interpreters don't search for DLLs in the path anymore, you
|
||||
# have to provide a path explicitly. This re-enables path searching for USD
|
||||
# dependency libraries
|
||||
import platform, sys
|
||||
if sys.version_info >= (3, 8) and platform.system() == "Windows":
|
||||
import contextlib
|
||||
|
||||
@contextlib.contextmanager
|
||||
def WindowsImportWrapper():
|
||||
import os
|
||||
dirs = []
|
||||
import_paths = os.getenv('PXR_USD_WINDOWS_DLL_PATH')
|
||||
if import_paths is None:
|
||||
import_paths = os.getenv('PATH', '')
|
||||
for path in import_paths.split(os.pathsep):
|
||||
# Calling add_dll_directory raises an exception if paths don't
|
||||
# exist, or if you pass in dot
|
||||
if os.path.exists(path) and path != '.':
|
||||
dirs.append(os.add_dll_directory(path))
|
||||
# This block guarantees we clear the dll directories if an exception
|
||||
# is raised in the with block.
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
for dll_dir in dirs:
|
||||
dll_dir.close()
|
||||
del os
|
||||
del contextlib
|
||||
else:
|
||||
class WindowsImportWrapper(object):
|
||||
def __enter__(self):
|
||||
pass
|
||||
def __exit__(self, exc_type, ex_val, exc_tb):
|
||||
pass
|
||||
del platform, sys
|
||||
|
||||
|
||||
def PreparePythonModule(moduleName=None):
|
||||
"""Prepare an extension module at import time. This will import the
|
||||
Python module associated with the caller's module (e.g. '_tf' for 'pxr.Tf')
|
||||
or the module with the specified moduleName and copy its contents into
|
||||
the caller's local namespace.
|
||||
|
||||
Generally, this should only be called by the __init__.py script for a module
|
||||
upon loading a boost python module (generally '_libName.so')."""
|
||||
import importlib
|
||||
import inspect
|
||||
frame = inspect.currentframe().f_back
|
||||
try:
|
||||
f_locals = frame.f_locals
|
||||
|
||||
# If an explicit moduleName is not supplied, construct it from the
|
||||
# caller's module name, like "pxr.Tf", and our naming conventions,
|
||||
# which results in "_tf".
|
||||
if moduleName is None:
|
||||
moduleName = f_locals["__name__"].split(".")[-1]
|
||||
moduleName = "_" + moduleName[0].lower() + moduleName[1:]
|
||||
|
||||
with WindowsImportWrapper():
|
||||
module = importlib.import_module(
|
||||
"." + moduleName, f_locals["__name__"])
|
||||
|
||||
PrepareModule(module, f_locals)
|
||||
try:
|
||||
del f_locals[moduleName]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
try:
|
||||
module = importlib.import_module(".__DOC", f_locals["__name__"])
|
||||
module.Execute(f_locals)
|
||||
try:
|
||||
del f_locals["__DOC"]
|
||||
except KeyError:
|
||||
pass
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
finally:
|
||||
del frame
|
||||
|
||||
def PrepareModule(module, result):
|
||||
"""PrepareModule(module, result) -- Prepare an extension module at import
|
||||
time. Generally, this should only be called by the __init__.py script for a
|
||||
module upon loading a boost python module (generally '_libName.so')."""
|
||||
# inject into result.
|
||||
ignore = frozenset(['__name__', '__package__', '__builtins__',
|
||||
'__doc__', '__file__', '__path__'])
|
||||
newModuleName = result.get('__name__')
|
||||
|
||||
for key, value in module.__dict__.items():
|
||||
if not key in ignore:
|
||||
result[key] = value
|
||||
|
||||
# Lie about the module from which value came.
|
||||
if newModuleName and hasattr(value, '__module__'):
|
||||
try:
|
||||
setattr(value, '__module__', newModuleName)
|
||||
except AttributeError as e:
|
||||
# The __module__ attribute of Boost.Python.function
|
||||
# objects is not writable, so we get this exception
|
||||
# a lot. Just ignore it. We're really only concerned
|
||||
# about the data objects like enum values and such.
|
||||
#
|
||||
pass
|
||||
|
||||
def GetCodeLocation(framesUp):
|
||||
"""Returns a tuple (moduleName, functionName, fileName, lineNo).
|
||||
|
||||
To trace the current location of python execution, use GetCodeLocation().
|
||||
By default, the information is returned at the current stack-frame; thus
|
||||
|
||||
info = GetCodeLocation()
|
||||
|
||||
will return information about the line that GetCodeLocation() was called
|
||||
from. One can write:
|
||||
|
||||
def genericDebugFacility():
|
||||
info = GetCodeLocation(1)
|
||||
# print out data
|
||||
|
||||
|
||||
def someCode():
|
||||
...
|
||||
if bad:
|
||||
genericDebugFacility()
|
||||
|
||||
and genericDebugFacility() will get information associated with its caller,
|
||||
i.e. the function someCode()."""
|
||||
import sys
|
||||
f_back = sys._getframe(framesUp).f_back
|
||||
return (f_back.f_globals['__name__'], f_back.f_code.co_name,
|
||||
f_back.f_code.co_filename, f_back.f_lineno)
|
||||
|
||||
PreparePythonModule()
|
||||
|
||||
# Need to provide an exception type that tf errors will show up as.
|
||||
class ErrorException(RuntimeError):
|
||||
def __init__(self, *args):
|
||||
RuntimeError.__init__(self, *args)
|
||||
self.__TfException = True
|
||||
|
||||
def __str__(self):
|
||||
return '\n\t' + '\n\t'.join([str(e) for e in self.args])
|
||||
__SetErrorExceptionClass(ErrorException)
|
||||
|
||||
def Warn(msg, template=""):
|
||||
"""Issue a warning via the TfDiagnostic system.
|
||||
|
||||
At this time, template is ignored.
|
||||
"""
|
||||
codeInfo = GetCodeLocation(framesUp=1)
|
||||
_Warn(msg, codeInfo[0], codeInfo[1], codeInfo[2], codeInfo[3])
|
||||
|
||||
def Status(msg, verbose=True):
|
||||
"""Issues a status update to the Tf diagnostic system.
|
||||
|
||||
If verbose is True (the default) then information about where in the code
|
||||
the status update was issued from is included.
|
||||
"""
|
||||
if verbose:
|
||||
codeInfo = GetCodeLocation(framesUp=1)
|
||||
_Status(msg, codeInfo[0], codeInfo[1], codeInfo[2], codeInfo[3])
|
||||
else:
|
||||
_Status(msg, "", "", "", 0)
|
||||
|
||||
def RaiseCodingError(msg):
|
||||
"""Raise a coding error to the Tf Diagnostic system."""
|
||||
codeInfo = GetCodeLocation(framesUp=1)
|
||||
_RaiseCodingError(msg, codeInfo[0], codeInfo[1], codeInfo[2], codeInfo[3])
|
||||
|
||||
def RaiseRuntimeError(msg):
|
||||
"""Raise a runtime error to the Tf Diagnostic system."""
|
||||
codeInfo = GetCodeLocation(framesUp=1)
|
||||
_RaiseRuntimeError(msg, codeInfo[0], codeInfo[1], codeInfo[2], codeInfo[3])
|
||||
|
||||
def Fatal(msg):
|
||||
"""Raise a fatal error to the Tf Diagnostic system."""
|
||||
codeInfo = GetCodeLocation(framesUp=1)
|
||||
_Fatal(msg, codeInfo[0], codeInfo[1], codeInfo[2], codeInfo[3])
|
||||
|
||||
|
||||
class NamedTemporaryFile(object):
|
||||
"""A named temporary file which keeps the internal file handle closed.
|
||||
A class which constructs a temporary file(that isn't open) on __enter__,
|
||||
provides its name as an attribute, and deletes it on __exit__.
|
||||
|
||||
Note: The constructor args for this object match those of
|
||||
python's tempfile.mkstemp() function, and will have the same effect on
|
||||
the underlying file created."""
|
||||
|
||||
def __init__(self, suffix='', prefix='', dir=None, text=False):
|
||||
# Note that we defer creation until the enter block to
|
||||
# prevent users from unintentionally creating a bunch of
|
||||
# temp files that don't get cleaned up.
|
||||
self._args = (suffix, prefix, dir, text)
|
||||
|
||||
def __enter__(self):
|
||||
from tempfile import mkstemp
|
||||
from os import close
|
||||
|
||||
fd, path = mkstemp(*self._args)
|
||||
close(fd)
|
||||
|
||||
# XXX: We currently only expose the name attribute
|
||||
# more can be added based on client needs in the future.
|
||||
self._name = path
|
||||
|
||||
return self
|
||||
|
||||
def __exit__(self, *args):
|
||||
import os
|
||||
os.remove(self.name)
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""The path for the temporary file created."""
|
||||
return self._name
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,59 @@
|
||||
#
|
||||
# Copyright 2021 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
from pxr import Tf
|
||||
|
||||
def _NoArgs():
|
||||
return "_NoArgs result"
|
||||
|
||||
def _ReturnInt():
|
||||
return 42
|
||||
|
||||
def _RepeatStrings(stringList, numRepeats):
|
||||
return [s * numRepeats for s in stringList]
|
||||
|
||||
def _ConcatWithList(arg1, arg2, *args):
|
||||
return str.join(
|
||||
" ",
|
||||
[str(a) for a in
|
||||
[arg1, arg2]
|
||||
+ list(args)])
|
||||
|
||||
def _ConcatWithKwArgs(arg1, arg2, arg3 = "c", arg4 = "d", **kwargs):
|
||||
return str.join(
|
||||
" ",
|
||||
[str(a) for a in
|
||||
[arg1, arg2, arg3, arg4]
|
||||
+ ["%s=%s" % (k, kwargs[k]) for k in sorted(kwargs.keys())]])
|
||||
|
||||
def _GetTheeToANonery(arg):
|
||||
assert arg is None
|
||||
|
||||
_globalVar = 88
|
||||
|
||||
def _RaiseException():
|
||||
raise Exception("test exception")
|
||||
|
||||
def _RaiseTfError():
|
||||
Tf.RaiseRuntimeError("test error")
|
||||
Binary file not shown.
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
from pxr import Tf
|
||||
|
||||
raise RuntimeError('This module should not get loaded!')
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
from pxr import Tf
|
||||
|
||||
Tf.ScriptModuleLoader()._LoadModulesForLibrary('DepLoadsAll')
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,30 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
from pxr import Tf
|
||||
|
||||
Tf.ScriptModuleLoader()._LoadModulesForLibrary('LoadsAll')
|
||||
|
||||
# Request to load everything. This will be deferred by the TfScriptModuleLoader
|
||||
# until after the current dependency load is complete.
|
||||
Tf.ScriptModuleLoader()._LoadModulesForLibrary('')
|
||||
Binary file not shown.
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
from pxr import Tf
|
||||
|
||||
Tf.ScriptModuleLoader()._LoadModulesForLibrary('LoadsUnknown')
|
||||
|
||||
from . import testTfScriptModuleLoader_Unknown
|
||||
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
from pxr import Tf
|
||||
|
||||
Tf.ScriptModuleLoader()._LoadModulesForLibrary('Other')
|
||||
Binary file not shown.
@@ -0,0 +1,25 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
pass
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
from pxr import Tf
|
||||
|
||||
# Register this library with a new, previously unknown dependency. Note, we're
|
||||
# just using 'sys' as the module to load here, which is a lie. It should really
|
||||
# be this module, but it doesn't matter, and it's not trivial to come up with a
|
||||
# robust, correct module name for this module.
|
||||
Tf.ScriptModuleLoader()._RegisterLibrary('Unknown', 'sys',
|
||||
['NewDynamicDependency'])
|
||||
|
||||
# Register the dependency. In this case we use 'sys' just because it saves us
|
||||
# from creating a real module called NewDynamicDependency.
|
||||
Tf.ScriptModuleLoader()._RegisterLibrary('NewDynamicDependency', 'sys', [])
|
||||
|
||||
# Load dependencies for this module, which includes the
|
||||
# NewDynamicDependency. This is a reentrant load that will be handled
|
||||
# immediately by TfScriptModuleLoader.
|
||||
Tf.ScriptModuleLoader()._LoadModulesForLibrary('Unknown')
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,89 @@
|
||||
#
|
||||
# Copyright 2018 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
"""
|
||||
Trace -- Utilities for counting and recording events.
|
||||
"""
|
||||
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
|
||||
import contextlib
|
||||
|
||||
@contextlib.contextmanager
|
||||
def TraceScope(label):
|
||||
"""A context manager that calls BeginEvent on the global collector on enter
|
||||
and EndEvent on exit."""
|
||||
try:
|
||||
collector = Collector()
|
||||
eventId = collector.BeginEvent(label)
|
||||
yield
|
||||
finally:
|
||||
collector.EndEvent(label)
|
||||
|
||||
del contextlib
|
||||
|
||||
def TraceFunction(obj):
|
||||
"""A decorator that enables tracing the function that it decorates.
|
||||
If you decorate with 'TraceFunction' the function will be traced in the
|
||||
global collector."""
|
||||
|
||||
collector = Collector()
|
||||
|
||||
def decorate(func):
|
||||
import inspect
|
||||
|
||||
if inspect.ismethod(func):
|
||||
callableTypeLabel = 'method'
|
||||
classLabel = func.__self__.__class__.__name__+'.'
|
||||
else:
|
||||
callableTypeLabel = 'func'
|
||||
classLabel = ''
|
||||
|
||||
module = inspect.getmodule(func)
|
||||
if module is not None:
|
||||
moduleLabel = module.__name__+'.'
|
||||
else:
|
||||
moduleLabel = ''
|
||||
|
||||
label = 'Python {0}: {1}{2}{3}'.format(
|
||||
callableTypeLabel,
|
||||
moduleLabel,
|
||||
classLabel,
|
||||
func.__name__)
|
||||
def invoke(*args, **kwargs):
|
||||
with TraceScope(label):
|
||||
return func(*args, **kwargs)
|
||||
|
||||
invoke.__name__ = func.__name__
|
||||
# Make sure wrapper function gets attributes of wrapped function.
|
||||
import functools
|
||||
return functools.update_wrapper(invoke, func)
|
||||
|
||||
return decorate(obj)
|
||||
|
||||
def TraceMethod(obj):
|
||||
"""A convenience. Same as TraceFunction but changes the recorded
|
||||
label to use the term 'method' rather than 'function'."""
|
||||
return TraceFunction(obj)
|
||||
Binary file not shown.
@@ -0,0 +1,78 @@
|
||||
#
|
||||
# Copyright 2018 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
# Execute a script with tracing enabled.
|
||||
|
||||
# Usage: python -m pxr.Trace [-o OUTPUT] [-c "command" | FILE]
|
||||
|
||||
from __future__ import print_function
|
||||
import argparse, sys
|
||||
|
||||
parser = argparse.ArgumentParser(description='Trace script execution.')
|
||||
parser.add_argument('-o', dest='output', metavar='OUTPUT',
|
||||
type=str, default=None,
|
||||
help='trace output; defaults to stdout')
|
||||
parser.add_argument('-c', dest='cmd',
|
||||
type=str,
|
||||
help='trace <cmd> as a Python script')
|
||||
parser.add_argument('file', metavar="FILE",
|
||||
nargs='?',
|
||||
default=None,
|
||||
help='script to trace')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if not args.cmd and not args.file:
|
||||
print("Must specify a command or script to trace", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if args.cmd and args.file:
|
||||
print("Only one of -c or FILE may be specified", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
from pxr import Trace
|
||||
|
||||
env = {}
|
||||
|
||||
# Create a Main function that is traced so we always capture a useful
|
||||
# top-level scope.
|
||||
if args.file:
|
||||
@Trace.TraceFunction
|
||||
def Main():
|
||||
exec(compile(open(args.file).read(), args.file, 'exec'), env)
|
||||
else:
|
||||
@Trace.TraceFunction
|
||||
def Main():
|
||||
exec(args.cmd, env)
|
||||
|
||||
try:
|
||||
Trace.Collector().enabled = True
|
||||
Main()
|
||||
finally:
|
||||
Trace.Collector().enabled = False
|
||||
|
||||
if args.output is not None:
|
||||
Trace.Reporter.globalReporter.Report(args.output)
|
||||
else:
|
||||
Trace.Reporter.globalReporter.Report()
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,33 @@
|
||||
#
|
||||
# Copyright 2019 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
from pxr import Tf
|
||||
Tf.PreparePythonModule()
|
||||
del Tf
|
||||
|
||||
from . import cameraArgs
|
||||
from . import colorArgs
|
||||
from . import complexityArgs
|
||||
from . import framesArgs
|
||||
from . import rendererArgs
|
||||
Loaded 100 of 15684 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user