HDK
|
#include <primCompositionQuery.h>
Public Member Functions | |
~UsdPrimCompositionQueryArc ()=default | |
Target and Introducing Nodes | |
These functions access either the target or the introducing nodes in the composition graph that this arc represents. The returned node from GetTargetNode(), along with a layer obtained from the layer stack accessible through the node's GetLayerStack() function, can be used to create a UsdEditTarget to direct edits to the target of the arc. The same can be done with the introducing node but there are additional functions below that are more convenient for directly editing the included arcs. It is important to be aware that the nodes returned by GetTargetNode() and GetIntroducingNode() are only valid through the collective lifetime of the UsdCompositionQuery and all the UsdPrimCompositionQueryArcs the query returns. After the query and all the arcs have gone out of scope every PcpNodeRef returned by these two functions will become immediately invalid and its behavior will be undefined. | |
USD_API PcpNodeRef | GetTargetNode () const |
Returns the targeted node of this composition arc. More... | |
USD_API PcpNodeRef | GetIntroducingNode () const |
Arc Target Details | |
USD_API SdfLayerHandle | GetTargetLayer () const |
USD_API SdfPath | GetTargetPrimPath () const |
USD_API UsdResolveTarget | MakeResolveTargetUpTo (const SdfLayerHandle &subLayer=nullptr) const |
USD_API UsdResolveTarget | MakeResolveTargetStrongerThan (const SdfLayerHandle &subLayer=nullptr) const |
Arc Editing | |
This set of functions returns information about where the specific opinions are authored that cause this arc to be included in the composition graph. They can be used to edit the composition arcs themselves. | |
USD_API SdfLayerHandle | GetIntroducingLayer () const |
USD_API SdfPath | GetIntroducingPrimPath () const |
USD_API bool | GetIntroducingListEditor (SdfReferenceEditorProxy *editor, SdfReference *ref) const |
USD_API bool | GetIntroducingListEditor (SdfPayloadEditorProxy *editor, SdfPayload *payload) const |
USD_API bool | GetIntroducingListEditor (SdfPathEditorProxy *editor, SdfPath *path) const |
USD_API bool | GetIntroducingListEditor (SdfNameEditorProxy *editor, std::string *name) const |
Arc classification | |
Queries about the arc that are useful for classifying the arc for filtering. | |
USD_API PcpArcType | GetArcType () const |
Returns the arc type. More... | |
USD_API bool | IsImplicit () const |
USD_API bool | IsAncestral () const |
USD_API bool | HasSpecs () const |
USD_API bool | IsIntroducedInRootLayerStack () const |
USD_API bool | IsIntroducedInRootLayerPrimSpec () const |
Friends | |
class | UsdPrimCompositionQuery |
This represents a composition arc that is returned by a UsdPrimCompositionQuery. It contains the node in the composition graph that is the target of this arc as well as access to information about how the arc was introduced to the composition graph.
If this arc's arc type is PcpArcTypeRoot, then this arc represents the root node of the graph. The composition graph's root arc is not an authored arc; it exists to target the root node of the graph which represents any local opinions that may be defined for the prim in the root layer stack.
Definition at line 53 of file primCompositionQuery.h.
|
default |
USD_API PcpArcType UsdPrimCompositionQueryArc::GetArcType | ( | ) | const |
Returns the arc type.
USD_API SdfLayerHandle UsdPrimCompositionQueryArc::GetIntroducingLayer | ( | ) | const |
Returns the specific layer in the layer stack that adds this arc to the composition graph. This layer combined with the path returned from GetIntroducingPrimPath can be used to find the prim spec which owns the field that ultimately causes this arc to exist. If this arc is the root arc of the composition graph, it is not an authored composition arc and this returns a null layer handle.
USD_API bool UsdPrimCompositionQueryArc::GetIntroducingListEditor | ( | SdfReferenceEditorProxy * | editor, |
SdfReference * | ref | ||
) | const |
Gets the list editor and authored SdfReference value that introduces this arc to the composition graph for reference arcs. If this arc's type is reference, editor
will be set to the reference list editor of the introducing prim spec and ref
will be set to the authored value of the SdfReference in the reference list.
This returns true if the arc type is reference and there are no errors; it returns false for all other arc types.
USD_API bool UsdPrimCompositionQueryArc::GetIntroducingListEditor | ( | SdfPayloadEditorProxy * | editor, |
SdfPayload * | payload | ||
) | const |
Gets the list editor and authored SdfPayload value that introduces this arc to the composition graph for payload arcs. If this arc's type is payload, editor
will be set to the payload list editor of the introducing prim spec and payload
will be set to the authored value of the SdfPayload in the payload list.
This returns true if the arc type is payload and there are no errors; it returns false for all other arc types.
USD_API bool UsdPrimCompositionQueryArc::GetIntroducingListEditor | ( | SdfPathEditorProxy * | editor, |
SdfPath * | path | ||
) | const |
Gets the list editor and authored SdfPath value that introduced this arc to the composition graph for class arcs. If this arc's type is inherit or specialize, editor
will be set to the corresponding path list editor of the introducing prim spec and path
will be set to the authored value of the SdfPath in the path list.
This returns true if the arc type is either inherit or specialize and there are no errors; it returns false for all other arc types.
USD_API bool UsdPrimCompositionQueryArc::GetIntroducingListEditor | ( | SdfNameEditorProxy * | editor, |
std::string * | name | ||
) | const |
Gets the list editor and authored string value that introduces this arc to the composition graph for variant arcs. If this arc's type is variant, editor
will be set to the name list editor of the introducing prim spec and name
will be set to the authored value of the variant set name in the name list.
This returns true if the arc type is variant and there are no errors; it returns false for all other arc types.
USD_API PcpNodeRef UsdPrimCompositionQueryArc::GetIntroducingNode | ( | ) | const |
Returns the node that introduces this arc into composition graph. This is the node where the authored composition opinion exists and is not necessarily the target node's parent. If this arc is the root arc then this function returns the same node as GetTargetNode which is the root node of the composition graph.
Returns the path of the prim that introduces this arc to the composition graph within the layer in which the composition opinion is authored. This path combined with the layer returned from GetIntroducingLayer can be used to find the prim spec which owns the field that ultimately causes this arc to exist. If this arc is the root arc of the composition graph, it is not an authored composition arc and this returns an empty path.
USD_API SdfLayerHandle UsdPrimCompositionQueryArc::GetTargetLayer | ( | ) | const |
Returns the root layer of the layer stack that holds the prim spec targeted by this composition arc.
USD_API PcpNodeRef UsdPrimCompositionQueryArc::GetTargetNode | ( | ) | const |
Returns the targeted node of this composition arc.
Returns the path of the prim spec that is targeted by this composition arc in the target layer stack.
USD_API bool UsdPrimCompositionQueryArc::HasSpecs | ( | ) | const |
Returns whether the target node of this arc contributes any local spec opinions that are composed for the prim.
USD_API bool UsdPrimCompositionQueryArc::IsAncestral | ( | ) | const |
Returns whether this arc is ancestral, i.e. it exists because it was composed in by a namespace parent's prim index.
USD_API bool UsdPrimCompositionQueryArc::IsImplicit | ( | ) | const |
Returns whether this arc was implicitly added to this prim meaning it exists because of the introduction of another composition arc. These will typically exist due to inherits or specializes that are authored across a reference.
USD_API bool UsdPrimCompositionQueryArc::IsIntroducedInRootLayerPrimSpec | ( | ) | const |
Returns whether the composition opinion that introduces this arc is authored directly on the prim's prim spec within the root layer stack. This is always true for the root arc.
USD_API bool UsdPrimCompositionQueryArc::IsIntroducedInRootLayerStack | ( | ) | const |
Returns whether the composition opinion that introduces this arc is authored in the root layer stack. This returns true for any arcs where the composition opinion can be authored in the root layer stack. This is always true for the root arc.
USD_API UsdResolveTarget UsdPrimCompositionQueryArc::MakeResolveTargetStrongerThan | ( | const SdfLayerHandle & | subLayer = nullptr | ) | const |
Creates and returns a resolve target that, when passed to a UsdAttributeQuery for one of this prim's attributes, causes value resolution to only consider node sites stronger than this arc, not including this arc itself (unless subLayer
is provided).
If subLayer
is provided, it must be a layer in this arc's layer stack and it will cause value resolution to additionally consider layers in this arc but only if they are stronger than subLayer within this arc's layer stack.
USD_API UsdResolveTarget UsdPrimCompositionQueryArc::MakeResolveTargetUpTo | ( | const SdfLayerHandle & | subLayer = nullptr | ) | const |
Creates and returns a resolve target that, when passed to a UsdAttributeQuery for one of this prim's attributes, causes value resolution to only consider node sites weaker than this arc, up to and and including this arc's site itself.
If subLayer
is provided, it must be a layer in this arc's layer stack and it will further limit value resolution to only the weaker layers up to and including subLayer
within this layer stack. (This is only with respect to this arc; all layers will still be considered in the arcs weaker than this arc).
|
friend |
Definition at line 255 of file primCompositionQuery.h.