HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OP_CommandManager Class Reference

#include <OP_CommandManager.h>

+ Inheritance diagram for OP_CommandManager:

Public Member Functions

 OP_CommandManager (const char *appname, int load_dsos=1)
 
virtual ~OP_CommandManager ()
 
virtual void getChRefData (const CH_ChannelRef &r, OP_Node **pnode, CH_Channel **pchp, PRM_Parm **ppparm, int *subindex) const
 
virtual OP_NodegetChRefOpNode (const CH_ChannelRef &r) const
 
virtual int getChRefParmIndex (const CH_ChannelRef &r, int *subindex) const
 
virtual PRM_ParmgetChRefParm (const CH_ChannelRef &r, int *subindex) const
 
virtual PRM_ParmgetChRefFullParm (const CH_ChannelRef &r) const
 
virtual CH_ChannelgetChRefChannel (const CH_ChannelRef &r) const
 
virtual bool isOwnerExposed (const CH_ChannelRef &r) const
 
virtual void getChannelsWithNodeId (CH_ChannelList &chans, int node_id) const
 
bool match (const CH_ChannelRef &r, const char *patt) const
 
virtual bool buildChanRef (CH_ChannelRef &r, const CH_Channel *chp) const
 
virtual bool buildChanRef (CH_ChannelRef &r, const OP_Node *node, const PRM_Parm *parm) const
 
virtual bool buildChanRef (CH_ChannelRef &r, const OP_Node &node, const char *channel_name) const
 
virtual bool buildChanRef (CH_ChannelRef &r, const OP_Node *node, const PRM_Parm *parm, int subindex) const
 
virtual bool buildChanRef (CH_ChannelRef &r, const char *path) const
 Use this method to build a channel reference from a channel path. More...
 
virtual int compareChanRefs (const CH_ChannelRef &r1, const CH_ChannelRef &r2) const
 Returns 0 if r1 and r2 are equal, -1 if r1 < r2 and 1 if r1 > r2. More...
 
virtual int compareLayerRefs (const CH_ChannelRef &r1, const CH_ChannelRef &r2) const
 Returns 0 if r1 and r2 are equal, -1 if r1 < r2 and 1 if r1 > r2. More...
 
virtual void getChanRefPath (const CH_ChannelRef &r, UT_String &path, bool use_alias=false) const
 Use this method to get the full path of the channel referenced by r. More...
 
void getChanRefsPythonListCode (const CH_ChannelRefList &chanrefs, UT_WorkBuffer &result)
 Returns Python code representing the list of channel references. More...
 
bool inTrustedContextForNode (const OP_Node *node, int thread) const
 
bool inTrustedContextForNodeContents (const OP_Node *node, int thread) const
 
virtual CH_ScriptAccessManager * getAccessManager (int thread)
 
virtual bool resolveChanRefExport (const CH_ChannelRef &r, CH_ChannelRef &out_export)
 
- Public Member Functions inherited from CMD_Manager
 CMD_Manager (const char *appname, int load_dsos=1)
 
virtual ~CMD_Manager ()
 
virtual void setContext () override
 
void sendInput (const char *input, bool create_block=true)
 
void sendMultiLineInput (const char *input, bool create_block=true)
 
void execute (const char *cmd, bool add_to_history=false, std::ostream *out=0, std::ostream *err=0, bool do_alias_expansion=true, bool create_block=true)
 Force execution of a command. More...
 
void completeCommand (const char *prefix, UT_String &command) const
 
void matchCommands (const char *prefix, UT_StringArray &matches) const
 Return a list of all commands that start with the given prefix. More...
 
void installCommand (const char *name, const char *options, CMD_Callback cb, bool is_safe=true)
 Install a command into the command list. More...
 
bool uninstallCommand (const char *name)
 
bool markCommandForFalseIfStatements (const char *name, CMD_Callback cb)
 
CMD_PostCmdCallback setPostCmdCallback (CMD_PostCmdCallback callback, void *userdata)
 
voidgetPostCmdCallbackData () const
 Return the userdata set in setPostCmdCallback(). More...
 
void setCommandEchoCallback (CMD_CommandEchoCallback callback, void *userdata)
 
voidgetCommandEchoCallbackData () const
 Return the userdata set in setCommandEchoCallback(). More...
 
void commandDump (std::ostream &os, const char *pattern=0, const char *prefix=0) const
 Displays a list of all commands. More...
 
void commandHelp (std::ostream &os, const char *cmd, bool full_match_only=false) const
 
void searchHelp (CMD_CommandList &list, const char *filename, const char *pattern) const
 
void printHelp (std::ostream &os, const char *filename, const char *pattern=0) const
 Note this only prints exact matches to the help. More...
 
void saveAliases (std::ostream &os)
 
void saveVariables (std::ostream &os, bool level0_locals)
 
int setHistoryCapture (int onOff)
 
CMD_SourcepushSource (const char *filename, int verbose=0)
 
CMD_SourcepopSource (int checkLoop=1)
 
