14 #ifndef __PRM_ParmList__
15 #define __PRM_ParmList__
38 class PRM_OpSharedInfo;
67 int *tdepend,
int *enable ) = 0;
68 virtual bool setFloatOverride(
int data_idx,
fpreal time,
69 int *tdepend,
int *enable,
fpreal newvalue ) = 0;
72 int *tdepend,
int *enable ) = 0;
73 virtual bool setIntOverride(
int data_idx,
fpreal time,
74 int *tdepend,
int *enable,
exint newvalue ) = 0;
77 int *tdepend,
int *enable ) = 0;
78 virtual bool setStringOverride(
int data_idx,
fpreal time,
98 bool build_delayed_defaults);
108 bool leavedefaultsunchanged);
117 { myChannelGroupPtr = thechgroupptr; }
119 {
return myChannelGroupPtr; }
128 int allDefaults()
const;
133 void buildDelayedDefaults(
bool clear_channels =
true );
144 return (theindex >= 0 && theindex < myParms.entries())
150 return (theindex >= 0 && theindex < myParms.entries())
156 int getParmIndex(
const PRM_Parm *parm)
const;
164 int *vecidx =
nullptr)
const
166 int i = getParmIndexFromChannel(
167 channel, vecidx,
true);
175 int *vecidx =
nullptr)
177 int i = getParmIndexFromChannel(
178 channel, vecidx,
true);
185 bool allow_alias =
true)
const
187 return getParmIndexFromChannel(
188 channel_name, &subidx, allow_alias);
190 int getParmIndexFromChannel(
const UT_StringRef &channel,
192 bool allow_alias)
const;
196 void clearAllDirtyFlags();
197 int areAllFlagsClean()
const;
198 void clearAllUndoSavedFlags();
202 void revertValuesToFactoryDefaults();
211 void updateSpareParmTemplates(
PRM_Template *newtemplates,
212 bool leavedefaultsunchanged);
214 void saveSingle(
PRM_Parm *, std::ostream &os,
216 void save(std::ostream &os,
217 bool binary,
bool compiled)
const;
222 void saveSingleUndoData(
const PRM_Parm *parm,
230 void saveChannelAliases(std::ostream &os,
bool binary);
234 bool hasChannelAliases()
const;
238 bool hasSpareOrMultiInstanceParms()
const;
240 void clearAndDestroyChannels();
241 int hasAnyChannels();
243 void reloadChannelPtrs();
252 if (mask != myPermissions)
254 myPermissions =
mask;
259 {
return myAssetPermissionMask; }
262 if (mask != myAssetPermissionMask)
264 myAssetPermissionMask =
mask;
273 int canAccessIgnoringAssetMask(
276 int canAccessCheckingOnlyAssetMask(
280 static void beginLoading();
281 static void endLoading();
282 static bool isLoading();
284 void hardenChanges(
fpreal time,
bool forceflag = 0,
293 myEventObject =
data;
294 myEventHandler = handler;
303 int checkTimeDependence(
bool evaluate_channels =
false);
307 { myTimeDependent=onOff;}
310 {
return myTimeDependent; }
313 { myCookTimeDependent=onOff;}
316 {
return myCookTimeDependent; }
322 &myContextOptionDepsLock).insert(opt); }
325 myContextOptionDepsLock);
326 myContextOptionDeps.reset(); }
329 myContextOptionDeps); }
333 myCookContextOptionDeps,
334 &myContextOptionDepsLock).insert(opt); }
337 myContextOptionDepsLock);
338 myCookContextOptionDeps.reset(); }
341 myCookContextOptionDeps); }
346 { theORCallback = impl; }
348 void pushVariables();
351 int findString(
const char *str,
bool fullword,
352 bool usewildcards)
const;
353 int changeString(
const char *from,
const char *to,
356 bool notifyVarChange(
const char *varname);
360 {
return myNumSendExtra; }
362 { myNumSendExtra +=
n; }
373 { myAutoTakeUndoSavedFlag =
true; }
376 void appendMultiParms(
const PRM_Multi &multiparmowner,
381 void removeAndDestroyParm(
int index);
383 void insertMultiParmItem(
int index,
int i);
384 void removeMultiParmItem(
int index,
int i);
388 void clearParmOwner();
394 bool checkMultiParmInstance(
const UT_StringRef &parmname,
401 bool setChannelAlias(
PRM_Parm &parm,
int subindex,
404 int64 getMemoryUsage(
bool inclusive)
const;
407 {
return myAddRemoveCount; }
409 { myAddRemoveCount =
count; }
437 bool hasParmMicroNode(
int parm_idx)
const;
442 void propagateDirtyParmMicroNodes(
448 void clearMicroNodeInputs();
449 void getParmInputList(
451 bool cooking_only =
false)
const;
452 int getNumParmInputs()
const;
453 void getParmOutputList(
455 bool cooking_only =
false)
const;
460 int indent_level=0)
const;
461 int64 getMicroNodesMemoryUsage()
const;
467 static void removeOpSharedInfo(
const UT_StringRef &optoken);
471 static void renameOpSharedInfo(
const UT_StringRef &oldoptoken,
480 ->getParmPtrInst(parm_name, instance, nest_level, unused);
489 ->getParmPtrInst(parm_name, instance, nest_level, theparmidx);
494 int nest_level)
const
497 return getParmPtrInst(parm_name, instance, nest_level, unused);
502 int &theparmidx)
const;
513 void moveMultiParmAlias(
int index,
int i,
bool up);
520 bool try_again=
true);
526 bool leavedefaultsunchanged);
528 static bool shouldCopyOnAdopt(
531 bool leavedefaultsunchanged);
541 bool leavedefaultsunchanged);
543 void adoptChannelAlias(
553 const PRM_Multi &multiparmowner);
558 bool allow_alias)
const;
563 unsigned long myAddRemoveCount;
594 unsigned myPermissions;
596 unsigned myAssetPermissionMask;
612 bool myTimeDependent;
613 bool myCookTimeDependent;
615 bool myUndoSavedFlag;
616 bool myAutoTakeUndoSavedFlag;
620 static int thePRMLoadCount;
void setChannelGroupPtr(CH_Collection *thechgroupptr)
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
const PRM_Parm * getParmPtrInst(const UT_StringRef &parm_name, const int *instance, int nest_level) const
const PRM_Parm * getParmPtr(const int theindex) const
SYS_FORCE_INLINE void setCookTimeDependent(bool onOff)
UT_UniquePtr< DEP_ContextOptionDeps > DEP_ContextOptionDepsPtr
void setUserMask(unsigned m)
GT_API const UT_StringHolder time
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
DEP_API const DEP_ContextOptionDeps & DEPgetContextOptionDepsFromPtr(const DEP_ContextOptionDepsPtr &ptr)
const GLuint GLenum const void * binary
UT_ConcurrentSet< UT_StringHolder > DEP_ContextOptionDeps
SYS_FORCE_INLINE PRM_Parm * getParmPtrFromChannel(const UT_StringRef &channel, int *vecidx=nullptr)
void setEventHandler(void *data, void(*handler)(void *, CH_CHANGE_TYPE, int))
GLsizei const GLchar *const * path
static void setORCallback(PRM_ORCallback *impl)
unsigned getAssetPermissionMask() const
SYS_FORCE_INLINE bool getCookTimeDependent() const
void bumpNumSendExtra(int n)
unsigned getPermissions() const
unsigned long getAddRemoveCount() const
Read, write, execute user.
SYS_FORCE_INLINE const PRM_Parm * getParmPtrFromChannel(const UT_StringRef &channel, int *vecidx=nullptr) const
void setAddRemoveCount(unsigned long count)
int getNumSendExtra() const
This used to be called getSendExtraEvent()
PRM_ParmOwner * getParmOwner() const
PRM_API const PRM_Type PRM_TYPE_ZERO
void addContextOptionDep(const UT_StringHolder &opt)
int getParmIndex(const UT_StringRef &channel_name, int &subidx, bool allow_alias=true) const
const UT_StringRef & getTokenRef() const
Use this for hash tables, might be the sentinel value.
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
SYS_FORCE_INLINE bool getTimeDependent() const
UT_Function< void(DEP_MicroNode &, DEP_MicroNode &) > Visitor
PRM_Parm * getParmPtr(const int theindex)
void addCookContextOptionDep(const UT_StringHolder &opt)
PRM_PresetInfo * getPresetInfo() const
const DEP_ContextOptionDeps & getContextOptionDeps() const
virtual ~PRM_ORCallback()
PRM_Parm * getParmPtrInst(const UT_StringRef &parm_name, const int *instance, int nest_level, int &theparmidx)
static PRM_ORCallback * getORCallback()
GLuint const GLchar * name
void clearContextOptionDeps()
void setPermissions(unsigned mask)
bool getUndoSavedFlag() const
**Note that the tasks the is the thread number *for the or if it s being executed by a non pool thread(this *can happen in cases where the whole pool is occupied and the calling *thread contributes to running the work load).**Thread pool.Have fun
void setAutoTakeUndoSavedFlag()
void setAssetPermissionMask(unsigned mask)
SIM_API const UT_StringHolder force
GA_API const UT_StringHolder up
int getParmIndex(const PRM_Name &name) const
const DEP_ContextOptionDeps & getCookContextOptionDeps() const
LeafData & operator=(const LeafData &)=delete
Read, write, execute all.
Read, write, execute group.
DEP_API DEP_ContextOptionDeps & DEPcreateContextOptionDepsFromPtr(DEP_ContextOptionDepsPtr &ptr, DEP_ContextOptionDepsLock *lock=nullptr)
void clearCookContextOptionDeps()
unsigned getUserMask() const
CH_Collection * getChannelGroupPtr() const
PRM_Parm * getParmPtrInst(const UT_StringRef &parm_name, const int *instance, int nest_level)
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void setTimeDependent(bool onOff)