HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LOP_PRMShared.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: LOP_PRMShared.h
7  *
8  * COMMENTS:
9  * This enum defines common LOP parameters and callbacks.
10  *
11 */
12 
13 #include "LOP_API.h"
14 
15 #ifndef __LOP_PRMShared__
16 #define __LOP_PRMShared__
17 
18 #include <OP/OP_Error.h>
19 #include <PRM/PRM_ChoiceList.h>
20 #include <PRM/PRM_Default.h>
21 #include <PRM/PRM_Name.h>
22 #include <PRM/PRM_SpareData.h>
23 #include <PRM/PRM_Template.h>
24 #include <UT/UT_BoundingBox.h>
25 #include <UT/UT_Matrix4.h>
26 
27 class LOP_Node;
28 class HUSD_AutoAnyLock;
29 class HUSD_FindPrims;
30 class HUSD_FindProps;
32 class OP_Node;
33 class OP_Context;
35 class PRM_Parm;
36 class UT_String;
37 
44 
67 
79 
97 
101 
102 /// Version of lopPrimPathSpareData that only supports selection using the
103 /// primitive picker dialog. This can be used for nodes in other contexts that
104 /// reference a LOP.
106 
108  int which_input,
109  const UT_String &primpattern,
110  PRM_Name *menu_entries,
111  int max_menu_entries);
112 
114  int which_input,
115  const UT_String &primpattern,
116  const UT_String &variantset,
117  PRM_Name *menu_entries,
118  int max_menu_entries);
119 
120 extern LOP_API void lopBuildUsdExpansionRulesMenu(void *,
121  PRM_Name *menu_entries,
122  int max_menu_entries,
123  const PRM_SpareData *,
124  const PRM_Parm *);
125 
137 };
138 
140 public:
141  static const LOP_XformComponents &identity();
142 
143  void combine(const LOP_XformComponents &other);
144 
152 };
153 extern LOP_API const PRM_Template *lopXformTemplates();
156  fpreal t, LOP_XformComponents *accumulate = nullptr);
157 extern LOP_API UT_Matrix4D lopBuildMultiparmXform(OP_Node &node, int inst,
158  fpreal t, LOP_XformComponents *accumulate = nullptr);
159 
160 // Parm templates for setting arbitrary custom data.
162 
163 // Class to hold evaluated parm templates so we can evaluate all our parms
164 // before using the parm values to edit the custom data on a layer, primitive,
165 // or property.
167 {
168 public:
173 };
175 
176 // Called on a node with the custom data template defined above, this
177 // method evaluates the multiparm and populates a LOP_CustomDataParms array.
178 extern LOP_API void lopGetCustomDataParms(LOP_Node &node,
179  fpreal t,
180  LOP_CustomDataParms &custom_data_parms);
181 // Uses the data in a LOP_CustomDataParms array to call into the edit_data
182 // object to set the custom data on the prims specified in find_prims, or on
183 // the active layer if find_prims is null.
184 extern LOP_API void lopSetCustomData(LOP_Node &node,
185  const LOP_CustomDataParms &custom_data_parms,
186  const HUSD_EditCustomData &edit_data,
187  const HUSD_FindPrims *find_prims = nullptr,
188  const HUSD_FindProps *find_props = nullptr);
189 
190 // Parm templates for setting arbitrary context options.
192 extern LOP_API void lopSetContextOptions(OP_Node &node,
194  OP_ContextOptionsWriteScope &options);
195 
196 // Parm templates for defining a collection using every available algorithm,
197 // rather than just a primitive pattern string.
199  PRM_Name &collapser_parm_name);
201  PRM_Name &collection_parm_name,
202  const char *multiparm_prefix = nullptr);
203 
204 // Class to hold evaluated parm templates so we can evaluate all our parms
205 // before using the parm values to populate an HUSD_FindPrims.
207 {
208 public:
210  // Find by pattern string.
212  // Find by bounding box.
215  // Find by primitive type.
217  // Find by primitive type.
219  // Find by VEXpression.
221  // Find by primitive kind.
223 };
225 
226 // Evaluate an adhoc collection multiparm and use it to fill in a
227 // LOP_CollectionParms array.
228 extern LOP_API void lopGetCollectionParms(LOP_Node &node,
229  const PRM_Template &collection_parm_template,
230  fpreal t, LOP_CollectionParms &collection_parms);
231 // Take a populated LOP_CollectionParms array and use it to fill in an
232 // HUSD_FindParms object.
233 extern LOP_API bool lopGetCollection(LOP_Node &node,
234  const LOP_CollectionParms &collection_parms,
235  fpreal t, HUSD_FindPrims &findprims);
236 
237 // Checks if the layer at a given file path exists, using the resolver context
238 // of the supplied data lock.
240  HUSD_AutoAnyLock &lock,
241  const UT_StringRef &filepath,
242  const UT_StringRef &handle_missing_files,
243  bool *skip_this_file);
244 
245 #endif
LOP_API const UT_StringHolder lopAttrControlMultiplyToken
UT_StringHolder myPrimPurpose
UT_StringHolder myPattern
LOP_API PRM_ChoiceList lopParentPrimTypeMenu
LOP_API PRM_Template lopCollectionCollapserParmTemplate(PRM_Name &collapser_parm_name)
LOP_API PRM_Name lopHandleMissingFilesName
LOP_API PRM_ChoiceList lopPrimKindWithAutoMenu
LOP_API void lopGetCollectionParms(LOP_Node &node, const PRM_Template &collection_parm_template, fpreal t, LOP_CollectionParms &collection_parms)
LOP_API PRM_ChoiceList lopSecondInputCollectionsMenu
LOP_API UT_Matrix4D lopBuildXform(OP_Node &node, fpreal t, LOP_XformComponents *accumulate=nullptr)
LOP_API PRM_Default lopHandleMissingFilesDefault
LOP_API PRM_Name lopPrimPathName
LOP_API void lopBuildUsdPrimVariantSetsMenu(LOP_Node &node, int which_input, const UT_String &primpattern, PRM_Name *menu_entries, int max_menu_entries)
LOP_API PRM_ChoiceList lopRefPrimMenu
LOP_API PRM_Default lopParentPrimTypeDefault
LOP_API void lopSetCustomData(LOP_Node &node, const LOP_CustomDataParms &custom_data_parms, const HUSD_EditCustomData &edit_data, const HUSD_FindPrims *find_prims=nullptr, const HUSD_FindProps *find_props=nullptr)
LOP_API PRM_Default lopPrimKindWithAutoDefault
LOP_API UT_Matrix4D lopBuildMultiparmXform(OP_Node &node, int inst, fpreal t, LOP_XformComponents *accumulate=nullptr)
LOP_API const UT_StringHolder lopAttrControlAddToken
LOP_API PRM_ChoiceList lopAllPrimTypeMenu
UT_StringHolder myPrimType
LOP_API PRM_ChoiceList lopAttributeTypeMenu
LOP_API void lopBuildUsdExpansionRulesMenu(void *, PRM_Name *menu_entries, int max_menu_entries, const PRM_SpareData *, const PRM_Parm *)
UT_BoundingBoxD myBBox
UT_ErrorSeverity
Definition: UT_Error.h:25
LOP_API PRM_ChoiceList lopPrimPathMenu
LOP_API PRM_Name lopUpVecMethodName
LOP_API PRM_Name lopParentPrimTypeName
LOP_API PRM_Default lopEditPrimPathDefault
LOP_API PRM_Default lopPrimPatternDefault
LOP_API PRM_ChoiceList lopPrimPurposeMenu
LOP_API PRM_Name lopLookAtPrimName
LOP_API PRM_Default lopPrimPurposeDefault
UT_StringHolder myDataType
LOP_API void lopSetContextOptions(OP_Node &node, OP_Context &context, OP_ContextOptionsWriteScope &options)
UT_Array< LOP_CollectionParmSet > LOP_CollectionParms
LOP_API OP_ERROR lopCheckForMissingFile(LOP_Node &node, HUSD_AutoAnyLock &lock, const UT_StringRef &filepath, const UT_StringRef &handle_missing_files, bool *skip_this_file)
LOP_API void lopBuildUsdPrimVariantsMenu(LOP_Node &node, int which_input, const UT_String &primpattern, const UT_String &variantset, PRM_Name *menu_entries, int max_menu_entries)
UT_XformOrder myOrder
LOP_API PRM_SpareData lopMultiPrimPathSpareData
LOP_API PRM_Name lopLookAtPrimPositionName
LOP_API PRM_Default lopPrimKindQueryDefault
LOP_API PRM_ChoiceList lopAttributeInterpolationMenu
LOP_API PRM_Default lopPrimKindDefault
LOP_API bool lopGetCollection(LOP_Node &node, const LOP_CollectionParms &collection_parms, fpreal t, HUSD_FindPrims &findprims)
LOP_API PRM_Name lopPrimKindName
LOP_API PRM_Name lopPathName
LOP_API PRM_ChoiceList lopPrimDrawModeMenu
UT_StringHolder myTargetMethod
LOP_API const PRM_Template * lopMultiparmXformTemplates()
LOP_API const UT_StringHolder lopAttrControlSetExistingToken
LOP_API PRM_Name lopUpVecCustomName
UT_StringHolder myDataName
LOP_API PRM_Name lopCollectionName
LOP_API PRM_SpareData lopPrimPatternSpareData
LOP_API PRM_ChoiceList lopPrimSpecifierMenu
UT_StringHolder myContainmentStr
LOP_API const UT_StringHolder lopAttrControlBlockToken
LOP_API PRM_ChoiceList lopPrimKindMenu
LOP_API PRM_Default lopParentPrimTypeScopeDefault
LOP_API PRM_Name lopResolverContextAssetPathName
void combine(const LOP_XformComponents &other)
#define LOP_API
Definition: LOP_API.h:10
LOP_API PRM_ChoiceList lopFirstInputCollectionsMenu
LOP_API PRM_Default lopRefPrimDefault
LOP_API PRM_Name lopUpVecName
LOP_API const PRM_Template & lopCustomDataTemplate()
LOP_API PRM_Name lopPrimCountName
LOP_API PRM_SpareData lopPrimPathSpareData
LOP_API const UT_StringHolder lopAttrControlSetToken
LOP_API PRM_Name lopPropPatternName
LOP_API void lopGetCustomDataParms(LOP_Node &node, fpreal t, LOP_CustomDataParms &custom_data_parms)
LOP_API PRM_Name lopLookAtEnableName
LOP_API PRM_ChoiceList lopAttributeColorSpaceMenu
void accumulate(const IterT &iter, XformOp &op, bool threaded=true)
double fpreal
Definition: SYS_Types.h:276
LOP_API const UT_StringHolder lopAttrControlNoneToken
LOP_API PRM_Name lopUpVecYAxisName
UT_StringHolder myVexExpr
LOP_API PRM_Name lopUpVecXAxisName
LOP_API const PRM_Template * lopXformTemplates()
LOP_API PRM_Name lopPrimPatternName
UT_StringHolder myValueStr
LOP_API PRM_Template lopCollectionParmTemplate(PRM_Name &collection_parm_name, const char *multiparm_prefix=nullptr)
LOP_API PRM_Name lopLookAtPositionName
LOP_API PRM_Name lopLookAtPrimRotationName
LOP_API PRM_ChoiceList lopPrimKindQueryMenu
LOP_API PRM_Name lopTwistName
static const LOP_XformComponents & identity()
LOP_API PRM_Name lopCollectionCollapserName
LOP_API PRM_ChoiceList lopHandleMissingFilesMenu
LOP_API const PRM_Template & lopContextOptionsTemplate()
UT_Array< LOP_CustomDataParmSet > LOP_CustomDataParms
LOP_API PRM_ChoiceList lopConcretePrimTypeMenu
GLdouble GLdouble t
Definition: glew.h:1398
UT_StringHolder myPrimKind
LOP_API PRM_Default lopAddPrimPathDefault
LOP_XformParms
LOP_API PRM_SpareData lopPrimPathDialogSpareData