CMD_SourcegetSource ()
 
int getSourceLevel ()
 
void pushOutputStreams (std::ostream &out, std::ostream &err)
 
void popOutputStreams ()
 
void unsetVariable (const char *name)
 Removes the named variable. More...
 
void resetVariables ()
 Resets all variables to their defaults. More...
 
void setVariable (const char *name, const char *value, int local, int uplevel=0)
 
bool hasVariable (const char *name) const
 Returns true if the named variable exists. More...
 
bool getVariable (const char *name, UT_String &value)
 Returns the value of the named variable. More...
 
bool getVariable (const char *name, fpreal64 &value)
 Returns the value of the named variable as a fpreal64. More...
 
bool getVariable (const char *name, fpreal32 &value)
 Returns the value of the named variable as a float. More...
 
bool getVariable (const char *name, int32 &value)
 Returns the value of the named variable as an int. More...
 
bool getVariable (const char *name, int64 &value)
 Returns the value of the named variable as an int. More...
 
bool hasEnv (const char *name) const
 
bool getEnv (const char *name, UT_String &value)
 
void getVariableNames (UT_StringArray &names, int dirty=0)
 Returns a list of all defined variables. More...
 
int clearDirtyVariables ()
 
int clearDirtyVariables (const UT_StringArray &names)
 
int isVariableNameOk (const char *name)
 
void setMotName (const char *path)
 
void setJob (const char *path)
 Convenience method to set the JOB variable. More...
 
unsigned getCommandsRun () const
 Return the number of commands run. It's possible for this to overflow. More...
 
std::ostream & getError (int printMessage=1)
 
std::ostream * setStandardOut (std::ostream &os)
 
std::ostream * setStandardErr (std::ostream &os)
 
void streamDeleted (std::ostream &os)
 
void setPrompt (const char *prompt)
 
const char * getPrompt (int level=-1) const
 
void pushPrompt (const char *prompt)
 
void popPrompt ()
 
int isLoopCommand (const char *str)
 
int evaluateCondition (const char *expr)
 
int evaluateCondition (int argc, const char *argv[])
 
void dumpHistory (std::ostream &os) const
 Displays the contents of the history buffer. More...
 
void clearHistory ()
 Clears the history buffer. More...
 
const char * getHistoryCommand (int n) const
 
unsigned int getHistoryCount () const
 Returns the number of entries in the history buffer. More...
 
CMD_VariableTablegetGlobalVariables ()
 
CMD_AliasTablegetAliases ()
 
bool getAlias (const char *name, UT_String &value)
 
void setAlias (const char *name, const char *value)
 Create a new alias or override an existing alias. More...
 
void destroyAlias (const char *name)
 Removes the named alias. More...
 
void destroyAliases ()
 Removes all aliases. More...
 
void allowEnvironmentToOverwriteVariable (const char *name, bool onoff)
 
bool isEnvironmentAllowedToOverwriteVariable (const char *name)
 
void setIsLoadingGlobalVariables (bool onoff)
 
bool isLoadingGlobalVariables ()
 Are we loading global variables from the hip file? More...
 
void setVariableChangeNotifier (CMD_VariableChangeNotifier *notifier)
 Register a variable change notification center object. More...
 
CMD_VariableChangeNotifiergetVariableChangeNotifier () const
 Returns a variable change notification center object. More...
 
void saveCommandString (std::ostream &os, const UT_String &str)
 
void getFrameRange (CMD_Args &args, int &fstart, int &fend, int &finc, char oframe= 'f', char ofinc= 'i')
 Now, here, we provide some nice functions to handle getting arguments. More...
 
void setContinueLevel (int level)
 
int getContinueLevel () const
 
void bumpBreakLevel (int dir)
 
int getBreakLevel () const
 
void bumpLoopNestLevel (int dir)
 
int getLoopNestLevel () const
 
CMD_Loop * buildLoop (const char *text)
 
void doPrompt ()
 
void getPrompt (UT_String &str)
 
void setVerbose (int on_off)
 
int getVerbose () const
 
void setCommandEcho (bool on_off)
 
bool getCommandEcho () const
 
void setIORedirection (int on_off)
 
int getIORedirection () const
 
const char * getOptions (const char *cmdName)
 Returns the getopts-style options for the given command. More...
 
int isCommandDefined (const char *name)
 Returns true if the command is defined. More...
 
void getDSOCommands (CMD_CommandList &list)
 
bool isLoading () const
 
void beginLoading ()
 
void endLoading ()
 
void setSafeMode (int safe_mode)
 
int isInSafeMode () const
 
void setBrowserMode (int browser_mode)
 
int isInBrowserMode () const
 
void setStatusCode (int status_code)
 
int getStatusCode () const
 Returns non-zero if the last command failed. More...
 
void closePort (int port)
 Closes a port opened with openPort(). More...
 
void closeAutoPort ()
 
bool beginChannelBlock ()
 
bool endChannelBlock ()
 
void echoOff ()
 
void echoOn ()
 
