13 #ifndef __PI_OpHandleLink__
14 #define __PI_OpHandleLink__
35 #define PI_SETTING_SHOWOPPATH "showoppath"
36 #define PI_SETTING_COLOR "color"
37 #define PI_SETTING_OWNEROP "ownerop"
38 #define PI_SETTING_OWNEROPGROUP "owneropgroup"
90 int linkOpParmToHandleParm(
const char *op_type,
91 const char *handle_parm_name,
92 const char *op_parm_name);
96 int activateHandleParm(
int pindex);
99 void disableHandleParm(
int pindex);
101 virtual int attach(
OP_Node &node);
102 virtual int detach(
OP_Node &node);
103 virtual void detachAll();
105 void attachForKeyframe(
OP_Node &node);
106 void detachForKeyframe(
OP_Node &node);
107 void detachAllForKeyframe();
111 void isolateHandleParms(
int beg,
114 void setShowOpPath(
bool onoff);
115 virtual bool getShowOpPath()
const;
122 void setRootDescription(
const char *description);
123 const char *getRootDescription()
const;
124 void buildDescription();
126 virtual void descriptionChanged(
const char* old_description);
131 void setIsTimeOverride(
bool is_time_override);
132 void setTimeOverrideTime(
fpreal t);
135 {
return myIsTimeOverride; }
137 {
return myTimeOverrideTime; }
142 {
return myAllowUsingPerOpSettingsTable; }
144 {
return myAllowUsingLastSettingsTable; }
146 {
return myAllowUsingOpTypeSettings; }
148 {
return myAllowUsingLastVisibilitySetting; }
162 OP_Operator *lastSettingsOperatorTypeRestriction()
const;
165 OP_Node *getOpNode(
int opnum = 0)
const;
166 int getNumOps()
const;
167 OP_Node *getKeyframeOpNode(
int opnum = 0)
const;
168 int getKeyframeNumOps()
const;
171 int hasOpNode(
const OP_Node &node)
const;
172 int hasKeyframeOpNode(
const OP_Node &node)
const;
173 OP_Node *findOpNode(
int op_type,
const char *op_name)
const;
176 void doUpdateFromOpParms();
177 virtual void forceUpdateFromOpParms();
181 virtual void handleOpNodeChange(
OP_Node &node);
193 virtual int refreshBindings(
int op_type,
const char *op_name);
201 {
return myParmNames.entries() > 0; }
205 {
return *myParmNames(opnum); }
212 {
return *myParmNames(opnum); }
216 int getOpnumForHandleParmIndex(
int idx)
const;
219 const UT_Color &getActiveColor()
const;
220 virtual void setActiveColor(
const UT_Color &
c);
223 void setBindingState(
const bool active);
229 bool ethereal()
const;
233 int writeOptions(std::ostream &os,
const char *baseCommand);
238 void editChannels(
int append_channels,
int opnum=-1);
239 void findKey(
int direction,
int opnum=-1);
240 void setKeys(
int opnum = -1,
241 int pindex_start = -1,
243 const char *undo_str = 0);
244 void removeKeys(
int opnum=-1);
245 void deleteChannels(
int opnum=-1);
246 void lockParms(
int opnum=-1);
247 void revertToDefaults(
int opnum=-1);
248 void revertToFactoryDefaults(
int opnum=-1);
249 void overwriteDefaults(
int opnum=-1);
256 bool specific_to_op)
const;
259 virtual void saveSettingsToAppropriateLocation();
263 void loadSettingsFromTables(
bool okay_to_use_last_settings);
267 void removeSettingsFromTables();
279 static void extractProjection(
UT_String &channel,
283 const char *parmname)
286 extractProjection(channel, parmname,
291 void setLateBinding(LateBinding * binding);
292 bool hasLateBinding()
const;
293 bool hasLateBinding(LateBinding
const * binding)
const;
298 int findHandleParmIndex(
const char *h_parm_name)
const;
301 virtual void onDeletion();
309 void updateSettings(
char const* setting_string);
313 { myAllowUsingPerOpSettingsTable = onoff; }
315 { myAllowUsingLastSettingsTable = onoff; }
317 { myAllowUsingOpTypeSettings = onoff; }
319 { myAllowUsingLastVisibilitySetting = onoff; }
322 int iterateParms(
int opnum, ReadParmFunc
func)
const;
323 int iterateParms(
int opnum, ModifyParmFunc
func,
bool modify_locked=
false);
328 virtual void updateFromOpParms();
337 virtual int justLinked(
int pindex);
338 virtual void justUnlinked(
int pindex);
340 virtual PI_Interest *getInputGroupInterests()
const;
346 void addAllInputGroupInterests(
int opnum);
347 void removeAllInputGroupInterests(
int opnum);
350 virtual fpreal getTime()
const;
355 int getParmValue(
int pindex,
int &
val,
int d=0)
const;
363 int getParmInstValue(
int pindex,
const int *inst,
365 int nestlevel=1)
const;
366 int getParmInstValue(
int pindex,
const int *inst,
368 int nestlevel=1)
const;
369 int getParmInstValue(
int pindex,
const int *inst,
371 int nestlevel=1)
const;
373 void getParmInstVector3(
int pindex,
const int *inst,
377 int setParmValue(
int pindex,
int val,
bool addkey=
false);
378 int setParmValue(
int pindex,
fpreal val,
bool addkey=
false);
384 int setParmInstValue(
int pindex,
const int *inst,
385 int val,
bool addkey=
false,
387 int setParmInstValue(
int pindex,
const int *inst,
390 int setParmInstValue(
int pindex,
const int *inst,
394 void setParmInstVector3(
int pindex,
const int *inst,
397 int performParmCallback(
int pindex,
int theitem);
400 int val,
bool addkey=
false);
409 bool readParm(
int pindex, ReadParmFunc
f)
const;
410 bool modifyParm(
int pindex, ModifyParmFunc
f,
bool modify_locked=
false);
414 void copyKeyStructure(
int pindex_dest,
int pindex_from);
417 bool isParmEnabled(
int pindex,
int opnum = 0)
const;
424 {
return myParmNames.entries(); }
431 virtual int hasTimeInterest()
const;
432 virtual void handleTimeChange();
441 void beginDistributedUndoBlock(
const char *operation,
443 void endDistributedUndoBlock();
447 bool inDistributedUndoBlock();
451 virtual void handleOpChange(
OP_Node *op,
458 virtual void setOwnerOp(
const char *owner_op);
461 virtual void setOwnerOpGroup(
const char *owner_op_group);
462 const UT_String &getOwnerOpGroup()
const;
470 static bool isOpParmLocked(
473 const OP_Node **ret_node = NULL);
476 void updateStateValues(
void* ui_event);
479 void beginHandleChange(
void* ui_event);
482 void endHandleChange(
void* ui_event);
485 void allocProxy(
void*
ptr);
495 int linkOpParm(
const char *op_type,
496 int pindex,
const char *parmname);
497 void updateParmLockStatus(
OP_Node &op );
499 void addParmNames(
int opnum);
500 void removeParmNames(
int opnum);
502 void setKeysSingleOp(
int opnum,
int pindex = -1,
504 const char *name_prefix = NULL);
505 void removeKeysSingleOp(
int opnum);
506 void deleteChannelsSingleOp(
int opnum);
507 void lockParmsSingleOp(
int opnum);
508 void revertToDefaultsSingleOp(
int opnum);
509 void revertToFactoryDefaultsSingleOp(
int opnum);
510 void overwriteDefaultsSingleOp(
int opnum);
514 int addInputGroupInterest(
int pindex,
517 int removeInputGroupInterest(
int pindex,
523 static void handleOpChangeCallback(
OP_Node *op,
void *callee,
526 void clearOpTypeParmNamesMap();
529 void updateHandleValues();
548 const PI_Interest *myInterests;
556 int myDistributedUndoBlockLevel;
557 bool myAllowUsingPerOpSettingsTable;
558 bool myAllowUsingLastSettingsTable;
559 bool myAllowUsingOpTypeSettings;
560 bool myAllowUsingLastVisibilitySetting;
563 bool myIsTimeOverride;
564 fpreal myTimeOverrideTime;
565 LateBinding* myLateBinding;
void setAllowUsingPerOpSettingsTable(bool onoff)
PXL_API const char * getDescription(const ColorSpace *space)
Return the description of the color space.
int getProxyIndex() const
virtual int wantsOpNodeChange(const OP_Node &) const
GT_API const UT_StringHolder time
IMF_EXPORT IMATH_NAMESPACE::V3f direction(const IMATH_NAMESPACE::Box2i &dataWindow, const IMATH_NAMESPACE::V2f &pixelPosition)
void setAllowUsingLastSettingsTable(bool onoff)
bool allowsUsingOpTypeSettings() const
bool allowsUsingLastVisibilitySetting() const
GLboolean GLboolean GLboolean GLboolean a
virtual bool flagOpNodeChangeNeeded(OP_Node &)
virtual void endHandleChange(PI_OpHandleLink const *pi, void *ui_event)
UT_Function< void(const PRM_Parm &parm, int vecidx)> ReadParmFunc
PRM_ValueCallback myCallback
bool getIsTimeOverride() const
virtual void handleOpUIChange(OP_Node &)
void setAllowUsingOpTypeSettings(bool onoff)
static void extractChannelName(UT_String &channel, const char *parmname)
constexpr enabler dummy
An instance to use in EnableIf.
bool hasLinkedParms() const
std::function< T > UT_Function
GLboolean GLboolean GLboolean b
void(* PRM_ValueCallback)(void *callee, void *value)
that also have some descendant prim *whose name begins with which in turn has a child named baz where *the predicate active
bool allowsUsingLastSettingsTable() const
virtual const UT_StringArray & allParmNames(int opnum) const
void setAllowUsingLastVisibilitySetting(bool onoff)
__hostdev__ constexpr T pi()
Pi constant taken from Boost to match old behaviour.
bool allowsUsingPerOpSettingsTable() const
virtual void beginHandleChange(PI_OpHandleLink const *pi, void *ui_event)
const UT_StringArray & linkedParmNames(int opnum) const
int getLinkedParmCount() const
fpreal getTimeOverrideTime() const
**If you just want to fire and args
UT_Function< void(PRM_Parm &parm, int vecidx)> ModifyParmFunc