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

#include <CH_Channel.h>

Classes

class  ConstIntervalIter
 Const iterator over an interval. More...
 
class  IntervalIter
 Iterator over an interval. More...
 

Public Types

enum  SnapType { SNAP_SNAP, SNAP_SNAP_AND_DELETE, SNAP_REPLACE, SNAP_REPLACE_DOUBLE }
 

Public Member Functions

 CH_Channel (CH_Collection *dad, const UT_StringHolder &name, fpreal default_value=0, const char *default_string=nullptr, bool temporary=false)
 
 CH_Channel (CH_Collection *dad, const CH_Channel &from)
 
 CH_Channel (CH_Collection *dad, const CH_Channel &from, bool temporary)
 
 ~CH_Channel ()
 
void initializeFirstSegment (const char *expr, CH_ExprLanguage language)
 
void initializeSegmentParents ()
 
void clear ()
 Clear everything, even the defaults. More...
 
void swap (CH_Channel &other)
 
const UT_StringHoldergetName () const
 
const UT_StringHoldergetAlias () const
 
void getFullPath (UT_String &path) const
 
void getFullPath (UT_StringHolder &path) const
 
void setName (const UT_StringHolder &s)
 
void setAlias (const UT_StringHolder &s)
 
CH_ManagergetManager () const
 
fpreal getTolerance () const
 
bool isTimeDependent () const
 
bool isTimeDependentSlow (int thread) const
 
bool isStringTimeDependentSlow (int thread) const
 
bool hasNonIntegerKeys () const
 
bool isDataDependent (fpreal gtime) const
 
bool hasOnlyOneSegment () const
 
bool isRotationChannel () const
 
bool getSurroundingSegs (fpreal gtime, CH_Segment *&left, CH_Segment *&right) const
 
CH_SegmentgetSegmentAfterKey (fpreal gtime) const
 
bool isAtKey (fpreal gtime) const
 
bool isAtHardKey (fpreal gtime) const
 
bool isAtHardKeyframe (int frame) const
 
fpreal findKey (fpreal gtime, fpreal direction) const
 
int findKeyframe (int frame, int direction) const
 
void sampleValueSlope (CH_Segment *seg, fpreal gtime, int thread, fpreal &v, fpreal &s)
 
bool sampleVSA (CH_Segment *seg, fpreal gtime, int thread, fpreal &v, fpreal &s, fpreal a[2])
 
void sampleKey (CH_Segment *seg, fpreal gtime, int thread, CH_Key &key)
 
bool getKey (fpreal gtime, CH_Key &key, bool accel_ratios=true, CH_GetKeyExtend extend=CH_GETKEY_EXTEND_NONE)
 
bool getFullKey (fpreal gtime, CH_FullKey &key, bool reverse=false, bool accel_ratios=true, CH_GetKeyExtend extend=CH_GETKEY_EXTEND_NONE)
 
bool getReversibleKey (fpreal gtime, CH_ReversibleKey &key)
 
void putKey (fpreal gtime, CH_Key const &key, bool accel_ratios, bool apply_auto_slope, bool update_fake_slope_accel_handles)
 
void putFullKey (fpreal gtime, CH_FullKey const &key, bool accel_ratios, bool apply_auto_slope, bool update_fake_slope_accel_handles)
 
void putKey (fpreal gtime, CH_Key const &key, bool accel_ratios=true, bool apply_auto_slope=true)
 
void putFullKey (fpreal gtime, CH_FullKey const &key, bool accel_ratios=true, bool apply_auto_slope=true)
 
void transferKey (fpreal to_time, CH_Channel *from_chp, fpreal from_time)
 
void applyPendingToKey (CH_Key &key, fpreal gtime)
 
void applyDefaultSlopeToKey (CH_Key &key)
 
void insertKeyFrame (fpreal global_t, bool use_auto_slope_pref=true)
 Insert key at given time. More...
 
void destroyKeyFrame (fpreal global_t)
 Delete key at given time. More...
 
void moveKeyFrame (fpreal old_gtime, fpreal new_gtime)
 
void saveKeyFrameForUndo (fpreal global_t)
 
void saveForUndo ()
 
int setKeyValue (fpreal val, fpreal gtime, bool set_pending=false, bool commit_keys=true, bool propagate=true)
 
int setKeyString (const UT_String &str, fpreal gtime, bool set_pending=false, bool commit_keys=true, bool propagate=true)
 
int setKeyString (const UT_String &str, fpreal gtime, CH_ExprLanguage language, bool set_pending=false, bool commit_keys=true, bool propagate=true)
 
void holdValue (fpreal gtime, int thread)
 
void getKeyFrames (const UT_SuperIntervalR &range, UT_Array< int > &frames, bool error_frames_only)
 
void getKeyTimes (const UT_SuperIntervalR &range, UT_Array< fpreal > &times, bool error_frames_only)
 
void getDisabledFrames (UT_Array< int > &frames, int minframe, int maxframe)
 
CH_SegmentgetExpressionSegment (fpreal gtime) const
 
const char * getExpression (fpreal gtime) const
 
