HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SdfPrimSpec Class Reference

#include <primSpec.h>

+ Inheritance diagram for SdfPrimSpec:

Public Types

typedef SdfPrimSpecView NameChildrenView
 
typedef SdfPropertySpecView PropertySpecView
 
typedef SdfAttributeSpecView AttributeSpecView
 
typedef SdfRelationshipSpecView RelationshipSpecView
 

Public Member Functions

Namespace hierarchy
SDF_API SdfPrimSpecHandle GetNameRoot () const
 Returns the prim's namespace pseudo-root prim. More...
 
SDF_API SdfPrimSpecHandle GetNameParent () const
 
SDF_API SdfPrimSpecHandle GetRealNameParent () const
 Returns the prim's namespace parent. More...
 
SDF_API NameChildrenView GetNameChildren () const
 Returns a keyed vector view of the prim's namespace children. More...
 
SDF_API void SetNameChildren (const SdfPrimSpecHandleVector &)
 Updates nameChildren to match the given vector of prims. More...
 
SDF_API bool InsertNameChild (const SdfPrimSpecHandle &child, int index=-1)
 
SDF_API bool RemoveNameChild (const SdfPrimSpecHandle &child)
 Removes the child. Returns true if successful, false if failed. More...
 
SDF_API SdfNameChildrenOrderProxy GetNameChildrenOrder () const
 
SDF_API bool HasNameChildrenOrder () const
 Returns true if this prim has name children order specified. More...
 
SDF_API void SetNameChildrenOrder (const std::vector< TfToken > &names)
 
SDF_API void InsertInNameChildrenOrder (const TfToken &name, int index=-1)
 
SDF_API void RemoveFromNameChildrenOrder (const TfToken &name)
 Removes a name child name from the name children order. More...
 
SDF_API void RemoveFromNameChildrenOrderByIndex (int index)
 Removes a name child name from the name children order by index. More...
 
SDF_API void ApplyNameChildrenOrder (std::vector< TfToken > *vec) const
 
Properties
SDF_API PropertySpecView GetProperties () const
 Returns the prim's properties. More...
 
SDF_API void SetProperties (const SdfPropertySpecHandleVector &)
 Updates properties to match the given vector of properties. More...
 
SDF_API bool InsertProperty (const SdfPropertySpecHandle &property, int index=-1)
 
SDF_API void RemoveProperty (const SdfPropertySpecHandle &property)
 Removes the property. More...
 
SDF_API AttributeSpecView GetAttributes () const
 Returns a view of the attributes of this prim. More...
 
SDF_API RelationshipSpecView GetRelationships () const
 Returns a view of the relationships of this prim. More...
 
SDF_API SdfPropertyOrderProxy GetPropertyOrder () const
 
SDF_API bool HasPropertyOrder () const
 Returns true if this prim has a property ordering specified. More...
 
SDF_API void SetPropertyOrder (const std::vector< TfToken > &names)
 
SDF_API void InsertInPropertyOrder (const TfToken &name, int index=-1)
 
SDF_API void RemoveFromPropertyOrder (const TfToken &name)
 Remove a property name from the property order. More...
 
SDF_API void RemoveFromPropertyOrderByIndex (int index)
 Remove a property name from the property order by index. More...
 
SDF_API void ApplyPropertyOrder (std::vector< TfToken > *vec) const
 
Lookup
SDF_API SdfSpecHandle GetObjectAtPath (const SdfPath &path) const
 
SDF_API SdfPrimSpecHandle GetPrimAtPath (const SdfPath &path) const
 
SDF_API SdfPropertySpecHandle GetPropertyAtPath (const SdfPath &path) const
 
SDF_API SdfAttributeSpecHandle GetAttributeAtPath (const SdfPath &path) const
 
SDF_API SdfRelationshipSpecHandle GetRelationshipAtPath (const SdfPath &path) const
 
Metadata
SDF_API TfToken GetTypeName () const
 
SDF_API void SetTypeName (const std::string &value)
 Sets the typeName of the model prim. More...
 
SDF_API std::string GetComment () const
 
SDF_API void SetComment (const std::string &value)
 Sets the comment string for this prim spec. More...
 
SDF_API std::string GetDocumentation () const
 
