PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
5.42k stars 1.13k forks source link

Unable to set PathExpressionArray in Python #3046

Open dgovil opened 1 week ago

dgovil commented 1 week ago

Description of Issue

I’m trying to create an asset with a Path Expression array I thought this code should work, but it errors out

array = prim.CreateAttribute("array", Sdf.ValueTypeNames.PathExpressionArray, custom=False) 

array.Set([Sdf.PathExpression("Hello"), Sdf.PathExpression("World")])

The error is

Error in 'pxrInternal_v0_24__pxrReserved__::UsdStage::_SetValueImpl' at line 6723 in file /Users/dhruvgovil/Projects/usd/pxr/usd/usd/stage.cpp : 'Type mismatch for </root.array>: expected 'VtArray<SdfPathExpression>', got '__1::vector<VtValue, __1::allocator<VtValue>>''
jesschimein commented 1 week ago

Filed as internal issue #USD-9561