void sendInputNoLock (const char *input, bool create_block=true)
 
void sendMultiLineInputNoLock (const char *input, bool create_block=true)
 
void executeNoLock (const char *cmd, bool add_to_history=false, std::ostream *out=0, std::ostream *err=0, bool do_alias_expansion=true, bool create_block=true)
 
bool openPort (int port, bool safe, bool quiet, bool wait, CMD_Args &args, const char *execute, pid_t *pid, bool separateerrors, bool suppress=true, const char *ip_mask=0, FS_ServerSocketListener::ChildExitedCallback child_exited_callback=0, bool detach_console_for_execute=false, bool drain_queue_when_waiting_for_exec=true)
 
bool openPort (int port, bool safe, bool quiet, bool wait, std::ostream &error_output, const char *execute, pid_t *pid, bool separateerrors, bool suppress=true, const char *ip_mask=0, FS_ServerSocketListener::ChildExitedCallback child_exited_callback=0, bool detach_console_for_execute=false, bool drain_queue_when_waiting_for_exec=true)
 
bool openPort (int port, bool safe, bool quiet, bool wait, CMD_Args &args, const char *const *execute_argv, pid_t *pid, bool separateerrors, bool suppress=true, const char *ip_mask=0, FS_ServerSocketListener::ChildExitedCallback child_exited_callback=0, bool detach_console_for_execute=false, bool drain_queue_when_waiting_for_exec=true)
 
bool openPort (int port, bool safe, bool quiet, bool wait, std::ostream &error_output, const char *const *execute_argv, pid_t *pid, bool separateerrors, bool suppress=true, const char *ip_mask=0, FS_ServerSocketListener::ChildExitedCallback child_exited_callback=0, bool detach_console_for_execute=false, bool drain_queue_when_waiting_for_exec=true)
 
- Public Member Functions inherited from CH_Manager
 CH_Manager (int initTheExpressionLibrary=1)
 
virtual ~CH_Manager ()
 
int condenseCommon (UT_String &path)
 
void resetPlayback ()
 
void resetChannelOptions ()
 
bool loadChannelOptions (const char *filename)
 
bool saveChannelOptions (const char *filename)
 
void setDefaultExpression (const char *s)
 
const char * getDefaultExpression () const
 
void setDefaultRotationExpression (const char *s)
 
const char * getDefaultRotationExpression () const
 
void setAutoSlope (SlopeMode m)
 
SlopeMode getAutoSlope () const
 
void setDefaultSlope (fpreal slope)
 
fpreal getDefaultSlope () const
 
void setAutoSplit (bool onoff)
 
bool getAutoSplit () const
 
void setDefaultSplitExpression (const char *expr)
 
const char * getDefaultSplitExpression () const
 
void setHoldLastKey (bool onoff)
 
int getHoldLastKey () const
 
const char * getChanCreateKeyExpression () const
 
void setChanCreateKeyExpression (const char *s)
 
bool getAlwaysCommitKeyChange () const
 
void setAlwaysCommitKeyChange (bool onoff)
 
void clearChannelScope ()
 
void getScopedChannels (CH_ChannelList &channels, bool sorted=false)
 
int getNumScopedChanRefs () const
 
void getScopedChanRefs (CH_ChannelRefList &chanrefs, unsigned mask=0, bool sorted=false) const
 
void getSelectedScopedChanRefs (CH_ChannelRefList &chanrefs, bool sorted=false, int operateOn=CH_SELECTED)
 
void getScopedChannelsKeyFrames (UT_IntArray &frames, int minframe, int maxframe)
 
void blockModifyScope (int on_off)
 
void scopeChannel (const CH_ChannelRef &chref, bool on_off)
 
void scopeChannel (const char *full_chan_path, bool on_off)
 
bool scopeChannelInternal (CH_Channel *chp, bool on_off)
 
bool scopeChannelInternal (const CH_ChannelRef &chref, bool on_off)
 
void scopeChanged (unsigned flags, bool propagate=true)
 
bool isChannelScoped (CH_Channel *chp) const
 
bool isChannelScoped (const char *full_chan_path) const
 
bool isChannelScoped (const CH_ChannelRef &chref) const
 
void clearPendingChannels ()
 
void getPendingChannels (CH_ChannelList &channels)
 
void addPendingChannel (CH_Channel *chp)
 
void removePendingChannel (CH_Channel *chp)
 
bool isChannelDisplayed (CH_Channel *chp) const
 
bool isChannelDisplayed (const CH_ChannelRef &chref) const
 
bool isChannelDisplayed (const char *full_chan_path) const
 
void clearDisplayedChannels (bool propagate=true)
 
void displayAllScopedChannels (bool propagate=true)
 
void displaySelectedScopedChannels (bool propagate=true)
 
void displayChannel (const CH_ChannelRef &chref, bool propagate=true)
 
void displayChannel (const char *full_chan_path, bool propagate=true)
 
void undisplayChannel (const CH_ChannelRef &chref, bool propagate=true)
 