SDF_API void SetDocumentation (const std::string &value)
 Sets the documentation string for this prim spec. More...
 
SDF_API bool GetActive () const
 
SDF_API void SetActive (bool value)
 Sets whether this prim spec is active. More...
 
SDF_API bool HasActive () const
 Returns true if this prim spec has an opinion about active. More...
 
SDF_API void ClearActive ()
 Removes the active opinion in this prim spec if there is one. More...
 
SDF_API bool GetHidden () const
 
SDF_API void SetHidden (bool value)
 Sets whether this prim spec will be hidden in browsers. More...
 
SDF_API TfToken GetKind () const
 
SDF_API void SetKind (const TfToken &value)
 Sets this prim spec's kind. More...
 
SDF_API bool HasKind () const
 Returns true if this prim spec has an opinion about kind. More...
 
SDF_API void ClearKind ()
 Remove the kind opinion from this prim spec if there is one. More...
 
SDF_API TfToken GetSymmetryFunction () const
 
SDF_API void SetSymmetryFunction (const TfToken &functionName)
 
SDF_API SdfDictionaryProxy GetSymmetryArguments () const
 
SDF_API void SetSymmetryArgument (const std::string &name, const VtValue &value)
 
SDF_API std::string GetSymmetricPeer () const
 
SDF_API void SetSymmetricPeer (const std::string &peerName)
 
SDF_API std::string GetPrefix () const
 
SDF_API void SetPrefix (const std::string &value)
 Sets the prefix string for this prim spec. More...
 
SDF_API std::string GetSuffix () const
 
SDF_API void SetSuffix (const std::string &value)
 Sets the suffix string for this prim spec. More...
 
SDF_API SdfDictionaryProxy GetCustomData () const
 
SDF_API SdfDictionaryProxy GetAssetInfo () const
 
SDF_API void SetCustomData (const std::string &name, const VtValue &value)
 
SDF_API void SetAssetInfo (const std::string &name, const VtValue &value)
 
SDF_API SdfSpecifier GetSpecifier () const
 Returns the spec specifier (def, over or class). More...
 
SDF_API void SetSpecifier (SdfSpecifier value)
 Sets the spec specifier (def or over). More...
 
SDF_API SdfPermission GetPermission () const
 
SDF_API void SetPermission (SdfPermission value)
 Sets the prim's permission restriction. More...
 
SDF_API VtDictionary GetPrefixSubstitutions () const
 
SDF_API void SetPrefixSubstitutions (const VtDictionary &prefixSubstitutions)
 Sets the prefixSubstitutions dictionary for this prim spec. More...
 
SDF_API VtDictionary GetSuffixSubstitutions () const
 
SDF_API void SetSuffixSubstitutions (const VtDictionary &suffixSubstitutions)
 Sets the suffixSubstitutions dictionary for this prim spec. More...
 
SDF_API void SetInstanceable (bool instanceable)
 Sets the value for the prim's instanceable flag. More...
 
SDF_API bool GetInstanceable () const
 Returns the value for the prim's instanceable flag. More...
 
SDF_API bool HasInstanceable () const
 
SDF_API void ClearInstanceable ()
 Clears the value for the prim's instanceable flag. More...
 
Payloads
SDF_API SdfPayloadsProxy GetPayloadList () const
 
SDF_API bool HasPayloads () const
 Returns true if this prim has payloads set. More...
 
SDF_API void ClearPayloadList ()
 Clears the payloads for this prim. More...
 
Inherits
SDF_API SdfInheritsProxy GetInheritPathList () const
 
SDF_API bool HasInheritPaths () const
 Returns true if this prim has inherit paths set. More...
 
SDF_API void ClearInheritPathList ()
 Clears the inherit paths for this prim. More...
 
Specializes
SDF_API SdfSpecializesProxy GetSpecializesList () const
 
SDF_API bool HasSpecializes () const
 Returns true if this prim has specializes set. More...
 
SDF_API void ClearSpecializesList ()
 Clears the specializes for this prim. More...
 
References
SDF_API SdfReferencesProxy GetReferenceList () const
 
SDF_API bool HasReferences () const
 Returns true if this prim has references set. More...
 
