HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
CH_BatchModifyScope.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_BatchModifyScope.h (CH Library, C++)
7
*
8
* COMMENTS: Scoped batch modification of a CH_Channel.
9
*/
10
11
#ifndef __CH_BatchModifyScope_h__
12
#define __CH_BatchModifyScope_h__
13
14
#include "
CH_API.h
"
15
#include "
CH_EventManager.h
"
16
17
#include <
UT/UT_Array.h
>
18
#include <
UT/UT_Assert.h
>
19
#include <
UT/UT_NonCopyable.h
>
20
21
#include <
SYS/SYS_Types.h
>
22
23
#include <tuple>
24
25
class
CH_Channel
;
26
27
class
CH_API
CH_BatchModifyScope
28
{
29
public
:
30
CH_BatchModifyScope
(
31
CH_Channel
*chp,
32
CH_CHANGE_TYPE
notify_type,
33
bool
verify_tied_values =
true
);
34
35
~CH_BatchModifyScope
()
36
{
37
finish();
38
}
39
40
UT_NON_COPYABLE
(
CH_BatchModifyScope
)
41
42
// If you call setChannelStart(), then it needs to adjust everything,
43
// so the adjust range will be ignored.
44
void
setChannelStart(
fpreal
new_global_start)
45
{
46
myChannelStart = new_global_start;
47
myChannelStartChanged =
true
;
48
}
49
// Only used if setChannelStart() has not been called
50
void
setAdjustRange
(
int
beg,
int
end
)
51
{
52
myAdjustBeg = beg;
53
myAdjustEnd =
end
;
54
}
55
56
void
deferredSmoothAutoSlopes
(
57
fpreal
global_time,
fpreal
delta,
bool
value_changed)
58
{
59
mySmoothAutoSlopes.emplace_back(global_time, delta, value_changed);
60
}
61
62
void
finish();
63
64
private
:
65
// Do all pending smooth auto slopes. This is a modified version of
66
// CH_Channel::smoothAutoSlopes(fpreal, fpreal, bool) which does the
67
// same thing for one key.
68
void
smoothAutoSlopes();
69
70
CH_Channel
* myCh;
71
CH_CHANGE_TYPE
myNotifyType;
72
UT_Array<std::tuple<fpreal, fpreal, bool>
> mySmoothAutoSlopes;
73
int
myAdjustBeg;
74
int
myAdjustEnd;
75
fpreal
myChannelStart;
76
bool
myChannelStartChanged;
77
#if (UT_ASSERT_LEVEL >= UT_ASSERT_LEVEL_PARANOID)
78
bool
myVerifyTiedValues;
79
#endif
80
};
81
82
#endif
CH_BatchModifyScope
Definition:
CH_BatchModifyScope.h:27
void
void
Definition:
png.h:1083
CH_EventManager.h
CH_Channel
Definition:
CH_Channel.h:169
UT_Array.h
UT_Assert.h
UT_Array
Definition:
BV_KDOPTree.h:18
SYS_Types.h
CH_BatchModifyScope::~CH_BatchModifyScope
~CH_BatchModifyScope()
Definition:
CH_BatchModifyScope.h:35
CH_CHANGE_TYPE
CH_CHANGE_TYPE
Definition:
CH_EventManager.h:42
end
GLuint GLuint end
Definition:
glcorearb.h:475
UT_NON_COPYABLE
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
Definition:
UT_NonCopyable.h:31
UT_NonCopyable.h
CH_BatchModifyScope::setAdjustRange
void setAdjustRange(int beg, int end)
Definition:
CH_BatchModifyScope.h:50
CH_API.h
CH_BatchModifyScope::deferredSmoothAutoSlopes
void deferredSmoothAutoSlopes(fpreal global_time, fpreal delta, bool value_changed)
Definition:
CH_BatchModifyScope.h:56
fpreal
fpreal64 fpreal
Definition:
SYS_Types.h:283
CH_API
#define CH_API
Definition:
CH_API.h:10
CH
CH_BatchModifyScope.h
Generated on Mon Aug 24 2026 02:26:01 for HDK by
1.8.6