void undisplayChannel (const char *full_chan_path, bool propagate=true)
 
bool isChannelSelected (const CH_ChannelRef &chref) const
 
bool isChannelSelected (const char *full_chan_path) const
 
void clearSelectedChannels (bool propagate=true)
 
void selectAllScopedChannels (bool propagate=true)
 
void selectChannel (const CH_ChannelRef &chref, bool propagate=true)
 
void selectChannel (const char *full_chan_path, bool propagate=true)
 
void deselectChannel (const CH_ChannelRef &chref, bool propagate=true)
 
void deselectChannel (const char *full_chan_path, bool propagate=true)
 
void togglePinAllScopedChannels ()
 
void togglePinScopedChannels (const CH_ChannelRefList &chanrefs)
 
void pinAllScopedChannels (bool propagate=true)
 
void unpinAllScopedChannels (bool propagate=true)
 
void pinSelectedChannels (bool propagate=true, int operateOn=CH_SELECTED)
 
void unpinSelectedChannels (bool propagate=true, int operateOn=CH_SELECTED)
 
void pinChannels (const CH_ChannelRefList &chanrefs, bool propagate=true)
 
void unpinChannels (const CH_ChannelRefList &chanrefs, bool propagate=true)
 
void clearLayerScope ()
 
bool isLayerScoped (CH_Channel *chp) const
 
bool isLayerScoped (const char *full_chan_path) const
 
bool isLayerScoped (const CH_ChannelRef &chref) const
 
void scopeLayer (const CH_ChannelRef &chref, bool on_off)
 
void scopeLayer (const char *full_chan_path, bool on_off)
 
bool scopeLayerInternal (CH_Channel *chp, bool on_off)
 
bool scopeLayerInternal (const CH_ChannelRef &chref, bool on_off)
 
bool isLayerSelected (const CH_ChannelRef &chref) const
 
bool isLayerSelected (const char *full_chan_path) const
 
void clearSelectedLayers (bool propagate=true)
 
void selectAllScopedLayers (bool propagate=true)
 
void selectLayer (const CH_ChannelRef &chref, bool propagate=true)
 
void selectLayer (const char *full_chan_path, bool propagate=true)
 
void deselectLayer (const CH_ChannelRef &chref, bool propagate=true)
 
void deselectLayer (const char *full_chan_path, bool propagate=true)
 
void togglePinAllScopedLayers ()
 
void togglePinScopedLayers (const CH_ChannelRefList &chanrefs)
 
void pinAllScopedLayers (bool propagate=true)
 
void unpinAllScopedLayers (bool propagate=true)
 
void pinSelectedLayers (bool propagate=true, int operateOn=CH_LAYER_SELECTED)
 
void unpinSelectedLayers (bool propagate=true, int operateOn=CH_LAYER_SELECTED)
 
void pinLayers (const CH_ChannelRefList &chanrefs, bool propagate=true)
 
void unpinLayers (const CH_ChannelRefList &chanrefs, bool propagate=true)
 
bool isLayerDisplayed (CH_Channel *chp) const
 
bool isLayerDisplayed (const CH_ChannelRef &chref) const
 
bool isLayerDisplayed (const char *full_chan_path) const
 
void clearDisplayedLayers (bool propagate=true)
 
void displayAllScopedLayers (bool propagate=true)
 
void displaySelectedScopedLayers (bool propagate=true)
 
void displayLayer (const CH_ChannelRef &chref, bool propagate=true)
 
void displayLayer (const char *full_chan_path, bool propagate=true)
 
void undisplayLayer (const CH_ChannelRef &chref, bool propagate=true)
 
void undisplayLayer (const char *full_chan_path, bool propagate=true)
 
void setChannelFlags (const CH_ChannelRef &chref, unsigned flags, bool on_off, bool propagate=true)
 
unsigned getChannelFlags (const CH_ChannelRef &chref) const
 
int expandString (const char *string, UT_String &expanded, fpreal time, CH_Collection *local=0, int thread=0, int expansion_type=CH_EXPANSION_TYPE_DEFAULT)
 
void buildStringOpDependencies (const char *str, void *ref_id, CH_Collection *locals, int thread)
 
bool scanForVariableInString (const char *variable, const char *string) const
 
bool changeStringOpRef (UT_String &str, const char *new_fullpath, const char *old_fullpath, const char *old_cwd, const char *chan_name, const char *old_chan_name, CH_Collection *locals, int thread)
 
fpreal evaluate (const char *expr, fpreal now, CH_Collection *local=0, int *frame_dep=0, int thread=0, CH_ExprLanguage language=CH_OLD_EXPR_LANGUAGE)
 
int evaluateString (const char *expr, UT_String &result, fpreal now, CH_Collection *local=0, int thread=0, CH_ExprLanguage language=CH_OLD_EXPR_LANGUAGE)
 
bool getIsSettingGlobalParam () const
 
void getGlobalParamF (const char *token, CH_Collection *scope, fpreal &result, fpreal def, int thread, bool add_dependencies)
 
