81 virtual const char *getDataTypeToken()
const = 0;
82 virtual bool saveAscii(std::ostream &os)
const = 0;
83 virtual bool saveBinary(std::ostream &os)
const = 0;
84 virtual int64 getMemoryUsage()
const = 0;
96 virtual const char *getDataTypeToken()
const = 0;
116 virtual const char *getDataType()
const = 0;
117 virtual int64 getMemoryUsage()
const = 0;
124 UT_SMALLOBJECT_CLEANPAGES_DEFAULT,
125 UT_SMALLOBJECT_PAGESIZE_DEFAULT,
126 UT_SMALLOBJECT_THREADSAFE_OFF>
138 void adoptOverrides(
PRM_Parm &srcparm);
141 void revertToDefault(
fpreal time,
int index,
bool propagate=
true);
142 void restoreFactoryDefaults();
143 void restoreFactoryDefault(
int index);
146 {
return myDestructiveRevertToDefaultFlag; }
148 { myDestructiveRevertToDefaultFlag =
v; }
151 {
return myRevertInvisibleToDefaultsFlag; }
153 { myRevertInvisibleToDefaultsFlag =
v; }
156 {
return myMakeSpareParmsForUnknownChannelsFlag; }
158 { myMakeSpareParmsForUnknownChannelsFlag =
v; }
161 static bool isStringThatCanExpand(
const char *str);
162 static bool isOrdinalExpression(
const char *str,
164 static bool isOrdinalExpression(
const PRM_Default &dflt,
169 static void convertStringToExprLanguage(
const char *str,
172 static void convertStringFromExprLanguage(
const char *str,
176 static bool getIsAddingOrRemovingMultiParms();
182 static bool replaceRemainingMultiNumbers(
UT_String &str);
185 static void instanceMultiString(
UT_String &token,
187 bool fill_remaining=
true);
188 static void instanceMultiString(
UT_String &token,
189 const int *indexlist,
int num,
190 bool fill_remaining=
true);
195 int isDefault()
const;
196 int isDefault(
int index)
const;
197 int isFactoryDefault()
const;
198 int isFactoryDefault(
int index)
const;
204 int isTrueFactoryDefault(
int index)
const;
205 int isTrueFactoryDefault()
const;
210 int isFactoryDefaultUI(
int index)
const;
211 int isFactoryDefaultUI()
const;
213 void overwriteDefaults(
fpreal time);
214 void overwriteDefault(
fpreal time,
int index);
217 void changeOpRef(
const char *new_fullpath,
const char *old_fullpath,
218 const char *old_cwd,
const char *chan_name,
219 const char *old_chan_name,
220 void (*undo_callback)(
void *),
void *undo_data,
230 bool expand,
int thread)
const;
232 bool expand,
int thread)
const;
239 bool expand,
int thread)
const;
245 void getDefaultValue(
fpreal &
value,
int index)
const;
252 int index,
int thread)
const;
257 int index,
int thread)
const;
259 int index,
int thread)
const;
264 int index,
int thread)
const;
268 int index,
bool evaluate =
true,
269 bool rmchannel =
false,
bool propagate =
true);
274 bool kill_expr =
false,
int index = 0,
276 bool propagate =
true);
279 bool kill_expr =
false,
int index = 0,
281 bool propagate =
true);
284 bool kill_expr =
false,
int index = 0,
286 bool propagate =
true);
289 bool kill_expr =
false,
int index = 0,
291 bool propagate =
true);
294 bool kill_expr =
false,
int index = 0,
296 bool propagate =
true);
303 bool kill_expr =
false,
305 bool propagate =
true);
308 bool kill_expr =
false,
310 bool propagate =
true);
313 bool kill_expr =
false,
315 bool propagate =
true);
322 bool isMultiParm()
const;
329 void insertMultiParmItem(
int index,
bool propagate = 1);
332 void removeMultiParmItem(
int index,
bool propagate = 1);
335 void revertMultiParmItem(
int index);
339 void revertAllMultiParmItems();
343 void assignMultiParmItem(
int from,
int to);
347 void swapMultiParmItem(
int from,
int to);
350 int getMultiParmNumItems()
const;
356 int getMultiParmInstancesPerItem()
const;
360 const char* getMultiParmToken(
int p,
int index)
const;
365 int getMultiParmUIEntries()
const;
368 const PRM_Template *getMultiParmTemplate(
int idx)
const;
373 PRM_Parm *getMultiParm(
int idx)
const;
374 int getMultiParmCount()
const;
382 { privateValueChanged(vec_idx, propagate,
384 void sendValueChanged(
int vec_idx,
bool propagate);
385 void indirectChange(
int vec_idx,
bool expr_changed,
386 bool update_multi =
true);
389 int setOverride(
int index,
int data_idx,
const char *
source,
391 const char *getOverride(
int index)
const;
392 int getOverrideDataIndex(
int index)
const;
394 bool getOverrideTrackName(
int index,
UT_String &trackname)
const;
396 int setOverrideDisable(
int index,
int onoff);
397 int getIsOverrideActive(
int index)
const;
409 void copyValue(
fpreal t,
int dest_vi,
410 const PRM_Parm &src_parm,
int src_vi,
412 bool current_value_only,
413 bool set_value_to_default =
false,
418 void addChannel(
int index,
bool propagate =
true);
419 void addChannel(
int index,
const char *theexpr,
421 int addChannel(
const char *
name);
422 int addChannel(
const char *
name,
const char *expr,
425 void clearAndDestroyChannels(
bool force =
false);
426 void removeChannel(
int index,
bool propagage =
true);
430 void clearAndDestroyUnrefChannels(
const PRM_Parm &repl_parm);
433 int getChannelCount()
const;
435 void reloadChannelPtrs();
436 int channelPtrModified(
const char *
name);
438 int isTimeDependent()
const;
439 bool isTimeDependent(
int subindex)
const;
440 int isDataDependent(
fpreal gtime)
const;
441 bool isDataDependent(
fpreal gtime,
int subindex)
const;
442 void forceTimeDependent(
int subindex);
444 bool hasContextOptionDeps(
int subindex)
const;
446 void forceContextOptionDep(
int subindex,
452 fpreal getMultiSize()
const;
453 int getMultiStartOffset()
const;
455 bool isRampType()
const;
456 bool isRampTypeColor()
const;
459 {
return getTemplatePtr()->getVectorSize(); }
460 void getChannelToken(
UT_String &thestrref,
int index = 0)
const;
461 void getChannelLabel(
UT_String &thestrref,
int index = 0)
const;
462 void getToken(
UT_String &thestrref)
const;
463 void getLabel(
UT_String &thestrref)
const;
464 void getHelpText(
UT_String &helptext)
const;
465 void getHelpUrl(
UT_String &helptext)
const;
466 void getHelpTitle(
UT_String &helptext)
const;
468 const char *getToken()
const;
469 const char *getLabel()
const;
473 {
return getTemplatePtr()->getTokenRef(); }
477 {
return getTemplatePtr()->getChannelToken(vi); }
481 {
return getTemplatePtr()->getDecodedChannelToken(vi); }
483 void getChannelLabelForUI(
UT_String &thestrref,
int vec_idx)
const;
487 unsigned getTokenHash()
const;
489 bool hasChannelAlias(
int subindex)
const ;
490 void getChannelAlias(
UT_String &stringref,
int subindex)
const;
492 getChannelAlias(
int subindex)
const;
500 bool setChannelAlias(
const char *token_alias,
int subindex);
508 void createInputNotifyValue();
511 bool hasMicroNodes()
const;
514 int isDirty(
int vector_idx=0)
const;
515 int areAllFlagsClean()
const;
516 void clearAllDirtyFlags();
520 bool isSendExtra(
int vi)
const;
521 bool hasAnySendExtraFlags()
const;
523 int findSubIndex(
const char *thechannelname,
bool allow_alias)
const;
533 unsigned getEnableState(
int comp = -1)
const;
534 unsigned getInstanceEnableState(
int comp = -1)
const;
535 int setEnableState(
int thestate,
int comp = -1);
537 bool getActiveTakeFlag()
const;
538 bool getAlwaysTakeFlag()
const;
539 void setActiveTakeFlag(
int onoff);
540 bool getBypassFlag()
const;
541 void setBypassFlag(
bool v);
543 bool getVisibleState(
int comp = -1)
const;
544 bool setVisibleState(
bool f,
int comp = -1);
546 int getExpressionState();
547 void setExpressionState(
int state);
549 void setValueState(
int state);
554 bool isValueEditableByUI(
fpreal time,
int index)
const;
559 bool isExpressionEditableByUI(
fpreal time,
int index)
const;
562 void hardenChanges(
fpreal time,
bool forceflag = 0,
563 const char *patt = 0,
565 void hardenChanges(
fpreal time,
int index,
bool forceflag = 0,
566 const char *patt = 0,
569 void setKey(
fpreal time,
int index);
570 void setKey(
fpreal time,
int index,
const char *
exp,
575 bool accel_ratios =
true);
587 bool isLanguageOldExprOrLiteral(
fpreal time,
int index);
589 int changePending(
int index);
593 void save(std::ostream &os,
int binary,
bool compiled)
const;
599 void saveCommand(std::ostream &os,
int values=0,
int index=-1)
const;
600 int loadCommand(
int argc,
const char *
const argv[],
int index,
606 int findString(
const char *str,
bool fullword,
607 bool usewildcards)
const;
608 int changeString(
const char *from,
const char *to,
bool fullword);
610 bool notifyVarChange(
const char *varname);
612 bool getUndoSavedFlag();
616 void setUndoSavedFlag(
bool f);
618 bool getAutoTakeUndoSavedFlag();
622 void setAutoTakeUndoSavedFlag(
bool f);
624 bool getLockedFlag(
int vec_idx)
const;
625 bool areAllComponentsLocked()
const;
626 void setLockedFlag(
int vec_idx,
bool f);
627 unsigned int getLockedField()
const;
628 bool getAutoScopedFlag(
int vec_idx)
const;
629 void setAutoScopedFlag(
int vec_idx,
bool f);
630 unsigned int getAutoScopedField()
const;
634 int parm_group_mask ,
635 bool add_if_default ,
639 void destroyChildParms();
649 bool isCompatible(
const PRM_Parm &other_parm)
const;
653 bool isOfBasicType(
PRM_Type check_type)
const;
658 bool isParmValueEqual(
PRM_Parm &other_parm,
int vec_index,
660 bool isParmValueEqual(
int vec_index,
PRM_Parm &other_parm,
661 int other_index,
fpreal time,
669 int vec_index)
const;
673 void getAllChannelAliases(
UT_String &aliasstring,
674 char sep =
'/')
const;
677 bool isActive(
const int index)
const;
678 void setActive(
const int index,
const bool active);
680 int64 getMemoryUsage(
bool inclusive)
const;
682 bool isSpareParm()
const;
683 void setSpareParm(
bool sp)
const;
686 void setMultiParmOwner(
const PRM_Multi *multiparmowner);
704 bool instance_index=
true)
const;
706 void rebuildParmDependency();
708 bool isRotationParm()
const;
712 void setChannelReference(
fpreal time,
715 const char *ch_name=
nullptr,
717 bool rmchannel=
false);
727 const char *ch_name=
nullptr);
729 static bool isChanRefString(
const char *str,
bool is_expr,
732 bool getHaveCompiledExpressions()
const;
737 void setSaveLabelFlag(
bool f);
740 bool hasChannelCustomColor(
int index)
const;
741 const UT_Color &getChannelCustomColor(
int index)
const;
742 void setChannelCustomColor(
int index,
const UT_Color &
c);
743 void resetChannelCustomColor(
int index);
745 bool getAutoSelectFlag(
int vec_idx)
const;
746 void setAutoSelectFlag(
int vec_idx,
bool f);
747 unsigned int getAutoSelectField()
const;
749 void setTimeDependentMicroNode(
int subindex,
bool timedep)
const;
751 void privateValueChanged(
762 static bool myAlwaysHardenFlag;
763 static bool myDestructiveRevertToDefaultFlag;
764 static bool myRevertInvisibleToDefaultsFlag;
765 static bool myMakeSpareParmsForUnknownChannelsFlag;
UT_JSONValueMap stores a map/dictionary of UT_JSONValue objects.
const UT_StringRef & getTokenRef() const
static bool getDestructiveRevertToDefaultFlag()
GT_API const UT_StringHolder time
static bool getMakeSpareParmsForUnknownChannelsFlag()
PRM_API size_t format(char *buffer, size_t buffer_size, const PRM_Parm &v)
UT_SharedPtr< PRM_UndoData > PRM_UndoDataHandle
int getVectorSize() const
const GLuint GLenum const void * binary
UT_ConcurrentSet< UT_StringHolder > DEP_ContextOptionDeps
UT_Array< std::pair< UT_StringHolder, PRM_UndoDataHandle > > PRM_UndoDataList
GLsizei const GLchar *const * path
GLenum const void GLuint GLint reference
static void setMakeSpareParmsForUnknownChannelsFlag(bool v)
GLuint const GLchar * name
virtual UT_JSONValueMap * getKeyValueDict() const
static bool getRevertInvisibleToDefaultsFlag()
GLenum GLsizei GLsizei GLint * values
const UT_StringHolder & getDecodedChannelToken(int vi=0) const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
static void setAlwaysHardenFlag(bool o)
GLsizei GLsizei GLchar * source
std::string OIIO_UTIL_API replace(string_view str, string_view pattern, string_view replacement, bool global=false)
GLsizei GLenum const void * indices
void valueChanged(int vec_idx, bool propagate)
PRM_Callback getCallback()
const UT_StringHolder & getChannelToken(int vi=0) const
static void setRevertInvisibleToDefaultsFlag(bool v)
static bool getAlwaysHardenFlag()
**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
PRM_ParmList * getOwner() const
virtual ~PRM_DataFactory()
static void setDestructiveRevertToDefaultFlag(bool v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
PRM_MultiType
This type enum defines the different types of multi (dynamic) parameters.