SDF_API void ClearReferenceList ()
 Clears the references for this prim. More...
 
Variants
SDF_API SdfVariantSetNamesProxy GetVariantSetNameList () const
 
SDF_API bool HasVariantSetNames () const
 Returns true if this prim has variant sets set. More...
 
SDF_API std::vector< std::stringGetVariantNames (const std::string &name) const
 Returns list of variant names for the given variant set. More...
 
SDF_API SdfVariantSetsProxy GetVariantSets () const
 
SDF_API void RemoveVariantSet (const std::string &name)
 
SDF_API SdfVariantSelectionProxy GetVariantSelections () const
 
SDF_API void SetVariantSelection (const std::string &variantSetName, const std::string &variantName)
 
SDF_API void BlockVariantSelection (const std::string &variantSetName)
 
Relocates
SDF_API SdfRelocatesMapProxy GetRelocates () const
 
SDF_API void SetRelocates (const SdfRelocatesMap &newMap)
 
SDF_API bool HasRelocates () const
 
SDF_API void ClearRelocates ()
 Clears the relocates opinion for this prim. More...
 
- Public Member Functions inherited from SdfSpec
SDF_API SdfSpecoperator= (const SdfSpec &other)
 
SDF_API ~SdfSpec ()
 
SDF_API const SdfSchemaBaseGetSchema () const
 Returns the SdfSchemaBase for the layer that owns this spec. More...
 
SDF_API SdfSpecType GetSpecType () const
 
SDF_API bool IsDormant () const
 Returns true if this object is invalid or expired. More...
 
SDF_API SdfLayerHandle GetLayer () const
 Returns the layer that this object belongs to. More...
 
SDF_API SdfPath GetPath () const
 Returns the scene path of this object. More...
 
SDF_API bool PermissionToEdit () const
 Returns whether this object's layer can be edited. More...
 
SDF_API std::vector< TfTokenListInfoKeys () const
 
SDF_API std::vector< TfTokenGetMetaDataInfoKeys () const
 
SDF_API TfToken GetMetaDataDisplayGroup (TfToken const &key) const
 
SDF_API VtValue GetInfo (const TfToken &key) const
 
SDF_API void SetInfo (const TfToken &key, const VtValue &value)
 
SDF_API void SetInfoDictionaryValue (const TfToken &dictionaryKey, const TfToken &entryKey, const VtValue &value)
 
SDF_API bool HasInfo (const TfToken &key) const
 
SDF_API void ClearInfo (const TfToken &key)
 
SDF_API TfType GetTypeForInfo (const TfToken &key) const
 Returns the data type for the info with the given key. More...
 
SDF_API const VtValueGetFallbackForInfo (const TfToken &key) const
 Returns the fallback for the info with the given key. More...
 
SDF_API bool WriteToStream (std::ostream &, size_t indent=0) const
 Writes this spec to the given stream. More...
 
SDF_API bool IsInert (bool ignoreChildren=false) const
 
SDF_API std::vector< TfTokenListFields () const
 Returns all fields with values. More...
 
SDF_API bool HasField (const TfToken &name) const
 
template<class T >
bool HasField (const TfToken &name, T *value) const
 
SDF_API VtValue GetField (const TfToken &name) const
 Returns a field value by name. More...
 
template<typename T >
T GetFieldAs (const TfToken &name, const T &defaultValue=T()) const
 
SDF_API bool SetField (const TfToken &name, const VtValue &value)
 Sets a field value as a boxed VtValue. More...
 
template<typename T >
bool SetField (const TfToken &name, const T &value)
 Sets a field value of type T. More...
 
SDF_API bool ClearField (const TfToken &name)
 Clears a field. More...
 
SDF_API bool operator== (const SdfSpec &rhs) const
 
SDF_API bool operator< (const SdfSpec &rhs) const
 

Static Public Member Functions

Spec creation
static SDF_API SdfPrimSpecHandle New (const SdfLayerHandle &parentLayer, const std::string &name, SdfSpecifier spec, const std::string &typeName=std::string())
 
static SDF_API SdfPrimSpecHandle New (const SdfPrimSpecHandle &parentPrim, const std::string &name, SdfSpecifier spec, const std::string &typeName=std::string())
 

