-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7aee73a
commit 7e95e91
Showing
6 changed files
with
603 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
sources: | ||
"24.05": | ||
url: | ||
- "https://github.com/PixarAnimationStudios/OpenUSD/archive/refs/tags/v24.05.tar.gz" | ||
sha256: "0352619895588efc8f9d4aa7004c92be4e4fa70e1ccce77e474ce23941c05828" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
|
||
project(test_package LANGUAGES CXX) | ||
|
||
find_package(openusd REQUIRED CONFIG) | ||
|
||
add_executable(${PROJECT_NAME} test_package.cpp) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE openusd::usd_usdGeom) | ||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from conan import ConanFile | ||
from conan.tools.build import can_run | ||
from conan.tools.cmake import cmake_layout, CMake | ||
import os | ||
|
||
|
||
# It will become the standard on Conan 2.x | ||
class TestPackageConan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" | ||
test_type = "explicit" | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
|
||
def layout(self): | ||
cmake_layout(self) | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
# cmake.build() | ||
cmake.build(cli_args=["--verbose"]) | ||
|
||
def test(self): | ||
if can_run(self): | ||
bin_path = os.path.join(self.cpp.build.bindir, "test_package") | ||
self.run(bin_path, env="conanrun") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include <pxr/base/tf/token.h> | ||
#include <pxr/usd/sdf/path.h> | ||
#include <pxr/usd/usd/stage.h> | ||
#include <pxr/usd/usd/zipFile.h> | ||
#include <pxr/usd/usdGeom/mesh.h> | ||
#include <pxr/usd/usdGeom/metrics.h> | ||
#include <pxr/usd/usdGeom/primvar.h> | ||
#include <pxr/usd/usdGeom/primvarsAPI.h> | ||
#include <pxr/usd/usdGeom/xform.h> | ||
#include <pxr/usdImaging/usdImaging/tokens.h> | ||
#include <pxr/usd/usdShade/material.h> | ||
#include <pxr/usd/usdShade/materialBindingAPI.h> | ||
#include <pxr/usd/usdShade/shader.h> | ||
|
||
|
||
PXR_NAMESPACE_USING_DIRECTIVE | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
UsdStageRefPtr stage = UsdStage::CreateNew("HelloWorld.usda"); | ||
|
||
UsdGeomSetStageUpAxis(stage, UsdGeomTokens->y); | ||
// UsdGeomSetStageMetersPerUnit(stage, 0.01); | ||
|
||
// // create mesh | ||
// UsdGeomXform xform = UsdGeomXform::Define(stage, SdfPath("/root")); | ||
// UsdGeomMesh mesh = UsdGeomMesh::Define(stage, SdfPath("/root/mesh")); | ||
// stage->SetDefaultPrim(xform.GetPrim()); | ||
|
||
stage->GetRootLayer()->Save(); | ||
|
||
return EXIT_SUCCESS; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
versions: | ||
"24.05": | ||
folder: all |