void getGlobalParamS (const char *token, CH_Collection *scope, UT_String &result, const char *def, int thread, bool add_dependencies)
 
int setGlobalFloatParam (const char *token, fpreal val, CH_Collection *&owner)
 
int setGlobalStringParam (const char *token, const char *strval, CH_Collection *&owner)
 
int removeGlobalParamOwner (CH_Collection *owner)
 
void dumpGlobalParams (std::ostream &out) const
 
void dirtyOrphanGlobalParamDependents (const char *token, CH_Collection *scope, bool recurse, UT_Set< CH_Collection * > *dependents)
 
bool getIsSettingGuideParam () const
 
CH_GroupgetTopGroup () const
 
CH_GroupfindGroup (const char *const_path, bool create=false, CH_Group *head=0)
 
void findGroups (CH_GroupList &groups, const char *pattern, bool minimal)
 
void findChannelsFromGroups (CH_ChannelList &channels, const char *pattern)
 
void findChanRefsFromGroups (CH_ChannelRefList &chanrefs, const char *pattern)
 
CH_GroupList getSelectedGroups ()
 
CH_GroupgetCurrentGroup ()
 
void updateGroupSelection (const CH_GroupList &groups, void *by, bool propagate=true)
 
void updateGroupSelectionFromScoped (void *by, bool propagate=true)
 
void updateCurrentGroup (CH_Group *group, void *by, bool propagate=true)
 
void enforceLeafOnlyChannels (CH_Group *group, const char *name="new_group")
 
CH_GroupcreateGroup (const char *const_path, bool doRename=true, CH_Group *head=0)
 
void renameGroup (CH_Group *group, const char *newname)
 
void deleteGroup (CH_Group *group)
 
void extractGroup (CH_Group *group, CollisionBehaviour cb)
 
CH_GroupcollapseGroups (CH_GroupList const &groups, const char *name)
 
void collapseChildren (CH_Group *parent)
 
void copyIntoGroup (CH_Group *source, CH_Group *target, CollisionBehaviour cb, const char *new_name=0)
 
void moveIntoGroup (CH_Group *source, CH_Group *target, CollisionBehaviour cb, const char *new_name=0)
 
void addToGroup (CH_Group *source, CH_Group *target, CollisionBehaviour cb)
 
void mergeWithGroup (CH_Group *source, CH_Group *target, CollisionBehaviour cb)
 
void channelCreated (const CH_Channel *chp)
 
void channelDeleted (const CH_Channel *chp)
 
void saveGroup (CH_Group *g, std::ostream &os, int binary)
 
CH_GrouploadGroup (UT_IStream &is)
 
CH_ExprLanguage getDefaultExprLanguage ()
 
void setDefaultExprLanguage (CH_ExprLanguage language)
 
bool isGlobalScopedChannels (CH_ScopedChannels *p)
 
CH_ScopedChannelsgetGlobalScopedChannels ()
 
const CH_ScopedChannelsgetGlobalScopedChannels () const
 
void timeGroupsChanged ()
 
void addTimeGroup (CH_TimeGroup *group, bool doRename=true, bool force=false)
 
void destroyTimeGroup (const CH_TimeGroup *group)
 
void destroyTimeGroup (int i)
 
void renameTimeGroup (CH_TimeGroup *group, const char *newname, bool force=false)
 
int getNTimeGroups () const
 
CH_TimeGroupgetTimeGroup (int i)
 
const CH_TimeGroupgetTimeGroup (int i) const
 
CH_TimeGroupgetTimeGroup (const char *name)
 
const CH_TimeGroupgetTimeGroup (const char *name) const
 
int getTimeGroupIdx (const char *name) const
 
int niceFrameSeparation (fpreal initialSep, int minimumSep=1) const
 
void stretchCollections (CH_Collection *from, fpreal ostart, fpreal oend)
 
fpreal getNumSamples () const
 
void setRawNumSamples (int n)
 
fpreal getSamplesPerSec () const
 
void setSamplesPerSec (fpreal fps)
 
fpreal getSecsPerSample () const
 
void setRawSamplesPerSec (fpreal fps)
 
int getChopMotionSamples () const
 
void setChopMotionSamples (int n)
 
fpreal getGlobalStart () const
 
fpreal getGlobalEnd () const
 
int getGlobalStartFrame () const
 
int getGlobalEndFrame () const
 
void setGlobalTime (fpreal start, fpreal end)
 
void setRawInterpolation (int state)
 
int getRawInterpolation ()
 
fpreal getTolerance () const
 
fpreal getTime (fpreal sample) const
 
fpreal getSampleRaw (fpreal t) const
 
fpreal getSample (fpreal t) const
 
int getFrame (fpreal t) const
 
fpreal getTimeDelta (fpreal sample_delta) const
 
fpreal getSampleDelta (fpreal time_delta) const
 
fpreal getSnapToFrameTime (fpreal t) const
 
fpreal getSnapSample (fpreal frame) const
 