Name

static SDF_API bool IsValidName (const std::string &name)
 Returns true if the given string is a valid prim name. More...
 
SDF_API const std::stringGetName () const
 Returns the prim's name. More...
 
SDF_API TfToken GetNameToken () const
 Returns the prim's name, as a token. More...
 
SDF_API bool CanSetName (const std::string &newName, std::string *whyNot) const
 
SDF_API bool SetName (const std::string &newName, bool validate=true)
 

Additional Inherited Members

- Protected Member Functions inherited from SdfSpec
bool _MoveSpec (const SdfPath &oldPath, const SdfPath &newPath) const
 
bool _DeleteSpec (const SdfPath &path)
 

Detailed Description

Represents a prim description in an SdfLayer object.

Every SdfPrimSpec object is defined in a layer. It is identified by its path (SdfPath class) in the namespace hierarchy of its layer. SdfPrimSpecs can be created using the New() method as children of either the containing SdfLayer itself (for "root level" prims), or as children of other SdfPrimSpec objects to extend a hierarchy. The helper function SdfCreatePrimInLayer() can be used to quickly create a hierarchy of primSpecs.

SdfPrimSpec objects have properties of two general types: attributes (containing values) and relationships (different types of connections to other prims and attributes). Attributes are represented by the SdfAttributeSpec class and relationships by the SdfRelationshipSpec class. Each prim has its own namespace of properties. Properties are stored and accessed by their name.

SdfPrimSpec objects have a typeName, permission restriction, and they reference and inherit prim paths. Permission restrictions control which other layers may refer to, or express opinions about a prim. See the SdfPermission class for more information.

Todo:
  • Insert doc about references and inherits here.
  • Should have validate... methods for name, children, properties

Definition at line 74 of file primSpec.h.

Member Typedef Documentation

Definition at line 79 of file primSpec.h.

Definition at line 80 of file primSpec.h.

Member Function Documentation

SDF_API void SdfPrimSpec::ApplyNameChildrenOrder ( std::vector< TfToken > *  vec) const

Reorders the given list of child names according to the reorder nameChildren statement for this prim.

This routine employs the standard list editing operation for ordered items in a ListEditor.

SDF_API void SdfPrimSpec::ApplyPropertyOrder ( std::vector< TfToken > *  vec) const

Reorders the given list of property names according to the reorder properties statement for this prim.

This routine employs the standard list editing operation for ordered items in a ListEditor.

SDF_API void SdfPrimSpec::BlockVariantSelection ( const std::string variantSetName)

Blocks the variant selected for the given variant set by setting the variant selection to empty.

SDF_API bool SdfPrimSpec::CanSetName ( const std::string newName,
std::string whyNot 
) const

Returns true if setting the prim spec's name to newName will succeed.

Returns false if it won't, and sets whyNot with a string describing why not.

SDF_API void SdfPrimSpec::ClearActive ( )

Removes the active opinion in this prim spec if there is one.

SDF_API void SdfPrimSpec::ClearInheritPathList ( )

Clears the inherit paths for this prim.

SDF_API void SdfPrimSpec::ClearInstanceable ( )

Clears the value for the prim's instanceable flag.

SDF_API void SdfPrimSpec::ClearKind ( )

Remove the kind opinion from this prim spec if there is one.

SDF_API void SdfPrimSpec::ClearPayloadList ( )

Clears the payloads for this prim.

SDF_API void SdfPrimSpec::ClearReferenceList ( )

Clears the references for this prim.

SDF_API void SdfPrimSpec::ClearRelocates ( )

Clears the relocates opinion for this prim.

SDF_API void SdfPrimSpec::ClearSpecializesList ( )

Clears the specializes for this prim.

SDF_API bool SdfPrimSpec::GetActive ( ) const

Returns whether this prim spec is active.

The default value for active is true.

SDF_API SdfDictionaryProxy SdfPrimSpec::GetAssetInfo ( ) const

Returns the asset info dictionary for this prim.

The default value is an empty dictionary.

The asset info dictionary is used to annotate prims representing the root-prims of assets (generally organized as models) with various data related to asset management. For example, asset name, root layer identifier, asset version etc.

