How to set Material Binding to None?

Hi there

def Xform "Root"
{
    def Capsule "Capsule" (
        active = true
        prepend apiSchemas = ["MaterialBindingAPI"]
    )
    {
        uniform token axis = "Y"
        double height = 0.2
        rel material:binding = None (
            bindMaterialAs = "weakerThanDescendants"
        )
        double radius = 0.1
    }
}


I checked the corresponding API and found no method to set it to None. ClearTargets also does not work.

Thanks!

Thanks everyone, I found a way!

  auto directRel = bindingApi.GetDirectBindingRel();
  bound = directRel.SetTargets({});

There are a handful of Unbind methods you might want to consider as well.

Universal Scene Description: UsdShadeMaterialBindingAPI Class Reference

1 Like