bool changeExpression (fpreal gtime, const char *expr, CH_ExprLanguage language, bool convert_accels)
 
CH_ExprLanguage getCollectionExprLanguage () const
 
CH_ExprLanguage getExprLanguageAtTime (fpreal time) const
 
void setExprLanguage (CH_ExprLanguage language)
 
void setExprLanguageAtTime (CH_ExprLanguage language, fpreal time)
 
CH_StringMeaning getStringMeaning (fpreal time) const
 
void clearSegments ()
 
void deleteKeys (UT_SuperIntervalR const &range)
 Delete keys in given range. More...
 
void deleteKeys (const UT_Array< int > &ascending_sorted_key_indices)
 
void moveFrames (const UT_Array< int > &frames, int amount)
 
bool copyRangeOverwritesKeys (const CH_Channel &src, UT_SuperIntervalR const &range, UT_IntervalR const &to_range)
 
bool copyRangeOverwritesFrames (const CH_Channel &src, UT_SuperIntervalR const &range, UT_IntervalR const &to_range)
 
bool copyRangeOverwrites (const CH_Channel &src, UT_SuperIntervalR const &range, UT_IntervalR const &to_range)
 
void copyRange (const CH_Channel &src, UT_SuperIntervalR const &range, UT_IntervalR const &to_range, bool apply_auto_slope=true)
 
void copyRangeFrames (const CH_Channel &src, const UT_SuperIntervalR &range, const UT_IntervalR &to_range, const UT_Array< int > *frames=nullptr)
 
void deleteRangeFrames (UT_SuperIntervalR const &range, const UT_Array< int > *frames=nullptr)
 
void copyContents (const CH_Channel &from)
 
void swapContents (CH_Channel &other)
 
void copyRange (const CH_Channel &src, fpreal global_start, fpreal global_end)
 
void snapKeysInRange (const UT_SuperIntervalR &range, SnapType type=SNAP_SNAP, std::ostream *os=nullptr)
 
void scroll (fpreal new_start, bool update=true)
 
void stretch (fpreal new_start, fpreal new_end)
 
void reverse (fpreal gstart=0, fpreal gend=0, bool whole_chan=true)
 
bool increaseKeyValues (fpreal delta)
 
bool isAllDisabled () const
 
bool isAllEnabled () const
 
bool isDisabled (fpreal gtime) const
 
void disableAll (fpreal gtime)
 
void enableAll ()
 
void disable (fpreal gstart, fpreal gend)
 
void enable (fpreal gstart, fpreal gend)
 
SYS_FORCE_INLINE bool isPending () const
 
bool isPending (fpreal gtime) const
 
bool isPendingLocal (fpreal ltime) const
 
void clearPending ()
 
void updatePending (fpreal gtime)
 
fpreal getPendingEvalTime () const
 
SYS_FORCE_INLINE bool isPendingHold () const
 
void setPendingHold (bool state)
 
void save (std::ostream &os, bool binary, bool compiled, bool pending_state) const
 
template<typename FPREAL_TYPE >
bool load (UT_IStream &is)
 
void display () const
 
void displayAsKeys () const
 
void setDefaultValue (fpreal dv)
 
fpreal getDefaultValue () const
 
void setDefaultString (const UT_StringHolder &dv)
 
const UT_StringHoldergetDefaultString () const
 
void setChannelLeftType (CH_ChannelBehavior t)
 
void setChannelRightType (CH_ChannelBehavior t)
 
CH_ChannelBehavior getChannelLeftType () const
 
CH_ChannelBehavior getChannelRightType () const
 
void setCollection (CH_Collection *chp)
 
const CH_CollectiongetCollection () const
 
CH_CollectiongetCollection ()
 
void setIsTemporary (bool temp)
 
bool isTemporary () const
 
void setChangeActive (int state)
 
bool isChangeActive () const
 
bool getLocked () const
 
void setLocked (bool f)
 
int getChanged () const
 
void setChanged (bool on, CH_CHANGE_TYPE type=CH_CHANNEL_CHANGED)
 
void dirtyExprCache ()
 
int canAccess (uint mask) const
 
fpreal localTime (fpreal t) const
 
fpreal globalTime (fpreal t) const
 
fpreal getStart () const
 
fpreal getEnd () const
 
fpreal getLength () const
 
void unresolveLocalVars (int thread)
 
void buildOpDependencies (void *ref_id, int thread)
 
void changeOpRef (const char *new_fullpath, const char *old_fullpath, const char *old_cwd, const char *chan_name, const char *old_chan_name, int thread)
 
void cook (int state)
 
int setRawValues (fpreal from, fpreal to, fpreal *vals, int nsamples)
 
int setRawValues (fpreal *times, fpreal *vals, int n)
 
void setScope (bool on_off)
 
bool isScoped () const
 
bool isEditable ()
 
fpreal evaluate (fpreal t, bool no_disabling, int thread)
 
void evaluate (fpreal from, fpreal to, fpreal *vals, int nsamples, bool no_disabling, bool use_cache, int thread)
 
fpreal evaluateSegment (CH_Segment *eval, fpreal localtime, bool extend, int thread)
 