SDF_API SdfAttributeSpecHandle SdfPrimSpec::GetAttributeAtPath ( const SdfPath path) const

Returns an attribute given its path.

Returns invalid handle if there is no attribute at path. This is simply a more specifically typed version of GetObjectAtPath.

SDF_API AttributeSpecView SdfPrimSpec::GetAttributes ( ) const

Returns a view of the attributes of this prim.

SDF_API std::string SdfPrimSpec::GetComment ( ) const

Returns the comment string for this prim spec.

The default value for comment is "".

SDF_API SdfDictionaryProxy SdfPrimSpec::GetCustomData ( ) const

Returns the custom data for this prim.

The default value for custom data is an empty dictionary.

Custom data is for use by plugins or other non-tools supplied extensions that need to be able to store data attached to arbitrary scene objects. Note that if the only objects you want to store data on are prims, using custom attributes is probably a better choice. But if you need to possibly store this data on attributes or relationships or as annotations on reference arcs, then custom data is an appropriate choice.

SDF_API std::string SdfPrimSpec::GetDocumentation ( ) const

Returns the documentation string for this prim spec.

The default value for documentation is "".

SDF_API bool SdfPrimSpec::GetHidden ( ) const

Returns whether this prim spec will be hidden in browsers.

The default value for hidden is false.

SDF_API SdfInheritsProxy SdfPrimSpec::GetInheritPathList ( ) const

Returns a proxy for the prim's inherit paths.

Inherit paths for this prim may be modified through the proxy.

SDF_API bool SdfPrimSpec::GetInstanceable ( ) const

Returns the value for the prim's instanceable flag.

SDF_API TfToken SdfPrimSpec::GetKind ( ) const

Returns this prim spec's kind.

The default value for kind is an empty TfToken.

SDF_API const std::string& SdfPrimSpec::GetName ( ) const

Returns the prim's name.

SDF_API NameChildrenView SdfPrimSpec::GetNameChildren ( ) const

Returns a keyed vector view of the prim's namespace children.

SDF_API SdfNameChildrenOrderProxy SdfPrimSpec::GetNameChildrenOrder ( ) const

Returns the list of child names for this prim's reorder. nameChildren statement.

See SetNameChildrenOrder() for more info.

SDF_API SdfPrimSpecHandle SdfPrimSpec::GetNameParent ( ) const

Returns the prim's namespace parent.

This does not return the pseudo-root for root prims. Most algorithms that scan the namespace hierarchy upwards don't want to process the pseudo-root the same way as actual prims. Algorithms that do can always call GetRealNameParent().

SDF_API SdfPrimSpecHandle SdfPrimSpec::GetNameRoot ( ) const

Returns the prim's namespace pseudo-root prim.

SDF_API TfToken SdfPrimSpec::GetNameToken ( ) const

Returns the prim's name, as a token.

SDF_API SdfSpecHandle SdfPrimSpec::GetObjectAtPath ( const SdfPath path) const

Returns the object for the given path.

If path is relative then it will be interpreted as relative to this prim. If it is absolute then it will be interpreted as absolute in this prim's layer.

Returns invalid handle if there is no object at path.

SDF_API SdfPayloadsProxy SdfPrimSpec::GetPayloadList ( ) const

Returns a proxy for the prim's payloads.

Payloads for this prim may be modified through the proxy.

SDF_API SdfPermission SdfPrimSpec::GetPermission ( ) const

Returns the prim's permission restriction.

The default value for permission is SdfPermissionPublic.

SDF_API std::string SdfPrimSpec::GetPrefix ( ) const

Returns the prefix string for this prim spec.

The default value for prefix is "".

SDF_API VtDictionary SdfPrimSpec::GetPrefixSubstitutions ( ) const

Returns the prefixSubstitutions dictionary for this prim spec.

The default value for prefixSubstitutions is an empty VtDictionary.

SDF_API SdfPrimSpecHandle SdfPrimSpec::GetPrimAtPath ( const SdfPath path) const

Returns a prim given its path.

Returns invalid handle if there is no prim at path. This is simply a more specifically typed version of GetObjectAtPath.

SDF_API PropertySpecView SdfPrimSpec::GetProperties ( ) const

Returns the prim's properties.

