Skip to content

Commit 7ca80b4

Browse files
committed
first round small bugs fixes
1 parent c3fd4eb commit 7ca80b4

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

src/objects/computer_vision/ChromaKey.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ void ChromaKey::updateObjectContent(map<int,shared_ptr<PatchObject>> &patchObjec
119119
greenSpillStrength = this->getCustomVar("GREEN_SPILL_STRENGTH");
120120
chromaBlur = this->getCustomVar("CHROMA_BLUR");
121121
multiplyFilterHue = this->getCustomVar("MULT_FILTER_HUE");
122+
if(this->inletsConnected[0] && static_cast<ofTexture *>(_inletParams[0])->isAllocated()){
123+
chromakey->setbgColor(chromaBgColor);
124+
}
122125
}
123126

124127
}

src/objects/math/Metronome.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ Metronome::Metronome() :
6565

6666
bpmMetro = false;
6767

68+
loaded = false;
69+
6870
}
6971

7072
//--------------------------------------------------------------
@@ -121,6 +123,11 @@ void Metronome::updateObjectContent(map<int,shared_ptr<PatchObject>> &patchObjec
121123
*(float *)&_outletParams[1] = 0.0f;
122124
}
123125

126+
if(!loaded){
127+
loaded = true;
128+
timeSetting.set(static_cast<int>(floor(this->getCustomVar("TIME"))));
129+
}
130+
124131
}
125132

126133
//--------------------------------------------------------------

src/objects/math/Metronome.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ class Metronome : public PatchObject {
6262

6363
bool sync;
6464

65+
bool loaded;
66+
6567
protected:
6668

6769
ofxVPObjectParameter<int> timeSetting;

src/ofxVisualProgramming.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ void ofxVisualProgramming::updateCanvasViewport(){
252252
//--------------------------------------------------------------
253253
void ofxVisualProgramming::draw(){
254254

255+
// LIVE PATCHING SESSION
256+
drawLivePatchingSession();
257+
255258
ofPushView();
256259
ofPushStyle();
257260
ofPushMatrix();
@@ -362,9 +365,6 @@ void ofxVisualProgramming::draw(){
362365
// Graphical Context
363366
canvas.update();
364367

365-
// LIVE PATCHING SESSION
366-
drawLivePatchingSession();
367-
368368
}
369369

370370
//--------------------------------------------------------------

0 commit comments

Comments
 (0)