void evaluateString (UT_String &result, fpreal t, int thread)
 
void evaluateStringSegment (UT_String &result, CH_Segment *eval, fpreal localtime, bool extend, int thread)
 
int findString (const char *str, bool fullword, bool usewildcards) const
 
int changeString (const char *from, const char *to, bool fullword, bool update, int thread)
 
const CH_SegmentgetEvaluationSegment (int thread) const
 
CH_SegmentgetEvaluationSegment (int thread)
 
const CH_SegmentgetPrevEvaluationSegment (int thread) const
 
CH_SegmentgetPrevEvaluationSegment (int thread)
 
const CH_SegmentgetNextEvaluationSegment (int thread) const
 
CH_SegmentgetNextEvaluationSegment (int thread)
 
fpreal getInTime (int thread) const
 
fpreal getOutTime (int thread) const
 
fpreal getPrevInTime (int thread) const
 
fpreal getNextOutTime (int thread) const
 
int match (const char *pattern) const
 
void setConstantValue (fpreal value)
 
bool fitToPointData (UT_Vector2R *data, int n_pts, bool preserve_extrema, fpreal error2=0.01f, bool delete_old_segments=false)
 
void refit (fpreal tolerance, bool preserve_extrema)
 
void refit (fpreal tolerance, bool preserve_extrema, fpreal from_gtime, fpreal to_gtime, bool delete_old_segments)
 
bool setKeys (fpreal *new_key_values, int num_keys, fpreal global_start, fpreal time_delta, bool smooth_slopes=true, bool clear=false, bool notify=true)
 
bool isEmpty () const
 
int getNSegments () const
 
int getNKeys () const
 
int getNKeysBefore (fpreal gtime) const
 
int getNKeysBeforeOrAt (fpreal gtime) const
 
fpreal getKeyTime (unsigned idx) const
 
unsigned getSegmentIdx (fpreal local_time) const
 
CH_SegmentgetSegment (unsigned idx) const
 
CH_SegmentgetSegment (fpreal local_time) const
 
CH_SegmentgetNextSegment (unsigned idx) const
 
CH_SegmentgetPrevSegment (unsigned idx) const
 
CH_SegmentgetFirstSegment () const
 
CH_SegmentgetLastSegment () const
 
int64 getMemoryUsage (bool inclusive) const
 
void changeSegLength (CH_Segment *seg, fpreal gtime, CH_SegmentScale how=CH_SCALE_ANY, bool adjust_and_update=true)
 
bool getHaveCompiledExpressions () const
 
bool verify ()
 
bool verify (bool verify_tied_values)
 
void saveSnapshot ()
 
void undoSnapshot (CH_Channel *previous, bool previous_snapshot_cleared)
 
bool loadSnapshot ()
 
bool swapSnapshot ()
 
bool clearSnapshot ()
 
CH_ChannelgetSnapshotChannel ()
 
void smoothAutoSlopesForSegments (UT_RLEBitArray &slope_flags, bool force=false, fpreal max_delta=-1)
 
void smoothAutoSlopes ()
 
void smoothAutoSlopes (fpreal global_time, fpreal delta=-1, bool value_changed=true)
 
void smoothAutoSlopes (CH_Segment *seg)
 Smooths slopes of keys at both ends of a segment. More...
 
void setLayerScope (bool on_off)
 
bool isLayerScoped () const
 
void setCaptureCopiedKeys (UT_Array< fpreal > *capture_array)
 
void putChFullKey (fpreal gtime, CH_FullKey const &key, bool accel_ratios=true)
 
fpreal evaluateSegment (CH_Segment &eval, fpreal localtime, bool extend, int thread)
 
fpreal evaluateSegment (CH_Segment &eval, fpreal localtime, int thread)
 
fpreal evaluateSegment (CH_Segment *eval, fpreal localtime, int thread)
 
fpreal evaluateSegmentExtend (CH_Segment *eval, fpreal localtime, int thread)
 
fpreal evaluateSegmentExtend (CH_Segment &eval, fpreal localtime, int thread)
 
fpreal evaluateSegmentSlope (CH_Segment *eval, fpreal localtime, int thread)
 
fpreal evaluateSegmentSlopeApprox (CH_Segment *eval, fpreal localtime, int thread)
 
bool isSimpleChannel () const
 
CL_SimpleChannel asSimpleChannel () const
 
void fromSimpleChannel (const CL_SimpleChannel &sc)
 Clears this channel and sets it from the given simple channel. More...
 
void clear (bool clear_defaults)
 
IntervalIter intervalIter (const UT_SuperIntervalR &range, const bool ascending=true) const
 
ConstIntervalIter constIntervalIter (const UT_SuperIntervalR &range, const bool ascending=true) const
 

Static Public Member Functions

static const char * getChannelTypeName (CH_ChannelBehavior type)
 
static fpreal getGlueIV (int thread)
 
static void getGlueTime (fpreal &t, fpreal &t0, fpreal &t1, fpreal &v0, fpreal &v1, int thread)
 
static void getGlueSlope (fpreal *m0, fpreal *m1, fpreal *a0, fpreal *a1, int thread)
 

Public Attributes

class CH_API ConstIntervalIter
 
class CH_API IntervalIter
 

Friends

class CH_BatchModifyScope
 

Detailed Description

Definition at line 170 of file CH_Channel.h.

Member Enumeration Documentation

Enumerator
SNAP_SNAP 
SNAP_SNAP_AND_DELETE 
SNAP_REPLACE 
SNAP_REPLACE_DOUBLE 

Definition at line 173 of file CH_Channel.h.

Constructor & Destructor Documentation

CH_Channel::CH_Channel ( CH_Collection dad,
const UT_StringHolder name,
fpreal  default_value = 0,
const char *  default_string = nullptr,
bool  temporary = false 
)
CH_Channel::CH_Channel ( CH_Collection dad,
const CH_Channel from 
)
CH_Channel::CH_Channel ( CH_Collection dad,
const CH_Channel from,
bool  temporary 
)
CH_Channel::~CH_Channel ( )

Member Function Documentation

void CH_Channel::applyDefaultSlopeToKey ( CH_Key key)
void CH_Channel::applyPendingToKey ( CH_Key key,
fpreal  gtime 
)
CL_SimpleChannel CH_Channel::asSimpleChannel ( ) const

Constructs and returns a simple channel from this channel Converts all the segments to CL_SimpleSegments

void CH_Channel::buildOpDependencies ( void ref_id,
int  thread 
)
int CH_Channel::canAccess ( uint  mask) const
inline

Definition at line 526 of file CH_Channel.h.

bool CH_Channel::changeExpression ( fpreal  gtime,
const char *  expr,
CH_ExprLanguage  language,
bool  convert_accels 
)
void CH_Channel::changeOpRef ( const char *  new_fullpath,
const char *  old_fullpath,
const char *  old_cwd,
const char *  chan_name,
const char *  old_chan_name,
int  thread 
)
void CH_Channel::changeSegLength ( CH_Segment seg,
fpreal  gtime,
CH_SegmentScale  how = CH_SCALE_ANY,
bool  adjust_and_update = true 
)
int CH_Channel::changeString ( const char *  from,
const char *  to,
bool  fullword,
bool  update,
int  thread 
)
void CH_Channel::clear ( )

Clear everything, even the defaults.

void CH_Channel::clear ( bool  clear_defaults)

clear method that can keep the default values.

Parameters
clear_defaults- true to clear myDefValue and myDefString.
void CH_Channel::clearPending ( )
void CH_Channel::clearSegments ( )
bool CH_Channel::clearSnapshot ( )
CH_Channel::ConstIntervalIter CH_Channel::constIntervalIter ( const UT_SuperIntervalR range,
const bool  ascending = true 
) const
inline

Return an iterator for keys within the given interval. If ascending is false, then the iterator is initialized at the end of the range instead of at the beginning of the range.

Definition at line 1190 of file CH_Channel.h.

void CH_Channel::cook ( int  state)
void CH_Channel::copyContents ( const CH_Channel from)
void CH_Channel::copyRange ( const CH_Channel src,
UT_SuperIntervalR const &  range,
UT_IntervalR const &  to_range,
bool  apply_auto_slope = true 
)
void CH_Channel::copyRange ( const CH_Channel src,
fpreal  global_start,
fpreal  global_end 
)
void CH_Channel::copyRangeFrames ( const CH_Channel src,
const UT_SuperIntervalR range,
const UT_IntervalR to_range,
const UT_Array< int > *  frames = nullptr 
)
bool CH_Channel::copyRangeOverwrites ( const CH_Channel src,
UT_SuperIntervalR const &  range,
UT_IntervalR const &  to_range 
)
bool CH_Channel::copyRangeOverwritesFrames ( const CH_Channel src,
UT_SuperIntervalR const &  range,
UT_IntervalR const &  to_range 
)
bool CH_Channel::copyRangeOverwritesKeys ( const CH_Channel src,
UT_SuperIntervalR const &  range,
UT_IntervalR const &  to_range 
)
void CH_Channel::deleteKeys ( UT_SuperIntervalR const &  range)

Delete keys in given range.

void CH_Channel::deleteKeys ( const UT_Array< int > &  ascending_sorted_key_indices)

Delete keys at the given key indices.

Note
Must be sorted in ascending order!
void CH_Channel::deleteRangeFrames ( UT_SuperIntervalR const &  range,
const UT_Array< int > *  frames = nullptr 
)
void CH_Channel::destroyKeyFrame ( fpreal  global_t)

Delete key at given time.

void CH_Channel::dirtyExprCache ( )
void CH_Channel::disable ( fpreal  gstart,
fpreal  gend 
)
void CH_Channel::disableAll ( fpreal  gtime)
void CH_Channel::display ( ) const
void CH_Channel::displayAsKeys ( ) const
void CH_Channel::enable ( fpreal  gstart,
fpreal  gend 
)
void CH_Channel::enableAll ( )
fpreal CH_Channel::evaluate ( fpreal  t,
bool  no_disabling,
int  thread 
)
void CH_Channel::evaluate ( fpreal  from,
fpreal  to,
fpreal vals,
int  nsamples,
bool  no_disabling,
bool  use_cache,
int  thread 
)
fpreal CH_Channel::evaluateSegment ( CH_Segment eval,
fpreal  localtime,
bool  extend,
int  thread 
)
fpreal CH_Channel::evaluateSegment ( CH_Segment eval,
fpreal  localtime,
bool  extend,
int  thread 
)
fpreal CH_Channel::evaluateSegment ( CH_Segment eval,
fpreal  localtime,
int  thread 
)
fpreal CH_Channel::evaluateSegment ( CH_Segment eval,
fpreal  localtime,
int  thread 
)
fpreal CH_Channel::evaluateSegmentExtend ( CH_Segment eval,
fpreal  localtime,
int  thread 
)
fpreal CH_Channel::evaluateSegmentExtend ( CH_Segment eval,
fpreal  localtime,
int  thread 
)
fpreal CH_Channel::evaluateSegmentSlope ( CH_Segment eval,
fpreal  localtime,
int  thread 
)
fpreal CH_Channel::evaluateSegmentSlopeApprox ( CH_Segment eval,
fpreal  localtime,
int  thread 
)
void CH_Channel::evaluateString ( UT_String result,
fpreal  t,
int  thread 
)
void CH_Channel::evaluateStringSegment ( UT_String result,
CH_Segment eval,
fpreal  localtime,
bool  extend,
int  thread 
)
fpreal CH_Channel::findKey ( fpreal  gtime,
fpreal  direction 
) const
int CH_Channel::findKeyframe ( int  frame,
int  direction 
) const
int CH_Channel::findString ( const char *  str,
bool  fullword,
bool  usewildcards 
) const
bool CH_Channel::fitToPointData ( UT_Vector2R data,
int  n_pts,
bool  preserve_extrema,
fpreal  error2 = 0.01f,
bool  delete_old_segments = false 
)
void CH_Channel::fromSimpleChannel ( const CL_SimpleChannel sc)

Clears this channel and sets it from the given simple channel.

const UT_StringHolder& CH_Channel::getAlias ( ) const
inline

Definition at line 203 of file CH_Channel.h.

int CH_Channel::getChanged ( ) const
inline

Definition at line 520 of file CH_Channel.h.

CH_ChannelBehavior CH_Channel::getChannelLeftType ( ) const
inline

Definition at line 494 of file CH_Channel.h.

CH_ChannelBehavior CH_Channel::getChannelRightType ( ) const
inline

Definition at line 495 of file CH_Channel.h.

static const char* CH_Channel::getChannelTypeName ( CH_ChannelBehavior  type)
static
const CH_Collection* CH_Channel::getCollection ( ) const
inline

Definition at line 500 of file CH_Channel.h.

CH_Collection* CH_Channel::getCollection ( )
inline

Definition at line 501 of file CH_Channel.h.

CH_ExprLanguage CH_Channel::getCollectionExprLanguage ( ) const
const UT_StringHolder& CH_Channel::getDefaultString ( ) const
inline

Definition at line 490 of file CH_Channel.h.

fpreal CH_Channel::getDefaultValue ( ) const
inline

Definition at line 485 of file CH_Channel.h.

void CH_Channel::getDisabledFrames ( UT_Array< int > &  frames,
int  minframe,
int  maxframe 
)
fpreal CH_Channel::getEnd ( ) const
inline

Definition at line 542 of file CH_Channel.h.

const CH_Segment* CH_Channel::getEvaluationSegment ( int  thread) const
inline

Definition at line 601 of file CH_Channel.h.

CH_Segment* CH_Channel::getEvaluationSegment ( int  thread)
inline

Definition at line 605 of file CH_Channel.h.

const char* CH_Channel::getExpression ( fpreal  gtime) const
CH_Segment* CH_Channel::getExpressionSegment ( fpreal  gtime) const
CH_ExprLanguage CH_Channel::getExprLanguageAtTime ( fpreal  time) const
CH_Segment* CH_Channel::getFirstSegment ( ) const
inline

Definition at line 696 of file CH_Channel.h.

bool CH_Channel::getFullKey ( fpreal  gtime,
CH_FullKey key,
bool  reverse = false,
bool  accel_ratios = true,
CH_GetKeyExtend  extend = CH_GETKEY_EXTEND_NONE 
)
void CH_Channel::getFullPath ( UT_String path) const
inline

Definition at line 211 of file CH_Channel.h.

void CH_Channel::getFullPath ( UT_StringHolder path) const
inline

Definition at line 215 of file CH_Channel.h.

fpreal CH_Channel::getGlueIV ( int  thread)
inlinestatic

Definition at line 1223 of file CH_Channel.h.

void CH_Channel::getGlueSlope ( fpreal m0,
fpreal m1,
fpreal a0,
fpreal a1,
int  thread 
)
inlinestatic
Examples:
expr/channel.C.

Definition at line 1297 of file CH_Channel.h.

void CH_Channel::getGlueTime ( fpreal t,
fpreal t0,
fpreal t1,
fpreal v0,
fpreal v1,
int  thread 
)
inlinestatic
Examples:
expr/channel.C.

Definition at line 1241 of file CH_Channel.h.

bool CH_Channel::getHaveCompiledExpressions ( ) const
fpreal CH_Channel::getInTime ( int  thread) const
bool CH_Channel::getKey ( fpreal  gtime,
CH_Key key,
bool  accel_ratios = true,
CH_GetKeyExtend  extend = CH_GETKEY_EXTEND_NONE 
)
void CH_Channel::getKeyFrames ( const UT_SuperIntervalR range,
UT_Array< int > &  frames,
bool  error_frames_only 
)
fpreal CH_Channel::getKeyTime ( unsigned  idx) const
inline

Definition at line 987 of file CH_Channel.h.

void CH_Channel::getKeyTimes ( const UT_SuperIntervalR range,
UT_Array< fpreal > &  times,
bool  error_frames_only 
)

Similar to the above, but gets times of all keys in the channel in the specified range.

CH_Segment* CH_Channel::getLastSegment ( ) const
inline

Definition at line 704 of file CH_Channel.h.

fpreal CH_Channel::getLength ( ) const
inline

Definition at line 543 of file CH_Channel.h.

bool CH_Channel::getLocked ( ) const
inline

Definition at line 516 of file CH_Channel.h.

CH_Manager* CH_Channel::getManager ( ) const
inline

Definition at line 224 of file CH_Channel.h.

int64 CH_Channel::getMemoryUsage ( bool  inclusive) const
const UT_StringHolder& CH_Channel::getName ( ) const
inline

Definition at line 202 of file CH_Channel.h.

const CH_Segment* CH_Channel::getNextEvaluationSegment ( int  thread) const
CH_Segment* CH_Channel::getNextEvaluationSegment ( int  thread)
fpreal CH_Channel::getNextOutTime ( int  thread) const
CH_Segment* CH_Channel::getNextSegment ( unsigned  idx) const
int CH_Channel::getNKeys ( ) const
inline

Definition at line 981 of file CH_Channel.h.

int CH_Channel::getNKeysBefore ( fpreal  gtime) const
int CH_Channel::getNKeysBeforeOrAt ( fpreal  gtime) const
int CH_Channel::getNSegments ( ) const
inline

Definition at line 969 of file CH_Channel.h.

fpreal CH_Channel::getOutTime ( int  thread) const
fpreal CH_Channel::getPendingEvalTime ( ) const
inline

Definition at line 469 of file CH_Channel.h.

const CH_Segment* CH_Channel::getPrevEvaluationSegment ( int  thread) const
CH_Segment* CH_Channel::getPrevEvaluationSegment ( int  thread)
fpreal CH_Channel::getPrevInTime ( int  thread) const
CH_Segment* CH_Channel::getPrevSegment ( unsigned  idx) const
bool CH_Channel::getReversibleKey ( fpreal  gtime,
CH_ReversibleKey key 
)
CH_Segment * CH_Channel::getSegment ( unsigned  idx) const
inline

Definition at line 955 of file CH_Channel.h.

CH_Segment* CH_Channel::getSegment ( fpreal  local_time) const
CH_Segment* CH_Channel::getSegmentAfterKey ( fpreal  gtime) const
unsigned CH_Channel::getSegmentIdx ( fpreal  local_time) const
CH_Channel* CH_Channel::getSnapshotChannel ( )
fpreal CH_Channel::getStart ( ) const
inline

Definition at line 541 of file CH_Channel.h.

CH_StringMeaning CH_Channel::getStringMeaning ( fpreal  time) const
bool CH_Channel::getSurroundingSegs ( fpreal  gtime,
CH_Segment *&  left,
CH_Segment *&  right 
) const
fpreal CH_Channel::getTolerance ( ) const
inline

Definition at line 226 of file CH_Channel.h.

fpreal CH_Channel::globalTime ( fpreal  t) const
inline

Definition at line 538 of file CH_Channel.h.

bool CH_Channel::hasNonIntegerKeys ( ) const
bool CH_Channel::hasOnlyOneSegment ( ) const
inline

Definition at line 1002 of file CH_Channel.h.

void CH_Channel::holdValue ( fpreal  gtime,
int  thread 
)
bool CH_Channel::increaseKeyValues ( fpreal  delta)
void CH_Channel::initializeFirstSegment ( const char *  expr,
CH_ExprLanguage  language 
)
void CH_Channel::initializeSegmentParents ( )
void CH_Channel::insertKeyFrame ( fpreal  global_t,
bool  use_auto_slope_pref = true 
)

Insert key at given time.

CH_Channel::IntervalIter CH_Channel::intervalIter ( const UT_SuperIntervalR range,
const bool  ascending = true 
) const
inline

Return an iterator for keys within the given interval. If ascending is false, then the iterator is initialized at the end of the range instead of at the beginning of the range.

Definition at line 1184 of file CH_Channel.h.

