|
Represents a prim description in an SdfLayer object. More...
#include <primSpec.h>
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. | |
SDF_API SdfPrimSpecHandle | GetNameParent () const |
Returns the prim's namespace parent. | |
SDF_API SdfPrimSpecHandle | GetRealNameParent () const |
Returns the prim's namespace parent. | |
SDF_API NameChildrenView | GetNameChildren () const |
Returns a keyed vector view of the prim's namespace children. | |
SDF_API void | SetNameChildren (const SdfPrimSpecHandleVector &) |
Updates nameChildren to match the given vector of prims. | |
SDF_API bool | InsertNameChild (const SdfPrimSpecHandle &child, int index=-1) |
Inserts a child. | |
SDF_API bool | RemoveNameChild (const SdfPrimSpecHandle &child) |
Removes the child. Returns true if successful, false if failed. | |
SDF_API SdfNameChildrenOrderProxy | GetNameChildrenOrder () const |
Returns the list of child names for this prim's reorder. | |
SDF_API bool | HasNameChildrenOrder () const |
Returns true if this prim has name children order specified. | |
SDF_API void | SetNameChildrenOrder (const std::vector< TfToken > &names) |
Given a list of (possibly sparse) child names, authors a reorder nameChildren statement for this prim. | |
SDF_API void | InsertInNameChildrenOrder (const TfToken &name, int index=-1) |
Adds a new name child name in the name children order. | |
SDF_API void | RemoveFromNameChildrenOrder (const TfToken &name) |
Removes a name child name from the name children order. | |
SDF_API void | RemoveFromNameChildrenOrderByIndex (int index) |
Removes a name child name from the name children order by index. | |
SDF_API void | ApplyNameChildrenOrder (std::vector< TfToken > *vec) const |
Reorders the given list of child names according to the reorder nameChildren statement for this prim. | |
Properties | |
SDF_API PropertySpecView | GetProperties () const |
Returns the prim's properties. | |
SDF_API void | SetProperties (const SdfPropertySpecHandleVector &) |
Updates properties to match the given vector of properties. | |
SDF_API bool | InsertProperty (const SdfPropertySpecHandle &property, int index=-1) |
Inserts a property. | |
SDF_API void | RemoveProperty (const SdfPropertySpecHandle &property) |
Removes the property. | |
SDF_API AttributeSpecView | GetAttributes () const |
Returns a view of the attributes of this prim. | |
SDF_API RelationshipSpecView | GetRelationships () const |
Returns a view of the relationships of this prim. | |
SDF_API SdfPropertyOrderProxy | GetPropertyOrder () const |
Returns the list of property names for this prim's reorder properties statement. | |
SDF_API bool | HasPropertyOrder () const |
Returns true if this prim has a property ordering specified. | |
SDF_API void | SetPropertyOrder (const std::vector< TfToken > &names) |
Given a list of (possibly sparse) property names, authors a reorder properties statement for this prim. | |
SDF_API void | InsertInPropertyOrder (const TfToken &name, int index=-1) |
Add a new property name in the property order. | |
SDF_API void | RemoveFromPropertyOrder (const TfToken &name) |
Remove a property name from the property order. | |
SDF_API void | RemoveFromPropertyOrderByIndex (int index) |
Remove a property name from the property order by index. | |
SDF_API void | ApplyPropertyOrder (std::vector< TfToken > *vec) const |
Reorders the given list of property names according to the reorder properties statement for this prim. | |
Lookup | |
SDF_API SdfSpecHandle | GetObjectAtPath (const SdfPath &path) const |
Returns the object for the given path . | |
SDF_API SdfPrimSpecHandle | GetPrimAtPath (const SdfPath &path) const |
Returns a prim given its path . | |
SDF_API SdfPropertySpecHandle | GetPropertyAtPath (const SdfPath &path) const |
Returns a property given its path . | |
SDF_API SdfAttributeSpecHandle | GetAttributeAtPath (const SdfPath &path) const |
Returns an attribute given its path . | |
SDF_API SdfRelationshipSpecHandle | GetRelationshipAtPath (const SdfPath &path) const |
Returns a relationship given its path . | |
Metadata | |
SDF_API TfToken | GetTypeName () const |
Returns the typeName of the prim. | |
SDF_API void | SetTypeName (const std::string &value) |
Sets the typeName of the model prim. | |
SDF_API std::string | GetComment () const |
Returns the comment string for this prim spec. | |
SDF_API void | SetComment (const std::string &value) |
Sets the comment string for this prim spec. | |
SDF_API std::string | GetDocumentation () const |
Returns the documentation string for this prim spec. | |
SDF_API void | SetDocumentation (const std::string &value) |
Sets the documentation string for this prim spec. | |
SDF_API bool | GetActive () const |
Returns whether this prim spec is active. | |
SDF_API void | SetActive (bool value) |
Sets whether this prim spec is active. | |
SDF_API bool | HasActive () const |
Returns true if this prim spec has an opinion about active. | |
SDF_API void | ClearActive () |
Removes the active opinion in this prim spec if there is one. | |
SDF_API bool | GetHidden () const |
Returns whether this prim spec will be hidden in browsers. | |
SDF_API void | SetHidden (bool value) |
Sets whether this prim spec will be hidden in browsers. | |
SDF_API TfToken | GetKind () const |
Returns this prim spec's kind. | |
SDF_API void | SetKind (const TfToken &value) |
Sets this prim spec's kind. | |
SDF_API bool | HasKind () const |
Returns true if this prim spec has an opinion about kind. | |
SDF_API void | ClearKind () |
Remove the kind opinion from this prim spec if there is one. | |
SDF_API TfToken | GetSymmetryFunction () const |
Returns the symmetry function for this prim. | |
SDF_API void | SetSymmetryFunction (const TfToken &functionName) |
Sets the symmetry function for this prim. | |
SDF_API SdfDictionaryProxy | GetSymmetryArguments () const |
Returns the symmetry arguments for this prim. | |
SDF_API void | SetSymmetryArgument (const std::string &name, const VtValue &value) |
Sets a symmetry argument for this prim. | |
SDF_API std::string | GetSymmetricPeer () const |
Returns the symmetric peer for this prim. | |
SDF_API void | SetSymmetricPeer (const std::string &peerName) |
Sets a symmetric peer for this prim. | |
SDF_API std::string | GetPrefix () const |
Returns the prefix string for this prim spec. | |
SDF_API void | SetPrefix (const std::string &value) |
Sets the prefix string for this prim spec. | |
SDF_API std::string | GetSuffix () const |
Returns the suffix string for this prim spec. | |
SDF_API void | SetSuffix (const std::string &value) |
Sets the suffix string for this prim spec. | |
SDF_API SdfDictionaryProxy | GetCustomData () const |
Returns the custom data for this prim. | |
SDF_API SdfDictionaryProxy | GetAssetInfo () const |
Returns the asset info dictionary for this prim. | |
SDF_API void | SetCustomData (const std::string &name, const VtValue &value) |
Sets a custom data entry for this prim. | |
SDF_API void | SetAssetInfo (const std::string &name, const VtValue &value) |
Sets a asset info entry for this prim. | |
SDF_API SdfSpecifier | GetSpecifier () const |
Returns the spec specifier (def, over or class). | |
SDF_API void | SetSpecifier (SdfSpecifier value) |
Sets the spec specifier (def or over). | |
SDF_API SdfPermission | GetPermission () const |
Returns the prim's permission restriction. | |
SDF_API void | SetPermission (SdfPermission value) |
Sets the prim's permission restriction. | |
SDF_API VtDictionary | GetPrefixSubstitutions () const |
Returns the prefixSubstitutions dictionary for this prim spec. | |
SDF_API void | SetPrefixSubstitutions (const VtDictionary &prefixSubstitutions) |
Sets the prefixSubstitutions dictionary for this prim spec. | |
SDF_API VtDictionary | GetSuffixSubstitutions () const |
Returns the suffixSubstitutions dictionary for this prim spec. | |
SDF_API void | SetSuffixSubstitutions (const VtDictionary &suffixSubstitutions) |
Sets the suffixSubstitutions dictionary for this prim spec. | |
SDF_API void | SetInstanceable (bool instanceable) |
Sets the value for the prim's instanceable flag. | |
SDF_API bool | GetInstanceable () const |
Returns the value for the prim's instanceable flag. | |
SDF_API bool | HasInstanceable () const |
Returns true if this prim spec has a value authored for its instanceable flag, false otherwise. | |
SDF_API void | ClearInstanceable () |
Clears the value for the prim's instanceable flag. | |
Payloads | |
SDF_API SdfPayloadsProxy | GetPayloadList () const |
Returns a proxy for the prim's payloads. | |
SDF_API bool | HasPayloads () const |
Returns true if this prim has payloads set. | |
SDF_API void | ClearPayloadList () |
Clears the payloads for this prim. | |
Inherits | |
SDF_API SdfInheritsProxy | GetInheritPathList () const |
Returns a proxy for the prim's inherit paths. | |
SDF_API bool | HasInheritPaths () const |
Returns true if this prim has inherit paths set. | |
SDF_API void | ClearInheritPathList () |
Clears the inherit paths for this prim. | |
Specializes | |
SDF_API SdfSpecializesProxy | GetSpecializesList () const |
Returns a proxy for the prim's specializes paths. | |
SDF_API bool | HasSpecializes () const |
Returns true if this prim has specializes set. | |
SDF_API void | ClearSpecializesList () |
Clears the specializes for this prim. | |
References | |
SDF_API SdfReferencesProxy | GetReferenceList () const |
Returns a proxy for the prim's references. | |
SDF_API bool | HasReferences () const |
Returns true if this prim has references set. | |
SDF_API void | ClearReferenceList () |
Clears the references for this prim. | |
Variants | |
SDF_API SdfVariantSetNamesProxy | GetVariantSetNameList () const |
Returns a proxy for the prim's variant sets. | |
SDF_API bool | HasVariantSetNames () const |
Returns true if this prim has variant sets set. | |
SDF_API std::vector< std::string > | GetVariantNames (const std::string &name) const |
Returns list of variant names for the given variant set. | |
SDF_API SdfVariantSetsProxy | GetVariantSets () const |
Returns the variant sets. | |
SDF_API void | RemoveVariantSet (const std::string &name) |
Removes the variant set with the given name. | |
SDF_API SdfVariantSelectionProxy | GetVariantSelections () const |
Returns an editable map whose keys are variant set names and whose values are the variants selected for each set. | |
SDF_API void | SetVariantSelection (const std::string &variantSetName, const std::string &variantName) |
Sets the variant selected for the given variant set. | |
SDF_API void | BlockVariantSelection (const std::string &variantSetName) |
Blocks the variant selected for the given variant set by setting the variant selection to empty. | |
Relocates | |
SDF_API SdfRelocatesMapProxy | GetRelocates () const |
Get an editing proxy for the map of namespace relocations specified on this prim. | |
SDF_API void | SetRelocates (const SdfRelocatesMap &newMap) |
Set the entire map of namespace relocations specified on this prim. | |
SDF_API bool | HasRelocates () const |
Returns true if this prim has any relocates opinion, including that there should be no relocates (i.e. | |
SDF_API void | ClearRelocates () |
Clears the relocates opinion for this prim. | |
Public Member Functions inherited from SdfSpec | |
SDF_API SdfSpec & | operator= (const SdfSpec &other) |
SDF_API const SdfSchemaBase & | GetSchema () const |
Returns the SdfSchemaBase for the layer that owns this spec. | |
SDF_API SdfSpecType | GetSpecType () const |
Returns the SdfSpecType specifying the spec type this object represents. | |
SDF_API bool | IsDormant () const |
Returns true if this object is invalid or expired. | |
SDF_API SdfLayerHandle | GetLayer () const |
Returns the layer that this object belongs to. | |
SDF_API SdfPath | GetPath () const |
Returns the scene path of this object. | |
SDF_API bool | PermissionToEdit () const |
Returns whether this object's layer can be edited. | |
SDF_API std::vector< TfToken > | ListInfoKeys () const |
Returns the full list of info keys currently set on this object. | |
SDF_API std::vector< TfToken > | GetMetaDataInfoKeys () const |
Returns the list of metadata info keys for this object. | |
SDF_API TfToken | GetMetaDataDisplayGroup (TfToken const &key) const |
Returns this metadata key's displayGroup. | |
SDF_API VtValue | GetInfo (const TfToken &key) const |
Gets the value for the given metadata key. | |
SDF_API void | SetInfo (const TfToken &key, const VtValue &value) |
Sets the value for the given metadata key. | |
SDF_API void | SetInfoDictionaryValue (const TfToken &dictionaryKey, const TfToken &entryKey, const VtValue &value) |
Sets the value for entryKey to value within the dictionary with the given metadata key dictionaryKey . | |
SDF_API bool | HasInfo (const TfToken &key) const |
Returns whether there is a setting for the scene spec info with the given key. | |
SDF_API void | ClearInfo (const TfToken &key) |
Clears the value for scene spec info with the given key. | |
SDF_API TfType | GetTypeForInfo (const TfToken &key) const |
Returns the data type for the info with the given key. | |
SDF_API const VtValue & | GetFallbackForInfo (const TfToken &key) const |
Returns the fallback for the info with the given key. | |
SDF_API bool | WriteToStream (std::ostream &, size_t indent=0) const |
Writes this spec to the given stream. | |
SDF_API bool | IsInert (bool ignoreChildren=false) const |
Returns whether this object has no significant data. | |
SDF_API std::vector< TfToken > | ListFields () const |
Returns all fields with values. | |
SDF_API bool | HasField (const TfToken &name) const |
Returns true if the spec has a non-empty value with field name name . | |
template<class T > | |
bool | HasField (const TfToken &name, T *value) const |
Returns true if the object has a non-empty value with name name and type T . | |
SDF_API VtValue | GetField (const TfToken &name) const |
Returns a field value by name. | |
template<typename T > | |
T | GetFieldAs (const TfToken &name, const T &defaultValue=T()) const |
Returns a field value by name. | |
SDF_API bool | SetField (const TfToken &name, const VtValue &value) |
Sets a field value as a boxed VtValue. | |
template<typename T > | |
bool | SetField (const TfToken &name, const T &value) |
Sets a field value of type T. | |
SDF_API bool | ClearField (const TfToken &name) |
Clears a field. | |
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()) |
Create a root prim spec. | |
static SDF_API SdfPrimSpecHandle | New (const SdfPrimSpecHandle &parentPrim, const std::string &name, SdfSpecifier spec, const std::string &typeName=std::string()) |
Create a prim spec. | |
Name | |
static SDF_API bool | IsValidName (const std::string &name) |
Returns true if the given string is a valid prim name. | |
SDF_API const std::string & | GetName () const |
Returns the prim's name. | |
SDF_API TfToken | GetNameToken () const |
Returns the prim's name, as a token. | |
SDF_API bool | CanSetName (const std::string &newName, std::string *whyNot) const |
Returns true if setting the prim spec's name to newName will succeed. | |
SDF_API bool | SetName (const std::string &newName, bool validate=true) |
Sets the prim's name. | |
Additional Inherited Members | |
Protected Member Functions inherited from SdfSpec | |
bool | _MoveSpec (const SdfPath &oldPath, const SdfPath &newPath) const |
bool | _DeleteSpec (const SdfPath &path) |
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.
Definition at line 57 of file primSpec.h.
Definition at line 64 of file primSpec.h.
typedef SdfPrimSpecView NameChildrenView |
Definition at line 62 of file primSpec.h.
typedef SdfPropertySpecView PropertySpecView |
Definition at line 63 of file primSpec.h.
Definition at line 65 of file primSpec.h.
SDF_API void 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 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 BlockVariantSelection | ( | const std::string & | variantSetName | ) |
Blocks the variant selected for the given variant set by setting the variant selection to empty.
SDF_API bool 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 ClearActive | ( | ) |
Removes the active opinion in this prim spec if there is one.
SDF_API void ClearInheritPathList | ( | ) |
Clears the inherit paths for this prim.
SDF_API void ClearInstanceable | ( | ) |
Clears the value for the prim's instanceable flag.
SDF_API void ClearKind | ( | ) |
Remove the kind opinion from this prim spec if there is one.
SDF_API void ClearPayloadList | ( | ) |
Clears the payloads for this prim.
SDF_API void ClearReferenceList | ( | ) |
Clears the references for this prim.
SDF_API void ClearRelocates | ( | ) |
Clears the relocates opinion for this prim.
SDF_API void ClearSpecializesList | ( | ) |
Clears the specializes for this prim.
SDF_API bool GetActive | ( | ) | const |
Returns whether this prim spec is active.
The default value for active is true.
SDF_API SdfDictionaryProxy 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 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 GetAttributes | ( | ) | const |
Returns a view of the attributes of this prim.
SDF_API std::string GetComment | ( | ) | const |
Returns the comment string for this prim spec.
The default value for comment is "".
SDF_API SdfDictionaryProxy 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 GetDocumentation | ( | ) | const |
Returns the documentation string for this prim spec.
The default value for documentation is "".
SDF_API bool GetHidden | ( | ) | const |
Returns whether this prim spec will be hidden in browsers.
The default value for hidden is false.
SDF_API SdfInheritsProxy 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 GetInstanceable | ( | ) | const |
Returns the value for the prim's instanceable flag.
SDF_API TfToken GetKind | ( | ) | const |
Returns this prim spec's kind.
The default value for kind is an empty TfToken
.
SDF_API const std::string & GetName | ( | ) | const |
Returns the prim's name.
SDF_API NameChildrenView GetNameChildren | ( | ) | const |
Returns a keyed vector view of the prim's namespace children.
SDF_API SdfNameChildrenOrderProxy GetNameChildrenOrder | ( | ) | const |
Returns the list of child names for this prim's reorder.
nameChildren statement.
See SetNameChildrenOrder() for more info.
SDF_API SdfPrimSpecHandle 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 GetNameRoot | ( | ) | const |
Returns the prim's namespace pseudo-root prim.
SDF_API TfToken GetNameToken | ( | ) | const |
Returns the prim's name, as a token.
SDF_API SdfSpecHandle 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 GetPayloadList | ( | ) | const |
Returns a proxy for the prim's payloads.
Payloads for this prim may be modified through the proxy.
SDF_API SdfPermission GetPermission | ( | ) | const |
Returns the prim's permission restriction.
The default value for permission is SdfPermissionPublic.
SDF_API std::string GetPrefix | ( | ) | const |
Returns the prefix string for this prim spec.
The default value for prefix is "".
SDF_API VtDictionary GetPrefixSubstitutions | ( | ) | const |
Returns the prefixSubstitutions dictionary for this prim spec.
The default value for prefixSubstitutions is an empty VtDictionary.
SDF_API SdfPrimSpecHandle 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 GetProperties | ( | ) | const |
Returns the prim's properties.
SDF_API SdfPropertySpecHandle 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 GetPropertyOrder | ( | ) | const |
Returns the list of property names for this prim's reorder properties statement.
See SetPropertyOrder() for more info.
SDF_API SdfPrimSpecHandle GetRealNameParent | ( | ) | const |
Returns the prim's namespace parent.
SDF_API SdfReferencesProxy GetReferenceList | ( | ) | const |
Returns a proxy for the prim's references.
References for this prim may be modified through the proxy.
SDF_API SdfRelationshipSpecHandle 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 GetRelationships | ( | ) | const |
Returns a view of the relationships of this prim.
SDF_API SdfRelocatesMapProxy 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 GetSpecializesList | ( | ) | const |
Returns a proxy for the prim's specializes paths.
Specializes for this prim may be modified through the proxy.
SDF_API SdfSpecifier GetSpecifier | ( | ) | const |
Returns the spec specifier (def, over or class).
SDF_API std::string GetSuffix | ( | ) | const |
Returns the suffix string for this prim spec.
The default value for suffix is "".
SDF_API VtDictionary GetSuffixSubstitutions | ( | ) | const |
Returns the suffixSubstitutions dictionary for this prim spec.
The default value for suffixSubstitutions is an empty VtDictionary.
SDF_API std::string GetSymmetricPeer | ( | ) | const |
Returns the symmetric peer for this prim.
The default value for symmetric peer is an empty string.
SDF_API SdfDictionaryProxy GetSymmetryArguments | ( | ) | const |
Returns the symmetry arguments for this prim.
The default value for symmetry arguments is an empty dictionary.
SDF_API TfToken GetSymmetryFunction | ( | ) | const |
Returns the symmetry function for this prim.
The default value for symmetry function is an empty token.
SDF_API TfToken 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 > GetVariantNames | ( | const std::string & | name | ) | const |
Returns list of variant names for the given variant set.
SDF_API SdfVariantSelectionProxy 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 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 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 HasActive | ( | ) | const |
Returns true if this prim spec has an opinion about active.
SDF_API bool HasInheritPaths | ( | ) | const |
Returns true if this prim has inherit paths set.
SDF_API bool HasInstanceable | ( | ) | const |
Returns true if this prim spec has a value authored for its instanceable flag, false otherwise.
SDF_API bool HasKind | ( | ) | const |
Returns true if this prim spec has an opinion about kind.
SDF_API bool HasNameChildrenOrder | ( | ) | const |
Returns true if this prim has name children order specified.
SDF_API bool HasPayloads | ( | ) | const |
Returns true if this prim has payloads set.
SDF_API bool HasPropertyOrder | ( | ) | const |
Returns true if this prim has a property ordering specified.
SDF_API bool HasReferences | ( | ) | const |
Returns true if this prim has references set.
SDF_API bool 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 HasSpecializes | ( | ) | const |
Returns true if this prim has specializes set.
SDF_API bool HasVariantSetNames | ( | ) | const |
Returns true if this prim has variant sets set.
SDF_API void 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 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 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 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 |
Returns true if the given string is a valid prim name.
|
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 |
Create a prim spec.
Creates a prim spec with a name
, specifier
and typeName
as a namespace child of the given prim.
SDF_API void RemoveFromNameChildrenOrder | ( | const TfToken & | name | ) |
Removes a name child name from the name children order.
SDF_API void RemoveFromNameChildrenOrderByIndex | ( | int | index | ) |
Removes a name child name from the name children order by index.
SDF_API void RemoveFromPropertyOrder | ( | const TfToken & | name | ) |
Remove a property name from the property order.
SDF_API void RemoveFromPropertyOrderByIndex | ( | int | index | ) |
Remove a property name from the property order by index.
SDF_API bool RemoveNameChild | ( | const SdfPrimSpecHandle & | child | ) |
Removes the child. Returns true if successful, false if failed.
SDF_API void RemoveProperty | ( | const SdfPropertySpecHandle & | property | ) |
Removes the property.
SDF_API void 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 SetActive | ( | bool | value | ) |
Sets whether this prim spec is active.
SDF_API void 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.
SDF_API void SetComment | ( | const std::string & | value | ) |
Sets the comment string for this prim spec.
SDF_API void 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 SetDocumentation | ( | const std::string & | value | ) |
Sets the documentation string for this prim spec.
SDF_API void SetHidden | ( | bool | value | ) |
Sets whether this prim spec will be hidden in browsers.
SDF_API void SetInstanceable | ( | bool | instanceable | ) |
Sets the value for the prim's instanceable flag.
SDF_API void SetKind | ( | const TfToken & | value | ) |
Sets this prim spec's kind.
SDF_API bool 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 SetNameChildren | ( | const SdfPrimSpecHandleVector & | ) |
Updates nameChildren to match the given vector of prims.
SDF_API void 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 SetPermission | ( | SdfPermission | value | ) |
Sets the prim's permission restriction.
SDF_API void SetPrefix | ( | const std::string & | value | ) |
Sets the prefix string for this prim spec.
SDF_API void SetPrefixSubstitutions | ( | const VtDictionary & | prefixSubstitutions | ) |
Sets the prefixSubstitutions
dictionary for this prim spec.
SDF_API void SetProperties | ( | const SdfPropertySpecHandleVector & | ) |
Updates properties to match the given vector of properties.
SDF_API void 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 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 SetSpecifier | ( | SdfSpecifier | value | ) |
Sets the spec specifier (def or over).
SDF_API void SetSuffix | ( | const std::string & | value | ) |
Sets the suffix string for this prim spec.
SDF_API void SetSuffixSubstitutions | ( | const VtDictionary & | suffixSubstitutions | ) |
Sets the suffixSubstitutions
dictionary for this prim spec.
SDF_API void 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 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 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 SetTypeName | ( | const std::string & | value | ) |
Sets the typeName of the model prim.
SDF_API void 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.