forked from kineme/DataTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDTOrderPatch.m
52 lines (42 loc) · 896 Bytes
/
DTOrderPatch.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#import "DTOrderPatch.h"
@implementation DTOrderPatch
+(BOOL)isSafe
{
return YES;
}
+(BOOL)allowsSubpatchesWithIdentifier:(id)identifier
{
return NO;
}
+(QCPatchExecutionMode)executionModeWithIdentifier:(id)identifier
{
return kQCPatchExecutionModeProvider;
}
+(QCPatchTimeMode)timeModeWithIdentifier:(id)identifier
{
return kQCPatchTimeModeNone;
}
-(id)initWithIdentifier:(id)identifier
{
if(self = [super initWithIdentifier:identifier])
{
[[self userInfo] setObject:@"Order" forKey:@"name"];
}
return self;
}
-(void)enable:(QCOpenGLContext*)context
{
om = [DTOrderManager sharedManager];
}
-(void)disable:(QCOpenGLContext*)context
{
[om unuse];
}
-(BOOL)execute:(QCOpenGLContext*)context time:(double)time arguments:(NSDictionary*)arguments
{
[outputOrder setIndexValue:
[om orderForContext:context channel:[inputChannel stringValue] time:time]
];
return YES;
}
@end