Close

Palette:cppParsTemplateGen

Summary

The CppParsTemplateGen COMP can be used to quickly generate parameters.cpp and parameters.h files and kickstart your Custom Operator projects. The parameters.cpp and parameters.h files are used to define the Custom Parameters on Custom OPs.

To use, add the class and header to your C++ project (in Visual Studio, right click your project and click Add Existing Item or type Shift+Alt+A) and after importing the files where necessary, call the setup(OP_ParameterManager* manager) function within the overriden function setupParameters(OP_ParameterManager* manager, void*) of your main class. This will add all the parameters found on the referenced COMP into C++ code which will then appear on your custom operator parameter pages when the .dll of your project is loaded. The code generated follows Derivative's guidelines and conventions.

PythonIcon.pngPalette:cppParsTemplateGen Ext


Parameters - Generator settings Page

Source Parameters Comp Sourceparameterscomp - The COMP with one or multiple pages of custom parameters used as the template for your C++ custom operator parameters. Custom parameters order, style, pages... etc will be replicated.

Path Path - The path to which folder the .cpp and .h files will be generated in. If no path is supplied it will use your TouchDesigner project path.

Generate Generate - Pulse to generate the .cpp and .h files. It will overwrite files found at the folder location specified in the Path parameter if any parameters.cpp and / or parameters.h files are already present.


Operator Outputs

  • Output 0 - The generated content of the .h file as a DAT.
  • Output 1 - The generated content of the .cpp file as a DAT.