SDF_API SdfPropertySpecHandle SdfPrimSpec::GetPropertyAtPath ( const SdfPath path) const

Returns a property given its path.

Returns invalid handle if there is no property at path. This is simply a more specifically typed version of GetObjectAtPath.

SDF_API SdfPropertyOrderProxy SdfPrimSpec::GetPropertyOrder ( ) const

Returns the list of property names for this prim's reorder properties statement.

See SetPropertyOrder() for more info.

SDF_API SdfPrimSpecHandle SdfPrimSpec::GetRealNameParent ( ) const

Returns the prim's namespace parent.

SDF_API SdfReferencesProxy SdfPrimSpec::GetReferenceList ( ) const

Returns a proxy for the prim's references.

References for this prim may be modified through the proxy.

SDF_API SdfRelationshipSpecHandle SdfPrimSpec::GetRelationshipAtPath ( const SdfPath path) const

Returns a relationship given its path.

Returns invalid handle if there is no relationship at path. This is simply a more specifically typed version of GetObjectAtPath.

SDF_API RelationshipSpecView SdfPrimSpec::GetRelationships ( ) const

Returns a view of the relationships of this prim.

SDF_API SdfRelocatesMapProxy SdfPrimSpec::GetRelocates ( ) const

Get an editing proxy for the map of namespace relocations specified on this prim.

The map of namespace relocation paths is editable in-place via this editing proxy. Individual source-target pairs can be added, removed, or altered using common map operations.

The map is organized as target SdfPath indexed by source SdfPath. Key and value paths are stored as absolute regardless of how they're added.

SDF_API SdfSpecializesProxy SdfPrimSpec::GetSpecializesList ( ) const

Returns a proxy for the prim's specializes paths.

Specializes for this prim may be modified through the proxy.

SDF_API SdfSpecifier SdfPrimSpec::GetSpecifier ( ) const

Returns the spec specifier (def, over or class).

SDF_API std::string SdfPrimSpec::GetSuffix ( ) const

Returns the suffix string for this prim spec.

The default value for suffix is "".

SDF_API VtDictionary SdfPrimSpec::GetSuffixSubstitutions ( ) const

Returns the suffixSubstitutions dictionary for this prim spec.

The default value for suffixSubstitutions is an empty VtDictionary.

SDF_API std::string SdfPrimSpec::GetSymmetricPeer ( ) const

Returns the symmetric peer for this prim.

The default value for symmetric peer is an empty string.

SDF_API SdfDictionaryProxy SdfPrimSpec::GetSymmetryArguments ( ) const

Returns the symmetry arguments for this prim.

The default value for symmetry arguments is an empty dictionary.

SDF_API TfToken SdfPrimSpec::GetSymmetryFunction ( ) const

Returns the symmetry function for this prim.

The default value for symmetry function is an empty token.

SDF_API TfToken SdfPrimSpec::GetTypeName ( ) const

Returns the typeName of the prim.

The typeName should be meaningful to a higher level prim definition system.

The default value for typeName is the empty token.

SDF_API std::vector<std::string> SdfPrimSpec::GetVariantNames ( const std::string name) const

Returns list of variant names for the given variant set.

SDF_API SdfVariantSelectionProxy SdfPrimSpec::GetVariantSelections ( ) const

Returns an editable map whose keys are variant set names and whose values are the variants selected for each set.

SDF_API SdfVariantSetNamesProxy SdfPrimSpec::GetVariantSetNameList ( ) const

Returns a proxy for the prim's variant sets.

Variant sets for this prim may be modified through the proxy.

SDF_API SdfVariantSetsProxy SdfPrimSpec::GetVariantSets ( ) const

Returns the variant sets.

The result maps variant set names to variant sets. Variant sets may be removed through the proxy.

SDF_API bool SdfPrimSpec::HasActive ( ) const

Returns true if this prim spec has an opinion about active.

SDF_API bool SdfPrimSpec::HasInheritPaths ( ) const

Returns true if this prim has inherit paths set.

SDF_API bool SdfPrimSpec::HasInstanceable ( ) const

Returns true if this prim spec has a value authored for its instanceable flag, false otherwise.

SDF_API bool SdfPrimSpec::HasKind ( ) const

