OFX code gurus, Im looking for some guidance.

paul_w wrote on 12/12/2011, 1:35 PM
Hello OFX code gurus!

Well i have taken upon myself to spend some time learning how to write OFX plugins for Vegas. Im good with C and ++, so this should be doable.
Thus far:
I can compile all the examples in the Vegas API download.
They work, i can test them in both Vegas 10 and 11.
And i have read the Vegas API doc which outlines the API in not much detail.

And thats it. Now what!
Looking at the API, its confusing, can anyone tell me why there seems to be 2 different flavours of API? I have a set of downloaded OFX examples (a) and another set of Vegas examples (b) which both work but have a very different calling stucture. What gives?
Next, could someone point me to a book or an online resource for learing to write my own OFX code, rather than the suggested 'reverse engineering' feel of taking examples apart. Its taking too long. I just dont get some of these calls, knowing only 'i must use them' doesnt really help.
I do have goals for this, its not just an exercise.

Point me in the right direction, google didnt really help that much.
If you feel like donating a basic template with no functionality in it, just comments so i know whats going on, that would indeed help too.
thanks guys.

Paul.

Comments

Frederic Baumann wrote on 12/12/2011, 2:57 PM
Hi,

Welcome to the OFX development :-)

THE place to look at is http://openfx.sourceforge.net/. This is where you will find the documentation (rather long but quite explanatory), and where you will get the cinematics of OFX.

I am not sure which Vegas API you are referring to. It might be:
1) either the scripting API, in which case it is completely different from the OFX API. This helps you writing scripts to automate actions in Vegas, but not writing a plug-in

2) or the OFX plugin development kit, which presents a Sony-specific C++ API, built on top of the standard OFX C-only API. It adds some facilities to develop faster. It also provides OFX-specific classes, which do not exist in the standard C OFX API (obviously, because it's a C-only API).

Hope this helps,
Frederic - FBmn Software
FBmn Software's White Balance GPU now features a new Blending slider


paul_w wrote on 12/12/2011, 3:49 PM
Frederic, thank you for the warm welcome!

I have checked out your white balance plugin and its impressive, so i value your input here. Im even on your email list :)

Right, its not the scripting API, so i am assuming its your point 2) A Sony Vegas specific layer on top of the standard plugin development kit. That would totally explain it.
Do you have any advice about which way to go, keeping code standard OFX only, or use the Sony layer?
I guess GPU acceleration is another matter too. Can i develop a plugin with a view of changing source later for GPU acceleration? Or are we talking about a total re-write. Cross that bridge when i get to it.

Thanks for the openfx link, i have seen this already but did not spend enough time reading - i need to do that next.

Great start. Thanks.

Paul.
Frederic Baumann wrote on 12/12/2011, 5:20 PM
Glad to help Paul.

I personally started developing OFX plugins before this Sony layer was released. It looks like it adds some simplicity, but I have developed my own "FBmn Software" framework which more or less serves the same purposes... but earlier ;-)

I would recommend starting with the standard OFX C API - it will probably be easier for you to follow the OpenFX documentation this way.

Doing GPU plug-ins is one step beyond regarding complexity. I would strongly recommend developing CPU-based plug-ins first, and once you are familiar with this architecture, switching to GPU.

Hope this helps,
Frederic - FBmn Software
FBmn Software's White Balance GPU now features a new Blending slider
paul_w wrote on 12/12/2011, 5:38 PM
"I would recommend starting with the standard OFX C API - it will probably be easier for you to follow the OpenFX documentation this way. "..

Good advice and I will take it.
Trying to understand both standard API and Sony layer at the same time may have been my major problem. Breaking this down to a point where i can actually start programing seems logical. And i already learned that the standard API is just C whereas the Sony layer is classed and therefor c++. See, i didnt even know that.
GPU is off limits until i get the CPU side working well. Have to start somewhere.

Thanks again, this post may re-appear later down the road if theres any news.

Paul.