Skip to content

Unable to set PathExpressionArray in Python #3046

@dgovil

Description

@dgovil

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>>''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions