public bool SetProxyPrim(UsdPrim proxy) { bool ret = UsdCsPINVOKE.UsdGeomImageable_SetProxyPrim__SWIG_0(swigCPtr, UsdPrim.getCPtr(proxy)); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public UsdPrim GetChild(TfToken name) { UsdPrim ret = new UsdPrim(UsdCsPINVOKE.UsdPrim_GetChild(swigCPtr, TfToken.getCPtr(name)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static SdfPath GetNamedCollectionPath(UsdPrim prim, TfToken collectionName) { SdfPath ret = new SdfPath(UsdCsPINVOKE.UsdCollectionAPI_GetNamedCollectionPath(UsdPrim.getCPtr(prim), TfToken.getCPtr(collectionName)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static UsdSkelRoot Find(UsdPrim prim) { UsdSkelRoot ret = new UsdSkelRoot(UsdCsPINVOKE.UsdSkelRoot_Find(UsdPrim.getCPtr(prim)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static UsdCollectionAPI GetCollection(UsdPrim prim, TfToken name) { UsdCollectionAPI ret = new UsdCollectionAPI(UsdCsPINVOKE.UsdCollectionAPI_GetCollection__SWIG_1(UsdPrim.getCPtr(prim), TfToken.getCPtr(name)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static UsdCollectionAPIVector GetAllCollections(UsdPrim prim) { UsdCollectionAPIVector ret = new UsdCollectionAPIVector(UsdCsPINVOKE.UsdCollectionAPI_GetAllCollections(UsdPrim.getCPtr(prim)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static UsdGeomCollectionAPI Create(UsdPrim prim, TfToken name, SdfPathVector targets) { UsdGeomCollectionAPI ret = new UsdGeomCollectionAPI(UsdCsPINVOKE.UsdGeomCollectionAPI_Create__SWIG_2(UsdPrim.getCPtr(prim), TfToken.getCPtr(name), SdfPathVector.getCPtr(targets)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static UsdGeomFaceSetAPI GetMaterialFaceSet(UsdPrim prim) { UsdGeomFaceSetAPI ret = new UsdGeomFaceSetAPI(UsdCsPINVOKE.UsdShadeMaterial_GetMaterialFaceSet(UsdPrim.getCPtr(prim)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public UsdProperty FlattenTo(UsdPrim parent, TfToken propName) { UsdProperty ret = new UsdProperty(UsdCsPINVOKE.UsdProperty_FlattenTo__SWIG_1(swigCPtr, UsdPrim.getCPtr(parent), TfToken.getCPtr(propName)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public GfBBox3d ComputeLocalBound(UsdPrim prim) { GfBBox3d ret = new GfBBox3d(UsdCsPINVOKE.UsdGeomBBoxCache_ComputeLocalBound(swigCPtr, UsdPrim.getCPtr(prim)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public GfBBox3d ComputeUntransformedBound(UsdPrim prim, SWIGTYPE_p_std__setT_SdfPath_t pathsToSkip, SWIGTYPE_p_TfHashMapT_SdfPath_GfMatrix4d_SdfPath__Hash_t ctmOverrides) { GfBBox3d ret = new GfBBox3d(UsdCsPINVOKE.UsdGeomBBoxCache_ComputeUntransformedBound__SWIG_1(swigCPtr, UsdPrim.getCPtr(prim), SWIGTYPE_p_std__setT_SdfPath_t.getCPtr(pathsToSkip), SWIGTYPE_p_TfHashMapT_SdfPath_GfMatrix4d_SdfPath__Hash_t.getCPtr(ctmOverrides)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public UsdPrim GetFilteredNextSibling(Usd_PrimFlagsPredicate predicate) { UsdPrim ret = new UsdPrim(UsdCsPINVOKE.UsdPrim_GetFilteredNextSibling(swigCPtr, Usd_PrimFlagsPredicate.getCPtr(predicate)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public UsdPrim GetPrimAtPath(SdfPath path) { UsdPrim ret = new UsdPrim(UsdCsPINVOKE.UsdStageWeakPtr_GetPrimAtPath(swigCPtr, SdfPath.getCPtr(path)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool AddPrimToBindingCollection(UsdPrim prim, TfToken bindingName, TfToken materialPurpose) { bool ret = UsdCsPINVOKE.UsdShadeMaterialBindingAPI_AddPrimToBindingCollection(swigCPtr, UsdPrim.getCPtr(prim), TfToken.getCPtr(bindingName), TfToken.getCPtr(materialPurpose)); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static UsdShadeMaterial GetBoundMaterial(UsdPrim prim) { UsdShadeMaterial ret = new UsdShadeMaterial(UsdCsPINVOKE.UsdShadeMaterial_GetBoundMaterial(UsdPrim.getCPtr(prim)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static bool CreateMasterMaterialVariant(UsdPrim masterPrim, UsdPrimVector MaterialPrims, TfToken masterVariantSetName) { bool ret = UsdCsPINVOKE.UsdShadeMaterial_CreateMasterMaterialVariant__SWIG_0(UsdPrim.getCPtr(masterPrim), UsdPrimVector.getCPtr(MaterialPrims), TfToken.getCPtr(masterVariantSetName)); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static UsdGeomModelAPI Apply(UsdPrim prim) { UsdGeomModelAPI ret = new UsdGeomModelAPI(UsdCsPINVOKE.UsdGeomModelAPI_Apply(UsdPrim.getCPtr(prim)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static bool Unbind(UsdPrim prim) { bool ret = UsdCsPINVOKE.UsdShadeMaterial_Unbind(UsdPrim.getCPtr(prim)); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public GfMatrix4d GetLocalTransformation(UsdPrim prim, out bool resetsXformStack) { GfMatrix4d ret = new GfMatrix4d(UsdCsPINVOKE.UsdGeomXformCache_GetLocalTransformation(swigCPtr, UsdPrim.getCPtr(prim), out resetsXformStack), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public GfMatrix4d ComputeRelativeTransform(UsdPrim prim, UsdPrim ancestor, SWIGTYPE_p_bool resetXformStack) { GfMatrix4d ret = new GfMatrix4d(UsdCsPINVOKE.UsdGeomXformCache_ComputeRelativeTransform(swigCPtr, UsdPrim.getCPtr(prim), UsdPrim.getCPtr(ancestor), SWIGTYPE_p_bool.getCPtr(resetXformStack)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool GetResetXformStack(UsdPrim prim) { bool ret = UsdCsPINVOKE.UsdGeomXformCache_GetResetXformStack(swigCPtr, UsdPrim.getCPtr(prim)); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public GfMatrix4d GetParentToWorldTransform(UsdPrim prim) { GfMatrix4d ret = new GfMatrix4d(UsdCsPINVOKE.UsdGeomXformCache_GetParentToWorldTransform(swigCPtr, UsdPrim.getCPtr(prim)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool TransformMightBeTimeVarying(UsdPrim prim) { bool ret = UsdCsPINVOKE.UsdGeomXformCache_TransformMightBeTimeVarying(swigCPtr, UsdPrim.getCPtr(prim)); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool IsAttributeIncludedInLocalTransform(UsdPrim prim, TfToken attrName) { bool ret = UsdCsPINVOKE.UsdGeomXformCache_IsAttributeIncludedInLocalTransform(swigCPtr, UsdPrim.getCPtr(prim), TfToken.getCPtr(attrName)); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public UsdSkelAnimQuery GetAnimQuery(UsdPrim prim) { UsdSkelAnimQuery ret = new UsdSkelAnimQuery(UsdCsPINVOKE.UsdSkelCache_GetAnimQuery__SWIG_1(swigCPtr, UsdPrim.getCPtr(prim)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static UsdAttributeQueryVector CreateQueries(UsdPrim prim, TfTokenVector attrNames) { UsdAttributeQueryVector ret = new UsdAttributeQueryVector(UsdCsPINVOKE.UsdAttributeQuery_CreateQueries(UsdPrim.getCPtr(prim), TfTokenVector.getCPtr(attrNames)), true); if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
static void ApplySelfVisibility(GameObject go, UsdPrim usdPrim) { if (!go) { return; } if (IsVisible(usdPrim)) { return; } go.SetActive(false); }
/// <summary> /// If there is a variant set authored on this prim, expose it so the user can change the /// variant selection. /// </summary> static void AddVariantSet(GameObject go, UsdPrim prim) { var setNames = prim.GetVariantSets().GetNames(); var vs = go.GetComponent <UsdVariantSet>(); if (setNames.Count == 0) { if (vs) { Component.DestroyImmediate(vs); } return; } if (!vs) { vs = go.AddComponent <UsdVariantSet>(); } vs.LoadFromUsd(prim); }
/// <summary> /// Given an array of bone names (HierInfo.skelJoints), creates GameObjects under unityRoot. /// </summary> static void ExpandSkeleton(HierInfo info, GameObject unityRoot, SdfPath usdRoot, UsdPrim prim, PrimMap map, SceneImportOptions options) { foreach (var joint in info.skelJoints) { var path = joint; GameObject parentGo = null; if (!map.TryGetValue(path.GetParentPath(), out parentGo)) { // This will happen when the joints are discontinuous, for example: // // Foo/Bar // Foo/Bar/Baz/Qux // // Baz is implicitly defined, which is allowed by UsdSkel. CreateAncestors(path, map, unityRoot, usdRoot, options, out parentGo); if (!parentGo) { Debug.LogException(new Exception("Failed to create ancestors for " + path + " for prim: " + prim.GetPath())); continue; } } Transform child = parentGo.transform.Find(path.GetName()); if (!child) { child = new GameObject(path.GetName()).transform; child.SetParent(parentGo.transform, worldPositionStays: false); } map[path] = child.gameObject; } }
public UsdGeomScope(UsdPrim prim) : this(UsdCsPINVOKE.new_UsdGeomScope__SWIG_0(UsdPrim.getCPtr(prim)), true) { if (UsdCsPINVOKE.SWIGPendingException.Pending) { throw UsdCsPINVOKE.SWIGPendingException.Retrieve(); } }