From 13ac5137a7ec6c8e3ce72d4b66b066810e07b080 Mon Sep 17 00:00:00 2001 From: cpichard Date: Mon, 23 Jan 2023 14:35:12 +0000 Subject: [PATCH] Remove arnold to usd converter (#1398) * remove usd writer * update deprecated functions in the testsuite * disable ADP when running the testsuite * fix deprecation warning --- CMakeLists.txt | 9 +-------- SConstruct | 28 ++-------------------------- cmake/utils/options.cmake | 1 - cmake/utils/test.cmake | 2 +- docs/building.md | 5 ----- testsuite/SConscript | 7 +++++-- testsuite/test_0038/data/test.cpp | 8 ++++---- testsuite/test_0134/data/test.cpp | 2 +- testsuite/test_0136/data/test.cpp | 2 +- testsuite/test_0138/data/test.cpp | 16 ++++++++-------- testsuite/test_0142/data/test.cpp | 6 +++--- testsuite/test_0146/data/test.cpp | 2 +- testsuite/test_0147/data/test.cpp | 2 +- testsuite/test_0148/data/test.cpp | 2 +- testsuite/test_0152/data/test.cpp | 2 +- testsuite/test_0153/data/test.cpp | 2 +- testsuite/test_0154/data/test.cpp | 2 +- testsuite/test_0155/data/test.cpp | 2 +- testsuite/test_0156/data/test.cpp | 2 +- testsuite/test_0161/data/test.cpp | 6 +++--- testsuite/test_0162/data/test.cpp | 6 +++--- testsuite/test_0168/data/test.cpp | 6 +++--- testsuite/test_0174/data/test.cpp | 4 ++-- testsuite/test_0178/data/test.cpp | 2 +- testsuite/test_0180/data/test.cpp | 6 +++--- testsuite/test_0203/data/test.cpp | 10 ++-------- testsuite/test_0208/data/test.cpp | 10 +++++----- testsuite/test_0238/data/test.cpp | 6 +++--- 28 files changed, 59 insertions(+), 99 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8125b35335..e394aa1759 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,18 +149,11 @@ if (NOT USD_STATIC_BUILD) endif () endif () -if (BUILD_PROCEDURAL OR BUILD_USD_WRITER) - add_subdirectory(translator) -endif () - if (BUILD_PROCEDURAL) + add_subdirectory(translator) add_subdirectory(procedural) endif () -if (BUILD_USD_WRITER) - add_subdirectory(cmd) -endif () - if (BUILD_DOCS) add_subdirectory(docs) endif () diff --git a/SConstruct b/SConstruct index 277c33d229..7f61a4eafb 100644 --- a/SConstruct +++ b/SConstruct @@ -101,7 +101,6 @@ vars.AddVariables( BoolVariable('BUILD_RENDER_DELEGATE', 'Whether or not to build the hydra render delegate.', True), BoolVariable('BUILD_NDR_PLUGIN', 'Whether or not to build the node registry plugin.', True), BoolVariable('BUILD_USD_IMAGING_PLUGIN', 'Whether or not to build the usdImaging plugin.', True), - BoolVariable('BUILD_USD_WRITER', 'Whether or not to build the arnold to usd writer tool.', True), BoolVariable('BUILD_PROCEDURAL', 'Whether or not to build the arnold procedural.', True), BoolVariable('BUILD_SCENE_DELEGATE', 'Whether or not to build the arnold scene delegate.', False), BoolVariable('BUILD_TESTSUITE', 'Whether or not to build the testsuite.', True), @@ -157,7 +156,6 @@ BUILD_RENDER_DELEGATE = env['BUILD_RENDER_DELEGATE'] if USD_BUILD_MODE != 'st BUILD_NDR_PLUGIN = env['BUILD_NDR_PLUGIN'] if USD_BUILD_MODE != 'static' else False BUILD_USD_IMAGING_PLUGIN = env['BUILD_USD_IMAGING_PLUGIN'] if BUILD_SCHEMAS else False BUILD_SCENE_DELEGATE = env['BUILD_SCENE_DELEGATE'] if USD_BUILD_MODE != 'static' else False -BUILD_USD_WRITER = env['BUILD_USD_WRITER'] BUILD_PROCEDURAL = env['BUILD_PROCEDURAL'] BUILD_TESTSUITE = env['BUILD_TESTSUITE'] BUILD_DOCS = env['BUILD_DOCS'] @@ -423,9 +421,6 @@ else: procedural_script = os.path.join('procedural', 'SConscript') procedural_build = os.path.join(BUILD_BASE_DIR, 'procedural') -cmd_script = os.path.join('cmd', 'SConscript') -cmd_build = os.path.join(BUILD_BASE_DIR, 'cmd') - schemas_script = os.path.join('schemas', 'SConscript') schemas_build = os.path.join(BUILD_BASE_DIR, 'schemas') @@ -469,7 +464,7 @@ else: # Define targets # Target for the USD procedural -if BUILD_PROCEDURAL or BUILD_USD_WRITER: +if BUILD_PROCEDURAL: TRANSLATOR = env.SConscript(translator_script, variant_dir = translator_build, duplicate = 0, exports = 'env') @@ -513,19 +508,6 @@ if BUILD_SCHEMAS: else: SCHEMAS = None -if BUILD_USD_WRITER: - ARNOLD_TO_USD = env.SConscript(cmd_script, variant_dir = cmd_build, duplicate = 0, exports = 'env') - SConscriptChdir(0) - Depends(ARNOLD_TO_USD, TRANSLATOR[0]) - if env['USD_BUILD_MODE'] == 'static': - # For static builds of the writer, we need to copy the usd - # resources to the same path as the procedural - usd_target_resource_folder = os.path.join(os.path.dirname(os.path.abspath(str(ARNOLD_TO_USD[0]))), 'usd') - if os.path.exists(usd_input_resource_folder) and not os.path.exists(usd_target_resource_folder): - shutil.copytree(usd_input_resource_folder, usd_target_resource_folder) -else: - ARNOLD_TO_USD = None - if BUILD_RENDER_DELEGATE: RENDERDELEGATE = env.SConscript(renderdelegate_script, variant_dir = renderdelegate_build, duplicate = 0, exports = 'env') SConscriptChdir(0) @@ -611,7 +593,7 @@ if BUILD_TESTSUITE: else: TESTSUITE = None -for target in [RENDERDELEGATE, PROCEDURAL, SCHEMAS, ARNOLD_TO_USD, RENDERDELEGATE, DOCS, TESTSUITE, NDRPLUGIN, USDIMAGINGPLUGIN, HYDRA_TEST]: +for target in [RENDERDELEGATE, PROCEDURAL, SCHEMAS, RENDERDELEGATE, DOCS, TESTSUITE, NDRPLUGIN, USDIMAGINGPLUGIN, HYDRA_TEST]: if target: env.AlwaysBuild(target) @@ -626,12 +608,6 @@ if PROCEDURAL: INSTALL_PROC += env.Install(PREFIX_PROCEDURAL, usd_input_resource_folder) env.Alias('procedural-install', INSTALL_PROC) -if ARNOLD_TO_USD: - INSTALL_ARNOLD_TO_USD = env.Install(PREFIX_BIN, ARNOLD_TO_USD) - if env['USD_BUILD_MODE'] == 'static': - INSTALL_ARNOLD_TO_USD += env.Install(PREFIX_BIN, usd_input_resource_folder) - env.Alias('writer-install', INSTALL_ARNOLD_TO_USD) - if RENDERDELEGATE: if IS_WINDOWS: INSTALL_RENDERDELEGATE = env.Install(PREFIX_RENDER_DELEGATE, RENDERDELEGATE) diff --git a/cmake/utils/options.cmake b/cmake/utils/options.cmake index 1c0c34e36d..1b56120185 100644 --- a/cmake/utils/options.cmake +++ b/cmake/utils/options.cmake @@ -27,7 +27,6 @@ option(BUILD_RENDER_DELEGATE "Builds the Render Delegate" ON) option(BUILD_NDR_PLUGIN "Builds the NDR Plugin" ON) option(BUILD_PROCEDURAL "Builds the Procedural" ON) option(BUILD_PROC_SCENE_FORMAT "Enables the Procedural Scene format" ON) -option(BUILD_USD_WRITER "Builds the USD Writer" ON) option(BUILD_USD_IMAGING_PLUGIN "Builds the USD Imaging plugins" ON) option(BUILD_SCENE_DELEGATE "Builds the Scene Delegate" OFF) option(BUILD_DOCS "Builds the Documentation" OFF) diff --git a/cmake/utils/test.cmake b/cmake/utils/test.cmake index f8cebce9fe..d4e5bfd792 100644 --- a/cmake/utils/test.cmake +++ b/cmake/utils/test.cmake @@ -162,7 +162,7 @@ endfunction() function(add_translator_unit_test) # We are ignoring the tests so the scripts that automatically scan the folders will skip these folders. ignore_test(${ARGN}) - if (NOT BUILD_PROCEDURAL AND NOT BUILD_USD_WRITER) + if (NOT BUILD_PROCEDURAL) return() endif () foreach (_test_name ${ARGN}) diff --git a/docs/building.md b/docs/building.md index 5c5d57bf75..980241b293 100755 --- a/docs/building.md +++ b/docs/building.md @@ -34,7 +34,6 @@ Sample `custom.py` files are provided in the _Examples_ section below. - `BUILD_SCHEMAS`: Whether or not to build the schemas and their wrapper. - `BUILD_RENDER_DELEGATE`: Whether or not to build the hydra render delegate. - `BUILD_NDR_PLUGIN`: Whether or not to build the node registry plugin. -- `BUILD_USD_WRITER`: Whether or not to build the arnold to usd writer tool. - `BUILD_PROCEDURAL`: Whether or not to build the arnold procedural. - `BUILD_TESTSUITE`: Whether or not to build the testsuite. - `BUILD_DOCS`: Whether or not to build the documentation. @@ -136,7 +135,6 @@ PYTHON_LIB_NAME='python2.7' BUILD_SCHEMAS=False BUILD_RENDER_DELEGATE=True -BUILD_USD_WRITER=True BUILD_PROCEDURAL=True BUILD_TESTSUITE=True BUILD_DOCS=True @@ -171,7 +169,6 @@ BUILD_SCHEMAS=False BUILD_RENDER_DELEGATE=True BUILD_PROCEDURAL=True BUILD_TESTSUITE=True -BUILD_USD_WRITER=True BUILD_DOCS=False PREFIX=r'C:\solidAngle\arnold-usd' @@ -211,7 +208,6 @@ BUILD_RENDER_DELEGATE=True BUILD_NDR_PLUGIN=True BUILD_PROCEDURAL=True BUILD_TESTSUITE=True -BUILD_USD_WRITER=True BUILD_DOCS=True ~~~ @@ -223,7 +219,6 @@ We also support building the project with cmake to allow for greater flexibility - `BUILD_SCHEMAS`: Whether or not to build the schemas and their wrapper. - `BUILD_RENDER_DELEGATE`: Whether or not to build the hydra render delegate. - `BUILD_NDR_PLUGIN`: Whether or not to build the node registry plugin. -- `BUILD_USD_WRITER`: Whether or not to build the arnold to usd writer tool. - `BUILD_PROCEDURAL`: Whether or not to build the arnold procedural. - `BUILD_TESTSUITE`: Whether or not to build the testsuite. - `BUILD_UNIT_TESTS`: Whether or not to build the unit tests. diff --git a/testsuite/SConscript b/testsuite/SConscript index f114b3ce79..2e11f34b64 100755 --- a/testsuite/SConscript +++ b/testsuite/SConscript @@ -155,6 +155,9 @@ def run_test(target, source, env): local_env['ADCLMHUB_LOG_DIR'] = test_dir local_env['ADCLMHUB_LOG_LEVEL'] = 'T' + # Disable ADP for the tests + local_env['ARNOLD_ADP_DISABLE'] = '1' + output_image = test_env['OUTPUT_IMAGE'] if output_image: output_image = os.path.join(test_dir, output_image) @@ -621,7 +624,7 @@ TRANSLATOR_BUILD_PATH = os.path.join(build_base_dir, 'translator') RENDER_DELEGATE_BUILD_PATH = os.path.join(build_base_dir, 'render_delegate') NDR_PLUGIN_BUILD_PATH = os.path.join(build_base_dir, 'ndr') if env['ENABLE_UNIT_TESTS']: - if env['BUILD_PROCEDURAL'] or env['BUILD_USD_WRITER']: + if env['BUILD_PROCEDURAL']: test_env.Append(CPPPATH = TRANSLATOR_BUILD_PATH) test_env.Append(LIBPATH = TRANSLATOR_BUILD_PATH) if env['BUILD_RENDER_DELEGATE']: @@ -803,7 +806,7 @@ for target in sorted(TEST_NAMES, reverse=(env['TEST_ORDER']=='reverse')): cloned_env.Append(RPATH = NDR_PLUGIN_BUILD_PATH) test_target = Test.CreateTest(target, locals(), program_sources = source_deps).prepare_test(target, cloned_env) elif target in UNIT_TESTS['translator']: - if (not env['BUILD_PROCEDURAL'] and not env['BUILD_USD_WRITER']) or not env['ENABLE_UNIT_TESTS']: + if (not env['BUILD_PROCEDURAL']) or not env['ENABLE_UNIT_TESTS']: continue cloned_env = test_env.Clone() source_deps, lib_deps = sa.dependencies.translator(cloned_env, []) diff --git a/testsuite/test_0038/data/test.cpp b/testsuite/test_0038/data/test.cpp index 52d8553c82..928960d104 100644 --- a/testsuite/test_0038/data/test.cpp +++ b/testsuite/test_0038/data/test.cpp @@ -6,14 +6,14 @@ int main(int argc, char **argv) { - AiMsgSetConsoleFlags(AI_LOG_ALL); + AiMsgSetConsoleFlags(nullptr, AI_LOG_ALL); AiBegin(); AtUniverse *proc_universe = AiUniverse(); - AiASSLoad("scene.ass"); + AiSceneLoad(nullptr, "scene.ass", nullptr); // load the usd procedural (containing a sphere) in a separate universe - AiASSLoad(proc_universe, "usd_proc.ass"); + AiSceneLoad(proc_universe, "usd_proc.ass", nullptr); AtNode *proc_a = AiNode(proc_universe, "usd", "usd_proc_a"); AiNodeSetStr(proc_a, "filename", "usd_proc_a.usda"); // Call the viewport API on the usd procedural, and fill the main universe @@ -24,7 +24,7 @@ int main(int argc, char **argv) AiProceduralViewport(proc_b, nullptr, AI_PROC_BOXES); AiUniverseDestroy(proc_universe); - AiRender(); + AiRender(nullptr); AiEnd(); return 0; diff --git a/testsuite/test_0134/data/test.cpp b/testsuite/test_0134/data/test.cpp index 50e4a6a32e..2c8b498a62 100644 --- a/testsuite/test_0134/data/test.cpp +++ b/testsuite/test_0134/data/test.cpp @@ -344,7 +344,7 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); AiBegin(); - AiMsgSetConsoleFlags(AI_LOG_NONE); + AiMsgSetConsoleFlags(nullptr, AI_LOG_NONE); auto result = RUN_ALL_TESTS(); AiEnd(); return result; diff --git a/testsuite/test_0136/data/test.cpp b/testsuite/test_0136/data/test.cpp index b3db91c75e..51ece0650b 100644 --- a/testsuite/test_0136/data/test.cpp +++ b/testsuite/test_0136/data/test.cpp @@ -61,7 +61,7 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); AiBegin(); - AiMsgSetConsoleFlags(AI_LOG_NONE); + AiMsgSetConsoleFlags(nullptr, AI_LOG_NONE); auto result = RUN_ALL_TESTS(); AiEnd(); return result; diff --git a/testsuite/test_0138/data/test.cpp b/testsuite/test_0138/data/test.cpp index 748249fb3c..947022f014 100644 --- a/testsuite/test_0138/data/test.cpp +++ b/testsuite/test_0138/data/test.cpp @@ -6,9 +6,9 @@ int main(int argc, char **argv) { - AiMsgSetConsoleFlags(AI_LOG_ALL); + AiMsgSetConsoleFlags(nullptr, AI_LOG_ALL); AiBegin(); - AiASSLoad("scene.ass"); + AiSceneLoad(nullptr, "scene.ass", nullptr); AtParamValueMap* params = AiParamValueMap(); AiParamValueMapSetStr(params, AtString("scope"), AtString("beautiful/scope")); AiSceneWrite(nullptr, "scene.usda", params); @@ -19,27 +19,27 @@ int main(int argc, char **argv) bool success = true; AiSceneLoad(nullptr, "scene.usda", nullptr); - if (!AiNodeLookUpByName("/beautiful/scope/my/sphere/name")) { + if (!AiNodeLookUpByName(nullptr, "/beautiful/scope/my/sphere/name")) { AiMsgError("/beautiful/scope/my/sphere/name doesn't exist"); success = false; } - if (!AiNodeLookUpByName("/beautiful/scope/my/cube/name")) { + if (!AiNodeLookUpByName(nullptr, "/beautiful/scope/my/cube/name")) { AiMsgError("/beautiful/scope/my/cone/name doesn't exist"); success = false; } - if (!AiNodeLookUpByName("/beautiful/scope/lambert1/lambert1")) { + if (!AiNodeLookUpByName(nullptr, "/beautiful/scope/lambert1/lambert1")) { AiMsgError("/beautiful/scope/lambert1 doesn't exist"); success = false; } - if (!AiNodeLookUpByName("/beautiful/scope/persp/perspShape")) { + if (!AiNodeLookUpByName(nullptr, "/beautiful/scope/persp/perspShape")) { AiMsgError("/beautiful/scope/persp/perspShape doesn't exist"); success = false; } - if (!AiNodeLookUpByName("/beautiful/scope/defaultArnoldFilter_gaussian_filter")) { + if (!AiNodeLookUpByName(nullptr, "/beautiful/scope/defaultArnoldFilter_gaussian_filter")) { AiMsgError("/beautiful/scope/defaultArnoldFilter_gaussian_filter doesn't exist"); success = false; } - if (!AiNodeLookUpByName("/beautiful/scope/directionalLight1/directionalLightShape1")) { + if (!AiNodeLookUpByName(nullptr, "/beautiful/scope/directionalLight1/directionalLightShape1")) { AiMsgError("/beautiful/scope/directionalLight1/directionalLightShape1 doesn't exist"); success = false; } diff --git a/testsuite/test_0142/data/test.cpp b/testsuite/test_0142/data/test.cpp index b4bf43ef9f..3340fdea48 100644 --- a/testsuite/test_0142/data/test.cpp +++ b/testsuite/test_0142/data/test.cpp @@ -6,10 +6,10 @@ int main(int argc, char **argv) { - AiMsgSetConsoleFlags(AI_LOG_ALL); + AiMsgSetConsoleFlags(nullptr, AI_LOG_ALL); AiBegin(); - AiASSLoad("scene.ass"); + AiSceneLoad(nullptr, "scene.ass", nullptr); AtUniverse *proc_universe = AiUniverse(); AtNode *proc = AiNode(proc_universe, "usd", "usd_proc"); AtArray *array = AiArrayAllocate(1, 1, AI_TYPE_STRING); @@ -24,7 +24,7 @@ int main(int argc, char **argv) AiProceduralViewport(proc, nullptr, AI_PROC_POLYGONS); AiUniverseDestroy(proc_universe); - AiRender(); + AiRender(nullptr); AiEnd(); return 0; diff --git a/testsuite/test_0146/data/test.cpp b/testsuite/test_0146/data/test.cpp index 1e75c6fdfa..3d423697fe 100644 --- a/testsuite/test_0146/data/test.cpp +++ b/testsuite/test_0146/data/test.cpp @@ -122,7 +122,7 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); AiBegin(); - AiMsgSetConsoleFlags(AI_LOG_NONE); + AiMsgSetConsoleFlags(nullptr, AI_LOG_NONE); auto result = RUN_ALL_TESTS(); AiEnd(); return result; diff --git a/testsuite/test_0147/data/test.cpp b/testsuite/test_0147/data/test.cpp index bee7de8bc4..40f8bc5919 100644 --- a/testsuite/test_0147/data/test.cpp +++ b/testsuite/test_0147/data/test.cpp @@ -51,7 +51,7 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); AiBegin(); - AiMsgSetConsoleFlags(AI_LOG_NONE); + AiMsgSetConsoleFlags(nullptr, AI_LOG_NONE); auto result = RUN_ALL_TESTS(); AiEnd(); return result; diff --git a/testsuite/test_0148/data/test.cpp b/testsuite/test_0148/data/test.cpp index 7666da42d1..3c37180200 100644 --- a/testsuite/test_0148/data/test.cpp +++ b/testsuite/test_0148/data/test.cpp @@ -5,7 +5,7 @@ int main(int argc, char **argv) { - AiMsgSetConsoleFlags(AI_LOG_ALL); + AiMsgSetConsoleFlags(nullptr, AI_LOG_ALL); AiBegin(); AiSceneLoad(nullptr, "scene.ass", nullptr); AiSceneWrite(nullptr, "scene_exported.usda", nullptr); diff --git a/testsuite/test_0152/data/test.cpp b/testsuite/test_0152/data/test.cpp index 9c6b36eb44..230a86e350 100644 --- a/testsuite/test_0152/data/test.cpp +++ b/testsuite/test_0152/data/test.cpp @@ -188,7 +188,7 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); AiBegin(); - AiMsgSetConsoleFlags(AI_LOG_NONE); + AiMsgSetConsoleFlags(nullptr, AI_LOG_NONE); auto result = RUN_ALL_TESTS(); AiEnd(); return result; diff --git a/testsuite/test_0153/data/test.cpp b/testsuite/test_0153/data/test.cpp index 0f25862fe1..eade4bccec 100644 --- a/testsuite/test_0153/data/test.cpp +++ b/testsuite/test_0153/data/test.cpp @@ -119,7 +119,7 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); AiBegin(); - AiMsgSetConsoleFlags(AI_LOG_NONE); + AiMsgSetConsoleFlags(nullptr, AI_LOG_NONE); auto result = RUN_ALL_TESTS(); AiEnd(); return result; diff --git a/testsuite/test_0154/data/test.cpp b/testsuite/test_0154/data/test.cpp index e961712b34..90bc76bd2a 100644 --- a/testsuite/test_0154/data/test.cpp +++ b/testsuite/test_0154/data/test.cpp @@ -121,7 +121,7 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); AiBegin(); - AiMsgSetConsoleFlags(AI_LOG_NONE); + AiMsgSetConsoleFlags(nullptr, AI_LOG_NONE); auto result = RUN_ALL_TESTS(); AiEnd(); return result; diff --git a/testsuite/test_0155/data/test.cpp b/testsuite/test_0155/data/test.cpp index db5be754cb..2e3c593697 100644 --- a/testsuite/test_0155/data/test.cpp +++ b/testsuite/test_0155/data/test.cpp @@ -336,7 +336,7 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); AiBegin(); - AiMsgSetConsoleFlags(AI_LOG_NONE); + AiMsgSetConsoleFlags(nullptr, AI_LOG_NONE); auto result = RUN_ALL_TESTS(); AiEnd(); return result; diff --git a/testsuite/test_0156/data/test.cpp b/testsuite/test_0156/data/test.cpp index 507187aecd..23b8e4cc1f 100644 --- a/testsuite/test_0156/data/test.cpp +++ b/testsuite/test_0156/data/test.cpp @@ -121,7 +121,7 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); AiBegin(); - AiMsgSetConsoleFlags(AI_LOG_NONE); + AiMsgSetConsoleFlags(nullptr, AI_LOG_NONE); auto result = RUN_ALL_TESTS(); AiEnd(); return result; diff --git a/testsuite/test_0161/data/test.cpp b/testsuite/test_0161/data/test.cpp index 419de7bd1a..eeecd33408 100644 --- a/testsuite/test_0161/data/test.cpp +++ b/testsuite/test_0161/data/test.cpp @@ -6,10 +6,10 @@ int main(int argc, char **argv) { - AiMsgSetConsoleFlags(AI_LOG_ALL); + AiMsgSetConsoleFlags(nullptr, AI_LOG_ALL); AiBegin(); - AiASSLoad("scene.ass"); + AiSceneLoad(nullptr, "scene.ass", nullptr); AtUniverse *proc_universe = AiUniverse(); AtNode *proc = AiNode(proc_universe, "usd", "usd_proc"); AiNodeSetStr(proc, "filename", "nested_proc.usda"); @@ -22,7 +22,7 @@ int main(int argc, char **argv) AiProceduralViewport(proc2, nullptr, AI_PROC_POLYGONS); AiUniverseDestroy(proc_universe); - AiRender(); + AiRender(nullptr); AiEnd(); return 0; diff --git a/testsuite/test_0162/data/test.cpp b/testsuite/test_0162/data/test.cpp index 7215fc0ba6..ae69c692cd 100644 --- a/testsuite/test_0162/data/test.cpp +++ b/testsuite/test_0162/data/test.cpp @@ -6,13 +6,13 @@ int main(int argc, char **argv) { - AiMsgSetConsoleFlags(AI_LOG_ALL); + AiMsgSetConsoleFlags(nullptr, AI_LOG_ALL); AiBegin(); AtParamValueMap *params = AiParamValueMap(); AiParamValueMapSetBool(params, AtString("procedurals_only"), true); - AiASSLoad("scene.ass"); + AiSceneLoad(nullptr, "scene.ass", nullptr); AtUniverse *proc_universe = AiUniverse(); AtNode *proc = AiNode(proc_universe, "usd", "usd_proc"); AiNodeSetStr(proc, "filename", "nested_proc.usda"); @@ -20,7 +20,7 @@ int main(int argc, char **argv) AiProceduralViewport(proc, nullptr, AI_PROC_POINTS, params); AiUniverseDestroy(proc_universe); - AiRender(); + AiRender(nullptr); AiEnd(); return 0; diff --git a/testsuite/test_0168/data/test.cpp b/testsuite/test_0168/data/test.cpp index b802bdfec3..b3ff34c6ff 100644 --- a/testsuite/test_0168/data/test.cpp +++ b/testsuite/test_0168/data/test.cpp @@ -6,12 +6,12 @@ int main(int argc, char **argv) { - AiMsgSetConsoleFlags(AI_LOG_ALL); + AiMsgSetConsoleFlags(nullptr, AI_LOG_ALL); AiBegin(); AtUniverse *proc_universe = AiUniverse(); - AiASSLoad("scene.ass"); + AiSceneLoad(nullptr, "scene.ass", nullptr); // load the usd procedural (containing a sphere) in a separate universe AtNode *proc_a = AiNode(proc_universe, "usd", "my_usd"); AiNodeSetStr(proc_a, "filename", "scene.usda"); @@ -19,7 +19,7 @@ int main(int argc, char **argv) AiProceduralViewport(proc_a, nullptr, AI_PROC_POLYGONS); AiUniverseDestroy(proc_universe); - AiRender(); + AiRender(nullptr); AiEnd(); return 0; diff --git a/testsuite/test_0174/data/test.cpp b/testsuite/test_0174/data/test.cpp index d02dbdb875..091c92cb1c 100644 --- a/testsuite/test_0174/data/test.cpp +++ b/testsuite/test_0174/data/test.cpp @@ -9,7 +9,7 @@ int main(int argc, char **argv) { - AiMsgSetConsoleFlags(AI_LOG_ALL); + AiMsgSetConsoleFlags(nullptr, AI_LOG_ALL); AiBegin(); AtParamValueMap* params = AiParamValueMap(); AiSceneWrite(nullptr, "scene.usda", params); @@ -19,7 +19,7 @@ int main(int argc, char **argv) int optionsAttrs = 0; AtParamIterator* nodeParam = - AiNodeEntryGetParamIterator(AiNodeGetNodeEntry(AiUniverseGetOptions())); + AiNodeEntryGetParamIterator(AiNodeGetNodeEntry(AiUniverseGetOptions(nullptr))); while (!AiParamIteratorFinished(nodeParam)) { AiParamIteratorGetNext(nodeParam); optionsAttrs++; diff --git a/testsuite/test_0178/data/test.cpp b/testsuite/test_0178/data/test.cpp index 0ac525885c..d274f8cbb9 100644 --- a/testsuite/test_0178/data/test.cpp +++ b/testsuite/test_0178/data/test.cpp @@ -64,7 +64,7 @@ bool testParameter(const std::vector& samples, const std::string& filenam int main(int argc, char **argv) { - AiMsgSetConsoleFlags(AI_LOG_ALL); + AiMsgSetConsoleFlags(nullptr, AI_LOG_ALL); AiBegin(); bool sucess = diff --git a/testsuite/test_0180/data/test.cpp b/testsuite/test_0180/data/test.cpp index 700e19dba6..ef8468c230 100644 --- a/testsuite/test_0180/data/test.cpp +++ b/testsuite/test_0180/data/test.cpp @@ -9,14 +9,14 @@ int main(int argc, char **argv) { - AiMsgSetConsoleFlags(AI_LOG_ALL); + AiMsgSetConsoleFlags(nullptr, AI_LOG_ALL); AiBegin(); AiSceneLoad(nullptr, "scene.usda", nullptr); AiSceneWrite(nullptr, "scene.ass", nullptr, nullptr); AiEnd(); AiBegin(); AiSceneLoad(nullptr, "scene.ass", nullptr); - AtNode *options = AiUniverseGetOptions(); + AtNode *options = AiUniverseGetOptions(nullptr); AtArray *array = AiNodeGetArray(options, AtString("outputs")); bool success = false; @@ -35,7 +35,7 @@ int main(int argc, char **argv) } } if (success) - AiRender(); + AiRender(nullptr); AiEnd(); return (success) ? 0 : 1; diff --git a/testsuite/test_0203/data/test.cpp b/testsuite/test_0203/data/test.cpp index 41dc0654b2..5a989ad386 100644 --- a/testsuite/test_0203/data/test.cpp +++ b/testsuite/test_0203/data/test.cpp @@ -10,10 +10,8 @@ int main(int argc, char **argv) { bool success = true; - AiMsgSetConsoleFlags(AI_LOG_ALL); AiBegin(); - - + AiMsgSetConsoleFlags(nullptr, AI_LOG_ALL); AtString renderSettingsParam("render_settings"); for (int i = 0; i <= 4; ++i) { AtUniverse* universe = AiUniverse(); @@ -58,12 +56,8 @@ int main(int argc, char **argv) std::cerr<<"For "<