mirror of
https://github.com/zakk4223/CocoaSplit.git
synced 2026-05-15 14:15:50 -06:00
Add script config to normal InputSource.
Move script execution into SourceLayout
This commit is contained in:
parent
d9dee6611e
commit
e73e87df0c
8 changed files with 366 additions and 136 deletions
|
|
@ -19,6 +19,7 @@
|
|||
@synthesize inputSource = _inputSource;
|
||||
|
||||
|
||||
|
||||
-(instancetype) init
|
||||
{
|
||||
if (self = [super init])
|
||||
|
|
@ -53,6 +54,10 @@
|
|||
|
||||
self.compositionFilterNames = [CIFilter filterNamesInCategory:kCICategoryCompositeOperation];
|
||||
|
||||
self.scriptTypes = @[@"After Add", @"Before Delete", @"FrameTick", @"Before Merge", @"After Merge", @"Before Remove", @"Before Replace", @"After Replace"];
|
||||
self.scriptKeys = @[@"selection.script_afterAdd", @"selection.script_beforeDelete", @"selection.script_frameTick", @"selection.script_beforeMerge", @"selection.script_afterMerge", @"selection.script_beforeRemove", @"selection.script_beforeReplace", @"selection.script_afterReplace"];
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -94,6 +99,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (IBAction)scriptSaveAll:(id)sender
|
||||
{
|
||||
[self.inputobjctrl commitEditing];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (IBAction)configureFilter:(NSSegmentedControl *)sender
|
||||
{
|
||||
|
|
@ -384,6 +395,7 @@
|
|||
}
|
||||
|
||||
|
||||
|
||||
-(void)tableViewSelectionDidChange:(NSNotification *)notification
|
||||
{
|
||||
NSTableView *tableView = notification.object;
|
||||
|
|
@ -411,6 +423,10 @@
|
|||
} else {
|
||||
self.layerTableHasSelection = NO;
|
||||
}
|
||||
} else if (tableView == self.scriptTableView) {
|
||||
NSString *scriptKey = self.scriptKeys[tableView.selectedRow];
|
||||
[self.scriptTextView bind:@"value" toObject:self.inputobjctrl withKeyPath:scriptKey options:nil];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue