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

#include <OP_OTLManager.h>

Public Member Functions

 OP_OTLManager ()
 
virtual ~OP_OTLManager ()
 
bool getSaveToHipFile () const
 
void setSaveToHipFile (bool savetohip)
 
bool getSaveUnlockedToHipFile () const
 
void setSaveUnlockedToHipFile (bool saveunlockedtohip)
 
bool getWarnOutOfDateOps () const
 
void setWarnOutOfDateOps (bool warn)
 
bool getWarnDummyOpsOnLoad () const
 
void setWarnDummyOpsOnLoad (bool warn)
 
bool getPreferLatestDate () const
 
void setPreferLatestDate (bool preferlatest)
 
bool getPreferInternal () const
 
void setPreferInternal (bool preferinternal)
 
bool getPreferIndexFile () const
 
void setPreferIndexFile (bool preferindexfile)
 
bool getCreateBackups () const
 
void setCreateBackups (bool createbackups)
 
bool getSafeguardOpDefs () const
 
void setSafeguardOpDefs (bool safeguardopdefs)
 
bool getLeaveDefaultsUnchanged () const
 
void setLeaveDefaultsUnchanged (bool leavedefaultsunchanged)
 
bool getUseOplibrariesFiles () const
 
void setUseOplibrariesFiles (bool useoplibrariesfiles)
 
const UT_StringHoldergetOperatorTypeBarMode () const
 
void setOperatorTypeBarMode (const UT_StringHolder &mode)
 
const UT_StringArraygetAllowedOperatorTypeBarModes () const
 
bool runOTLCallbacks (const char *otl_name, const OP_OTLLibrary *opt_lib, OP_Operator *opt_operator, UT_String &error_out)
 Executes onOTLLoadBegin() for each registered callback and returns the result. More...
 
UT_StringArraygetFailedOTLs ()
 Gets the list of otls that have tried to load and failed. More...
 
void clearFailedOTLList ()
 Reset the list of failed otls. More...
 
bool loadOpLibrariesFile (UT_IStream &is, const char *metasrc, int &libpos)
 
bool saveInternalMetaFile (std::ostream &os, const char *prefix=0) const
 
void setLibraryPreference (const char *tablename, const char *opname, const char *libfile)
 
void setLibraryPreferencesIfRequired (int index)
 
const char * getLibraryPreference (const char *tablename, const char *opname) const
 
void clearLibraryPreferences (bool refreshlibs)
 Clear all explicit preferences. More...
 
bool loadLibraryPreferences (UT_IStream &is)
 Functions to save and load the preferred OTL information. More...
 
void saveLibraryPreferences (std::ostream &os, bool includeinternal=true, bool protectstrings=false) const
 
const UT_StringHoldergetMetaSourceName (OP_OTLLibrary *lib, bool withpath=true) const
 Returns the descriptive name for a particular meta source. More...
 
void getMetaSourceName (const char *metasrc, UT_String &metasrcname, bool withpath=true) const
 
bool setMetaSourceName (const char *metasrc, const char *metasrcname)
 
bool getIsPerformingAtomicAddRemove () const
 
bool getIsPerformingRefreshAll () const
 
bool getIsCreatingNewHDA () const
 Returns true if the manager is in teh process of creating a new HDA. More...
 
void loadAutoOTLs ()
 Basic operations of adding and removing libraries. More...
 
void installLibrary (char const *lib_filepath, char const *oplib_filepath=nullptr)
 
int findLibrary (const char *libfile, const char *metasrc=0) const
 
int findNextLibrary (const char *libfile, int after) const
 
bool refreshLibrary (int index, bool force=true)
 
bool removeLibrary (const char *libfile, const char *metasrc, bool changeoplibraries)
 
bool removeMetaSource (const char *metasrc)
 
void refreshAll (bool reloadOpLibraries)
 
OP_OTLLibraryaddLibrary (const char *libfile, const char *metasrc, bool changeoplibraries, bool installinternaliffail, UT_WorkBuffer &errors)
 
int getNumLibraries () const
 
int getPreferredLibrary (const char *tablename, const char *opname)
 
OP_OTLLibrarygetLibrary (int index) const
 
int getLatestLibrary (const char *tablename, const char *opname, OP_OTLLibrary *tiegoesto=0)
 
bool getOutOfDateInternalOps (UT_StringArray &ops)
 
int getNextLibrary (const char *tablename, const char *opname, OP_OTLLibrary *startat)
 
bool addToLibrary (const char *libfile, OP_OTLDefinition &definition, FS_IndexFile *deffile, bool dummydefinition=false, bool create_op_type=false, bool create_backup=true)
 
bool mergeLibraries (const char *primary, const char *secondary, bool overwrite)
 
bool addToInternalLibrary (OP_OTLLibrary *newlib)
 
bool addToInternalLibrary (UT_IStream &is, time_t modtime)
 
bool removeFromLibrary (const char *libfile, const UT_StringArray &ops)
 
bool touchDefinition (const char *libfile, const char *tablename, const char *opname, int newtime=-1)
 
void saveOpTypeFromNode (OP_Node *node, UT_String &errors)
 A utility function for saving the operator definition for a given node. More...
 
void updateContentsFromNode (FS_IndexFile *deffile, OP_Node *node, UT_CompressionType compressionType, bool compilebasic, bool compilevopnets, bool compilechannels, bool compilenodenames, const char *library, bool blackbox=false)
 
void updateDefinitionFromNode (FS_IndexFile *deffile, OP_Node *node, bool lockcontents, bool usedsparms, UT_CompressionType compressionType, bool savespareparms, bool compile_asset, const char *library, bool blackbox=false)
 
void setContentsCompression (FS_IndexFile *deffile, UT_CompressionType compressionType)
 
bool getComment (FS_IndexFile *deffile, UT_String &result)
 
void setComment (FS_IndexFile *deffile, const char *comment)
 
bool getVersion (FS_IndexFile *deffile, UT_String &result)
 
void setVersion (FS_IndexFile *deffile, const char *version)
 
void listLibraries (std::ostream &os) const
 Functions for listing information about libraries and ops. More...
 
void listLibrariesWithDefinition (const char *tablename, const char *opname, std::ostream &os) const
 
void listOperators (const char *libfile, std::ostream &os) const
 
void listOperator (const char *libfile, const char *tablename, const char *opname, const char *format, std::ostream &os) const
 
void getLibrariesWithDefinition (const char *tablename, const char *opname, UT_ValArray< OP_OTLLibrary * > &list)
 
bool getAllMatchingOperators (const char *opmask, const OP_OTLLibrary *library, bool onlyotlops, UT_StringArray &results, UT_StringSet &resultstable) const
 
void addManagerSink (OP_OTLManagerSink *sink)
 Functions for handling our interests. More...
 
void removeManagerSink (OP_OTLManagerSink *sink)
 
bool checkValidNodeName (const char *name, OP_OperatorTable *table, UT_WorkBuffer &errors)
 Checks if the given table and operator type name are valid. More...
 
bool createOptype (OP_OTLDefinition &def, const char *installpath, const char *extradsinfo, const char *installmetasrc, const UT_StringMap< UT_StringHolder > &extrasections, UT_WorkBuffer &errors, bool create_backup=true)
 Creates a new operator type in an OTL, and installs that OTL. More...
 
bool createOptype (const char *tablename, const char *opname, const char *oplabel, const char *installpath, int min_input, int max_input, int max_outputs, const char *extradsinfo, const char *installmetasrc, const char *extrainfo, bool subnet, UT_WorkBuffer &errors, bool create_backup=true)
 Creates a new operator type in an OTL, and installs that OTL. More...
 
void fullyQualifyMetaSrcName (const char *libfilebase, UT_String &libfile) const
 
void getSimplifiedPath (UT_String &destpath, const char *srcpath, const char *srcmeta) const
 
bool canSavePreferences () const
 
void pushFallbackLibraryContext ()
 
void popFallbackLibraryContext ()
 
void saveFallbackLibraryPaths (std::ostream &os, const OP_OperatorList &ops) const
 
bool loadFallbackLibraryPaths (UT_IStream &is)
 
bool loadFallbackLibrary (const char *tablename, const char *opname)
 
void setDummyDefinition (const OP_OTLDefinition &definition, const FS_IndexFile *deffile)
 
bool getDummyDefinition (const OP_Operator *op, FS_IndexFile *deffile) const
 
bool loadDummyDefinitions (UT_IStream &is, time_t modtime)
 
void saveDummyDefinitions (std::ostream &os, const OP_OperatorList &ops) const
 
void refreshLicenses ()
 
const UT_StringgetInternalTempFile () const
 
bool hasNCAsset (const OP_OTLLibrary *lib)
 
void getNCAssets (const OP_OTLLibrary *lib, UT_IntArray &nc_assets)
 
void setSaveOpTypeCallback (OP_SaveOpTypeCallback cb)
 Only called by FUSE_AssetsMenu to clean dirty flags of assets. More...
 
bool convertLibraryToFile (const char *libfilebase, const char *metasrcbase)
 Convert libraries between different formats. More...
 
bool convertLibraryToDir (const char *libfilebase, const char *metasrcbase)
 

Static Public Member Functions

static void registerOTLLoadCallback (OP_OTLLoadCallback *cb)
 
static bool addToLibrary (OP_OTLLibrary *lib, OP_OTLDefinition &definition, FS_IndexFile *deffile, bool dummydefinition=false)
 
static void modifyDefinitionToInternalPaths (OP_OTLDefinition &def, FS_IndexFile *deffile)
 
static bool getHelpTemplateFile (UT_String &helptemplatefile)
 
static void createDefaultOptypeName (OP_Node *fromnode, UT_String &name, UT_String &label)
 
static void createOptypeLabelFromName (UT_String name, UT_String &label)
 
static void createOptypeNameFromLabel (UT_String label, UT_String &name)
 
static void fullyQualifyLibFileName (const char *libfilebase, UT_String &libfile, const char *basedir=0)
 
static void saveDefaultDialogScript (std::ostream &os, const char *opname, const char *oplabel, const char *extradsinfo)
 Saves an empty (but valid) dialog script to a stream. More...
 
static void saveDefaultCreationScript (std::ostream &os, const char *op, const char *table)
 Saves a default, do-nothing creation script to a stream. More...
 
static void writeOutDefinitionContents (const OP_OTLDefinition &definition, FS_IndexFile &contents, std::ostream &os)
 
static void setFilters (const OP_OTLDefinition &definition, FS_IndexFile &contents)
 Sets the encryption and decryption filters on the contents. More...
 

Friends

class RefreshScope
 

Detailed Description

Definition at line 71 of file OP_OTLManager.h.

Constructor & Destructor Documentation

OP_OTLManager::OP_OTLManager ( )
virtual OP_OTLManager::~OP_OTLManager ( )
virtual

Member Function Documentation

OP_OTLLibrary* OP_OTLManager::addLibrary ( const char *  libfile,
const char *  metasrc,
bool  changeoplibraries,
bool  installinternaliffail,
UT_WorkBuffer errors 
)

This function adds the libfile to the specified metasrc if it isn't there already (or moves it to the specified position if it is there). This is the function external callers should always use.

void OP_OTLManager::addManagerSink ( OP_OTLManagerSink sink)

Functions for handling our interests.

bool OP_OTLManager::addToInternalLibrary ( OP_OTLLibrary newlib)

These functions are for maintaining our one "internal" library. This library is where we keep op definitions that have been loaded form the hip file, or definitions that we want to uninstall but couldn't because of existing operators of that type.

bool OP_OTLManager::addToInternalLibrary ( UT_IStream is,
time_t  modtime 
)
static bool OP_OTLManager::addToLibrary ( OP_OTLLibrary lib,
OP_OTLDefinition definition,
FS_IndexFile deffile,
bool  dummydefinition = false 
)
static

Adds an operator definition to an existing library, or creates a new library file if necessary.

bool OP_OTLManager::addToLibrary ( const char *  libfile,
OP_OTLDefinition definition,
FS_IndexFile deffile,
bool  dummydefinition = false,
bool  create_op_type = false,
bool  create_backup = true 
)
bool OP_OTLManager::canSavePreferences ( ) const
bool OP_OTLManager::checkValidNodeName ( const char *  name,
OP_OperatorTable table,
UT_WorkBuffer errors 
)

Checks if the given table and operator type name are valid.

void OP_OTLManager::clearFailedOTLList ( )

Reset the list of failed otls.

void OP_OTLManager::clearLibraryPreferences ( bool  refreshlibs)

Clear all explicit preferences.

bool OP_OTLManager::convertLibraryToDir ( const char *  libfilebase,
const char *  metasrcbase 
)
bool OP_OTLManager::convertLibraryToFile ( const char *  libfilebase,
const char *  metasrcbase 
)

Convert libraries between different formats.

static void OP_OTLManager::createDefaultOptypeName ( OP_Node fromnode,
UT_String name,
UT_String label 
)
static
bool OP_OTLManager::createOptype ( OP_OTLDefinition def,
const char *  installpath,
const char *  extradsinfo,
const char *  installmetasrc,
const UT_StringMap< UT_StringHolder > &  extrasections,
UT_WorkBuffer errors,
bool  create_backup = true 
)

Creates a new operator type in an OTL, and installs that OTL.

bool OP_OTLManager::createOptype ( const char *  tablename,
const char *  opname,
const char *  oplabel,
const char *  installpath,
int  min_input,
int  max_input,
int  max_outputs,
const char *  extradsinfo,
const char *  installmetasrc,
const char *  extrainfo,
bool  subnet,
UT_WorkBuffer errors,
bool  create_backup = true 
)

Creates a new operator type in an OTL, and installs that OTL.

static void OP_OTLManager::createOptypeLabelFromName ( UT_String  name,
UT_String label 
)
static
static void OP_OTLManager::createOptypeNameFromLabel ( UT_String  label,
UT_String name 
)
static
int OP_OTLManager::findLibrary ( const char *  libfile,
const char *  metasrc = 0 
) const
int OP_OTLManager::findNextLibrary ( const char *  libfile,
int  after 
) const
static void OP_OTLManager::fullyQualifyLibFileName ( const char *  libfilebase,
UT_String libfile,
const char *  basedir = 0 
)
static
void OP_OTLManager::fullyQualifyMetaSrcName ( const char *  libfilebase,
UT_String libfile 
) const
bool OP_OTLManager::getAllMatchingOperators ( const char *  opmask,
const OP_OTLLibrary library,
bool  onlyotlops,
UT_StringArray results,
UT_StringSet resultstable 
) const