fpreal getSnapToFrameDelta (fpreal base_time, fpreal time_delta) const
 
bool getIsAtFrame (fpreal t) const
 
void getTimeCode (char *buf, fpreal t)
 
int setTimeCode (const char *buf, fpreal &t)
 
void setTimeCodeOffset (fpreal t)
 
fpreal getTimeCodeOffset (fpreal) const
 
int getIntegerFrameFlag () const
 
void setIntegerFrameFlag (int flag)
 
int getRestrictRangeFlag () const
 
void setRestrictRangeFlag (int flag)
 
int getShowRangeFlag () const
 
void setShowRangeFlag (int flag)
 
int getShowTicksFlag () const
 
void setShowTicksFlag (int flag)
 
int getShowAudioFlag () const
 
void setShowAudioFlag (int flag)
 
int getShowKeysFlag () const
 
void setShowKeysFlag (int flag)
 
int getShowSimCacheFlag () const
 
void setShowSimCacheFlag (int flag)
 
fpreal getAudioLevel () const
 
void setAudioLevel (fpreal lvl)
 
fpreal getUnitLength () const
 
void setUnitLength (fpreal unitlength)
 
fpreal getUnitMass () const
 
void setUnitMass (fpreal unitmass)
 
void parseUnitsString (const char *units, fpreal &distexp, fpreal &massexp) const
 
fpreal scaleToMKS (const char *fromunits) const
 
fpreal scaleFromMKS (const char *tounits) const
 
int getRealTimeFlag () const
 
void setRealTimeFlag (int flag)
 
fpreal getRealTimeFactor () const
 
void setRealTimeFactor (fpreal f)
 
bool getRealTimeDisableSkip () const
 
void setRealTimeDisableSkip (bool b)
 
fpreal getSampleStep () const
 
void setSampleStep (fpreal s)
 
void getSampleRange (fpreal &start, fpreal &end)
 
void setSampleRange (fpreal start, fpreal end)
 
int getHoldFlag () const
 
void setHoldFlag (int flag)
 
int saveChannels (const char *filename, bool binary, bool compiled, const CH_ChannelList &channels, bool displayed=false) const
 
int loadChannels (const char *filename, const char *src_pattern, const char *dest_pattern, bool use_range, const fpreal *tstart, const fpreal *tend, CH_CollectionList &parents, bool delete_keys=false, CH_ChannelRefList *displayed_parms=NULL)
 
void addExpressionDefine (CH_ExprDefine *def)
 
void setEvalCollection (CH_Collection *g, int thread)
 
CH_CollectiongetEvalCollection (int thread) const
 
void setRootCollection (CH_Collection *root)
 
CH_CollectiongetRootCollection () const
 
const CH_EvalContextevalContext (int thread) const
 
CH_EvalContextevalContext (int thread)
 
const CH_ChannelgetEvalChannel (int thread) const
 
const CH_SegmentgetEvalSegment (int thread) const
 
const char * getEvalChannelName (int thread) const
 
fpreal getEvaluateTime () const
 
CH_LocalVariablegetLocalVariableTable () const
 
bool getVariableValue (UT_String &str, int i, int thread) const
 
bool getVariableValue (fpreal &val, int i, int thread) const
 
bool getVariableValue (int &val, int i, int thread) const
 
int addVariable (const CH_LocalVariable &var, CH_StringVarEvalFunc strfunc, CH_FloatVarEvalFunc floatfunc, CH_IntVarEvalFunc intfunc) const
 
void removeParamDependency (CH_Collection *coll)
 
bool buildChannelRefs (CH_ChannelRefList &reflist, const CH_ChannelList &chlist)
 
bool buildChannelRefs (CH_ChannelRefList &reflist, const UT_StringArray &chlist)
 
void changeReferencesToNodeId (int old_id, int new_id)
 
void removeReferencesToNodeId (int node_id)
 
void displayScope () const
 
bool getAutoKeyTuples () const
 Auto-Key all Tuples is a preference to key tuples together. More...
 
void setAutoKeyTuples (bool b)
 
bool getAutoScopeOnChannelCreate () const
 Auto-Scope when Creating Channel is a preference to set the auto-scope flag when creating a channel. More...
 
void setAutoScopeOnChannelCreate (bool b)
 
bool getAutoScopeIncludeAnimated () const
 Include all the Animated Channels when building the scoped parameter list from selection. More...
 
void setAutoScopeIncludeAnimated (bool b)
 
bool getFollowScopedChannelReferences () const
 
void setFollowScopedChannelReferences (bool b)
 
fpreal evalBezierFunc (int thread)
 
fpreal evalConstantFunc (int thread)
 
fpreal evalCubicFunc (int thread)
 
fpreal evalCycleFunc (fpreal start_frame, fpreal end_frame, int thread)
 
fpreal evalCycletFunc (fpreal start_frame, fpreal end_frame, int thread)
 
fpreal evalCycleOffsetFunc (fpreal start_frame, fpreal end_frame, int thread)
 
