HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CH_Types.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: CH library (C++)
7  *
8  * COMMENTS: Convenient types used by the channel library.
9  *
10  */
11 
12 #ifndef __CH_Types_h__
13 #define __CH_Types_h__
14 
15 #include "CH_API.h"
16 #include <UT/UT_Array.h>
17 
18 class CH_Group;
19 class CH_Segment;
20 class CH_Channel;
21 class CH_ChannelRef;
22 class CH_Collection;
23 
30 
31 using CHfindCallBack = int(*)(CH_Collection *grp, CH_Channel *chp, void *);
32 
33 typedef enum {
35 
36  CH_SCOPED = 0x1,
37  CH_SELECTED = 0x2,
38  CH_PINNED = 0x4,
39  CH_DISPLAY = 0x8,
40  CH_TEMPLATE = 0x10,
41 
46 
47  CH_HIDDEN = 0x200,
49 
51  CH_PARM_SELECTED = 0x1000,
52 
54  CH_ALL_FLAGS = ((1<<13)-1)
55 
57 
58 typedef enum {
59  CH_CHANNEL_DEFAULT, // Channel is default value beyond defined range
60  CH_CHANNEL_HOLD, // Channel is start/end value before/after
61  CH_CHANNEL_CYCLE, // Channel wraps to defined range
62  CH_CHANNEL_EXTEND, // Channel function continues outside start/end
63  CH_CHANNEL_SLOPE, // Channel extends at start/end slope
64  CH_CHANNEL_CYCLEOFF, // Channel warps tot defined range and offsets.
65  CH_CHANNEL_OSCILLATE, // Channel warps tot defined range and offsets.
68 
69 
70 // NB: This enum only has 8 bits.
71 // Do not change these values as they get saved.
72 typedef enum {
76  CH_CACHE_ENABLED = 0x04, // no longer used!
77  CH_CHANNEL_SPARE = 0x08, // no longer used!
79 
80  CH_CHANNEL_PENDING = 0x20, // only used for saving/loading
81  CH_CHANNEL_PENDINGHOLD = 0x40, // no longer used!
82 
84 
85  // We save/load CH_CHANNEL_PENDING via myPending
86  //CH_CHANNEL_SAVE_MASK = CH_CHANNEL_PENDING,
87 
88  CH_CHANNEL_FLAG_MASK = 0xFF // sentinel: we've only got 8 bits
90 
91 // Enum for the CH_Channel::getKey and getFullKey methods
92 typedef enum {
93  CH_GETKEY_EXTEND_NONE, // Don't extend the channel cycle.
94  CH_GETKEY_EXTEND_DEFAULT, // Extend the channel extrapolation, and returns keys in the middle.
95  CH_GETKEY_EXTEND_BOUNDARY, // Extend the channel extrapolation, but give a hint that the key is the last or the first.
97 
98 CH_API extern const char *const
100 
101 //
102 // This enum is used when calling the changeSegLength method and provides
103 // a hint as to how the change is to be done. This is currently only
104 // necessary when changing the length of raw segments and the channel
105 // manager raw interpolation option is turned off.
106 //
107 typedef enum {
108  CH_SCALE_ANY, // Don't care.
109  CH_SCALE_START, // Adjusting the segment start time.
110  CH_SCALE_END // Adjusting the segment end time.
112 
113 typedef enum {
114  CH_VALUE = 0,
118 } CH_ValueTypes;
119 
120 CH_API extern char
122 
123 /// CH_TweenMode - Tweening modes used by the CH_Tweener and CH_TweenTools
124 ///
125 /// Classic: Blends the given key linearly between neighboring keys. Adds
126 /// a key if none exists at the given time.
127 /// BlendToNeighbor: Blends between the current key value and the neighbor's
128 /// value. Whether it is the left or right neighbor depends
129 /// on which direction the slider is dragged. Resets base
130 /// values on mouse up.
131 /// EaseInOut: Tweens a sequence of keys between a perfect Ease In/Out
132 /// between the previous keys
133 /// BlendToEase: Tweens a sequence of keys between their current values and
134 /// an ease In/Out depending on which direction the slider is
135 /// dragged. Resets base values on mouse up.
136 /// BlendToFrame: Tweens the selected keys linearly between the values
137 /// evaluated at the frames defined in CH_Tweener (See
138 /// CH_Tweener::setBlendTimes)
139 /// PullPush: Softens or Intensifies the animation curve by blending the keys
140 /// towards or away from the linear curve between the neighboring keys
141 /// NoiseWave: Adds noise to or waves out keys
142 /// BlendToSnapshot: Blends to the channel's snapshot
143 /// TimeOffsetter: "Offsets" the channel's timing by adjusting key values
144 /// instead of shifting them in time.
145 /// TimeOffsetterStagger: Offsets channels as with TimeOffsetter, but also
146 /// applies a small stagger to each selected channel
147 /// ReduceResample: Reduces keys in the selected segments, or adds keys by
148 /// resampling the selected segments.
149 /// SmoothRough: Applies a smoothing filter when dragging left, or a noise
150 /// filter when dragging right.
151 /// Reverse: Reverses the animation (button)
152 enum class CH_TweenMode
153 {
154  // "Viewport" modes
155  Classic,
157  BlendToFrame,
158  // "Animation Editor" modes
159  EaseInOut,
160  BlendToEase,
161  PullPush,
162  NoiseWave,
167  SmoothRough,
168 
169  Reverse,
170 
171  Count,
172 };
173 
175 {
176  SLIDER,
177  BUTTON,
178 };
179 
180 #endif
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
CH_API const char *const chScopeFlagNames[]
CH_ChannelFlag
Definition: CH_Types.h:72
CH_ChannelBehavior
Definition: CH_Types.h:58
CH_API char CHvalueNames[2][CH_NUM_VALUES]
int(*)(CH_Collection *grp, CH_Channel *chp, void *) CHfindCallBack
Definition: CH_Types.h:31
CH_ValueTypes
Definition: CH_Types.h:113
CH_ScopeMasks
Definition: CH_Types.h:33
CH_TweenMode
Definition: CH_Types.h:152
#define CH_API
Definition: CH_API.h:10
CH_SegmentScale
Definition: CH_Types.h:107
CH_TweenToolType
Definition: CH_Types.h:174
CH_GetKeyExtend
Definition: CH_Types.h:92