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:
174 };
176 
177 // Called on a node with the custom data template defined above, this
178 // method evaluates the multiparm and populates a LOP_CustomDataParms array.
179 extern LOP_API void lopGetCustomDataParms(LOP_Node &node,
180  fpreal t,
181  LOP_CustomDataParms &custom_data_parms);
182 // Uses the data in a LOP_CustomDataParms array to call into the edit_data
183 // object to set the custom data on the prims specified in find_prims, or on
184 // the active layer if find_prims is null.
185 extern LOP_API void lopSetCustomData(LOP_Node &node,
186  const LOP_CustomDataParms &custom_data_parms,
187  const HUSD_EditCustomData &edit_data,
188  const HUSD_FindPrims *find_prims = nullptr,
189  const HUSD_FindProps *find_props = nullptr);
190 
191 // Parm templates for setting arbitrary context options.
193 extern LOP_API bool lopSetContextOptions(OP_Node &node,
195  OP_ContextOptionsWriteScope &options);
199  OP_ContextOptionsWriteScope &options);
203  OP_ContextOptionsWriteScope &options);
204 
205 // Parm templates for defining a collection using every available algorithm,
206 // rather than just a primitive pattern string.
208  PRM_Name &collapser_parm_name);
210  PRM_Name &collection_parm_name,
211  const char *multiparm_prefix = nullptr);
212 
213 // Class to hold evaluated parm templates so we can evaluate all our parms
214 // before using the parm values to populate an HUSD_FindPrims.
216 {
217 public:
219  // Find by pattern string.
221  // Find by bounding box.
224  // Find by primitive type.
226  // Find by primitive type.
228  // Find by VEXpression.
230  // Find by primitive kind.
232 };
234 
235 // Evaluate an adhoc collection multiparm and use it to fill in a
236 // LOP_CollectionParms array.
237 extern LOP_API void lopGetCollectionParms(LOP_Node &node,
238  const PRM_Template &collection_parm_template,
239  fpreal t, LOP_CollectionParms &collection_parms);
240 // Take a populated LOP_CollectionParms array and use it to fill in an
241 // HUSD_FindParms object.
242 extern LOP_API bool lopGetCollection(LOP_Node &node,
243  const LOP_CollectionParms &collection_parms,
244  fpreal t, HUSD_FindPrims &findprims);
245 
246 // Checks if the layer at a given file path exists, using the resolver context
247 // of the supplied data lock.
249  HUSD_AutoAnyLock &lock,
250  const UT_StringRef &filepath,
251  const UT_StringRef &handle_missing_files,
252  bool *skip_this_file);
253 
254 #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 bool lopSetContextOptions(OP_Node &node, OP_Context &context, OP_ContextOptionsWriteScope &options)
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 bool lopSetPatternMatchingContextOptions(OP_Node &node, OP_Context &context, OP_ContextOptionsWriteScope &options)
LOP_API PRM_ChoiceList lopRefPrimMenu
LOP_API const PRM_Template & lopTimeBasedContextOptionsTemplate()
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
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 bool lopSetTimeBasedContextOptions(OP_Node &node, OP_Context &context, OP_ContextOptionsWriteScope &options)
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 & lopPatternMatchingContextOptionsTemplate()
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