fpreal evalCycleOffsettFunc (fpreal start_frame, fpreal end_frame, int thread)
 
fpreal evalEaseFunc (int thread)
 
fpreal evalEaseinFunc (int thread)
 
fpreal evalEaseinpFunc (fpreal ease_speed, int thread)
 
fpreal evalEaseoutFunc (int thread)
 
fpreal evalEaseoutpFunc (fpreal ease_speed, int thread)
 
fpreal evalEasepFunc (fpreal ease_speed, int thread)
 
fpreal evalLinearFunc (int thread)
 
fpreal evalMatchFunc (int thread)
 
fpreal evalMatchinFunc (int thread)
 
fpreal evalMatchoutFunc (int thread)
 
fpreal evalQcubicFunc (int thread)
 
fpreal evalQlinearFunc (int thread)
 
fpreal evalQuinticFunc (int thread)
 
fpreal evalRepeatFunc (fpreal start_frame, fpreal end_frame, int thread)
 
fpreal evalRepeattFunc (fpreal start_frame, fpreal end_frame, int thread)
 
fpreal evalSplineFunc (int thread)
 
fpreal evalVmatchFunc (int thread)
 
fpreal evalVmatchinFunc (int thread)
 
fpreal evalVmatchoutFunc (int thread)
 
bool getAutoScopeIncludeChild () const
 Include all the Child nodes when building the scoped parameter list from selection. More...
 
void setAutoScopeIncludeChild (bool b)
 
bool getAutoScopeIncludeConstraints () const
 Include all the Constraints nodes when building the scoped parameter list from selection. More...
 
void setAutoScopeIncludeConstraints (bool b)
 
fpreal getEvaluateTime (int thread) const
 Functions for obtaining and setting the current evaluation time. More...
 
void setEvaluateTime (fpreal time, int thread)
 Functions for obtaining and setting the current evaluation time. More...
 

Static Public Member Functions

static void getChRefUniqueNodes (const CH_ChannelRefList &chanrefs, UT_ValArray< OP_Node * > &nodes)
 
- Static Public Member Functions inherited from CMD_Manager
static bool getContextExists ()
 
static CMD_ManagergetContext ()
 retrieves the global CMD_Manager More...
 
static void saveProtectedString (std::ostream &os, const char *s)
 
static void expandControlSequences (UT_String &str)
 
static void buildQuotedCommandLineStringForBinaryData (const UT_StringRef &data, UT_WorkBuffer &result)
 
static void retrieveBinaryDataFromInsideCommand (const char *encoded_data, UT_WorkBuffer &result)
 
static int getHScriptPort ()
 
static void cmd_python (CMD_Args &args)
 
- Static Public Member Functions inherited from CH_Manager
static CH_ManagergetContext ()
 
static bool getContextExists ()
 
static void evaluationError (int err, int thread, const char *path)
 
static CH_KeyState getKeyState (fpreal gtime, const CH_ChannelList &channels, bool loose=false)
 
static void getUniqueCollections (const CH_ChannelList &channels, CH_CollectionList &collections)
 
static bool makeGroupPathValid (UT_String &path)
 
static bool makeGroupNameValid (UT_String &path)
 
static bool couldExpandString (const char *str)
 
static fpreal niceNumber (fpreal num, int digits=6)
 
static fpreal getDefaultFPS ()
 
static fpreal getDefaultLength (fpreal fps)
 
static fpreal getDefaultLengthFrames (fpreal fps)
 
static int getDefaultChopMotionSamples ()
 
static bool readCHNFileHeader (UT_IStream &is, bool quiet, fpreal32 &version, int &binary, bool &is_fp64, fpreal64 &tstart, fpreal64 &tend)
 
static bool skipCHNFileHeaderForCollection (UT_IStream &is, bool &is_fp64)
 
static bool getFileType (const char *filename, int &raw, int &binary)
 
static bool printFileInfo (std::ostream &os, const char *filename, CH_Collection *load_coll, bool print_segments=true)
 
static void lookupVariable (const char *name, UT_String &val, int thread)
 
static void lookupVariableNoThread (const char *name, UT_String &val)
 
static void lookupExpression (const char *name, UT_String &val, int thread)
 
static void lookupExpressionNoThread (const char *name, UT_String &val)
 

Additional Inherited Members

- Public Types inherited from CH_Manager
enum  CollisionBehaviour { CH_ON_COLLISION_RENAME, CH_ON_COLLISION_MERGE, CH_ON_COLLISION_REPLACE, CH_ON_COLLISION_ASSERT }
 
enum  ExpansionType { CH_EXPANSION_TYPE_EXPRESSION = 1, CH_EXPANSION_TYPE_VARIABLE = 1 << 1, CH_EXPANSION_TYPE_DEFAULT }
 
enum  SlopeMode { CH_SLOPE_MANUAL, CH_SLOPE_MANUAL_KEEP, CH_SLOPE_AUTOMATIC }
 
typedef CollisionBehaviour(* CBCallback )(CH_Group *source, CH_Group *target)
 