Returns true if this prim spec has an opinion about kind.

SDF_API bool SdfPrimSpec::HasNameChildrenOrder ( ) const

Returns true if this prim has name children order specified.

SDF_API bool SdfPrimSpec::HasPayloads ( ) const

Returns true if this prim has payloads set.

SDF_API bool SdfPrimSpec::HasPropertyOrder ( ) const

Returns true if this prim has a property ordering specified.

SDF_API bool SdfPrimSpec::HasReferences ( ) const

Returns true if this prim has references set.

SDF_API bool SdfPrimSpec::HasRelocates ( ) const

Returns true if this prim has any relocates opinion, including that there should be no relocates (i.e. an empty map). An empty map (no relocates) does not mean the same thing as a missing map (no opinion).

SDF_API bool SdfPrimSpec::HasSpecializes ( ) const

Returns true if this prim has specializes set.

SDF_API bool SdfPrimSpec::HasVariantSetNames ( ) const

Returns true if this prim has variant sets set.

SDF_API void SdfPrimSpec::InsertInNameChildrenOrder ( const TfToken name,
int  index = -1 
)

Adds a new name child name in the name children order. If index is -1, the name is inserted at the end.

SDF_API void SdfPrimSpec::InsertInPropertyOrder ( const TfToken name,
int  index = -1 
)

Add a new property name in the property order. If index is -1, the name is inserted at the end.

SDF_API bool SdfPrimSpec::InsertNameChild ( const SdfPrimSpecHandle &  child,
int  index = -1 
)

Inserts a child.

index is ignored except for range checking; -1 is permitted.

Returns true if successful, false if failed.

SDF_API bool SdfPrimSpec::InsertProperty ( const SdfPropertySpecHandle &  property,
int  index = -1 
)

Inserts a property.

index is ignored except for range checking; -1 is permitted.

Returns true if successful, false if failed.

static SDF_API bool SdfPrimSpec::IsValidName ( const std::string name)
static

Returns true if the given string is a valid prim name.

static SDF_API SdfPrimSpecHandle SdfPrimSpec::New ( const SdfLayerHandle &  parentLayer,
const std::string name,
SdfSpecifier  spec,
const std::string typeName = std::string() 
)
static

Create a root prim spec.

Creates a prim spec with a name, specifier and typeName as a root prim in the given layer.

static SDF_API SdfPrimSpecHandle SdfPrimSpec::New ( const SdfPrimSpecHandle &  parentPrim,
const std::string name,
SdfSpecifier  spec,
const std::string typeName = std::string() 
)
static

Create a prim spec.

Creates a prim spec with a name, specifier and typeName as a namespace child of the given prim.

See Also
SdfCreatePrimInLayer() to create a PrimSpec with all required ancestor specs as SdfSpecifierOver.
SDF_API void SdfPrimSpec::RemoveFromNameChildrenOrder ( const TfToken name)

Removes a name child name from the name children order.

SDF_API void SdfPrimSpec::RemoveFromNameChildrenOrderByIndex ( int  index)

Removes a name child name from the name children order by index.

SDF_API void SdfPrimSpec::RemoveFromPropertyOrder ( const TfToken name)

Remove a property name from the property order.

SDF_API void SdfPrimSpec::RemoveFromPropertyOrderByIndex ( int  index)

Remove a property name from the property order by index.

SDF_API bool SdfPrimSpec::RemoveNameChild ( const SdfPrimSpecHandle &  child)

Removes the child. Returns true if successful, false if failed.

SDF_API void SdfPrimSpec::RemoveProperty ( const SdfPropertySpecHandle &  property)

Removes the property.

SDF_API void SdfPrimSpec::RemoveVariantSet ( const std::string name)

Removes the variant set with the given name.

Note that the set's name should probably also be removed from the variant set names list.

SDF_API void SdfPrimSpec::SetActive ( bool  value)

Sets whether this prim spec is active.

SDF_API void SdfPrimSpec::SetAssetInfo ( const std::string name,
const VtValue value 
)

Sets a asset info entry for this prim.

If value is empty, then this removes the given asset info entry.

See Also
GetAssetInfo()
SDF_API void SdfPrimSpec::SetComment ( const std::string value)

