HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
primAdapter.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_USD_IMAGING_USD_IMAGING_PRIM_ADAPTER_H
25 #define PXR_USD_IMAGING_USD_IMAGING_PRIM_ADAPTER_H
26 
27 /// \file usdImaging/primAdapter.h
28 
29 #include "pxr/pxr.h"
36 
39 #include "pxr/usd/usd/attribute.h"
40 #include "pxr/usd/usd/prim.h"
41 #include "pxr/usd/usd/timeCode.h"
42 
44 
45 #include "pxr/base/tf/type.h"
46 
47 #include <memory>
48 
50 
51 class UsdPrim;
52 
53 // Forward declaration for nested class.
54 class UsdImagingDelegate;
58 
60 
62  std::shared_ptr<class UsdImagingPrimAdapter>;
63 
64 /// \class UsdImagingPrimAdapter
65 ///
66 /// Base class for all PrimAdapters.
67 ///
69  : public std::enable_shared_from_this<UsdImagingPrimAdapter>
70 {
71 public:
72 
74  {}
75 
77  virtual ~UsdImagingPrimAdapter();
78 
79  // ---------------------------------------------------------------------- //
80  /// \name Scene Index Support
81  // ---------------------------------------------------------------------- //
82 
84  virtual TfTokenVector GetImagingSubprims(UsdPrim const& prim);
85 
88  UsdPrim const& prim, TfToken const& subprim);
89 
91  virtual HdContainerDataSourceHandle GetImagingSubprimData(
92  UsdPrim const& prim,
93  TfToken const& subprim,
94  const UsdImagingDataSourceStageGlobals &stageGlobals);
95 
98  UsdPrim const& prim,
99  TfToken const& subprim,
100  TfTokenVector const& properties,
101  UsdImagingPropertyInvalidationType invalidationType);
102 
103  /// \enum Scope
104  ///
105  /// Determines what USD prims an adapter type is responsible for from a
106  /// population and invalidation standpoint.
107  ///
109  {
110  /// The adapter is responsible only for USD prims of its registered
111  /// type. Any descendent USD prims are managed independently.
113 
114  /// The adapter is responsible for USD prims of its registered type as
115  /// well as any descendents of those prims. No population occurs for
116  /// descendent prims. USD changes to descendent prims whose own PopulationMode
117  /// is set to RepresentedByAncestor will be send to this adapter.
119 
120  /// Changes to prims of this adapter's registered type are sent to the
121  /// first ancestor prim whose adapter's PopulationMode value is
122  /// RepresentsSelfAndDescendents.
123  ///
124  /// This value alone does not prevent population as it is expected that
125  /// such prims appear beneath another prim whose own PopulationMode value
126  /// prevents descendents from being populated.
128  };
129 
130  /// Returns the prim's behavior with regard to population and invalidation.
131  /// See PopulationMode for possible values.
134 
135  /// This is called (for each result of GetImagingSubprims) when this
136  /// adapter's GetScope() result is RepresentsSelfAndDescendents and
137  /// USD properties have changed on a descendent prim whose adapter's
138  /// GetScope() result is RepresentedByAncestor.
141  UsdPrim const& prim,
142  UsdPrim const& descendentPrim,
143  TfToken const& subprim,
144  TfTokenVector const& properties,
145  UsdImagingPropertyInvalidationType invalidationType);
146 
147  // ---------------------------------------------------------------------- //
148  /// \name Initialization
149  // ---------------------------------------------------------------------- //
150 
151  /// Called to populate the RenderIndex for this UsdPrim. The adapter is
152  /// expected to create one or more prims in the render index using the
153  /// given proxy.
154  virtual SdfPath Populate(UsdPrim const& prim,
157  instancerContext = nullptr) = 0;
158 
159  // Indicates whether population traversal should be pruned based on
160  // prim-specific features (like whether it's imageable).
162  static bool ShouldCullSubtree(UsdPrim const& prim);
163 
164  // Indicates whether population traversal should be pruned based on
165  // adapter-specific features (like whether the adapter is an instance
166  // adapter, and wants to do its own population).
168  virtual bool ShouldCullChildren() const;
169 
170  // Indicates whether or not native USD prim instancing should be ignored
171  // for prims using this delegate, along with their descendants.
173  virtual bool ShouldIgnoreNativeInstanceSubtrees() const;
174 
175  // Indicates the adapter is a multiplexing adapter (e.g. PointInstancer),
176  // potentially managing its children. This flag is used in nested
177  // instancer cases to determine which adapter is assigned to which prim.
179  virtual bool IsInstancerAdapter() const;
180 
181  // Indicates whether this adapter can directly populate USD instance prims.
182  //
183  // Normally, with USD instances, we make a firewall between the instance
184  // prim and the USD prototype tree. The instance adapter creates one
185  // hydra prototype per prim in the USD prototype tree, shared by all USD
186  // instances; this lets us recognize the benefits of instancing,
187  // by hopefully having a high instance count per prototype. The instance
188  // adapter additionally configures a hydra instancer for the prototype tree;
189  // and a small set of specially-handled data is allowed through: things like
190  // inherited constant primvars, transforms, visibility, and other things
191  // we know how to vary per-instance.
192  //
193  // We enforce the above policy by refusing to populate gprims which are
194  // USD instances, since we'd need one prototype per instance and would lose
195  // any instancing benefit.
196  //
197  // There are a handful of times when it really is useful to directly
198  // populate instance prims: for example, instances with cards applied,
199  // or instances of type UsdSkelRoot. In those cases, the adapters can
200  // opt into this scheme with "CanPopulateUsdInstance".
201  //
202  // Note that any adapters taking advantage of this feature will need
203  // extensive code support in instanceAdapter: the instance adapter will
204  // need to potentially create and track multiple hydra prototypes per
205  // USD prototype, and the adapter will need special handling to pass down
206  // any relevant instance-varying data.
207  //
208  // In summary: use with caution.
210  virtual bool CanPopulateUsdInstance() const;
211 
212  // ---------------------------------------------------------------------- //
213  /// \name Parallel Setup and Resolve
214  // ---------------------------------------------------------------------- //
215 
216  /// For the given \p prim, variability is detected and
217  /// stored in \p timeVaryingBits. Initial values are cached into the value
218  /// cache.
219  ///
220  /// This method is expected to be called from multiple threads.
221  virtual void TrackVariability(UsdPrim const& prim,
222  SdfPath const& cachePath,
223  HdDirtyBits* timeVaryingBits,
225  instancerContext = nullptr) const = 0;
226 
227  /// Populates the \p cache for the given \p prim, \p time and \p
228  /// requestedBits.
229  ///
230  /// This method is expected to be called from multiple threads.
231  virtual void UpdateForTime(UsdPrim const& prim,
232  SdfPath const& cachePath,
234  HdDirtyBits requestedBits,
236  instancerContext = nullptr) const = 0;
237 
238  // ---------------------------------------------------------------------- //
239  /// \name Change Processing
240  // ---------------------------------------------------------------------- //
241 
242  /// Returns a bit mask of attributes to be updated, or
243  /// HdChangeTracker::AllDirty if the entire prim must be resynchronized.
244  ///
245  /// \p changedFields contains a list of changed scene description fields
246  /// for this prim. This may be empty in certain cases, like the addition
247  /// of an inert prim spec for the given \p prim.
248  ///
249  /// The default implementation returns HdChangeTracker::AllDirty if any of
250  /// the changed fields are plugin metadata fields, HdChangeTracker::Clean
251  /// otherwise.
253  virtual HdDirtyBits ProcessPrimChange(UsdPrim const& prim,
254  SdfPath const& cachePath,
255  TfTokenVector const& changedFields);
256 
257  /// Returns a bit mask of attributes to be updated, or
258  /// HdChangeTracker::AllDirty if the entire prim must be resynchronized.
259  virtual HdDirtyBits ProcessPropertyChange(UsdPrim const& prim,
260  SdfPath const& cachePath,
261  TfToken const& propertyName) = 0;
262 
263  /// When a PrimResync event occurs, the prim may have been deleted entirely,
264  /// adapter plug-ins should override this method to free any per-prim state
265  /// that was accumulated in the adapter.
267  virtual void ProcessPrimResync(SdfPath const& cachePath,
269 
270  /// Removes all associated Rprims and dependencies from the render index
271  /// without scheduling them for repopulation.
273  virtual void ProcessPrimRemoval(SdfPath const& cachePath,
275 
276 
277  virtual void MarkDirty(UsdPrim const& prim,
278  SdfPath const& cachePath,
279  HdDirtyBits dirty,
281 
283  virtual void MarkRefineLevelDirty(UsdPrim const& prim,
284  SdfPath const& cachePath,
286 
288  virtual void MarkReprDirty(UsdPrim const& prim,
289  SdfPath const& cachePath,
291 
293  virtual void MarkCullStyleDirty(UsdPrim const& prim,
294  SdfPath const& cachePath,
296 
298  virtual void MarkRenderTagDirty(UsdPrim const& prim,
299  SdfPath const& cachePath,
301 
303  virtual void MarkTransformDirty(UsdPrim const& prim,
304  SdfPath const& cachePath,
306 
308  virtual void MarkVisibilityDirty(UsdPrim const& prim,
309  SdfPath const& cachePath,
311 
313  virtual void MarkMaterialDirty(UsdPrim const& prim,
314  SdfPath const& cachePath,
316 
318  virtual void MarkLightParamsDirty(UsdPrim const& prim,
319  SdfPath const& cachePath,
321 
323  virtual void MarkWindowPolicyDirty(UsdPrim const& prim,
324  SdfPath const& cachePath,
326 
328  virtual void MarkCollectionsDirty(UsdPrim const& prim,
329  SdfPath const& cachePath,
331 
332  // ---------------------------------------------------------------------- //
333  /// \name Computations
334  // ---------------------------------------------------------------------- //
336  virtual void InvokeComputation(SdfPath const& cachePath,
337  HdExtComputationContext* context);
338 
339  // ---------------------------------------------------------------------- //
340  /// \name Instancing
341  // ---------------------------------------------------------------------- //
342 
343  /// Return an array of the categories used by each instance.
345  virtual std::vector<VtArray<TfToken>>
346  GetInstanceCategories(UsdPrim const& prim);
347 
348  /// Get the instancer transform for the given prim.
349  /// \see HdSceneDelegate::GetInstancerTransform()
352  UsdPrim const& instancerPrim,
353  SdfPath const& instancerPath,
354  UsdTimeCode time) const;
355 
356  /// Sample the instancer transform for the given prim.
357  /// \see HdSceneDelegate::SampleInstancerTransform()
359  virtual size_t SampleInstancerTransform(
360  UsdPrim const& instancerPrim,
361  SdfPath const& instancerPath,
363  size_t maxNumSamples,
364  float *sampleTimes,
365  GfMatrix4d *sampleValues);
366 
367  /// Return the instancerId for this prim.
369  virtual SdfPath GetInstancerId(
370  UsdPrim const& usdPrim,
371  SdfPath const& cachePath) const;
372 
373  /// Return the list of known prototypes of this prim.
376  UsdPrim const& usdPrim,
377  SdfPath const& cachePath) const;
378 
379  /// Sample the primvar for the given prim. If *sampleIndices is not nullptr
380  /// and the primvar has indices, it will sample the unflattened primvar and
381  /// set *sampleIndices to the primvar's sampled indices.
382  /// \see HdSceneDelegate::SamplePrimvar() and
383  /// HdSceneDelegate::SampleIndexedPrimvar()
385  virtual size_t
386  SamplePrimvar(UsdPrim const& usdPrim,
387  SdfPath const& cachePath,
388  TfToken const& key,
390  size_t maxNumSamples,
391  float *sampleTimes,
392  VtValue *sampleValues,
393  VtIntArray *sampleIndices);
394 
395  /// Get the subdiv tags for this prim.
397  virtual PxOsdSubdivTags GetSubdivTags(UsdPrim const& usdPrim,
398  SdfPath const& cachePath,
399  UsdTimeCode time) const;
400 
401  // ---------------------------------------------------------------------- //
402  /// \name Nested instancing support
403  // ---------------------------------------------------------------------- //
404 
405  // NOTE: This method is currently only used by PointInstancer
406  // style instances, and not instanceable-references.
407 
408  /// Returns the transform of \p protoInstancerPath relative to
409  /// \p instancerPath. \p instancerPath must be managed by this
410  /// adapter.
413  SdfPath const &instancerPath,
414  SdfPath const &protoInstancerPath,
415  UsdTimeCode time) const;
416 
417  // ---------------------------------------------------------------------- //
418  /// \name Selection
419  // ---------------------------------------------------------------------- //
420 
421  /// \deprecated Call and implement GetScenePrimPaths instead.
423  virtual SdfPath GetScenePrimPath(SdfPath const& cachePath,
424  int instanceIndex,
425  HdInstancerContext *instancerCtx) const;
426 
428  virtual SdfPathVector GetScenePrimPaths(SdfPath const& cachePath,
429  std::vector<int> const& instanceIndices,
430  std::vector<HdInstancerContext> *instancerCtxs) const;
431 
433  virtual SdfPath GetDataSharingId(SdfPath const& cachePath) const;
434 
435  // Add the given usdPrim to the HdSelection object, to mark it for
436  // selection highlighting. cachePath is the path of the object referencing
437  // this adapter.
438  //
439  // If an instance index is provided to Delegate::PopulateSelection, it's
440  // interpreted as a hydra instance index and left unchanged (to make
441  // picking/selection round-tripping work). Otherwise, instance adapters
442  // will build up a composite instance index range at each level.
443  //
444  // Consider:
445  // /World/A (2 instances)
446  // /B (2 instances)
447  // /C (gprim)
448  // ... to select /World/A, instance 0, you want to select cartesian
449  // coordinates (0, *) -> (0, 0) and (0, 1). The flattened representation
450  // of this is:
451  // index = coordinate[0] * instance_count[1] + coordinate[1]
452  // Likewise, for one more nesting level you get:
453  // index = c[0] * count[1] * count[2] + c[1] * count[2] + c[2]
454  // ... since the adapter for /World/A has no idea what count[1+] are,
455  // this needs to be built up. The delegate initially sets
456  // parentInstanceIndices to []. /World/A sets this to [0]. /World/A/B,
457  // since it is selecting *, adds all possible instance indices:
458  // 0 * 2 + 0 = 0, 0 * 2 + 1 = 1. /World/A/B/C is a gprim, and adds
459  // instances [0,1] to its selection.
461  virtual bool PopulateSelection(
462  HdSelection::HighlightMode const& highlightMode,
463  SdfPath const &cachePath,
464  UsdPrim const &usdPrim,
465  int const hydraInstanceIndex,
466  VtIntArray const &parentInstanceIndices,
467  HdSelectionSharedPtr const &result) const;
468 
469  // ---------------------------------------------------------------------- //
470  /// \name Volume field information
471  // ---------------------------------------------------------------------- //
472 
475  GetVolumeFieldDescriptors(UsdPrim const& usdPrim, SdfPath const &id,
476  UsdTimeCode time) const;
477 
478  // ---------------------------------------------------------------------- //
479  /// \name Light Params
480  // ---------------------------------------------------------------------- //
481 
483  virtual VtValue
485  const UsdPrim& prim,
486  const SdfPath& cachePath,
487  const TfToken& paramName,
488  UsdTimeCode time) const;
489 
490  // ---------------------------------------------------------------------- //
491  /// \name Utilities
492  // ---------------------------------------------------------------------- //
493 
494  /// The root transform provided by the delegate.
497 
498  /// A thread-local XformCache provided by the delegate.
500  void SetDelegate(UsdImagingDelegate* delegate);
501 
503  bool IsChildPath(SdfPath const& path) const;
504 
505  /// Returns true if the given prim is visible, taking into account inherited
506  /// visibility values. Inherited values are strongest, Usd has no notion of
507  /// "super vis/invis".
509  virtual bool GetVisible(
510  UsdPrim const& prim,
511  SdfPath const& cachePath,
512  UsdTimeCode time) const;
513 
514  /// Returns the purpose token for \p prim. If a non-empty \p
515  /// instanceInheritablePurpose is specified and the prim doesn't have an
516  /// explicitly authored or inherited purpose, it may inherit the
517  /// instancer's purpose if the instance has an explicit purpose.
519  virtual TfToken GetPurpose(
520  UsdPrim const& prim,
521  SdfPath const& cachePath,
522  TfToken const& instanceInheritablePurpose) const;
523 
524  /// Returns the purpose token for \p prim, but only if it is inheritable
525  /// by child prims (i.e. it is an explicitly authored purpose on the prim
526  /// itself or one of the prim's ancestors), otherwise it returns the empty
527  /// token.
529  TfToken GetInheritablePurpose(UsdPrim const& prim) const;
530 
531  /// Fetches the transform for the given prim at the given time from a
532  /// pre-computed cache of prim transforms. Requesting transforms at
533  /// incoherent times is currently inefficient.
535  virtual GfMatrix4d GetTransform(UsdPrim const& prim,
536  SdfPath const& cachePath,
538  bool ignoreRootTransform = false) const;
539 
540  /// Samples the transform for the given prim.
542  virtual size_t SampleTransform(UsdPrim const& prim,
543  SdfPath const& cachePath,
545  size_t maxNumSamples,
546  float *sampleTimes,
547  GfMatrix4d *sampleValues);
548 
549  /// Gets the value of the parameter named key for the given prim (which
550  /// has the given cache path) and given time. If outIndices is not nullptr
551  /// and the value has indices, it will return the unflattened value and set
552  /// outIndices to the value's associated indices.
554  virtual VtValue Get(UsdPrim const& prim,
555  SdfPath const& cachePath,
556  TfToken const& key,
557  UsdTimeCode time,
558  VtIntArray *outIndices) const;
559 
560  /// Gets the cullstyle of a specific path in the scene graph.
562  virtual HdCullStyle GetCullStyle(UsdPrim const& prim,
563  SdfPath const& cachePath,
564  UsdTimeCode time) const;
565 
566  /// Gets the material path for the given prim, walking up namespace if
567  /// necessary.
569  SdfPath GetMaterialUsdPath(UsdPrim const& prim) const;
570 
571  /// Gets the model:drawMode attribute for the given prim, walking up
572  /// the namespace if necessary.
574  TfToken GetModelDrawMode(UsdPrim const& prim);
575 
576  /// Gets the model draw mode object for the given prim, walking up the
577  /// namespace if necessary.
580 
581  /// Computes the per-prototype instance indices for a UsdGeomPointInstancer.
582  /// XXX: This needs to be defined on the base class, to have access to the
583  /// delegate, but it's a clear violation of abstraction. This call is only
584  /// legal for prims of type UsdGeomPointInstancer; in other cases, the
585  /// returned array will be empty and the computation will issue errors.
588  UsdTimeCode time) const;
589 
590  /// Gets the topology object of a specific Usd prim. If the
591  /// adapter is a mesh it will return an HdMeshTopology,
592  /// if it is of type basis curves, it will return an HdBasisCurvesTopology.
593  /// If the adapter does not have a topology, it returns an empty VtValue.
595  virtual VtValue GetTopology(UsdPrim const& prim,
596  SdfPath const& cachePath,
597  UsdTimeCode time) const;
598 
599  /// Reads the extent from the given prim. If the extent is not authored,
600  /// an empty GfRange3d is returned, the extent will not be computed.
602  virtual GfRange3d GetExtent(UsdPrim const& prim,
603  SdfPath const& cachePath,
604  UsdTimeCode time) const;
605 
606  /// Reads double-sided from the given prim. If not authored, returns false
608  virtual bool GetDoubleSided(UsdPrim const& prim,
609  SdfPath const& cachePath,
610  UsdTimeCode time) const;
611 
613  virtual SdfPath GetMaterialId(UsdPrim const& prim,
614  SdfPath const& cachePath,
615  UsdTimeCode time) const;
616 
618  virtual VtValue GetMaterialResource(UsdPrim const& prim,
619  SdfPath const& cachePath,
620  UsdTimeCode time) const;
621 
622  // ---------------------------------------------------------------------- //
623  /// \name ExtComputations
624  // ---------------------------------------------------------------------- //
627  SdfPath const& cachePath) const;
628 
631  GetExtComputationInputs(UsdPrim const& prim,
632  SdfPath const& cachePath,
633  const UsdImagingInstancerContext* instancerContext)
634  const;
635 
638  GetExtComputationOutputs(UsdPrim const& prim,
639  SdfPath const& cachePath,
640  const UsdImagingInstancerContext* instancerContext)
641  const;
642 
646  UsdPrim const& prim,
647  SdfPath const& cachePath,
648  HdInterpolation interpolation,
649  const UsdImagingInstancerContext* instancerContext) const;
650 
652  virtual VtValue
654  UsdPrim const& prim,
655  SdfPath const& cachePath,
656  TfToken const& name,
658  const UsdImagingInstancerContext* instancerContext) const;
659 
661  virtual size_t
663  UsdPrim const& prim,
664  SdfPath const& cachePath,
665  TfToken const& name,
667  const UsdImagingInstancerContext* instancerContext,
668  size_t maxSampleCount,
669  float *sampleTimes,
670  VtValue *sampleValues);
671 
673  virtual std::string
675  UsdPrim const& prim,
676  SdfPath const& cachePath,
677  const UsdImagingInstancerContext* instancerContext) const;
678 
680  virtual VtValue
681  GetInstanceIndices(UsdPrim const& instancerPrim,
682  SdfPath const& instancerCachePath,
683  SdfPath const& prototypeCachePath,
684  UsdTimeCode time) const;
685 
686  // ---------------------------------------------------------------------- //
687  /// \name Render Index Compatibility
688  // ---------------------------------------------------------------------- //
689 
690  /// Returns true if the adapter can be populated into the target index.
691  virtual bool IsSupported(UsdImagingIndexProxy const* index) const {
692  return true;
693  }
694 
695 
696  // ---------------------------------------------------------------------- //
697  /// \name Utilties
698  // ---------------------------------------------------------------------- //
699 
700  /// Provides to paramName->UsdAttribute value mappings
703  UsdPrim const& prim,
704  TfToken const& paramName);
705 
706 protected:
708 
709  template <typename T>
710  T _Get(UsdPrim const& prim, TfToken const& attrToken,
711  UsdTimeCode time) const {
712  T value;
713  prim.GetAttribute(attrToken).Get<T>(&value, time);
714  return value;
715  }
716 
717  template <typename T>
718  void _GetPtr(UsdPrim const& prim, TfToken const& key, UsdTimeCode time,
719  T* out) const {
720  prim.GetAttribute(key).Get<T>(out, time);
721  }
722 
725 
728 
730  _GetBlurScaleCache() const;
731 
733  UsdPrim _GetPrim(SdfPath const& usdPath) const;
734 
735  // Returns the prim adapter for the given \p prim, or an invalid pointer if
736  // no adapter exists. If \p prim is an instance and \p ignoreInstancing
737  // is \c true, the instancing adapter will be ignored and an adapter will
738  // be looked up based on \p prim's type.
741  _GetPrimAdapter(UsdPrim const& prim, bool ignoreInstancing = false) const;
742 
745  _GetAdapter(TfToken const& adapterKey) const;
746 
747  // XXX: Transitional API
748  // Returns the instance proxy prim path for a USD-instanced prim, given the
749  // instance chain leading to that prim. The paths are sorted from more to
750  // less local; the first path is the prim path (possibly in prototype), then
751  // instance paths (possibly in prototype); the last path is the prim or
752  // instance path in the scene.
755  SdfPathVector const& instancerChain) const;
756 
759 
760  // Converts \p cachePath to the path in the render index.
762  SdfPath _ConvertCachePathToIndexPath(SdfPath const& cachePath) const;
763 
764  // Converts \p indexPath to the path in the USD stage
766  SdfPath _ConvertIndexPathToCachePath(SdfPath const& indexPath) const;
767 
768  // Returns the material binding purpose from the renderer delegate.
771 
772  // Returns the material contexts from the renderer delegate.
775 
776  // Returns the namespace prefixes for render settings attributes relevant
777  // to a renderer delegate.
780 
781  /// Returns whether custom shading of prims is enabled.
783  bool _GetSceneMaterialsEnabled() const;
784 
785  /// Returns whether lights found in the usdscene are enabled.
787  bool _GetSceneLightsEnabled() const;
788 
789  // Returns true if render delegate wants primvars to be filtered based.
790  // This will filter the primvars based on the bound material primvar needs.
792  bool _IsPrimvarFilteringNeeded() const;
793 
794  // Returns the shader source type from the render delegate.
797 
798  // Returns \c true if \p usdPath is included in the scene delegate's
799  // invised path list.
801  bool _IsInInvisedPaths(SdfPath const& usdPath) const;
802 
803  // Determines if an attribute is varying and if so, sets the given
804  // \p dirtyFlag in the \p dirtyFlags and increments a perf counter. Returns
805  // true if the attribute is varying.
806  //
807  // If \p exists is non-null, _IsVarying will store whether the attribute
808  // was found. If the attribute is not found, it counts as non-varying.
809  //
810  // This only sets the dirty bit, never un-sets. The caller is responsible
811  // for setting the initial state correctly.
813  bool _IsVarying(UsdPrim prim, TfToken const& attrName,
814  HdDirtyBits dirtyFlag, TfToken const& perfToken,
815  HdDirtyBits* dirtyFlags, bool isInherited,
816  bool* exists = nullptr) const;
817 
818  // Determines if the prim's transform (CTM) is varying and if so, sets the
819  // given \p dirtyFlag in the \p dirtyFlags and increments a perf counter.
820  // Returns true if the prim's transform is varying.
821  //
822  // This only sets the dirty bit, never un-sets. The caller is responsible
823  // for setting the initial state correctly.
825  bool _IsTransformVarying(UsdPrim prim,
826  HdDirtyBits dirtyFlag,
827  TfToken const& perfToken,
828  HdDirtyBits* dirtyFlags) const;
829 
830  // Convenience method for adding or updating a primvar descriptor.
831  // Role defaults to empty token (none). Indexed defaults to false.
833  void _MergePrimvar(
835  TfToken const& name,
836  HdInterpolation interp,
837  TfToken const& role = TfToken(),
838  bool indexed = false) const;
839 
840  // Convenience method for removing a primvar descriptor.
842  void _RemovePrimvar(
844  TfToken const& name) const;
845 
846  // Convenience method for computing a primvar. The primvar will only be
847  // added to the list of prim desc if there is no primvar of the same
848  // name already present. Thus, "local" primvars should be merged before
849  // inherited primvars.
852  UsdPrim const& prim,
853  UsdGeomPrimvar const& primvar,
855  HdPrimvarDescriptorVector* primvarDescs,
856  HdInterpolation *interpOverride = nullptr) const;
857 
858  // Returns true if the property name has the "primvars:" prefix.
860  static bool _HasPrimvarsPrefix(TfToken const& propertyName);
861 
862  // Convenience methods to figure out what changed about the primvar and
863  // return the appropriate dirty bit.
864  // Caller can optionally pass in a dirty bit to set for primvar value
865  // changes. This is useful for attributes that have a special dirty bit
866  // such as normals and widths.
867  //
868  // Handle USD attributes that are treated as primvars by Hydra. This
869  // requires the interpolation to be passed in, as well as the primvar
870  // name passed to Hydra.
873  UsdPrim const& prim,
874  SdfPath const& cachePath,
875  TfToken const& propertyName,
876  TfToken const& primvarName,
877  HdInterpolation const& primvarInterp,
878  HdDirtyBits valueChangeDirtyBit = HdChangeTracker::DirtyPrimvar) const;
879 
880  // Handle UsdGeomPrimvars that use the "primvars:" prefix, while also
881  // accommodating inheritance.
884  UsdPrim const& prim,
885  SdfPath const& cachePath,
886  TfToken const& propertyName,
887  HdDirtyBits valueChangeDirtyBit = HdChangeTracker::DirtyPrimvar,
888  bool inherited = true) const;
889 
890  virtual void _RemovePrim(SdfPath const& cachePath,
892 
893  // Utility to resync bound dependencies of a particular usd path.
894  // This is necessary for the resync processing of certain prim types
895  // (e.g. materials).
897  void _ResyncDependents(SdfPath const& usdPath,
899 
902 
904  UsdStageRefPtr _GetStage() const;
905 
908  _GetCoordSysBindings(UsdPrim const& prim) const;
909 
912  _GetInheritedPrimvars(UsdPrim const& prim) const;
913 
914  // Utility for derived classes to try to find an inherited primvar.
917  TfToken const& primvarName) const;
918 
921 
924 
927 
929  bool _DoesDelegateSupportCoordSys() const;
930 
931 private:
932  UsdImagingDelegate* _delegate;
933 };
934 
936 public:
937  virtual UsdImagingPrimAdapterSharedPtr New() const = 0;
938 };
939 
940 template <class T>
942 public:
944  {
945  return std::make_shared<T>();
946  }
947 };
948 
949 
951 
952 #endif // PXR_USD_IMAGING_USD_IMAGING_PRIM_ADAPTER_H
static USDIMAGING_API bool _HasPrimvarsPrefix(TfToken const &propertyName)
Provides to paramName->UsdAttribute value mappings.
virtual USDIMAGING_API size_t SamplePrimvar(UsdPrim const &usdPrim, SdfPath const &cachePath, TfToken const &key, UsdTimeCode time, size_t maxNumSamples, float *sampleTimes, VtValue *sampleValues, VtIntArray *sampleIndices)
virtual USDIMAGING_API VtValue GetTopology(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time) const
virtual USDIMAGING_API SdfPathVector GetInstancerPrototypes(UsdPrim const &usdPrim, SdfPath const &cachePath) const
Return the list of known prototypes of this prim.
virtual USDIMAGING_API void InvokeComputation(SdfPath const &cachePath, HdExtComputationContext *context)
virtual HdDirtyBits ProcessPropertyChange(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &propertyName)=0
virtual USDIMAGING_API PxOsdSubdivTags GetSubdivTags(UsdPrim const &usdPrim, SdfPath const &cachePath, UsdTimeCode time) const
Get the subdiv tags for this prim.
HdCullStyle
Definition: enums.h:122
virtual UsdImagingPrimAdapterSharedPtr New() const =0
bool Get(T *value, UsdTimeCode time=UsdTimeCode::Default()) const
Definition: attribute.h:436
#define USDIMAGING_API
Definition: api.h:40
T _Get(UsdPrim const &prim, TfToken const &attrToken, UsdTimeCode time) const
Provides to paramName->UsdAttribute value mappings.
Definition: primAdapter.h:710
virtual USDIMAGING_API SdfPathVector GetScenePrimPaths(SdfPath const &cachePath, std::vector< int > const &instanceIndices, std::vector< HdInstancerContext > *instancerCtxs) const
USDIMAGING_API Usd_PrimFlagsConjunction _GetDisplayPredicateForPrototypes() const
Provides to paramName->UsdAttribute value mappings.
virtual USDIMAGING_API HdContainerDataSourceHandle GetImagingSubprimData(UsdPrim const &prim, TfToken const &subprim, const UsdImagingDataSourceStageGlobals &stageGlobals)
USDIMAGING_API bool IsChildPath(SdfPath const &path) const
The root transform provided by the delegate.
USDIMAGING_API UsdImagingPrimvarDescCache * _GetPrimvarDescCache() const
Provides to paramName->UsdAttribute value mappings.
USDIMAGING_API void SetDelegate(UsdImagingDelegate *delegate)
A thread-local XformCache provided by the delegate.
USDIMAGING_API VtArray< VtIntArray > GetPerPrototypeIndices(UsdPrim const &prim, UsdTimeCode time) const
GT_API const UT_StringHolder time
virtual USDIMAGING_API size_t SampleTransform(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time, size_t maxNumSamples, float *sampleTimes, GfMatrix4d *sampleValues)
Samples the transform for the given prim.
uint32_t HdDirtyBits
Definition: types.h:158
USDIMAGING_API UsdImaging_InheritedPrimvarStrategy::value_type _GetInheritedPrimvars(UsdPrim const &prim) const
Provides to paramName->UsdAttribute value mappings.
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
GLsizei const GLfloat * value
Definition: glcorearb.h:824
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
virtual USDIMAGING_API SdfPath GetInstancerId(UsdPrim const &usdPrim, SdfPath const &cachePath) const
Return the instancerId for this prim.
std::vector< HdExtComputationInputDescriptor > HdExtComputationInputDescriptorVector
virtual void UpdateForTime(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time, HdDirtyBits requestedBits, UsdImagingInstancerContext const *instancerContext=nullptr) const =0
virtual USDIMAGING_API HdDataSourceLocatorSet InvalidateImagingSubprimFromDescendent(UsdPrim const &prim, UsdPrim const &descendentPrim, TfToken const &subprim, TfTokenVector const &properties, UsdImagingPropertyInvalidationType invalidationType)
virtual USDIMAGING_API GfMatrix4d GetTransform(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time, bool ignoreRootTransform=false) const
USDIMAGING_API SdfPath GetMaterialUsdPath(UsdPrim const &prim) const
virtual USDIMAGING_API void MarkRenderTagDirty(UsdPrim const &prim, SdfPath const &cachePath, UsdImagingIndexProxy *index)
USDIMAGING_API UsdPrim _GetPrim(SdfPath const &usdPath) const
Provides to paramName->UsdAttribute value mappings.
virtual USDIMAGING_API void MarkVisibilityDirty(UsdPrim const &prim, SdfPath const &cachePath, UsdImagingIndexProxy *index)
USDIMAGING_API bool _IsTransformVarying(UsdPrim prim, HdDirtyBits dirtyFlag, TfToken const &perfToken, HdDirtyBits *dirtyFlags) const
Provides to paramName->UsdAttribute value mappings.
USDIMAGING_API HdDirtyBits _ProcessPrefixedPrimvarPropertyChange(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &propertyName, HdDirtyBits valueChangeDirtyBit=HdChangeTracker::DirtyPrimvar, bool inherited=true) const
Provides to paramName->UsdAttribute value mappings.
virtual USDIMAGING_API HdExtComputationPrimvarDescriptorVector GetExtComputationPrimvars(UsdPrim const &prim, SdfPath const &cachePath, HdInterpolation interpolation, const UsdImagingInstancerContext *instancerContext) const
std::vector< HdExtComputationOutputDescriptor > HdExtComputationOutputDescriptorVector
USDIMAGING_API UsdImaging_CollectionCache & _GetCollectionCache() const
Provides to paramName->UsdAttribute value mappings.
**But if you need a result
Definition: thread.h:613
USDIMAGING_API Usd_PrimFlagsConjunction _GetDisplayPredicate() const
Provides to paramName->UsdAttribute value mappings.
USDIMAGING_API SdfPath _ConvertCachePathToIndexPath(SdfPath const &cachePath) const
Provides to paramName->UsdAttribute value mappings.
USDIMAGING_API const UsdImagingPrimAdapterSharedPtr & _GetAdapter(TfToken const &adapterKey) const
Provides to paramName->UsdAttribute value mappings.
virtual USDIMAGING_API size_t SampleExtComputationInput(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &name, UsdTimeCode time, const UsdImagingInstancerContext *instancerContext, size_t maxSampleCount, float *sampleTimes, VtValue *sampleValues)
virtual USDIMAGING_API void MarkLightParamsDirty(UsdPrim const &prim, SdfPath const &cachePath, UsdImagingIndexProxy *index)
virtual USDIMAGING_API bool ShouldCullChildren() const
virtual USDIMAGING_API void ProcessPrimResync(SdfPath const &cachePath, UsdImagingIndexProxy *index)
UsdImaging_BlurScaleCache * _GetBlurScaleCache() const
Provides to paramName->UsdAttribute value mappings.
virtual USDIMAGING_API HdCullStyle GetCullStyle(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time) const
Gets the cullstyle of a specific path in the scene graph.
virtual USDIMAGING_API PopulationMode GetPopulationMode()
USDIMAGING_API bool _IsPrimvarFilteringNeeded() const
Provides to paramName->UsdAttribute value mappings.
Base class of all factory types.
Definition: type.h:73
std::vector< std::pair< SdfPath, int > > HdInstancerContext
Instancer context: a pair of instancer paths and instance indices.
Definition: sceneDelegate.h:61
virtual void TrackVariability(UsdPrim const &prim, SdfPath const &cachePath, HdDirtyBits *timeVaryingBits, UsdImagingInstancerContext const *instancerContext=nullptr) const =0
USDIMAGING_API bool _IsInInvisedPaths(SdfPath const &usdPath) const
Provides to paramName->UsdAttribute value mappings.
virtual USDIMAGING_API std::string GetExtComputationKernel(UsdPrim const &prim, SdfPath const &cachePath, const UsdImagingInstancerContext *instancerContext) const
virtual void _RemovePrim(SdfPath const &cachePath, UsdImagingIndexProxy *index)=0
Provides to paramName->UsdAttribute value mappings.
USDIMAGING_API void _RemovePrimvar(HdPrimvarDescriptorVector *vec, TfToken const &name) const
Provides to paramName->UsdAttribute value mappings.
Definition: token.h:87
GLintptr offset
Definition: glcorearb.h:665
USDIMAGING_API UsdGeomPrimvar _GetInheritedPrimvar(UsdPrim const &prim, TfToken const &primvarName) const
Provides to paramName->UsdAttribute value mappings.
virtual USDIMAGING_API std::vector< VtArray< TfToken > > GetInstanceCategories(UsdPrim const &prim)
Return an array of the categories used by each instance.
virtual USDIMAGING_API bool ShouldIgnoreNativeInstanceSubtrees() const
virtual USDIMAGING_API GfRange3d GetExtent(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time) const
virtual USDIMAGING_API void MarkWindowPolicyDirty(UsdPrim const &prim, SdfPath const &cachePath, UsdImagingIndexProxy *index)
virtual USDIMAGING_API VtValue GetMaterialResource(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time) const
The root transform provided by the delegate.
virtual USDIMAGING_API HdExtComputationOutputDescriptorVector GetExtComputationOutputs(UsdPrim const &prim, SdfPath const &cachePath, const UsdImagingInstancerContext *instancerContext) const
USDIMAGING_API bool _GetSceneLightsEnabled() const
Returns whether lights found in the usdscene are enabled.
virtual USDIMAGING_API SdfPath GetDataSharingId(SdfPath const &cachePath) const
virtual USDIMAGING_API void MarkReprDirty(UsdPrim const &prim, SdfPath const &cachePath, UsdImagingIndexProxy *index)
USDIMAGING_API UsdStageRefPtr _GetStage() const
Provides to paramName->UsdAttribute value mappings.
USDIMAGING_API TfToken _GetMaterialBindingPurpose() const
Provides to paramName->UsdAttribute value mappings.
USDIMAGING_API const UsdImagingPrimAdapterSharedPtr & _GetPrimAdapter(UsdPrim const &prim, bool ignoreInstancing=false) const
Provides to paramName->UsdAttribute value mappings.
virtual USDIMAGING_API void MarkCullStyleDirty(UsdPrim const &prim, SdfPath const &cachePath, UsdImagingIndexProxy *index)
USDIMAGING_API bool _IsVarying(UsdPrim prim, TfToken const &attrName, HdDirtyBits dirtyFlag, TfToken const &perfToken, HdDirtyBits *dirtyFlags, bool isInherited, bool *exists=nullptr) const
Provides to paramName->UsdAttribute value mappings.
Definition: prim.h:135
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:442
OIIO_UTIL_API bool exists(string_view path) noexcept
GLuint const GLchar * name
Definition: glcorearb.h:786
static USDIMAGING_API bool ShouldCullSubtree(UsdPrim const &prim)
static USDIMAGING_API UsdAttribute LookupLightParamAttribute(UsdPrim const &prim, TfToken const &paramName)
Provides to paramName->UsdAttribute value mappings.
Definition: types.h:173
HighlightMode
Selection modes allow differentiation in selection highlight behavior.
Definition: selection.h:56
Definition: path.h:291
virtual USDIMAGING_API VtValue GetInstanceIndices(UsdPrim const &instancerPrim, SdfPath const &instancerCachePath, SdfPath const &prototypeCachePath, UsdTimeCode time) const
virtual USDIMAGING_API void MarkCollectionsDirty(UsdPrim const &prim, SdfPath const &cachePath, UsdImagingIndexProxy *index)
virtual USDIMAGING_API bool GetDoubleSided(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time) const
Reads double-sided from the given prim. If not authored, returns false.
std::vector< HdVolumeFieldDescriptor > HdVolumeFieldDescriptorVector
virtual USDIMAGING_API HdExtComputationInputDescriptorVector GetExtComputationInputs(UsdPrim const &prim, SdfPath const &cachePath, const UsdImagingInstancerContext *instancerContext) const
std::vector< class SdfPath > SdfPathVector
A vector of SdfPaths.
Definition: path.h:212
virtual SdfPath Populate(UsdPrim const &prim, UsdImagingIndexProxy *index, UsdImagingInstancerContext const *instancerContext=nullptr)=0
virtual USDIMAGING_API ~UsdImagingPrimAdapter()
USDIMAGING_API UsdTimeCode _GetTimeWithOffset(float offset) const
Provides to paramName->UsdAttribute value mappings.
USDIMAGING_API TfTokenVector _GetMaterialRenderContexts() const
Provides to paramName->UsdAttribute value mappings.
virtual USDIMAGING_API bool IsInstancerAdapter() const
USDIMAGING_API SdfPath _ConvertIndexPathToCachePath(SdfPath const &indexPath) const
Provides to paramName->UsdAttribute value mappings.
USDIMAGING_API TfToken GetModelDrawMode(UsdPrim const &prim)
virtual USDIMAGING_API TfTokenVector GetImagingSubprims(UsdPrim const &prim)
virtual void MarkDirty(UsdPrim const &prim, SdfPath const &cachePath, HdDirtyBits dirty, UsdImagingIndexProxy *index)=0
virtual USDIMAGING_API GfMatrix4d GetRelativeInstancerTransform(SdfPath const &instancerPath, SdfPath const &protoInstancerPath, UsdTimeCode time) const
virtual USDIMAGING_API TfToken GetPurpose(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &instanceInheritablePurpose) const
virtual USDIMAGING_API bool CanPopulateUsdInstance() const
USDIMAGING_API HdModelDrawMode GetFullModelDrawMode(UsdPrim const &prim)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1441
virtual USDIMAGING_API GfMatrix4d GetInstancerTransform(UsdPrim const &instancerPrim, SdfPath const &instancerPath, UsdTimeCode time) const
USDIMAGING_API TfToken GetInheritablePurpose(UsdPrim const &prim) const
virtual USDIMAGING_API bool GetVisible(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time) const
USDIMAGING_API SdfPath _GetPrimPathFromInstancerChain(SdfPathVector const &instancerChain) const
Provides to paramName->UsdAttribute value mappings.
virtual USDIMAGING_API const TfTokenVector & GetExtComputationSceneInputNames(SdfPath const &cachePath) const
virtual USDIMAGING_API void MarkMaterialDirty(UsdPrim const &prim, SdfPath const &cachePath, UsdImagingIndexProxy *index)
virtual USDIMAGING_API void ProcessPrimRemoval(SdfPath const &cachePath, UsdImagingIndexProxy *index)
virtual USDIMAGING_API HdVolumeFieldDescriptorVector GetVolumeFieldDescriptors(UsdPrim const &usdPrim, SdfPath const &id, UsdTimeCode time) const
void _GetPtr(UsdPrim const &prim, TfToken const &key, UsdTimeCode time, T *out) const
Provides to paramName->UsdAttribute value mappings.
Definition: primAdapter.h:718
GLuint index
Definition: glcorearb.h:786
virtual USDIMAGING_API VtValue GetExtComputationInput(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &name, UsdTimeCode time, const UsdImagingInstancerContext *instancerContext) const
virtual USDIMAGING_API size_t SampleInstancerTransform(UsdPrim const &instancerPrim, SdfPath const &instancerPath, UsdTimeCode time, size_t maxNumSamples, float *sampleTimes, GfMatrix4d *sampleValues)
HdInterpolation
Definition: enums.h:194
USDIMAGING_API GfMatrix4d GetRootTransform() const
The root transform provided by the delegate.
USDIMAGING_API GfInterval _GetCurrentTimeSamplingInterval()
Provides to paramName->UsdAttribute value mappings.
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
USDIMAGING_API UsdImaging_CoordSysBindingStrategy::value_type _GetCoordSysBindings(UsdPrim const &prim) const
Provides to paramName->UsdAttribute value mappings.
std::shared_ptr< UsdImagingPrimAdapter > UsdImagingPrimAdapterSharedPtr
virtual USDIMAGING_API void MarkRefineLevelDirty(UsdPrim const &prim, SdfPath const &cachePath, UsdImagingIndexProxy *index)
virtual bool IsSupported(UsdImagingIndexProxy const *index) const
Returns true if the adapter can be populated into the target index.
Definition: primAdapter.h:691
std::shared_ptr< PrimvarRecord > value_type
virtual USDIMAGING_API HdDirtyBits ProcessPrimChange(UsdPrim const &prim, SdfPath const &cachePath, TfTokenVector const &changedFields)
virtual USDIMAGING_API void MarkTransformDirty(UsdPrim const &prim, SdfPath const &cachePath, UsdImagingIndexProxy *index)
virtual USDIMAGING_API VtValue GetLightParamValue(const UsdPrim &prim, const SdfPath &cachePath, const TfToken &paramName, UsdTimeCode time) const
virtual UsdImagingPrimAdapterSharedPtr New() const
Definition: primAdapter.h:943
USDIMAGING_API bool _GetSceneMaterialsEnabled() const
Returns whether custom shading of prims is enabled.
std::vector< HdPrimvarDescriptor > HdPrimvarDescriptorVector
virtual USDIMAGING_API SdfPath GetScenePrimPath(SdfPath const &cachePath, int instanceIndex, HdInstancerContext *instancerCtx) const
USDIMAGING_API void _ResyncDependents(SdfPath const &usdPath, UsdImagingIndexProxy *index)
Provides to paramName->UsdAttribute value mappings.
virtual USDIMAGING_API TfToken GetImagingSubprimType(UsdPrim const &prim, TfToken const &subprim)
USDIMAGING_API HdDirtyBits _ProcessNonPrefixedPrimvarPropertyChange(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &propertyName, TfToken const &primvarName, HdInterpolation const &primvarInterp, HdDirtyBits valueChangeDirtyBit=HdChangeTracker::DirtyPrimvar) const
Provides to paramName->UsdAttribute value mappings.
USDIMAGING_API void _MergePrimvar(HdPrimvarDescriptorVector *vec, TfToken const &name, HdInterpolation interp, TfToken const &role=TfToken(), bool indexed=false) const
Provides to paramName->UsdAttribute value mappings.
std::shared_ptr< class HdSelection > HdSelectionSharedPtr
Definition: selection.h:40
USD_API UsdAttribute GetAttribute(const TfToken &attrName) const
virtual USDIMAGING_API HdDataSourceLocatorSet InvalidateImagingSubprim(UsdPrim const &prim, TfToken const &subprim, TfTokenVector const &properties, UsdImagingPropertyInvalidationType invalidationType)
virtual USDIMAGING_API VtValue Get(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &key, UsdTimeCode time, VtIntArray *outIndices) const
USDIMAGING_API TfTokenVector _GetShaderSourceTypes() const
Provides to paramName->UsdAttribute value mappings.
Definition: value.h:167
UsdImaging_NonlinearSampleCountCache * _GetNonlinearSampleCountCache() const
Provides to paramName->UsdAttribute value mappings.
UsdImagingPropertyInvalidationType
Definition: types.h:34
USDIMAGING_API TfTokenVector _GetRenderSettingsNamespaces() const
Provides to paramName->UsdAttribute value mappings.
virtual USDIMAGING_API SdfPath GetMaterialId(UsdPrim const &prim, SdfPath const &cachePath, UsdTimeCode time) const
The root transform provided by the delegate.
USDIMAGING_API bool _DoesDelegateSupportCoordSys() const
Provides to paramName->UsdAttribute value mappings.
std::vector< HdExtComputationPrimvarDescriptor > HdExtComputationPrimvarDescriptorVector
virtual USDIMAGING_API bool PopulateSelection(HdSelection::HighlightMode const &highlightMode, SdfPath const &cachePath, UsdPrim const &usdPrim, int const hydraInstanceIndex, VtIntArray const &parentInstanceIndices, HdSelectionSharedPtr const &result) const
USDIMAGING_API void _ComputeAndMergePrimvar(UsdPrim const &prim, UsdGeomPrimvar const &primvar, UsdTimeCode time, HdPrimvarDescriptorVector *primvarDescs, HdInterpolation *interpOverride=nullptr) const
Provides to paramName->UsdAttribute value mappings.