bool CH_Channel::isAllDisabled ( ) const
bool CH_Channel::isAllEnabled ( ) const
bool CH_Channel::isAtHardKey ( fpreal  gtime) const
bool CH_Channel::isAtHardKeyframe ( int  frame) const
bool CH_Channel::isAtKey ( fpreal  gtime) const
bool CH_Channel::isChangeActive ( ) const
inline

Definition at line 512 of file CH_Channel.h.

bool CH_Channel::isDataDependent ( fpreal  gtime) const
bool CH_Channel::isDisabled ( fpreal  gtime) const
bool CH_Channel::isEditable ( )
bool CH_Channel::isEmpty ( ) const
inline

Definition at line 975 of file CH_Channel.h.

bool CH_Channel::isLayerScoped ( ) const
SYS_FORCE_INLINE bool CH_Channel::isPending ( ) const
inline

Definition at line 463 of file CH_Channel.h.

bool CH_Channel::isPending ( fpreal  gtime) const
SYS_FORCE_INLINE bool CH_Channel::isPendingHold ( ) const
inline

Definition at line 472 of file CH_Channel.h.

bool CH_Channel::isPendingLocal ( fpreal  ltime) const
bool CH_Channel::isRotationChannel ( ) const
inline

Definition at line 1008 of file CH_Channel.h.

bool CH_Channel::isScoped ( ) const
bool CH_Channel::isSimpleChannel ( ) const

Check if all segment expressions are simple expressions such as linear(), bezier(), constant(). Note that you can still convert to a simple channel even if this returns false, but any custom segment expressions will be evaluated as beziers instead.

bool CH_Channel::isStringTimeDependentSlow ( int  thread) const
bool CH_Channel::isTemporary ( ) const
inline

Definition at line 504 of file CH_Channel.h.

bool CH_Channel::isTimeDependent ( ) const
inline

Definition at line 1322 of file CH_Channel.h.

bool CH_Channel::isTimeDependentSlow ( int  thread) const
template<typename FPREAL_TYPE >
bool CH_Channel::load ( UT_IStream is)
bool CH_Channel::loadSnapshot ( )
fpreal CH_Channel::localTime ( fpreal  t) const
inline

Definition at line 535 of file CH_Channel.h.

int CH_Channel::match ( const char *  pattern) const
void CH_Channel::moveFrames ( const UT_Array< int > &  frames,
int  amount 
)
void CH_Channel::moveKeyFrame ( fpreal  old_gtime,
fpreal  new_gtime 
)

Move key from old time to new time. Requires that a key exists at old_gtime and that there is no key at new_gtime.

void CH_Channel::putChFullKey ( fpreal  gtime,
CH_FullKey const &  key,
bool  accel_ratios = true 
)
void CH_Channel::putFullKey ( fpreal  gtime,
CH_FullKey const &  key,
bool  accel_ratios,
bool  apply_auto_slope,
bool  update_fake_slope_accel_handles 
)
void CH_Channel::putFullKey ( fpreal  gtime,
CH_FullKey const &  key,
bool  accel_ratios = true,
bool  apply_auto_slope = true 
)
inline

Definition at line 309 of file CH_Channel.h.

void CH_Channel::putKey ( fpreal  gtime,
CH_Key const &  key,
bool  accel_ratios,
bool  apply_auto_slope,
bool  update_fake_slope_accel_handles 
)
void CH_Channel::putKey ( fpreal  gtime,
CH_Key const &  key,
bool  accel_ratios = true,
bool  apply_auto_slope = true 
)
inline

Definition at line 304 of file CH_Channel.h.

void CH_Channel::refit ( fpreal  tolerance,
bool  preserve_extrema 
)
void CH_Channel::refit ( fpreal  tolerance,
bool  preserve_extrema,
fpreal  from_gtime,
fpreal  to_gtime,
bool  delete_old_segments 
)
void CH_Channel::reverse ( fpreal  gstart = 0,
fpreal  gend = 0,
bool  whole_chan = true 
)
void CH_Channel::sampleKey ( CH_Segment seg,
fpreal  gtime,
int  thread,
CH_Key key 
)
void CH_Channel::sampleValueSlope ( CH_Segment seg,
fpreal  gtime,
int  thread,
fpreal v,
fpreal s 
)
bool CH_Channel::sampleVSA ( CH_Segment seg,
fpreal  gtime,
int  thread,
fpreal v,
fpreal s,
fpreal  a[2] 
)
void CH_Channel::save ( std::ostream &  os,
bool  binary,
bool  compiled,
bool  pending_state 
) const
void CH_Channel::saveForUndo ( )
void CH_Channel::saveKeyFrameForUndo ( fpreal  global_t)
void CH_Channel::saveSnapshot ( )
void CH_Channel::scroll ( fpreal  new_start,
bool  update = true 
)
void CH_Channel::setAlias ( const UT_StringHolder s)
inline

Definition at line 222 of file CH_Channel.h.

void CH_Channel::setCaptureCopiedKeys ( UT_Array< fpreal > *  capture_array)
void CH_Channel::setChangeActive ( int  state)
inline

Definition at line 507 of file CH_Channel.h.

