mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
make no texture load and no usd print default.
add release build script.
This commit is contained in:
@@ -82,9 +82,9 @@ int main(int argc, char **argv) {
|
|||||||
std::cout << " --noidxbuild: Do not rebuild vertex indices\n";
|
std::cout << " --noidxbuild: Do not rebuild vertex indices\n";
|
||||||
std::cout << " --notri: Do not triangulate mesh\n";
|
std::cout << " --notri: Do not triangulate mesh\n";
|
||||||
std::cout << " --trifan: Use triangle fan triangulation (instead of earcut)\n";
|
std::cout << " --trifan: Use triangle fan triangulation (instead of earcut)\n";
|
||||||
std::cout << " --notexload: Do not load textures\n";
|
std::cout << " --texload: Load textures\n";
|
||||||
std::cout << " --noar: Do not use (default) AssertResolver\n";
|
std::cout << " --noar: Do not use (default) AssertResolver\n";
|
||||||
std::cout << " --nousdprint: Do not print parsed USD\n";
|
std::cout << " --usdprint: Print parsed USD\n";
|
||||||
std::cout
|
std::cout
|
||||||
<< " --dumpobj: Dump mesh as wavefront .obj(for visual debugging)\n";
|
<< " --dumpobj: Dump mesh as wavefront .obj(for visual debugging)\n";
|
||||||
std::cout << " --dumpusd: Dump scene as USD(USDA Ascii)\n";
|
std::cout << " --dumpusd: Dump scene as USD(USDA Ascii)\n";
|
||||||
@@ -101,8 +101,8 @@ int main(int argc, char **argv) {
|
|||||||
bool use_triangle_fan = false;
|
bool use_triangle_fan = false;
|
||||||
bool export_obj = false;
|
bool export_obj = false;
|
||||||
bool export_usd = false;
|
bool export_usd = false;
|
||||||
bool no_usdprint = false;
|
bool usdprint = false;
|
||||||
bool no_texload = false;
|
bool texload = false;
|
||||||
bool no_assetresolver = false;
|
bool no_assetresolver = false;
|
||||||
|
|
||||||
std::string filepath;
|
std::string filepath;
|
||||||
@@ -113,10 +113,10 @@ int main(int argc, char **argv) {
|
|||||||
use_triangle_fan = true;
|
use_triangle_fan = true;
|
||||||
} else if (strcmp(argv[i], "--noidxbuild") == 0) {
|
} else if (strcmp(argv[i], "--noidxbuild") == 0) {
|
||||||
build_indices = false;
|
build_indices = false;
|
||||||
} else if (strcmp(argv[i], "--nousdprint") == 0) {
|
} else if (strcmp(argv[i], "--usdprint") == 0) {
|
||||||
no_usdprint = true;
|
usdprint = true;
|
||||||
} else if (strcmp(argv[i], "--notexload") == 0) {
|
} else if (strcmp(argv[i], "--texload") == 0) {
|
||||||
no_texload = true;
|
texload = true;
|
||||||
} else if (strcmp(argv[i], "--noar") == 0) {
|
} else if (strcmp(argv[i], "--noar") == 0) {
|
||||||
no_assetresolver = true;
|
no_assetresolver = true;
|
||||||
} else if (strcmp(argv[i], "--dumpobj") == 0) {
|
} else if (strcmp(argv[i], "--dumpobj") == 0) {
|
||||||
@@ -161,7 +161,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
bool is_usdz = tinyusdz::IsUSDZ(filepath);
|
bool is_usdz = tinyusdz::IsUSDZ(filepath);
|
||||||
|
|
||||||
if (!no_usdprint) {
|
if (usdprint) {
|
||||||
std::string s = stage.ExportToString();
|
std::string s = stage.ExportToString();
|
||||||
std::cout << s << "\n";
|
std::cout << s << "\n";
|
||||||
std::cout << "--------------------------------------"
|
std::cout << "--------------------------------------"
|
||||||
@@ -186,8 +186,8 @@ int main(int argc, char **argv) {
|
|||||||
<< "\n";
|
<< "\n";
|
||||||
env.mesh_config.build_vertex_indices = build_indices;
|
env.mesh_config.build_vertex_indices = build_indices;
|
||||||
|
|
||||||
std::cout << "Load texture data : " << (!no_texload ? "true" : "false") << "\n";
|
std::cout << "Load texture data : " << (texload ? "true" : "false") << "\n";
|
||||||
env.scene_config.load_texture_assets = !no_texload;
|
env.scene_config.load_texture_assets = texload;
|
||||||
|
|
||||||
// Add base directory of .usd file to search path.
|
// Add base directory of .usd file to search path.
|
||||||
std::string usd_basedir = tinyusdz::io::GetBaseDir(filepath);
|
std::string usd_basedir = tinyusdz::io::GetBaseDir(filepath);
|
||||||
|
|||||||
15
scripts/bootstrap-cmake-linux-release.sh
Executable file
15
scripts/bootstrap-cmake-linux-release.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
curdir=`pwd`
|
||||||
|
|
||||||
|
builddir=${curdir}/build_release
|
||||||
|
|
||||||
|
rm -rf ${builddir}
|
||||||
|
mkdir ${builddir}
|
||||||
|
|
||||||
|
# with lld linker
|
||||||
|
# -DCMAKE_TOOLCHAIN_FILE=cmake/lld-linux.toolchain.cmake
|
||||||
|
|
||||||
|
cd ${builddir} && CXX=clang++ CC=clang cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
|
-DCMAKE_VERBOSE_MAKEFILE=1 \
|
||||||
|
..
|
||||||
|
|
||||||
Reference in New Issue
Block a user