Ejemplo n.º 1
0
void THISTimeline::objectDidRelease(ofxMSAInteractiveObject* object, int x, int y, int button)
{
	if(object == cancelExportButton){
		exporter->cancelExport();
		return;
	}
	
	if(exporting){
		return;
	}
	
	if(object == newCompButton){
		newComposition();
	}
	else if(object == loadCompButton){
		ofFileDialogResult result = ofSystemLoadDialog("Load Composition", true);
		if(result.bSuccess && ofDirectory::doesDirectoryExist(result.filePath, false)){
			loadComposition(result.getPath());
		}
	}

	if(object == exportEntireSequenceButton){
		exportEntireSequence();
	}

	if(object == exportCurrentViewButton){
		exportCurrentView();
	}
}
Ejemplo n.º 2
0
 void onNewComp(void *e) {
     if (curComposition) {
         curComposition->visible = false;
         removeChild(curComposition);
     }
     CompositionInfo *compositionInfo = get_paylaod(CompositionInfo);
     newComposition(compositionInfo);
 }
Ejemplo n.º 3
0
//--------------------------------------------------------------
void testApp::objectDidRelease(ofxMSAInteractiveObject* object, int x, int y, int button){
	if(object == newCompButton){
		newComposition();
	}
	else if(object == saveCompButton){
		saveComposition();		
	}
	else {
		for(int i = 0; i < comps.size(); i++){
			
			if(comps[i]->toggle == object){
				comps[i]->wasRenderedInBatch = false;
				comps[i]->batchExport = !comps[i]->batchExport;
				break;
			}

			if(comps[i]->load == object){
				loadCompositionAtIndex(i);
				break;
			}		
		}
	}
}
Ejemplo n.º 4
0
void THISTimeline::setup()
{
	sourceA = new THISSequence();
	sourceA->setDrawWidth(1024);

	sourceB = new THISSequence();
	sourceB->setDrawWidth(1024);

	distortion = new THISSequence();
	distortion->setImageType(OF_IMAGE_GRAYSCALE);
	distortion->setDrawWidth(1024);

	output = new THISOutputTimeline();
	output->inputTimeline = this;

	maxwidthkeys = new THISKeyframeEditor();
	minwidthkeys = new THISKeyframeEditor();
	sourcekeys = new THISKeyframeEditor();
	blendkeys = new THISKeyframeEditor();
	zoomer = new THISTimelineZoom();
	
	maxwidthkeys->snapToFrame = true;
	minwidthkeys->snapToFrame = true;
	sourcekeys->snapToFrame = true;
	blendkeys->snapToFrame = true;
	
	//TODO: make many and multithreaded...
	exporter = new THISExporter();
	exporter->inputTimeline = this;
	exporter->outputTimeline = output;

	newCompButton = new ofxMSAInteractiveObjectWithDelegate();
	newCompButton->setup();
	newCompButton->setDelegate(this);
	newCompButton->disableAppEvents();

	loadCompButton = new ofxMSAInteractiveObjectWithDelegate();
	loadCompButton->setup();
	loadCompButton->setDelegate(this);
	loadCompButton->disableAppEvents();

	/*
	loadSourceBButton = new ofxMSAInteractiveObjectWithDelegate();
	loadSourceBButton->setup();
	loadSourceBButton->setDelegate(this);
	loadSourceBButton->disableAppEvents();

	loadDistortionButton = new ofxMSAInteractiveObjectWithDelegate();
	loadDistortionButton->setup();
	loadDistortionButton->setDelegate(this);
	loadDistortionButton->disableAppEvents();

	setOutputDirectoryButton = new ofxMSAInteractiveObjectWithDelegate();
	setOutputDirectoryButton->setup();
	setOutputDirectoryButton->setDelegate(this);
	setOutputDirectoryButton->disableAppEvents();
	 */
	
	playheadBar = new ofxMSAInteractiveObjectWithDelegate();
    playheadBar->setup();
    playheadBar->setDelegate(this);
    playheadBar->disableAppEvents();

	exportCurrentViewButton = new ofxMSAInteractiveObjectWithDelegate();
	exportCurrentViewButton->setup();
	exportCurrentViewButton->setDelegate(this);
    exportCurrentViewButton->disableAppEvents();

	exportEntireSequenceButton = new ofxMSAInteractiveObjectWithDelegate();
	exportEntireSequenceButton->setup();
	exportEntireSequenceButton->setDelegate(this);
    exportEntireSequenceButton->disableAppEvents();

	cancelExportButton = new ofxMSAInteractiveObjectWithDelegate();
	cancelExportButton->setup();
	cancelExportButton->setDelegate(this);
    cancelExportButton->disableAppEvents();

	string defaultComp = "";
	if(defaults.loadFile("defaults.xml")){
		defaultComp = defaults.getValue("defaults:comp", "");
	}

	if(defaultComp == ""){
		ofLog(OF_LOG_ERROR, "THISTimeline -- No defaults comp, creating one.");
		ofEnableDataPath();
		if(!ofDirectory::doesDirectoryExist("defaultcomp")){
			ofDirectory::createDirectory("defaultcomp", true);
		}
		defaultComp = ofToDataPath("deafultcomp/", true);
		
		cout << "DEFAULT COMP IS " << defaultComp << endl;
		ofDisableDataPath();

	}
	
	if(!loadComposition(defaultComp)){
		newComposition();
	}
}