Skip to content

Commit

Permalink
Stop using deprecated functions in the testsuite (#2182)
Browse files Browse the repository at this point in the history
* Stop using deprecated functions in the testsuite

* Remove useless AtString conversion
  • Loading branch information
sebastienblor authored Jan 30, 2025
1 parent 3843c2e commit 42b1cac
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions testsuite/test_0038/data/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ int main(int argc, char **argv)
AiSceneLoad(render_universe, "scene.ass", nullptr);
// load the usd procedural (containing a sphere) in a separate universe
AtNode *proc_a = AiNode(proc_universe, "usd", "usd_proc_a");
AiNodeSetStr(proc_a, "filename", "usd_proc_a.usda");
AiNodeSetStr(proc_a, AtString("filename"), AtString("usd_proc_a.usda"));
// Call the viewport API on the usd procedural, and fill the main universe
AiProceduralViewport(proc_a, render_universe, AI_PROC_POLYGONS);
AtNode *proc_b = AiNode(proc_universe, "usd", "usd_proc_b");
AiNodeSetStr(proc_b, "filename", "usd_proc_b.usda");
AiNodeSetStr(proc_b, AtString("filename"), AtString("usd_proc_b.usda"));
// Call the viewport API on the usd procedural, and fill the main universe
AiProceduralViewport(proc_b, render_universe, AI_PROC_BOXES);

Expand Down
2 changes: 1 addition & 1 deletion testsuite/test_0142/data/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ int main(int argc, char **argv)
overrides += "rel material:binding = </materials/lambert1>\nuniform token orientation = \"rightHanded\"\n";
overrides += "point3f[] points = [(-0.5, -0.5, 0.5), (0.5, -0.5, 0.5), (-0.5, 0.5, 0.5), (0.5, 0.5, 0.5), (-0.5, 0.5, -0.5), (0.5, 0.5, -0.5), (-0.5, -0.5, -0.5), (0.5, -0.5, -0.5)]\n}\n}";
AiArraySetStr(array, 0, overrides.c_str());
AiNodeSetArray(proc, "overrides", array);
AiNodeSetArray(proc, AtString("overrides"), array);

AiProceduralViewport(proc, render_universe, AI_PROC_POLYGONS);

Expand Down
4 changes: 2 additions & 2 deletions testsuite/test_0148/data/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ int main(int argc, char **argv)

AtUniverse *universe = AiUniverse();
AiSceneLoad(universe, "scene_exported.usda", nullptr);
AtNode *mesh = AiNodeLookUpByName(universe, "/root/world/geo/primitive");
AtNode *mesh = AiNodeLookUpByName(universe, AtString("/root/world/geo/primitive"));
if (mesh) {
AtArray *nsides = AiNodeGetArray(mesh, "nsides");
AtArray *nsides = AiNodeGetArray(mesh, AtString("nsides"));
if (nsides && AiArrayGetNumElements(nsides) == 2) {
AiEnd();
return 0;
Expand Down
4 changes: 2 additions & 2 deletions testsuite/test_0161/data/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ int main(int argc, char **argv)
AiSceneLoad(render_universe, "scene.ass", nullptr);
AtUniverse *proc_universe = AiUniverse();
AtNode *proc = AiNode(proc_universe, "usd", "usd_proc");
AiNodeSetStr(proc, "filename", "nested_proc.usda");
AiNodeSetStr(proc, AtString("filename"), AtString("nested_proc.usda"));

AiProceduralViewport(proc, render_universe, AI_PROC_POLYGONS);

AtNode *proc2 = AiNode(proc_universe, "usd", "usd_proc2");
AiNodeSetStr(proc2, "filename", "cube.usda");
AiNodeSetStr(proc2, AtString("filename"), AtString("cube.usda"));

AiProceduralViewport(proc2, render_universe, AI_PROC_POLYGONS);

Expand Down
2 changes: 1 addition & 1 deletion testsuite/test_0162/data/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int main(int argc, char **argv)
AiSceneLoad(render_universe, "scene.ass", nullptr);
AtUniverse *proc_universe = AiUniverse();
AtNode *proc = AiNode(proc_universe, "usd", "usd_proc");
AiNodeSetStr(proc, "filename", "nested_proc.usda");
AiNodeSetStr(proc, AtString("filename"), AtString("nested_proc.usda"));

AiProceduralViewport(proc, render_universe, AI_PROC_POINTS, params);

Expand Down
2 changes: 1 addition & 1 deletion testsuite/test_0168/data/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int main(int argc, char **argv)
AiSceneLoad(render_universe, "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");
AiNodeSetStr(proc_a, AtString("filename"), AtString("scene.usda"));
// Call the viewport API on the usd procedural, and fill the main universe
AiProceduralViewport(proc_a, render_universe, AI_PROC_POLYGONS);

Expand Down

0 comments on commit 42b1cac

Please sign in to comment.