Building OpenFX plugin example

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

EsmeraldaQuintero

  • Posts: 14
  • Joined: Fri Mar 06, 2020 12:36 am
  • Location: Mexico
  • Real Name: Esmeralda Quintero

Building OpenFX plugin example

PostMon Mar 09, 2020 10:28 pm

Hello!
I'm trying to compile a simple example of OpenFX plugin for DaVinci Resolve but I'm stuck on this
github.com/ofxa/openfx/tree/master/Documentation/sources/Guide

I put the enviroment variables
INCLUDE=D:\VisualStudio2013\VC\include;D:\Projects\openfx\include
LIB=D:\VisualStudio2013\VC\lib
PATH=D:\VisualStudio2013\VC\bin

But it still doesn't work, so I think I missing something.

I want to compile and create a simple DaVinci OFX Plugin. Can anybody help me?
Offline

EsmeraldaQuintero

  • Posts: 14
  • Joined: Fri Mar 06, 2020 12:36 am
  • Location: Mexico
  • Real Name: Esmeralda Quintero

Re: Building OpenFX plugin example

PostTue Mar 10, 2020 4:16 pm

Well, I already compiled it with the Developer Command Prompt for VS2015 and the enviroment variable INCLUDE, but it is not detected by DaVinci Resolve and I don't know why.

Can anybody tell me if I need to do some special code modifications?
Offline

EsmeraldaQuintero

  • Posts: 14
  • Joined: Fri Mar 06, 2020 12:36 am
  • Location: Mexico
  • Real Name: Esmeralda Quintero

Re: Building OpenFX plugin example

PostThu Mar 12, 2020 11:54 pm

I already compile the plugin with a CMakeLists and visual studio 2015 but when I tried the same but with MINGW the plugin could not be loaded by DaVinci Resolve.
Offline

EsmeraldaQuintero

  • Posts: 14
  • Joined: Fri Mar 06, 2020 12:36 am
  • Location: Mexico
  • Real Name: Esmeralda Quintero

Re: Building OpenFX plugin example

PostTue Mar 17, 2020 3:36 pm

Just for close this topic

The noise plugin could be compiled from here and DaVinci Resolve 16 detects it.
Code: Select all
github.com/ofxa/openfx/tree/master/Support/Plugins


For the "basics.cpp" plugin you could use the next code and it will compile and be detected by DaVinci Resolve 16.

Code: Select all
project(OpenFX_Plugin)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(OS_VAR "windows")
set(OFX_ARCH_NAME "Win64")
add_definitions(-DWIN64)

set(OPENFX_DIR ./openfx)
include_directories(${OPENFX_DIR}/include)
set(OPENFX_PLUGIN_DIR ./OpenFX_Plugin)
include_directories(${OPENFX_PLUGIN_DIR})
file(GLOB SRC_LIST ${SRC_LIST} ${OPENFX_PLUGIN_DIR}/basics.cpp)
add_library(${PROJECT_NAME} SHARED ${SRC_LIST} ${HEADER_LIST})
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
set_target_properties(${PROJECT_NAME} PROPERTIES SUFFIX ".ofx")

set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/${OS_VAR}/${CMAKE_BUILD_TYPE})
install(
    TARGETS ${PROJECT_NAME}
    RUNTIME DESTINATION ${PROJECT_NAME}.ofx.bundle/Contents/${OFX_ARCH_NAME}
    LIBRARY DESTINATION ${PROJECT_NAME}.ofx.bundle/Contents/${OFX_ARCH_NAME}
    )

Return to Software Developers

Who is online

Users browsing this forum: stevemac00 and 22 guests