void CH_Channel::setChanged ( bool  on,
CH_CHANGE_TYPE  type = CH_CHANNEL_CHANGED 
)
void CH_Channel::setChannelLeftType ( CH_ChannelBehavior  t)
void CH_Channel::setChannelRightType ( CH_ChannelBehavior  t)
void CH_Channel::setCollection ( CH_Collection chp)
inline

Definition at line 499 of file CH_Channel.h.

void CH_Channel::setConstantValue ( fpreal  value)
void CH_Channel::setDefaultString ( const UT_StringHolder dv)
inline

Definition at line 487 of file CH_Channel.h.

void CH_Channel::setDefaultValue ( fpreal  dv)
inline

Definition at line 484 of file CH_Channel.h.

void CH_Channel::setExprLanguage ( CH_ExprLanguage  language)
void CH_Channel::setExprLanguageAtTime ( CH_ExprLanguage  language,
fpreal  time 
)
void CH_Channel::setIsTemporary ( bool  temp)
inline

Definition at line 503 of file CH_Channel.h.

bool CH_Channel::setKeys ( fpreal new_key_values,
int  num_keys,
fpreal  global_start,
fpreal  time_delta,
bool  smooth_slopes = true,
bool  clear = false,
bool  notify = true 
)

Overwrites segments and keys in the range [start, start + time_delta * (num_keys - 1)]

Parameters
new_key_values- Array of size num_keys containing the values for the new keys
num_keys- Number of keys to set in the new range
global_start- Global start (in time) of the range to replace keys in. Must be at or after the global start of this channel
time_delta- Spacing between keys in time
smooth_slopes- Smooth the slopes of the new keys
clear- If true, will first clear all keys and segments keys in a partial region
notify- If true, emit a CH_CHANNELS_MAJOR_CHANGE event
Returns
true on success, false if failed
int CH_Channel::setKeyString ( const UT_String str,
fpreal  gtime,
bool  set_pending = false,
bool  commit_keys = true,
bool  propagate = true 
)
int CH_Channel::setKeyString ( const UT_String str,
fpreal  gtime,
CH_ExprLanguage  language,
bool  set_pending = false,
bool  commit_keys = true,
bool  propagate = true 
)
int CH_Channel::setKeyValue ( fpreal  val,
fpreal  gtime,
bool  set_pending = false,
bool  commit_keys = true,
bool  propagate = true 
)
void CH_Channel::setLayerScope ( bool  on_off)
void CH_Channel::setLocked ( bool  f)
void CH_Channel::setName ( const UT_StringHolder s)
inline

Definition at line 221 of file CH_Channel.h.

void CH_Channel::setPendingHold ( bool  state)
int CH_Channel::setRawValues ( fpreal  from,
fpreal  to,
fpreal vals,
int  nsamples 
)
int CH_Channel::setRawValues ( fpreal times,
fpreal vals,
int  n 
)
void CH_Channel::setScope ( bool  on_off)
void CH_Channel::smoothAutoSlopes ( )
void CH_Channel::smoothAutoSlopes ( fpreal  global_time,
fpreal  delta = -1,
bool  value_changed = true 
)

Smooths slopes of key at time Can set up a max step based on delta if > 0

Parameters
value_changed- true if delta refers to a value change, false if delta refers to a time change
void CH_Channel::smoothAutoSlopes ( CH_Segment seg)

Smooths slopes of keys at both ends of a segment.

void CH_Channel::smoothAutoSlopesForSegments ( UT_RLEBitArray slope_flags,
bool  force = false,
fpreal  max_delta = -1 
)

Smooth the specified auto slopes

Parameters
slope_flags- bit array indicating which slopes are to be smoothed. Each slope (in and out) has a bit and they are arranged in left-right order. 0th bit is the in slope of the first seg, so for the ith seg, its in slope is at bit 2i and out slope at 2i+1
force- If true, smooths all selected slopes, even if not auto
max_step- If > 0, the maximum amount a slope may change from its existing value during this smoothing pass.
void CH_Channel::snapKeysInRange ( const UT_SuperIntervalR range,
SnapType  type = SNAP_SNAP,
std::ostream *  os = nullptr 
)
void CH_Channel::stretch ( fpreal  new_start,
fpreal  new_end 
)
void CH_Channel::swap ( CH_Channel other)
void CH_Channel::swapContents ( CH_Channel other)
bool CH_Channel::swapSnapshot ( )
void CH_Channel::transferKey ( fpreal  to_time,
CH_Channel from_chp,
fpreal  from_time 
)
void CH_Channel::undoSnapshot ( CH_Channel previous,
bool  previous_snapshot_cleared 
)
void CH_Channel::unresolveLocalVars ( int  thread)
void CH_Channel::updatePending ( fpreal  gtime)
bool CH_Channel::verify ( )
bool CH_Channel::verify ( bool  verify_tied_values)

Friends And Related Function Documentation

friend class CH_BatchModifyScope
friend

Definition at line 814 of file CH_Channel.h.

Member Data Documentation

Definition at line 266 of file CH_Channel.h.


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