From 6767c67e86c0fc4c9cb47809789919a9651ac2f7 Mon Sep 17 00:00:00 2001 From: Antonin Stefanutti Date: Tue, 3 Dec 2024 18:47:45 +0100 Subject: [PATCH] Update cloth example with new ModelBuilder coloring API --- warp/examples/sim/example_cloth.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/warp/examples/sim/example_cloth.py b/warp/examples/sim/example_cloth.py index 3d13ce34..5e38ba9e 100644 --- a/warp/examples/sim/example_cloth.py +++ b/warp/examples/sim/example_cloth.py @@ -100,7 +100,6 @@ def __init__( tri_ka=1e4, tri_kd=1e-5, edge_ke=100, - color_particles=True, ) usd_stage = Usd.Stage.Open(os.path.join(warp.examples.get_asset_directory(), "bunny.usd")) @@ -122,6 +121,9 @@ def __init__( kf=1.0e1, ) + if self.integrator_type == IntegratorType.VBD: + builder.color() + self.model = builder.finalize() self.model.ground = True self.model.soft_contact_ke = 1.0e4