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 terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_USD_IMAGING_USD_IMAGING_PRIM_ADAPTER_H
8 #define PXR_USD_IMAGING_USD_IMAGING_PRIM_ADAPTER_H
9 
10 /// \file usdImaging/primAdapter.h
11 
12 #include "pxr/pxr.h"
19 
22 #include "pxr/usd/sdf/path.h"
23 #include "pxr/usd/usd/attribute.h"
24 #include "pxr/usd/usd/prim.h"
25 #include "pxr/usd/usd/timeCode.h"
26 
28 
29 #include "pxr/base/tf/type.h"
30 
31 #include <memory>
32 
34 
35 class UsdPrim;
36 
37 // Forward declaration for nested class.
38 class UsdImagingDelegate;
42 
44 
46  std::shared_ptr<class UsdImagingPrimAdapter>;
47 
48 /// \class UsdImagingPrimAdapter
49 ///
50 /// Base class for all PrimAdapters.
51 ///
53  : public std::enable_shared_from_this<UsdImagingPrimAdapter>
54 {
55 public:
57  virtual ~UsdImagingPrimAdapter() = default;
58 
59  // ---------------------------------------------------------------------- //
60  /// \name Scene Index Support
61  // ---------------------------------------------------------------------- //
62 
64  virtual TfTokenVector GetImagingSubprims(UsdPrim const& prim);
65 
68  UsdPrim const& prim, TfToken const& subprim);
69 
71  virtual HdContainerDataSourceHandle GetImagingSubprimData(
72  UsdPrim const& prim,
73  TfToken const& subprim,
74  const UsdImagingDataSourceStageGlobals &stageGlobals);
75 
78  UsdPrim const& prim,
79  TfToken const& subprim,
80  TfTokenVector const& properties,
81  UsdImagingPropertyInvalidationType invalidationType);
82 
83  /// \enum Scope
84  ///
85  /// Determines what USD prims an adapter type is responsible for from a
86  /// population and invalidation standpoint.
87  ///
89  {
90  /// The adapter is responsible only for USD prims of its registered
91  /// type. Any descendent USD prims are managed independently.
93 
94  /// The adapter is responsible for USD prims of its registered type as
95  /// well as any descendents of those prims. No population occurs for
96  /// descendent prims. USD changes to descendent prims whose own PopulationMode
97  /// is set to RepresentedByAncestor will be send to this adapter.
99 
100  /// Changes to prims of this adapter's registered type are sent to the
101  /// first ancestor prim whose adapter's PopulationMode value is
102  /// RepresentsSelfAndDescendents.
103  ///
104  /// This value alone does not prevent population as it is expected that
105  /// such prims appear beneath another prim whose own PopulationMode value
106  /// prevents descendents from being populated.
108  };
109 
110  /// Returns the prim's behavior with regard to population and invalidation.
111  /// See PopulationMode for possible values.
114 
115  /// This is called (for each result of GetImagingSubprims) when this
116  /// adapter's GetScope() result is RepresentsSelfAndDescendents and
117  /// USD properties have changed on a descendent prim whose adapter's
118  /// GetScope() result is RepresentedByAncestor.
121  UsdPrim const& prim,
122  UsdPrim const& descendentPrim,
123  TfToken const& subprim,
124  TfTokenVector const& properties,
125  UsdImagingPropertyInvalidationType invalidationType);
126 
127  // ---------------------------------------------------------------------- //
128  /// \name Initialization
129  // ---------------------------------------------------------------------- //
130 
131  /// Called to populate the RenderIndex for this UsdPrim. The adapter is
132  /// expected to create one or more prims in the render index using the
133  /// given proxy.
134  virtual SdfPath Populate(UsdPrim const& prim,
137  instancerContext = nullptr) = 0;
138 
139  // Indicates whether population traversal should be pruned based on
140  // prim-specific features (like whether it's imageable).
142  static bool ShouldCullSubtree(UsdPrim const& prim);
143 
144  // Indicates whether population traversal should be pruned based on
145  // adapter-specific features (like whether the adapter is an instance
146  // adapter, and wants to do its own population).
148  virtual bool ShouldCullChildren() const;
149 
150  // Indicates whether or not native USD prim instancing should be ignored
151  // for prims using this delegate, along with their descendants.
153  virtual bool ShouldIgnoreNativeInstanceSubtrees() const;
154 
155  // Indicates the adapter is a multiplexing adapter (e.g. PointInstancer),
156  // potentially managing its children. This flag is used in nested
157  // instancer cases to determine which adapter is assigned to which prim.
159  virtual bool IsInstancerAdapter() const;
160 
161  // Indicates whether this adapter can directly populate USD instance prims.
162  //
163  // Normally, with USD instances, we make a firewall between the instance
164  // prim and the USD prototype tree. The instance adapter creates one
165  // hydra prototype per prim in the USD prototype tree, shared by all USD
166  // instances; this lets us recognize the benefits of instancing,
167  // by hopefully having a high instance count per prototype. The instance
168  // adapter additionally configures a hydra instancer for the prototype tree;
169  // and a small set of specially-handled data is allowed through: things like
170  // inherited constant primvars, transforms, visibility, and other things
171  // we know how to vary per-instance.
172  //
173  // We enforce the above policy by refusing to populate gprims which are
174  // USD instances, since we'd need one prototype per instance and would lose
175  // any instancing benefit.
176  //
177  // There are a handful of times when it really is useful to directly
178  // populate instance prims: for example, instances with cards applied,
179  // or instances of type UsdSkelRoot. In those cases, the adapters can
180  // opt into this scheme with "CanPopulateUsdInstance".
181  //
182  // Note that any adapters taking advantage of this feature will need
183  // extensive code support in instanceAdapter: the instance adapter will
184  // need to potentially create and track multiple hydra prototypes per
185  // USD prototype, and the adapter will need special handling to pass down
186  // any relevant instance-varying data.
187  //
188  // In summary: use with caution.
190  virtual bool CanPopulateUsdInstance() const;
191 
192  // ---------------------------------------------------------------------- //
193  /// \name Parallel Setup and Resolve
194  // ---------------------------------------------------------------------- //
195 
196  /// For the given \p prim, variability is detected and
197  /// stored in \p timeVaryingBits. Initial values are cached into the value
198  /// cache.
199  ///
200  /// This method is expected to be called from multiple threads.
201  virtual void TrackVariability(UsdPrim const& prim,
202  SdfPath const& cachePath,
203  HdDirtyBits* timeVaryingBits,
205  instancerContext = nullptr) const = 0;
206 
207  /// Populates the \p cache for the given \p prim, \p time and \p
208  /// requestedBits.
209  ///
210  /// This method is expected to be called from multiple threads.
211  virtual void UpdateForTime(UsdPrim const& prim,
212  SdfPath const& cachePath,
214  HdDirtyBits requestedBits,
216  instancerContext = nullptr) const = 0;
217 
218  // ---------------------------------------------------------------------- //
219  /// \name Change Processing
220  // ---------------------------------------------------------------------- //
221 
222  /// Returns a bit mask of attributes to be updated, or
223  /// HdChangeTracker::AllDirty if the entire prim must be resynchronized.
224  ///
225  /// \p changedFields contains a list of changed scene description fields
226  /// for this prim. This may be empty in certain cases, like the addition
227  /// of an inert prim spec for the given \p prim.
228  ///
229  /// The default implementation returns HdChangeTracker::AllDirty if any of
230  /// the changed fields are plugin metadata fields, HdChangeTracker::Clean
231  /// otherwise.
233  virtual HdDirtyBits ProcessPrimChange(UsdPrim const& prim,
234  SdfPath const& cachePath,
235  TfTokenVector const& changedFields);
236 
237  /// Returns a bit mask of attributes to be updated, or
238  /// HdChangeTracker::AllDirty if the entire prim must be resynchronized.
239  virtual HdDirtyBits ProcessPropertyChange(UsdPrim const& prim,
240  SdfPath const& cachePath,
241  TfToken const& propertyName) = 0;
242 
243  /// When a PrimResync event occurs, the prim may have been deleted entirely,
244  /// adapter plug-ins should override this method to free any per-prim state
245  /// that was accumulated in the adapter.
247  virtual void ProcessPrimResync(SdfPath const& cachePath,
249 
250  /// Removes all associated Rprims and dependencies from the render index
251  /// without scheduling them for repopulation.
253  virtual void ProcessPrimRemoval(SdfPath const& cachePath,
255 
256 
257  virtual void MarkDirty(UsdPrim const& prim,
258  SdfPath const& cachePath,
259  HdDirtyBits dirty,
261 
263  virtual void MarkRefineLevelDirty(UsdPrim const& prim,
264  SdfPath const& cachePath,
266 
268  virtual void MarkReprDirty(UsdPrim const& prim,
269  SdfPath const& cachePath,
271 
273  virtual void MarkCullStyleDirty(UsdPrim const& prim,
274  SdfPath const& cachePath,
276 
278  virtual void MarkRenderTagDirty(UsdPrim const& prim,
279  SdfPath const& cachePath,
281 
283  virtual void MarkTransformDirty(UsdPrim const& prim,
284  SdfPath const& cachePath,
286 
288  virtual void MarkVisibilityDirty(UsdPrim const& prim,
289  SdfPath const& cachePath,
291 
293  virtual void MarkMaterialDirty(UsdPrim const& prim,
294  SdfPath const& cachePath,
296 
298  virtual void MarkLightParamsDirty(UsdPrim const& prim,
299  SdfPath const& cachePath,
301 
303  virtual void MarkWindowPolicyDirty(UsdPrim const& prim,
304  SdfPath const& cachePath,
306 
308  virtual void MarkCollectionsDirty(UsdPrim const& prim,
309  SdfPath const& cachePath,
311 
312  // ---------------------------------------------------------------------- //
313  /// \name Computations
314  // ---------------------------------------------------------------------- //
316  virtual void InvokeComputation(SdfPath const& cachePath,
317  HdExtComputationContext* context);
318 
319  // ---------------------------------------------------------------------- //
320  /// \name Instancing
321  // ---------------------------------------------------------------------- //
322 
323  /// Return an array of the categories used by each instance.
325  virtual std::vector<VtArray<TfToken>>
326  GetInstanceCategories(UsdPrim const& prim);
327 
328  /// Get the instancer transform for the given prim.
329  /// \see HdSceneDelegate::GetInstancerTransform()
332  UsdPrim const& instancerPrim,
333  SdfPath const& instancerPath,
334  UsdTimeCode time) const;
335 
336  /// Sample the instancer transform for the given prim.
337  /// \see HdSceneDelegate::SampleInstancerTransform()
339  virtual size_t SampleInstancerTransform(
340  UsdPrim const& instancerPrim,
341  SdfPath const& instancerPath,
343  size_t maxNumSamples,
344  float *sampleTimes,
345  GfMatrix4d *sampleValues);
346 
347  /// Return the instancerId for this prim.
349  virtual SdfPath GetInstancerId(
350  UsdPrim const& usdPrim,
351  SdfPath const& cachePath) const;
352 
353  /// Return the list of known prototypes of this prim.
356  UsdPrim const& usdPrim,
357  SdfPath const& cachePath) const;
358 
359  /// Sample the primvar for the given prim. If *sampleIndices is not nullptr
360  /// and the primvar has indices, it will sample the unflattened primvar and
361  /// set *sampleIndices to the primvar's sampled indices.
362  /// \see HdSceneDelegate::SamplePrimvar() and
363  /// HdSceneDelegate::SampleIndexedPrimvar()
365  virtual size_t
366  SamplePrimvar(UsdPrim const& usdPrim,
367  SdfPath const& cachePath,
368  TfToken const& key,
370  size_t maxNumSamples,
371  float *sampleTimes,
372  VtValue *sampleValues,
373  VtIntArray *sampleIndices);
374 
375  /// Get the subdiv tags for this prim.
377  virtual PxOsdSubdivTags GetSubdivTags(UsdPrim const& usdPrim,
378  SdfPath const& cachePath,
379  UsdTimeCode time) const;
380 
381  // ---------------------------------------------------------------------- //
382  /// \name Nested instancing support
383  // ---------------------------------------------------------------------- //
384 
385  // NOTE: This method is currently only used by PointInstancer
386  // style instances, and not instanceable-references.
387 
388  /// Returns the transform of \p protoInstancerPath relative to
389  /// \p instancerPath. \p instancerPath must be managed by this
390  /// adapter.
393  SdfPath const &instancerPath,
394  SdfPath const &protoInstancerPath,
395  UsdTimeCode time) const;
396 
397  // ---------------------------------------------------------------------- //
398  /// \name Selection
399  // ---------------------------------------------------------------------- //
400 
401  /// \deprecated Call and implement GetScenePrimPaths instead.
403  virtual SdfPath GetScenePrimPath(SdfPath const& cachePath,
404  int instanceIndex,
405  HdInstancerContext *instancerCtx) const;
406 
408  virtual SdfPathVector GetScenePrimPaths(SdfPath const& cachePath,
409  std::vector<int> const& instanceIndices,
410  std::vector<HdInstancerContext> *instancerCtxs) const;
411 
413  virtual SdfPath GetDataSharingId(SdfPath const& cachePath) const;
414 
415  // Add the given usdPrim to the HdSelection object, to mark it for
416  // selection highlighting. cachePath is the path of the object referencing
417  // this adapter.
418  //
419  // If an instance index is provided to Delegate::PopulateSelection, it's
420  // interpreted as a hydra instance index and left unchanged (to make
421  // picking/selection round-tripping work). Otherwise, instance adapters
422  // will build up a composite instance index range at each level.
423  //
424  // Consider:
425  // /World/A (2 instances)
426  // /B (2 instances)
427  // /C (gprim)
428  // ... to select /World/A, instance 0, you want to select cartesian
429  // coordinates (0, *) -> (0, 0) and (0, 1). The flattened representation
430  // of this is:
431  // index = coordinate[0] * instance_count[1] + coordinate[1]
432  // Likewise, for one more nesting level you get:
433  // index = c[0] * count[1] * count[2] + c[1] * count[2] + c[2]
434  // ... since the adapter for /World/A has no idea what count[1+] are,
435  // this needs to be built up. The delegate initially sets
436  // parentInstanceIndices to []. /World/A sets this to [0]. /World/A/B,
437  // since it is selecting *, adds all possible instance indices:
438  // 0 * 2 + 0 = 0, 0 * 2 + 1 = 1. /World/A/B/C is a gprim, and adds
439  // instances [0,1] to its selection.
441  virtual bool PopulateSelection(
442  HdSelection::HighlightMode const& highlightMode,
443  SdfPath const &cachePath,
444  UsdPrim const &usdPrim,
445  int const hydraInstanceIndex,
446  VtIntArray const &parentInstanceIndices,
447  HdSelectionSharedPtr const &result) const;
448 
449  // ---------------------------------------------------------------------- //
450  /// \name Volume field information
451  // ---------------------------------------------------------------------- //
452 
455  GetVolumeFieldDescriptors(UsdPrim const& usdPrim, SdfPath const &id,
456  UsdTimeCode time) const;
457 
458  // ---------------------------------------------------------------------- //
459  /// \name Light Params
460  // ---------------------------------------------------------------------- //
461 
463  virtual VtValue
465  const UsdPrim& prim,
466  const SdfPath& cachePath,
467  const TfToken& paramName,
468  UsdTimeCode time) const;
469 
470  // ---------------------------------------------------------------------- //
471  /// \name Utilities
472  // ---------------------------------------------------------------------- //
473 
474  /// The root transform provided by the delegate.
477 
478  /// A thread-local XformCache provided by the delegate.
480  void SetDelegate(UsdImagingDelegate* delegate);
481 
483  virtual bool IsChildPath(const SdfPath& path) const;
484 
485  /// Returns true if the given prim is visible, taking into account inherited
486  /// visibility values. Inherited values are strongest, Usd has no notion of
487  /// "super vis/invis".
489  virtual bool GetVisible(
490  UsdPrim const& prim,
491  SdfPath const& cachePath,
492  UsdTimeCode time) const;
493 
494  /// Returns the purpose token for \p prim. If a non-empty \p
495  /// instanceInheritablePurpose is specified and the prim doesn't have an
496  /// explicitly authored or inherited purpose, it may inherit the
497  /// instancer's purpose if the instance has an explicit purpose.
499  virtual TfToken GetPurpose(
500  UsdPrim const& prim,
501  SdfPath const& cachePath,
502  TfToken const& instanceInheritablePurpose) const;
503 
504  /// Returns the purpose token for \p prim, but only if it is inheritable
505  /// by child prims (i.e. it is an explicitly authored purpose on the prim
506  /// itself or one of the prim's ancestors), otherwise it returns the empty
507  /// token.
509  TfToken GetInheritablePurpose(UsdPrim const& prim) const;
510 
511  /// Fetches the transform for the given prim at the given time from a
512  /// pre-computed cache of prim transforms. Requesting transforms at
513  /// incoherent times is currently inefficient.
515  virtual GfMatrix4d GetTransform(UsdPrim const& prim,
516  SdfPath const& cachePath,
518  bool ignoreRootTransform = false) const;
519 
520  /// Samples the transform for the given prim.
522  virtual size_t SampleTransform(UsdPrim const& prim,
523  SdfPath const& cachePath,
525  size_t maxNumSamples,
526  float *sampleTimes,
527  GfMatrix4d *sampleValues);
528 
529  /// Gets the value of the parameter named key for the given prim (which
530  /// has the given cache path) and given time. If outIndices is not nullptr
531  /// and the value has indices, it will return the unflattened value and set
532  /// outIndices to the value's associated indices.
534  virtual VtValue Get(UsdPrim const& prim,
535  SdfPath const& cachePath,
536  TfToken const& key,
537  UsdTimeCode time,
538  VtIntArray *outIndices) const;
539 
540  /// Gets the cullstyle of a specific path in the scene graph.
542  virtual HdCullStyle GetCullStyle(UsdPrim const& prim,
543  SdfPath const& cachePath,
544  UsdTimeCode time) const;
545 
546  /// Gets the material path for the given prim, walking up namespace if
547  /// necessary.
549  SdfPath GetMaterialUsdPath(UsdPrim const& prim) const;
550 
551  /// Gets the model:drawMode attribute for the given prim, walking up
552  /// the namespace if necessary.
554  TfToken GetModelDrawMode(UsdPrim const& prim);
555 
556  /// Gets the model draw mode object for the given prim, walking up the
557  /// namespace if necessary.
560 
561  /// Computes the per-prototype instance indices for a UsdGeomPointInstancer.
562  /// XXX: This needs to be defined on the base class, to have access to the
563  /// delegate, but it's a clear violation of abstraction. This call is only
564  /// legal for prims of type UsdGeomPointInstancer; in other cases, the
565  /// returned array will be empty and the computation will issue errors.
568  UsdTimeCode time) const;
569 
570  /// Gets the topology object of a specific Usd prim. If the
571  /// adapter is a mesh it will return an HdMeshTopology,
572  /// if it is of type basis curves, it will return an HdBasisCurvesTopology.
573  /// If the adapter does not have a topology, it returns an empty VtValue.
575  virtual VtValue GetTopology(UsdPrim const& prim,
576  SdfPath const& cachePath,
577  UsdTimeCode time) const;
578 
579  /// Reads the extent from the given prim. If the extent is not authored,
580  /// an empty GfRange3d is returned, the extent will not be computed.
582  virtual GfRange3d GetExtent(UsdPrim const& prim,
583  SdfPath const& cachePath,
584  UsdTimeCode time) const;
585 
586  /// Reads double-sided from the given prim. If not authored, returns false
588  virtual bool GetDoubleSided(UsdPrim const& prim,
589  SdfPath const& cachePath,
590  UsdTimeCode time) const;
591 
593  virtual SdfPath GetMaterialId(UsdPrim const& prim,
594  SdfPath const& cachePath,
595  UsdTimeCode time) const;
596 
598  virtual VtValue GetMaterialResource(UsdPrim const& prim,
599  SdfPath const& cachePath,
600  UsdTimeCode time) const;
601 
602  // ---------------------------------------------------------------------- //
603  /// \name ExtComputations
604  // ---------------------------------------------------------------------- //
607  SdfPath const& cachePath) const;
608 
611  GetExtComputationInputs(UsdPrim const& prim,
612  SdfPath const& cachePath,
613  const UsdImagingInstancerContext* instancerContext)
614  const;
615 
618  GetExtComputationOutputs(UsdPrim const& prim,
619  SdfPath const& cachePath,
620  const UsdImagingInstancerContext* instancerContext)
621  const;
622 
626  UsdPrim const& prim,
627  SdfPath const& cachePath,
628  HdInterpolation interpolation,
629  const UsdImagingInstancerContext* instancerContext) const;
630 
632  virtual VtValue
634  UsdPrim const& prim,
635  SdfPath const& cachePath,
636  TfToken const& name,
638  const UsdImagingInstancerContext* instancerContext) const;
639 
641  virtual size_t
643  UsdPrim const& prim,
644  SdfPath const& cachePath,
645  TfToken const& name,
647  const UsdImagingInstancerContext* instancerContext,
648  size_t maxSampleCount,
649  float *sampleTimes,
650  VtValue *sampleValues);
651 
653  virtual std::string
655  UsdPrim const& prim,
656  SdfPath const& cachePath,
657  const UsdImagingInstancerContext* instancerContext) const;
658 
660  virtual VtValue
661  GetInstanceIndices(UsdPrim const& instancerPrim,
662  SdfPath const& instancerCachePath,
663  SdfPath const& prototypeCachePath,
664  UsdTimeCode time) const;
665 
666  // ---------------------------------------------------------------------- //
667  /// \name Render Index Compatibility
668  // ---------------------------------------------------------------------- //
669 
670  /// Returns true if the adapter can be populated into the target index.
671  virtual bool IsSupported(UsdImagingIndexProxy const* index) const
672  {
673  return true;
674  }
675 
676  // ---------------------------------------------------------------------- //
677  /// \name Utilties
678  // ---------------------------------------------------------------------- //
679 
680  /// Provides to paramName->UsdAttribute value mappings
683  UsdPrim const& prim,
684  TfToken const& paramName);
685 
686 protected:
689  // ---------------------------------------------------------------------- //
690  /// \name Utility
691  // ---------------------------------------------------------------------- //
692 
693  // Given the USD path for a prim of this adapter's type, returns
694  // the prim's Hydra cache path.
696  virtual SdfPath
698  const SdfPath& usdPath,
699  const UsdImagingInstancerContext* instancerContext = nullptr) const;
700 
702 
703  template <typename T>
704  T _Get(UsdPrim const& prim, TfToken const& attrToken,
705  UsdTimeCode time) const {
706  T value;
707  prim.GetAttribute(attrToken).Get<T>(&value, time);
708  return value;
709  }
710 
711  template <typename T>
712  void _GetPtr(UsdPrim const& prim, TfToken const& key, UsdTimeCode time,
713  T* out) const {
714  prim.GetAttribute(key).Get<T>(out, time);
715  }
716 
719 
723 
726  _GetBlurScaleCache() const;
727 
729  UsdPrim _GetPrim(SdfPath const& usdPath) const;
730 
731  // Returns the prim adapter for the given \p prim, or an invalid pointer if
732  // no adapter exists. If \p prim is an instance and \p ignoreInstancing
733  // is \c true, the instancing adapter will be ignored and an adapter will
734  // be looked up based on \p prim's type.
737  _GetPrimAdapter(UsdPrim const& prim, bool ignoreInstancing = false) const;
738 
741  _GetAdapter(TfToken const& adapterKey) const;
742 
743  // XXX: Transitional API
744  // Returns the instance proxy prim path for a USD-instanced prim, given the
745  // instance chain leading to that prim. The paths are sorted from more to
746  // less local; the first path is the prim path (possibly in prototype), then
747  // instance paths (possibly in prototype); the last path is the prim or
748  // instance path in the scene.
751  SdfPathVector const& instancerChain) const;
752 
755 
756  // Converts \p cachePath to the path in the render index.
758  SdfPath _ConvertCachePathToIndexPath(SdfPath const& cachePath) const;
759 
760  // Converts \p indexPath to the path in the USD stage
762  SdfPath _ConvertIndexPathToCachePath(SdfPath const& indexPath) const;
763 
764  // Returns the material binding purpose from the renderer delegate.
767 
768  // Returns the material contexts from the renderer delegate.
771 
772  // Returns the namespace prefixes for render settings attributes relevant
773  // to a renderer delegate.
776 
777  /// Returns whether custom shading of prims is enabled.
779  bool _GetSceneMaterialsEnabled() const;
780 
781  /// Returns whether lights found in the usdscene are enabled.
783  bool _GetSceneLightsEnabled() const;
784 
785  // Returns true if render delegate wants primvars to be filtered based.
786  // This will filter the primvars based on the bound material primvar needs.
788  bool _IsPrimvarFilteringNeeded() const;
789 
790  // Returns the shader source type from the render delegate.
793 
794  // Returns \c true if \p usdPath is included in the scene delegate's
795  // invised path list.
797  bool _IsInInvisedPaths(SdfPath const& usdPath) const;
798 
799  // Determines if an attribute is varying and if so, sets the given
800  // \p dirtyFlag in the \p dirtyFlags and increments a perf counter. Returns
801  // true if the attribute is varying.
802  //
803  // If \p exists is non-null, _IsVarying will store whether the attribute
804  // was found. If the attribute is not found, it counts as non-varying.
805  //
806  // This only sets the dirty bit, never un-sets. The caller is responsible
807  // for setting the initial state correctly.
809  bool _IsVarying(UsdPrim prim, TfToken const& attrName,
810  HdDirtyBits dirtyFlag, TfToken const& perfToken,
811  HdDirtyBits* dirtyFlags, bool isInherited,
812  bool* exists = nullptr) const;
813 
814  // Determines if the prim's transform (CTM) is varying and if so, sets the
815  // given \p dirtyFlag in the \p dirtyFlags and increments a perf counter.
816  // Returns true if the prim's transform is varying.
817  //
818  // This only sets the dirty bit, never un-sets. The caller is responsible
819  // for setting the initial state correctly.
821  bool _IsTransformVarying(UsdPrim prim,
822  HdDirtyBits dirtyFlag,
823  TfToken const& perfToken,
824  HdDirtyBits* dirtyFlags) const;
825 
826  // Convenience method for adding or updating a primvar descriptor.
827  // Role defaults to empty token (none). Indexed defaults to false.
829  void _MergePrimvar(
831  TfToken const& name,
832  HdInterpolation interp,
833  TfToken const& role = TfToken(),
834  bool indexed = false) const;
835 
836  // Convenience method for removing a primvar descriptor.
838  void _RemovePrimvar(
840  TfToken const& name) const;
841 
842  // Convenience method for computing a primvar. The primvar will only be
843  // added to the list of prim desc if there is no primvar of the same
844  // name already present. Thus, "local" primvars should be merged before
845  // inherited primvars.
848  UsdPrim const& prim,
849  UsdGeomPrimvar const& primvar,
851  HdPrimvarDescriptorVector* primvarDescs,
852  HdInterpolation *interpOverride = nullptr) const;
853 
854  // Returns true if the property name has the "primvars:" prefix.
856  static bool _HasPrimvarsPrefix(TfToken const& propertyName);
857 
858  // Convenience methods to figure out what changed about the primvar and
859  // return the appropriate dirty bit.
860  // Caller can optionally pass in a dirty bit to set for primvar value
861  // changes. This is useful for attributes that have a special dirty bit
862  // such as normals and widths.
863  //
864  // Handle USD attributes that are treated as primvars by Hydra. This
865  // requires the interpolation to be passed in, as well as the primvar
866  // name passed to Hydra.
869  UsdPrim const& prim,
870  SdfPath const& cachePath,
871  TfToken const& propertyName,
872  TfToken const& primvarName,
873  HdInterpolation const& primvarInterp,
874  HdDirtyBits valueChangeDirtyBit = HdChangeTracker::DirtyPrimvar) const;
875 
876  // Handle UsdGeomPrimvars that use the "primvars:" prefix, while also
877  // accommodating inheritance.
880  UsdPrim const& prim,
881  SdfPath const& cachePath,
882  TfToken const& propertyName,
883  HdDirtyBits valueChangeDirtyBit = HdChangeTracker::DirtyPrimvar,
884  bool inherited = true) const;
885 
886  virtual void _RemovePrim(SdfPath const& cachePath,
888 
889  // Utility to resync bound dependencies of a particular usd path.
890  // This is necessary for the resync processing of certain prim types
891  // (e.g. materials).
893  void _ResyncDependents(SdfPath const& usdPath,
895 
898 
900  UsdStageRefPtr _GetStage() const;
901 
904  _GetCoordSysBindings(UsdPrim const& prim) const;
905 
908  _GetInheritedPrimvars(UsdPrim const& prim) const;
909 
910  // Utility for derived classes to try to find an inherited primvar.
913  TfToken const& primvarName) const;
914 
917 
920 
923 
925  bool _DoesDelegateSupportCoordSys() const;
926 
927 private:
928  UsdImagingDelegate* _delegate;
929 };
930 
932 public:
933  virtual UsdImagingPrimAdapterSharedPtr New() const = 0;
934 };
935 
936 template <class T>
938 public:
940  {
941  return std::make_shared<T>();
942  }
943 };
944 
946 
947 #endif // PXR_USD_IMAGING_USD_IMAGING_PRIM_ADAPTER_H
static USDIMAGING_API bool _HasPrimvarsPrefix(TfToken const &propertyName)
Returns whether custom shading of prims is enabled.
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:105
virtual UsdImagingPrimAdapterSharedPtr New() const =0
bool Get(T *value, UsdTimeCode time=UsdTimeCode::Default()) const
Definition: attribute.h:452
#define USDIMAGING_API
Definition: api.h:23
T _Get(UsdPrim const &prim, TfToken const &attrToken, UsdTimeCode time) const
Returns whether custom shading of prims is enabled.
Definition: primAdapter.h:704
virtual USDIMAGING_API SdfPathVector GetScenePrimPaths(SdfPath const &cachePath, std::vector< int > const &instanceIndices, std::vector< HdInstancerContext > *instancerCtxs) const
USDIMAGING_API Usd_PrimFlagsConjunction _GetDisplayPredicateForPrototypes() const
Returns whether custom shading of prims is enabled.
virtual USDIMAGING_API HdContainerDataSourceHandle GetImagingSubprimData(UsdPrim const &prim, TfToken const &subprim, const UsdImagingDataSourceStageGlobals &stageGlobals)
USDIMAGING_API UsdImagingPrimvarDescCache * _GetPrimvarDescCache() const
Returns whether custom shading of prims is enabled.
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:143
USDIMAGING_API UsdImaging_InheritedPrimvarStrategy::value_type _GetInheritedPrimvars(UsdPrim const &prim) const
Returns whether custom shading of prims is enabled.
GLsizei const GLfloat * value
Definition: glcorearb.h:824
virtual USDIMAGING_API ~UsdImagingPrimAdapter()=default
HighlightMode
Selection modes allow differentiation in selection highlight behavior.
Definition: selection.h:39
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
Returns whether custom shading of prims is enabled.
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
Returns whether custom shading of prims is enabled.
USDIMAGING_API HdDirtyBits _ProcessPrefixedPrimvarPropertyChange(UsdPrim const &prim, SdfPath const &cachePath, TfToken const &propertyName, HdDirtyBits valueChangeDirtyBit=HdChangeTracker::DirtyPrimvar, bool inherited=true) const
Returns whether custom shading of prims is enabled.
virtual USDIMAGING_API HdExtComputationPrimvarDescriptorVector GetExtComputationPrimvars(UsdPrim const &prim, SdfPath const &cachePath, HdInterpolation interpolation, const UsdImagingInstancerContext *instancerContext) const
std::vector< HdExtComputationOutputDescriptor > HdExtComputationOutputDescriptorVector
USDIMAGING_API UsdImaging_NonlinearSampleCountCache * _GetNonlinearSampleCountCache() const
Returns whether custom shading of prims is enabled.
USDIMAGING_API UsdImaging_CollectionCache & _GetCollectionCache() const
Returns whether custom shading of prims is enabled.
**But if you need a result
Definition: thread.h:622
USDIMAGING_API Usd_PrimFlagsConjunction _GetDisplayPredicate() const
Returns whether custom shading of prims is enabled.
USDIMAGING_API SdfPath _ConvertCachePathToIndexPath(SdfPath const &cachePath) const
Returns whether custom shading of prims is enabled.
USDIMAGING_API const UsdImagingPrimAdapterSharedPtr & _GetAdapter(TfToken const &adapterKey) const
Returns whether custom shading of prims is enabled.
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_API UsdImaging_BlurScaleCache * _GetBlurScaleCache() const
Returns whether custom shading of prims is enabled.
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
Returns whether custom shading of prims is enabled.
Base class of all factory types.
Definition: type.h:56
std::vector< std::pair< SdfPath, int > > HdInstancerContext
Instancer context: a pair of instancer paths and instance indices.
Definition: sceneDelegate.h:44
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
Returns whether custom shading of prims is enabled.
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
Returns whether custom shading of prims is enabled.
USDIMAGING_API void _RemovePrimvar(HdPrimvarDescriptorVector *vec, TfToken const &name) const
Returns whether custom shading of prims is enabled.
Definition: token.h:70
virtual USDIMAGING_API SdfPath ResolveCachePath(const SdfPath &usdPath, const UsdImagingInstancerContext *instancerContext=nullptr) const
Returns whether custom shading of prims is enabled.
GLintptr offset
Definition: glcorearb.h:665
USDIMAGING_API UsdGeomPrimvar _GetInheritedPrimvar(UsdPrim const &prim, TfToken const &primvarName) const
Returns whether custom shading of prims is enabled.
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
std::vector< class SdfPath > SdfPathVector
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
Returns whether custom shading of prims is enabled.
USDIMAGING_API TfToken _GetMaterialBindingPurpose() const
Returns whether custom shading of prims is enabled.
USDIMAGING_API const UsdImagingPrimAdapterSharedPtr & _GetPrimAdapter(UsdPrim const &prim, bool ignoreInstancing=false) const
Returns whether custom shading of prims is enabled.
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
Returns whether custom shading of prims is enabled.
Definition: prim.h:116
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440
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:153
Definition: path.h:273
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
virtual SdfPath Populate(UsdPrim const &prim, UsdImagingIndexProxy *index, UsdImagingInstancerContext const *instancerContext=nullptr)=0
USDIMAGING_API UsdTimeCode _GetTimeWithOffset(float offset) const
Returns whether custom shading of prims is enabled.
USDIMAGING_API TfTokenVector _GetMaterialRenderContexts() const
Returns whether custom shading of prims is enabled.
virtual USDIMAGING_API bool IsInstancerAdapter() const
USDIMAGING_API SdfPath _ConvertIndexPathToCachePath(SdfPath const &indexPath) const
Returns whether custom shading of prims is enabled.
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:1425
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
Returns whether custom shading of prims is enabled.
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
Returns whether custom shading of prims is enabled.
Definition: primAdapter.h:712
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:177
USDIMAGING_API GfMatrix4d GetRootTransform() const
The root transform provided by the delegate.
USDIMAGING_API GfInterval _GetCurrentTimeSamplingInterval()
Returns whether custom shading of prims is enabled.
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
USDIMAGING_API UsdImaging_CoordSysBindingStrategy::value_type _GetCoordSysBindings(UsdPrim const &prim) const
Returns whether custom shading of prims is enabled.
std::shared_ptr< UsdImagingPrimAdapter > UsdImagingPrimAdapterSharedPtr
virtual USDIMAGING_API void MarkRefineLevelDirty(UsdPrim const &prim, SdfPath const &cachePath, UsdImagingIndexProxy *index)
virtual USDIMAGING_API bool IsChildPath(const SdfPath &path) const
The root transform provided by the delegate.
virtual bool IsSupported(UsdImagingIndexProxy const *index) const
Returns true if the adapter can be populated into the target index.
Definition: primAdapter.h:671
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:939
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)
Returns whether custom shading of prims is enabled.
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
Returns whether custom shading of prims is enabled.
USDIMAGING_API void _MergePrimvar(HdPrimvarDescriptorVector *vec, TfToken const &name, HdInterpolation interp, TfToken const &role=TfToken(), bool indexed=false) const
Returns whether custom shading of prims is enabled.
std::shared_ptr< class HdSelection > HdSelectionSharedPtr
Definition: selection.h:23
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
Returns whether custom shading of prims is enabled.
Definition: value.h:146
UsdImagingPropertyInvalidationType
Definition: types.h:17
USDIMAGING_API TfTokenVector _GetRenderSettingsNamespaces() const
Returns whether custom shading of prims is enabled.
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
Returns whether custom shading of prims is enabled.
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
Returns whether custom shading of prims is enabled.