Sets the comment string for this prim spec.

SDF_API void SdfPrimSpec::SetCustomData ( const std::string name,
const VtValue value 
)

Sets a custom data entry for this prim.

If value is empty, then this removes the given custom data entry.

SDF_API void SdfPrimSpec::SetDocumentation ( const std::string value)

Sets the documentation string for this prim spec.

SDF_API void SdfPrimSpec::SetHidden ( bool  value)

Sets whether this prim spec will be hidden in browsers.

SDF_API void SdfPrimSpec::SetInstanceable ( bool  instanceable)

Sets the value for the prim's instanceable flag.

SDF_API void SdfPrimSpec::SetKind ( const TfToken value)

Sets this prim spec's kind.

SDF_API bool SdfPrimSpec::SetName ( const std::string newName,
bool  validate = true 
)

Sets the prim's name.

Children prims must be unique by name. It is an error to set the name to the same name as an existing child of this prim's parent.

Setting validate to false, will skip validation of the newName (that is, CanSetName will not be called).

Returns true if successful, false otherwise.

SDF_API void SdfPrimSpec::SetNameChildren ( const SdfPrimSpecHandleVector &  )

Updates nameChildren to match the given vector of prims.

SDF_API void SdfPrimSpec::SetNameChildrenOrder ( const std::vector< TfToken > &  names)

Given a list of (possibly sparse) child names, authors a reorder nameChildren statement for this prim.

The reorder statement can modify the order of name children during composition. This order doesn't affect GetNameChildren(), InsertNameChild(), SetNameChildren(), et al.

SDF_API void SdfPrimSpec::SetPermission ( SdfPermission  value)

Sets the prim's permission restriction.

SDF_API void SdfPrimSpec::SetPrefix ( const std::string value)

Sets the prefix string for this prim spec.

SDF_API void SdfPrimSpec::SetPrefixSubstitutions ( const VtDictionary prefixSubstitutions)

Sets the prefixSubstitutions dictionary for this prim spec.

SDF_API void SdfPrimSpec::SetProperties ( const SdfPropertySpecHandleVector &  )

Updates properties to match the given vector of properties.

SDF_API void SdfPrimSpec::SetPropertyOrder ( const std::vector< TfToken > &  names)

Given a list of (possibly sparse) property names, authors a reorder properties statement for this prim.

The reorder statement can modify the order of properties during composition. This order doesn't affect GetProperties(), InsertProperty(), SetProperties(), et al.

SDF_API void SdfPrimSpec::SetRelocates ( const SdfRelocatesMap newMap)

Set the entire map of namespace relocations specified on this prim. Use the editing proxy for modifying single paths in the map.

SDF_API void SdfPrimSpec::SetSpecifier ( SdfSpecifier  value)

Sets the spec specifier (def or over).

SDF_API void SdfPrimSpec::SetSuffix ( const std::string value)

Sets the suffix string for this prim spec.

SDF_API void SdfPrimSpec::SetSuffixSubstitutions ( const VtDictionary suffixSubstitutions)

Sets the suffixSubstitutions dictionary for this prim spec.

SDF_API void SdfPrimSpec::SetSymmetricPeer ( const std::string peerName)

Sets a symmetric peer for this prim.

If peerName is empty, then this removes the symmetric peer for this prim.

SDF_API void SdfPrimSpec::SetSymmetryArgument ( const std::string name,
const VtValue value 
)

Sets a symmetry argument for this prim.

If value is empty, then this removes the setting for the given symmetry argument name.

SDF_API void SdfPrimSpec::SetSymmetryFunction ( const TfToken functionName)

Sets the symmetry function for this prim.

If functionName is an empty token, then this removes any symmetry function for the given prim.

SDF_API void SdfPrimSpec::SetTypeName ( const std::string value)

Sets the typeName of the model prim.

SDF_API void SdfPrimSpec::SetVariantSelection ( const std::string variantSetName,
const std::string variantName 
)

Sets the variant selected for the given variant set. If variantName is empty, then this removes the variant selection opinion for the variant set variantSetName. To explicitly set the variant selection to be empty, use BlockVariantSelection instead.


The documentation for this class was generated from the following file: