You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I don't know if it should be here or is actually an obs websockets issue, but I used the following code (hacked some of yours) because I want to use the streamFX plugin through OSC. If it works I can give you my code if you want it when finished.
I am not familiar much with javascript per se but thought I knew enough about programming languages to do this... Anyway. In the following piece of code, changing the x position works, but y and z don't. As I want to make the code versatile I'd like to use variables and not have to type out every single string. Do you have any idea why this wouldn't work? I get no error message. You see a few variations, but any variation gives the same result.
//Triggers the Source Camera position (via Filter > 3D_Transform)
else if ((msg[0].includes('macbookCamSkew')) && (msg[0].includes('Position'))){
console.log(`OSC IN: ${msg[0]} ${msg[1]} ${msg[2]} ${msg[3]}`)
var msgArray = msg[0].split("/")
msgArray.shift()
var x = msg[1]
var y = msg[2]
var z = msg[3]
var filterType = 'Filter.Transform.'
var actionX = filterType.concat(msgArray[3], '.X')
var actionY = 'Filter.Transform.' + msgArray[3] + '.Y'
var actionZ = filterType.concat(msgArray[3], '.Z')
console.log(`filterprint: ${actionY}`)
obs.send("SetSourceFilterSettings", {
'sourceName': msgArray[0].split('_').join(' '),
'filterName': msgArray[1].split('_').join(' '),
'filterSettings': { 'Filter.Transform.Position.X' : x, actionY : y, actionZ : z }
}).catch(() => {
console.log("ERROR: Transform Command Syntax is Incorrect. Refer to Node OBSosc Github for Reference")
})
}
The text was updated successfully, but these errors were encountered:
Hey, sorry I'm unfamiliar with StreamFX, because I only have a Mac. I have looked into it and it looks pretty cool. I don't know what the properties or key should be, but it looks like if X works and it's
"Filter.Transform.Position.X" : x
then shouldn't Y be:
"Filter.Transform.Position.Y": y
Cause Right now it is:
"Filter.Transform.[msgArray[3]].Y" : y
If you wanted that variable to be "Position", after the msgArray.shift(), 'msgArray[0]' should then equal "Position"
(as long as the OSC message is set up kinda like this: "[/macbookCamSkew/Position], [x], [y], [z]")
Another debugging thing you could try to see if Y or Z is a different key name. obs.send("GetSourceFilterSettings) after that you can .then() and console.log whatever is going on in the 'filterSettings' properties.
Sorry if this info isn't much help, but it's my best guess
Hi, I don't know if it should be here or is actually an obs websockets issue, but I used the following code (hacked some of yours) because I want to use the streamFX plugin through OSC. If it works I can give you my code if you want it when finished.
I am not familiar much with javascript per se but thought I knew enough about programming languages to do this... Anyway. In the following piece of code, changing the x position works, but y and z don't. As I want to make the code versatile I'd like to use variables and not have to type out every single string. Do you have any idea why this wouldn't work? I get no error message. You see a few variations, but any variation gives the same result.
The text was updated successfully, but these errors were encountered: