Exemplo n.º 1
0
        // ----------------------------------------------------------------------------------------- //
        // Private API
        // ----------------------------------------------------------------------------------------- //

        /// <remarks>
        /// Converts an std::vector to an array, but why?
        /// Swig's current implementation of std::vector returns references to private memory, which
        /// means any value obtained from it is extremely unsafe and will cause C++ style memory errors
        /// if used after the vector is disposed. For safety, our API should never return a raw vector.
        /// </remarks>
        private SdfPath[] VectorToArray(SdfPathVector vec)
        {
            var ret = new SdfPath[vec.Count];

            vec.CopyTo(ret);
            return(ret);
        }
Exemplo n.º 2
0
 public UsdSkelTopology(SdfPathVector paths) : this(UsdCsPINVOKE.new_UsdSkelTopology__SWIG_3(SdfPathVector.getCPtr(paths)), true)
 {
     if (UsdCsPINVOKE.SWIGPendingException.Pending)
     {
         throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Exemplo n.º 3
0
 public SdfPathVectorEnumerator(SdfPathVector collection)
 {
     collectionRef = collection;
     currentIndex  = -1;
     currentObject = null;
     currentSize   = collectionRef.Count;
 }
Exemplo n.º 4
0
 public UsdStagePopulationMask(SdfPathVector paths) : this(UsdCsPINVOKE.new_UsdStagePopulationMask__SWIG_4(SdfPathVector.getCPtr(paths)), true)
 {
     if (UsdCsPINVOKE.SWIGPendingException.Pending)
     {
         throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Exemplo n.º 5
0
 public SdfPathVector(SdfPathVector other) : this(UsdCsPINVOKE.new_SdfPathVector__SWIG_1(SdfPathVector.getCPtr(other)), true)
 {
     if (UsdCsPINVOKE.SWIGPendingException.Pending)
     {
         throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Exemplo n.º 6
0
 public void SetItems(SdfPathVector items, SdfListOpType type)
 {
     UsdCsPINVOKE.SdfPathListOp_SetItems(swigCPtr, SdfPathVector.getCPtr(items), (int)type);
     if (UsdCsPINVOKE.SWIGPendingException.Pending)
     {
         throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Exemplo n.º 7
0
 public void SetOrderedItems(SdfPathVector items)
 {
     UsdCsPINVOKE.SdfPathListOp_SetOrderedItems(swigCPtr, SdfPathVector.getCPtr(items));
     if (UsdCsPINVOKE.SWIGPendingException.Pending)
     {
         throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Exemplo n.º 8
0
 public void ComputeAttributeConnectionPaths(SdfPath attributePath, SdfPathVector paths, bool localOnly, SdfSpecHandle stopProperty, bool includeStopProperty, SdfPathVector deletedPaths, SWIGTYPE_p_PcpErrorVector allErrors)
 {
     UsdCsPINVOKE.PcpCache_ComputeAttributeConnectionPaths(swigCPtr, SdfPath.getCPtr(attributePath), SdfPathVector.getCPtr(paths), localOnly, SdfSpecHandle.getCPtr(stopProperty), includeStopProperty, SdfPathVector.getCPtr(deletedPaths), SWIGTYPE_p_PcpErrorVector.getCPtr(allErrors));
     if (UsdCsPINVOKE.SWIGPendingException.Pending)
     {
         throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Exemplo n.º 9
0
 public void ComputeRelationshipTargetPaths(SdfPath relationshipPath, SdfPathVector paths, bool localOnly, SdfSpecHandle stopProperty, bool includeStopProperty, SWIGTYPE_p_PcpErrorVector allErrors)
 {
     UsdCsPINVOKE.PcpCache_ComputeRelationshipTargetPaths(swigCPtr, SdfPath.getCPtr(relationshipPath), SdfPathVector.getCPtr(paths), localOnly, SdfSpecHandle.getCPtr(stopProperty), includeStopProperty, SWIGTYPE_p_PcpErrorVector.getCPtr(allErrors));
     if (UsdCsPINVOKE.SWIGPendingException.Pending)
     {
         throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Exemplo n.º 10
0
 public void SetRange(int index, SdfPathVector values)
 {
     UsdCsPINVOKE.SdfPathVector_SetRange(swigCPtr, index, SdfPathVector.getCPtr(values));
     if (UsdCsPINVOKE.SWIGPendingException.Pending)
     {
         throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Exemplo n.º 11
0
        public bool SetTargets(SdfPathVector targets)
        {
            bool ret = UsdCsPINVOKE.UsdGeomCollectionAPI_SetTargets(swigCPtr, SdfPathVector.getCPtr(targets));

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 12
0
        public bool ReplaceOperations(SdfListOpType op, uint index, uint n, SdfPathVector newItems)
        {
            bool ret = UsdCsPINVOKE.SdfPathListOp_ReplaceOperations(swigCPtr, (int)op, index, n, SdfPathVector.getCPtr(newItems));

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 13
0
        public static SdfPathVector GetConciseRelativePaths(SdfPathVector paths)
        {
            SdfPathVector ret = new SdfPathVector(UsdCsPINVOKE.SdfPath_GetConciseRelativePaths(SdfPathVector.getCPtr(paths)), true);

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 14
0
        public static bool GetRawConnectedSourcePaths(UsdShadeOutput output, SdfPathVector sourcePaths)
        {
            bool ret = UsdCsPINVOKE.UsdShadeConnectableAPI_GetRawConnectedSourcePaths__SWIG_2(UsdShadeOutput.getCPtr(output), SdfPathVector.getCPtr(sourcePaths));

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 15
0
        public bool SetConnections(SdfPathVector sources)
        {
            bool ret = UsdCsPINVOKE.UsdAttribute_SetConnections(swigCPtr, SdfPathVector.getCPtr(sources));

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 16
0
        public static SdfPathListOp CreateExplicit(SdfPathVector explicitItems)
        {
            SdfPathListOp ret = new SdfPathListOp(UsdCsPINVOKE.SdfPathListOp_CreateExplicit__SWIG_0(SdfPathVector.getCPtr(explicitItems)), true);

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 17
0
        /// <summary>
        /// At each path, reads the given sample type from t he USD Stage.
        /// </summary>
        /// <typeparam name="T">
        /// A type which inherits from SampleBase, adorned with a UsdSchemaAttribute.
        /// </typeparam>
        /// <returns>
        /// Returns a collection which will read each prim found and return the requested SampleBase
        /// object type.
        /// </returns>
        public SampleCollection <T> ReadAll <T>(SdfPath[] paths) where T : SampleBase, new()
        {
            var vec = new SdfPathVector();

            foreach (SdfPath path in paths)
            {
                vec.Add(path);
            }
            return(new SampleCollection <T>(this, vec));
        }
Exemplo n.º 18
0
        public SdfPathVector GetPathsToPrimsWithRelocates()
        {
            SdfPathVector ret = new SdfPathVector(UsdCsPINVOKE.PcpLayerStack_GetPathsToPrimsWithRelocates(swigCPtr), false);

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 19
0
        public static SdfPathListOp Create(SdfPathVector prependedItems)
        {
            SdfPathListOp ret = new SdfPathListOp(UsdCsPINVOKE.SdfPathListOp_Create__SWIG_2(SdfPathVector.getCPtr(prependedItems)), true);

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 20
0
        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);
        }
Exemplo n.º 21
0
        public static bool GetRawConnectedSourcePaths(UsdProperty shadingProp, SdfPathVector sourcePaths)
        {
            bool ret = UsdCsPINVOKE.UsdShadeConnectableAPI_GetRawConnectedSourcePaths__SWIG_0(UsdProperty.getCPtr(shadingProp), SdfPathVector.getCPtr(sourcePaths));

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 22
0
        public bool SetInherits(SdfPathVector items)
        {
            bool ret = UsdCsPINVOKE.UsdInherits_SetInherits(swigCPtr, SdfPathVector.getCPtr(items));

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 23
0
        public bool SetBindingTargets(SdfPathVector bindings)
        {
            bool ret = UsdCsPINVOKE.UsdGeomFaceSetAPI_SetBindingTargets(swigCPtr, SdfPathVector.getCPtr(bindings));

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 24
0
        public SdfPathVector GetRange(int index, int count)
        {
            global::System.IntPtr cPtr = UsdCsPINVOKE.SdfPathVector_GetRange(swigCPtr, index, count);
            SdfPathVector         ret  = (cPtr == global::System.IntPtr.Zero) ? null : new SdfPathVector(cPtr, true);

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 25
0
        public static SdfPathVector Repeat(SdfPath value, int count)
        {
            global::System.IntPtr cPtr = UsdCsPINVOKE.SdfPathVector_Repeat(SdfPath.getCPtr(value), count);
            SdfPathVector         ret  = (cPtr == global::System.IntPtr.Zero) ? null : new SdfPathVector(cPtr, true);

            if (UsdCsPINVOKE.SWIGPendingException.Pending)
            {
                throw UsdCsPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemplo n.º 26
0
 public SampleCollection(Scene scene, SdfPathVector paths)
 {
     m_paths = new SdfPath[paths.Count];
     paths.CopyTo(m_paths);
     m_scene = scene;
 }
Exemplo n.º 27
0
        public SdfPathVector GetAllDirectInherits()
        {
            SdfPathVector ret = new SdfPathVector(UsdCsPINVOKE.UsdInherits_GetAllDirectInherits(swigCPtr), true);

            return(ret);
        }
Exemplo n.º 28
0
        public SdfPathVector GetPathsToPrimsWithRelocates()
        {
            SdfPathVector ret = new SdfPathVector(UsdCsPINVOKE.PcpLayerStackPtr_GetPathsToPrimsWithRelocates(swigCPtr), false);

            return(ret);
        }
Exemplo n.º 29
0
 public void GetAllTargetPathsRecursively(SdfPathVector result)
 {
     UsdCsPINVOKE.SdfPathAncestorsRange_iterator_GetAllTargetPathsRecursively(swigCPtr, SdfPathVector.getCPtr(result));
 }
Exemplo n.º 30
0
 public void GetPrefixes(SdfPathVector prefixes)
 {
     UsdCsPINVOKE.SdfPathAncestorsRange_iterator_GetPrefixes__SWIG_1(swigCPtr, SdfPathVector.getCPtr(prefixes));
 }