HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PRM_Shared.h
Go to the documentation of this file.
1 //
2 // Copyright 2017 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 /**
25  \file
26  \brief Shared PRM objects.
27 */
28 #ifndef __GUSD_PRM_SHARED_H__
29 #define __GUSD_PRM_SHARED_H__
30 
31 #include "pxr/pxr.h"
32 
33 #include "gusd/api.h"
34 
35 #include <PRM/PRM_Include.h>
36 #include <PRM/PRM_SpareData.h>
37 
39 
40 /** Common PRM data for USD.*/
42 {
43 public:
44  GUSD_API
46 
47  struct Components
48  {
49  Components();
50 
51  /** Pattern of all USD-backed extensions.*/
53 
54  /** Spare data with extension pattern for usd files.
55  The different variations are for the read/write mode of the
56  file chooser dialog.
57  @{ */
61  /** @} */
62 
63  PRM_Name filePathName; /*! file */
64 
65  PRM_Name primPathName; /*! primpath */
66 
67  /** Dynamic menu for selecting prim paths.
68  Must be paired with a PRM_SpareData giving 'fileprm', whose value
69  is the name of a string parm on the same prim, which gives the path
70  to the usd file.
71  @todo This currently uses a simple drop-down menu. When the new UI
72  API access rolls out in the HDK, this should be updated to use a proper
73  hierarchy UI, like the regular operator picker menus in Houdini.*/
75 
76  /** Variant of the above @em primMenu that can be used to
77  pick multiple prims.*/
79 
80  /** Dynamic menu for selecting prim attributes.
81  Like @a primMenu, must be paired with spair data giveing 'fileprm'
82  as well as 'primpathprm'. Additional spare data 'primattrcondtiion'
83  optionally provide conditional parm expressions for determining whether
84  or not the attribute keys are included.*/
86 
87  /** Has fileprm=>'fileprm', the common mapping for @a primMenu. */
89 
90  /** Has primpathprm=>'primpath', and fileprm=>'fileprm', the mapping
91  commonly used for @a primAttrMenu. */
93 
94  /** Multi-select menu for all UsdSchema-inherited types.*/
96 
97  /** Multi-select menu for all model kinds.*/
99 
100  /** Multi-select menu for all imageable purposes.*/
102 
106  };
107 
108  Components* operator->() const { return &_components; }
109  Components& operator*() const { return _components; }
110 
111 private:
112  Components& _components;
113 };
114 
116 
117 #endif /* __GUSD_PRM_PRMSHARED_H__ */
PRM_Default primPathAttrDefault
usdpath
Definition: PRM_Shared.h:104
GUSD_API GusdPRM_Shared()
PRM_SpareData primAttrData
Definition: PRM_Shared.h:92
PRM_SpareData usdFileWOData
Definition: PRM_Shared.h:60
PRM_ChoiceList primMenu
Definition: PRM_Shared.h:74
PRM_ChoiceList typesMenu
Definition: PRM_Shared.h:95
PRM_SpareData usdFileROData
Definition: PRM_Shared.h:58
PRM_ChoiceList multiPrimMenu
Definition: PRM_Shared.h:78
PRM_SpareData fileParm
Definition: PRM_Shared.h:88
PRM_Default variantsAttrDefault
usdprimpath
Definition: PRM_Shared.h:105
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1375
Components & operator*() const
Definition: PRM_Shared.h:109
Components * operator->() const
Definition: PRM_Shared.h:108
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
#define GUSD_API
Definition: api.h:40
PRM_ChoiceList purposesMenu
Definition: PRM_Shared.h:101
PRM_ChoiceList modelKindsMenu
Definition: PRM_Shared.h:98
PRM_SpareData usdFileRWData
Definition: PRM_Shared.h:59
PRM_ChoiceList primAttrMenu
Definition: PRM_Shared.h:85