Skip to main content

PrimSpecMut

Type Alias PrimSpecMut 

Source
pub type PrimSpecMut<'a> = PrimSpec<'a, &'a mut dyn AbstractData>;
Expand description

Mutable typed view of a prim spec. Parallel to C++ SdfPrimSpec.

Aliased Type§

pub struct PrimSpecMut<'a>(/* private fields */);

Implementations§

Source§

impl<'a> PrimSpecMut<'a>

Source

pub fn new( data: &'a mut dyn AbstractData, path: impl Into<Path>, specifier: Specifier, type_name: impl Into<String>, ) -> Result<Self, AuthoringError>

Create or upgrade the prim spec at path with specifier and type_name, mirroring C++ SdfPrimSpec::New. An empty type_name leaves typeName unauthored. Missing ancestor specs are created as over and each parent’s primChildren is updated. When data is a layer’s staging overlay, the structural change is captured when the layer derives its ChangeList at flush.

Source

pub fn over( data: &'a mut dyn AbstractData, path: impl Into<Path>, ) -> Result<Self, AuthoringError>

Ensure an over prim spec exists at path, creating it and any missing ancestors as over while leaving existing def/class specs unchanged. Mirrors C++ SdfCreatePrimInLayer / UsdStage::OverridePrim.