- Protected Member Functions inherited from CMD_Manager
bool getVariableString (const char *name, UT_String &value, int &timeDepend, int thread) override
 
- Protected Member Functions inherited from CH_Manager
void initExpressionLibrary ()
 
void initLibraryGlue ()
 

Detailed Description

Definition at line 24 of file OP_CommandManager.h.

Constructor & Destructor Documentation

OP_CommandManager::OP_CommandManager ( const char *  appname,
int  load_dsos = 1 
)
virtual OP_CommandManager::~OP_CommandManager ( )
virtual

Member Function Documentation

virtual bool OP_CommandManager::buildChanRef ( CH_ChannelRef r,
const CH_Channel chp 
) const
virtual

The following methods are used to build channel references using, nodes, parms or channels. The passed in channel reference r will be filled in with the appropriate data. Return true if success, false otherwise.

Reimplemented from CH_Manager.

virtual bool OP_CommandManager::buildChanRef ( CH_ChannelRef r,
const OP_Node node,
const PRM_Parm parm 
) const
virtual
virtual bool OP_CommandManager::buildChanRef ( CH_ChannelRef r,
const OP_Node node,
const char *  channel_name 
) const
virtual
virtual bool OP_CommandManager::buildChanRef ( CH_ChannelRef r,
const OP_Node node,
const PRM_Parm parm,
int  subindex 
) const
virtual
virtual bool OP_CommandManager::buildChanRef ( CH_ChannelRef r,
const char *  path 
) const
virtual

Use this method to build a channel reference from a channel path.

Reimplemented from CH_Manager.

virtual int OP_CommandManager::compareChanRefs ( const CH_ChannelRef r1,
const CH_ChannelRef r2 
) const
virtual

Returns 0 if r1 and r2 are equal, -1 if r1 < r2 and 1 if r1 > r2.

Reimplemented from CH_Manager.

virtual int OP_CommandManager::compareLayerRefs ( const CH_ChannelRef r1,
const CH_ChannelRef r2 
) const
virtual

Returns 0 if r1 and r2 are equal, -1 if r1 < r2 and 1 if r1 > r2.

Reimplemented from CH_Manager.

virtual CH_ScriptAccessManager* OP_CommandManager::getAccessManager ( int  thread)
virtual

Reimplemented from CH_Manager.

virtual void OP_CommandManager::getChannelsWithNodeId ( CH_ChannelList chans,
int  node_id 
) const
virtual

Reimplemented from CH_Manager.

virtual void OP_CommandManager::getChanRefPath ( const CH_ChannelRef r,
UT_String path,
bool  use_alias = false 
) const
virtual

Use this method to get the full path of the channel referenced by r.

Reimplemented from CH_Manager.

void OP_CommandManager::getChanRefsPythonListCode ( const CH_ChannelRefList chanrefs,
UT_WorkBuffer result 
)

Returns Python code representing the list of channel references.

virtual CH_Channel* OP_CommandManager::getChRefChannel ( const CH_ChannelRef r) const
virtual

Use this method to translate a channel reference to a channel pointer. May return NULL if the channel reference does not reference a valid channel.

Reimplemented from CH_Manager.

virtual void OP_CommandManager::getChRefData ( const CH_ChannelRef r,
OP_Node **  pnode,
CH_Channel **  pchp,
PRM_Parm **  ppparm,
int subindex 
) const
virtual

The following methods are used to extract information from channel references.

virtual PRM_Parm* OP_CommandManager::getChRefFullParm ( const CH_ChannelRef r) const
virtual
virtual OP_Node* OP_CommandManager::getChRefOpNode ( const CH_ChannelRef r) const
virtual
virtual PRM_Parm* OP_CommandManager::getChRefParm ( const CH_ChannelRef r,
int subindex 
) const
virtual
virtual int OP_CommandManager::getChRefParmIndex ( const CH_ChannelRef r,
int subindex 
) const
virtual
static void OP_CommandManager::getChRefUniqueNodes ( const CH_ChannelRefList chanrefs,
UT_ValArray< OP_Node * > &  nodes 
)
static

Returns a list of unique nodes corresponding to the given channel ref list. The order of the nodes will match chanrefs.

bool OP_CommandManager::inTrustedContextForNode ( const OP_Node node,
int  thread 
) const
bool OP_CommandManager::inTrustedContextForNodeContents ( const OP_Node node,
int  thread 
) const
virtual bool OP_CommandManager::isOwnerExposed ( const CH_ChannelRef r) const
virtual

Use this method to determine if the owner of the channel reference is exposed or not.

Reimplemented from CH_Manager.

bool OP_CommandManager::match ( const CH_ChannelRef r,
const char *  patt 
) const

This method will return true if the channel reference r matches the pattern patt, or false otherwise.

virtual bool OP_CommandManager::resolveChanRefExport ( const CH_ChannelRef r,
CH_ChannelRef out_export 
)
virtual

Reimplemented from CH_Manager.


The documentation for this class was generated from the following file: