Loading...
Searching...
No Matches
utils.h
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_USDVIEWQ_UTILS_H
8#define PXR_USD_IMAGING_USDVIEWQ_UTILS_H
9
10#include "pxr/pxr.h"
11#include "pxr/usdImaging/usdviewq/api.h"
12#include "pxr/usd/usd/prim.h"
13#include "pxr/usd/usd/timeCode.h"
14
15#include <vector>
16
17PXR_NAMESPACE_OPEN_SCOPE
18
19
20class UsdStage;
21
27public:
28
29 struct PrimInfo {
30 PrimInfo(const UsdPrim &prim, const UsdTimeCode time);
31
32 bool hasCompositionArcs;
33 bool isActive;
34 bool isImageable;
35 bool isDefined;
36 bool isAbstract;
37 bool isInPrototype;
38 bool isInstance;
39 bool supportsGuides;
40 bool supportsDrawMode;
41 bool isVisibilityInherited;
42 bool visVaries;
43 std::string name;
44 std::string typeName;
45 std::string displayName;
46 };
47
50 //
51 // Furthermore, this method is not intended to be used publically,
52 // ultimately Usd will have better core support for fast prim
53 // filtering by typeName.
54 USDVIEWQ_API
55 static
56 std::vector<UsdPrim> _GetAllPrimsOfType(UsdStagePtr const &stage,
57 TfType const& schemaType);
58
62 USDVIEWQ_API
63 static UsdviewqUtils::PrimInfo GetPrimInfo(const UsdPrim &prim,
64 const UsdTimeCode time);
65};
66
67
68PXR_NAMESPACE_CLOSE_SCOPE
69
70#endif //PXR_USD_IMAGING_USDVIEWQ_UTILS_H
TfType represents a dynamic runtime type.
Definition: type.h:48
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:117
The outermost container for scene description, which owns and presents composed prims as a scenegraph...
Definition: stage.h:136
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Definition: timeCode.h:72
Performance enhancing utilities for usdview.
Definition: utils.h:26
static USDVIEWQ_API UsdviewqUtils::PrimInfo GetPrimInfo(const UsdPrim &prim, const UsdTimeCode time)
Fetch prim-related data in batch to to speed up Qt treeview item population.
static USDVIEWQ_API std::vector< UsdPrim > _GetAllPrimsOfType(UsdStagePtr const &stage, TfType const &schemaType)
For the given stage and schemaType, return all active, defined prims that either match the schemaType...