Get a list of all operators (in tablename/optypenae form) that match the passed in mask, which may contain wildcards. Before adding a result to the array, it checks the symbol table to see if the result has already been found. The tablename/optype string is added to the results array. If a library pointer is passed in, only that library is searched. Optypes found in that library do not need to be installed or current in the Houdini session. If no library is passed in all current definitions are searched, and all non-current definitions are ignored (so there can be no confusion about which instance of an optype definition was found. Returns true if some matching optype was found (even if that optype wasn't added because of it already being in the symbol table).

const UT_StringArray& OP_OTLManager::getAllowedOperatorTypeBarModes ( ) const
bool OP_OTLManager::getComment ( FS_IndexFile deffile,
UT_String result 
)

Utility functions for getting/setting the comment and version data in an operator type definition index file.

bool OP_OTLManager::getCreateBackups ( ) const
bool OP_OTLManager::getDummyDefinition ( const OP_Operator op,
FS_IndexFile deffile 
) const
UT_StringArray& OP_OTLManager::getFailedOTLs ( )

Gets the list of otls that have tried to load and failed.

static bool OP_OTLManager::getHelpTemplateFile ( UT_String helptemplatefile)
static
const UT_String& OP_OTLManager::getInternalTempFile ( ) const

Get the real file name that is presently being used for the Embedded library. This should be used very carefully, and the value should not be stored, because it will change anytime a definition is added to or removed from the Embedded library.

bool OP_OTLManager::getIsCreatingNewHDA ( ) const

Returns true if the manager is in teh process of creating a new HDA.

bool OP_OTLManager::getIsPerformingAtomicAddRemove ( ) const

Returns true if we are adding a new instance of an existing library, followed immediately be removing the old copy. If so, we can do some optimizations in OP_Director::definitionsAdded.

bool OP_OTLManager::getIsPerformingRefreshAll ( ) const

Returns true if we are in the middle of a call to refreshAll. If we are, we can optimize out a whole bunch of calls that can be done once at the end of the refresh.

int OP_OTLManager::getLatestLibrary ( const char *  tablename,
const char *  opname,
OP_OTLLibrary tiegoesto = 0 
)

Returns the library that contains the latest (by date) definition for the specified operator.

bool OP_OTLManager::getLeaveDefaultsUnchanged ( ) const
void OP_OTLManager::getLibrariesWithDefinition ( const char *  tablename,
const char *  opname,
UT_ValArray< OP_OTLLibrary * > &  list 
)

Function to get a list of the libraries containing a definition for the specified type.

OP_OTLLibrary* OP_OTLManager::getLibrary ( int  index) const
const char* OP_OTLManager::getLibraryPreference ( const char *  tablename,
const char *  opname 
) const

Gets the preferred library for a particular operator type. Returns null if no preference is set, or the operator type is not known.

const UT_StringHolder& OP_OTLManager::getMetaSourceName ( OP_OTLLibrary lib,
bool  withpath = true 
) const

Returns the descriptive name for a particular meta source.

void OP_OTLManager::getMetaSourceName ( const char *  metasrc,
UT_String metasrcname,
bool  withpath = true 
) const
void OP_OTLManager::getNCAssets ( const OP_OTLLibrary lib,
UT_IntArray nc_assets 
)

Returns an array of asset indices that are non-commercial Note, the library does not have to be loaded yet.

int OP_OTLManager::getNextLibrary ( const char *  tablename,
const char *  opname,
OP_OTLLibrary startat 
)

Returns the next library with a definition for the specified operator. This function loops around to the start of the library list.

int OP_OTLManager::getNumLibraries ( ) const
const UT_StringHolder& OP_OTLManager::getOperatorTypeBarMode ( ) const
bool OP_OTLManager::getOutOfDateInternalOps ( UT_StringArray ops)
bool OP_OTLManager::getPreferIndexFile ( ) const
bool OP_OTLManager::getPreferInternal ( ) const
bool OP_OTLManager::getPreferLatestDate ( ) const
int OP_OTLManager::getPreferredLibrary ( const char *  tablename,
const char *  opname 
)
bool OP_OTLManager::getSafeguardOpDefs ( ) const
bool OP_OTLManager::getSaveToHipFile ( ) const
bool OP_OTLManager::getSaveUnlockedToHipFile ( ) const
void OP_OTLManager::getSimplifiedPath ( UT_String destpath,
const char *  srcpath,
const char *  srcmeta 
) const
bool OP_OTLManager::getUseOplibrariesFiles ( ) const
bool OP_OTLManager::getVersion ( FS_IndexFile deffile,
UT_String result 
)
bool OP_OTLManager::getWarnDummyOpsOnLoad ( ) const
bool OP_OTLManager::getWarnOutOfDateOps ( ) const
bool OP_OTLManager::hasNCAsset ( const OP_OTLLibrary lib)

Checks if the library has a non-commercial (tainted) asset. Note, the library does not have to be loaded yet.

void OP_OTLManager::installLibrary ( char const *  lib_filepath,
char const *  oplib_filepath = nullptr 
)
void OP_OTLManager::listLibraries ( std::ostream &  os) const

Functions for listing information about libraries and ops.

void OP_OTLManager::listLibrariesWithDefinition ( const char *  tablename,
const char *  opname,
std::ostream &  os 
) const
void OP_OTLManager::listOperator ( const char *  libfile,
const char *  tablename,
const char *  opname,
const char *  format,
std::ostream &  os 
) const
void OP_OTLManager::listOperators ( const char *  libfile,
std::ostream &  os 
) const
void OP_OTLManager::loadAutoOTLs ( )

Basic operations of adding and removing libraries.

bool OP_OTLManager::loadDummyDefinitions ( UT_IStream is,
time_t  modtime 
)
bool OP_OTLManager::loadFallbackLibrary ( const char *  tablename,
const char *  opname 
)
bool OP_OTLManager::loadFallbackLibraryPaths ( UT_IStream is)
bool OP_OTLManager::loadLibraryPreferences ( UT_IStream is)

Functions to save and load the preferred OTL information.

bool OP_OTLManager::loadOpLibrariesFile ( UT_IStream is,
const char *  metasrc,
int libpos 
)

Load in the contents of an OPlibraries file. This is public so that when loading a hip file, the OP_Director can use this to parse the .OPlibraries packet.

bool OP_OTLManager::mergeLibraries ( const char *  primary,
const char *  secondary,
bool  overwrite 
)

Take the secondary library and merge it into the primary library, and save the combined file out to the primary library.

static void OP_OTLManager::modifyDefinitionToInternalPaths ( OP_OTLDefinition def,
FS_IndexFile deffile 
)
static

This functions modifies the data in the OTLDefinition so that it will refer to the given index file so that both these elements can be embedded into an OTLLibrary.

void OP_OTLManager::popFallbackLibraryContext ( )
void OP_OTLManager::pushFallbackLibraryContext ( )

Functions for managing fallback libraries. These are libraries that are automatically loaded (as a last resort) if a particular type definition is missing.

The manager maintains a stack of fallback contexts. In general, each fallback context contains the fallback paths specified in a particular file fragment (hip file, digital asset contents section) and remains active until that file fragment is processed by the loading mechanism.

void OP_OTLManager::refreshAll ( bool  reloadOpLibraries)
bool OP_OTLManager::refreshLibrary ( int  index,
bool  force = true 
)
void OP_OTLManager::refreshLicenses ( )

Reload OTL license files, and notify interested parties of the potential for change.

static void OP_OTLManager::registerOTLLoadCallback ( OP_OTLLoadCallback cb)
static

Register a new class to be used as a callback when an OTL library is loaded.

bool OP_OTLManager::removeFromLibrary ( const char *  libfile,
const UT_StringArray ops 
)

Removes some operator definitions from an existing library. We check the file name to determine if we are removing from the internal library, or an external library file.

bool OP_OTLManager::removeLibrary ( const char *  libfile,
const char *  metasrc,
bool  changeoplibraries 
)
void OP_OTLManager::removeManagerSink ( OP_OTLManagerSink sink)
bool OP_OTLManager::removeMetaSource ( const char *  metasrc)
bool OP_OTLManager::runOTLCallbacks ( const char *  otl_name,
const OP_OTLLibrary opt_lib,
OP_Operator opt_operator,
UT_String error_out 
)

Executes onOTLLoadBegin() for each registered callback and returns the result.

static void OP_OTLManager::saveDefaultCreationScript ( std::ostream &  os,
const char *  op,
const char *  table 
)
static

Saves a default, do-nothing creation script to a stream.

static void OP_OTLManager::saveDefaultDialogScript ( std::ostream &  os,
const char *  opname,
const char *  oplabel,
const char *  extradsinfo 
)
static

Saves an empty (but valid) dialog script to a stream.

void OP_OTLManager::saveDummyDefinitions ( std::ostream &  os,
const OP_OperatorList ops 
) const
void OP_OTLManager::saveFallbackLibraryPaths ( std::ostream &  os,
const OP_OperatorList ops 
) const
bool OP_OTLManager::saveInternalMetaFile ( std::ostream &  os,
const char *  prefix = 0 
) const

Saves the .OPlibraries section that will be included in a .hip file. This file must be different from the one above because it has to skip the internal hip file library.

void OP_OTLManager::saveLibraryPreferences ( std::ostream &  os,
bool  includeinternal = true,
bool  protectstrings = false 
) const
void OP_OTLManager::saveOpTypeFromNode ( OP_Node node,
UT_String errors 
)

A utility function for saving the operator definition for a given node.

void OP_OTLManager::setComment ( FS_IndexFile deffile,
const char *  comment 
)
void OP_OTLManager::setContentsCompression ( FS_IndexFile deffile,
UT_CompressionType  compressionType 
)

A utility functino to make sure that the Contents section of the given file is either compressed or not, as set by gzipcontents.

void OP_OTLManager::setCreateBackups ( bool  createbackups)
void OP_OTLManager::setDummyDefinition ( const OP_OTLDefinition definition,
const FS_IndexFile deffile 
)

Functions for managing the dummy definitions for each operator. The dummy definition is just a dialog script copied from the last time the operator was loaded. It is retrieved if no other definition for the operator is available. It should be enough information to load and re-save a hip file containing an unknown operator type without losing any information.

static void OP_OTLManager::setFilters ( const OP_OTLDefinition definition,
FS_IndexFile contents 
)
static

Sets the encryption and decryption filters on the contents.

void OP_OTLManager::setLeaveDefaultsUnchanged ( bool  leavedefaultsunchanged)
void OP_OTLManager::setLibraryPreference ( const char *  tablename,
const char *  opname,
const char *  libfile 
)

Picks a particular OTL to be the preferred library for a particular operator type. Returns true if the operator type exists in an OTL. Even if we return false, we keep the information in case this operator type gets loaded later. WARNING: This method may reload libraries, so holding OP_OTLLibrary pointers across this call is unsafe.

void OP_OTLManager::setLibraryPreferencesIfRequired ( int  index)

Sets the preference on all assets in the supplied library if they are not already the current definition. WARNING: This method may reload libraries, so holding OP_OTLLibrary pointers across this call is unsafe.

bool OP_OTLManager::setMetaSourceName ( const char *  metasrc,
const char *  metasrcname 
)
void OP_OTLManager::setOperatorTypeBarMode ( const UT_StringHolder mode)
void OP_OTLManager::setPreferIndexFile ( bool  preferindexfile)
void OP_OTLManager::setPreferInternal ( bool  preferinternal)
void OP_OTLManager::setPreferLatestDate ( bool  preferlatest)
void OP_OTLManager::setSafeguardOpDefs ( bool  safeguardopdefs)
void OP_OTLManager::setSaveOpTypeCallback ( OP_SaveOpTypeCallback  cb)
inline

Only called by FUSE_AssetsMenu to clean dirty flags of assets.

Definition at line 469 of file OP_OTLManager.h.

void OP_OTLManager::setSaveToHipFile ( bool  savetohip)
void OP_OTLManager::setSaveUnlockedToHipFile ( bool  saveunlockedtohip)
void OP_OTLManager::setUseOplibrariesFiles ( bool  useoplibrariesfiles)
void OP_OTLManager::setVersion ( FS_IndexFile deffile,
const char *  version 
)
void OP_OTLManager::setWarnDummyOpsOnLoad ( bool  warn)
void OP_OTLManager::setWarnOutOfDateOps ( bool  warn)
bool OP_OTLManager::touchDefinition ( const char *  libfile,
const char *  tablename,
const char *  opname,
int  newtime = -1 
)

Update the date stamp for the specified definition to be the current date. Do a refresh of the library if it is loaded.

void OP_OTLManager::updateContentsFromNode ( FS_IndexFile deffile,
OP_Node node,
UT_CompressionType  compressionType,
bool  compilebasic,
bool  compilevopnets,
bool  compilechannels,
bool  compilenodenames,
const char *  library,
bool  blackbox = false 
)

A utility function for updating the Contents section of an asset definition based on a particular OP_Node. The compile flags can be used to control whether the contents are compiled

void OP_OTLManager::updateDefinitionFromNode ( FS_IndexFile deffile,
OP_Node node,
bool  lockcontents,
bool  usedsparms,
UT_CompressionType  compressionType,
bool  savespareparms,
bool  compile_asset,
const char *  library,
bool  blackbox = false 
)

A utility function for updating an operator definition based on a particular OP_Node.

static void OP_OTLManager::writeOutDefinitionContents ( const OP_OTLDefinition definition,
FS_IndexFile contents,
std::ostream &  os 
)
static

Writes the index file 'contents' to the output stream 'os'. Ensures that the filtering options (ie encryption) are set correctly on the index file before it is written out.

Friends And Related Function Documentation

friend class RefreshScope
friend

Definition at line 488 of file OP_OTLManager.h.


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