change: Switch to offical OpenFX Support. Still can't compile.

This commit is contained in:
Mike Solar
2025-09-03 21:14:56 +08:00
parent 7ff76427f9
commit b649b5e1bd
198 changed files with 57444 additions and 980 deletions
+35
View File
@@ -0,0 +1,35 @@
<!--
~ Olive Community Edition - Non-Linear Video Editor
~ Copyright (C) 2025 Olive CE Team
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<hr width="75%" size="2" noshade="">
<small>
Copyright OpenFX and contributors to the OpenFX project.
SPDX-License-Identifier: BSD-3-Clause
Copying and redistribution with or without
modification, is permitted provided that the following conditions are met:
<ol>
<li> Redistributions of the document must retain the above copyright notice
and this list of conditions.</li>
<li> Neither the name of The Open Effects Association Ltd nor names of its
contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.</li>
</ol>
Automatic documentation generated by <a href="http://www.doxygen.org">Doxygen</a>.<br>
</small>
+39
View File
@@ -0,0 +1,39 @@
<!--
~ Olive Community Edition - Non-Linear Video Editor
~ Copyright (C) 2025 Olive CE Team
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
<li class="footer">$generatedby
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<hr class="footer"/><address class="footer"><small>
$generatedby &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> $doxygenversion
</small></address>
<!--END !GENERATE_TREEVIEW-->
</body>
</html>
+73
View File
@@ -0,0 +1,73 @@
<!--
~ Olive Community Edition - Non-Linear Video Editor
~ Copyright (C) 2025 Olive CE Team
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

@@ -0,0 +1,839 @@
#ifndef _ofx_native_v1_5_aces_v1_3_ocio_v2_3_h_
#define _ofx_native_v1_5_aces_v1_3_ocio_v2_3_h_
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
#ifdef __cplusplus
extern "C" {
#endif
/** @file ofx-native-v1.5_aces-v1.3_ocio-v2.3.h
Contains the list of supported colourspaces.
This file was auto-generated by scripts/genColour from ofx-native-v1.5_aces-v1.3_ocio-v2.3.
*/
// For use with kOfxImageEffectPropColourManagementAvailableConfigs
#define kOfxConfigIdentifier "ofx-native-v1.5_aces-v1.3_ocio-v2.3"
// Basic Colourspaces
// These colourspaces are generic names for any colourspace with the correct attributes.
/** @brief ofx_display_hdr
Any display-referred HDR video such as Rec. 2100 HLG or PQ.
*/
#define kOfxColourspaceOfxDisplayHdr "ofx_display_hdr"
#define kOfxColourspaceOfxDisplayHdrLabel "OFX generic display HDR"
#define kOfxColourspaceOfxDisplayHdrEncoding "hdr-video"
#define kOfxColourspaceOfxDisplayHdrIsData false
#define kOfxColourspaceOfxDisplayHdrIsBasic true
#define kOfxColourspaceOfxDisplayHdrIsCore true
#define kOfxColourspaceOfxDisplayHdrIsDisplay true
/** @brief ofx_display_sdr
Any display-referred SDR video such as Rec. 709.
*/
#define kOfxColourspaceOfxDisplaySdr "ofx_display_sdr"
#define kOfxColourspaceOfxDisplaySdrLabel "OFX generic display SDR"
#define kOfxColourspaceOfxDisplaySdrEncoding "sdr-video"
#define kOfxColourspaceOfxDisplaySdrIsData false
#define kOfxColourspaceOfxDisplaySdrIsBasic true
#define kOfxColourspaceOfxDisplaySdrIsCore true
#define kOfxColourspaceOfxDisplaySdrIsDisplay true
/** @brief ofx_raw
Image values should not be treated as colour, e.g. motion vectors or masks.
*/
#define kOfxColourspaceOfxRaw "ofx_raw"
#define kOfxColourspaceOfxRawLabel "OFX generic raw"
#define kOfxColourspaceOfxRawEncoding ""
#define kOfxColourspaceOfxRawIsData true
#define kOfxColourspaceOfxRawIsBasic true
#define kOfxColourspaceOfxRawIsCore true
#define kOfxColourspaceOfxRawIsDisplay false
/** @brief ofx_scene_linear
Any scene-referred linear colourspace.
*/
#define kOfxColourspaceOfxSceneLinear "ofx_scene_linear"
#define kOfxColourspaceOfxSceneLinearLabel "OFX generic scene linear"
#define kOfxColourspaceOfxSceneLinearEncoding "scene-linear"
#define kOfxColourspaceOfxSceneLinearIsData false
#define kOfxColourspaceOfxSceneLinearIsBasic true
#define kOfxColourspaceOfxSceneLinearIsCore true
#define kOfxColourspaceOfxSceneLinearIsDisplay false
/** @brief ofx_scene_log
Any scene-referred colourspace with a log transfer function.
*/
#define kOfxColourspaceOfxSceneLog "ofx_scene_log"
#define kOfxColourspaceOfxSceneLogLabel "OFX generic scene log"
#define kOfxColourspaceOfxSceneLogEncoding "log"
#define kOfxColourspaceOfxSceneLogIsData false
#define kOfxColourspaceOfxSceneLogIsBasic true
#define kOfxColourspaceOfxSceneLogIsCore true
#define kOfxColourspaceOfxSceneLogIsDisplay false
// Core Colourspaces
// srgb_display
// Convert CIE XYZ (D65 white) to sRGB (piecewise EOTF)
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.RGBmonitor_100nits_dim.a1.0.3
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.RGBmonitor_100nits_dim.a1.0.3
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.RGBmonitor_D60sim_100nits_dim.a1.0.3
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.RGBmonitor_D60sim_100nits_dim.a1.0.3
#define kOfxColourspaceSrgbDisplay "srgb_display"
#define kOfxColourspaceSrgbDisplayLabel "sRGB - Display"
#define kOfxColourspaceSrgbDisplayEncoding "sdr-video"
#define kOfxColourspaceSrgbDisplayIsData false
#define kOfxColourspaceSrgbDisplayIsBasic false
#define kOfxColourspaceSrgbDisplayIsCore true
#define kOfxColourspaceSrgbDisplayIsDisplay true
// displayp3_display
// Convert CIE XYZ (D65 white) to Apple Display P3
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.DisplayP3_dim.a1.0.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.DisplayP3_dim.a1.0.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.DisplayP3_D60sim_dim.a1.0.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.DisplayP3_D60sim_dim.a1.0.0
#define kOfxColourspaceDisplayp3Display "displayp3_display"
#define kOfxColourspaceDisplayp3DisplayLabel "Display P3 - Display"
#define kOfxColourspaceDisplayp3DisplayEncoding "sdr-video"
#define kOfxColourspaceDisplayp3DisplayIsData false
#define kOfxColourspaceDisplayp3DisplayIsBasic false
#define kOfxColourspaceDisplayp3DisplayIsCore true
#define kOfxColourspaceDisplayp3DisplayIsDisplay true
// rec1886_rec709_display
// Convert CIE XYZ (D65 white) to Rec.1886/Rec.709 (HD video)
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec709_100nits_dim.a1.0.3
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.Rec709_100nits_dim.a1.0.3
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec709_D60sim_100nits_dim.a1.0.3
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.Rec709_D60sim_100nits_dim.a1.0.3
#define kOfxColourspaceRec1886Rec709Display "rec1886_rec709_display"
#define kOfxColourspaceRec1886Rec709DisplayLabel "Rec.1886 Rec.709 - Display"
#define kOfxColourspaceRec1886Rec709DisplayEncoding "sdr-video"
#define kOfxColourspaceRec1886Rec709DisplayIsData false
#define kOfxColourspaceRec1886Rec709DisplayIsBasic false
#define kOfxColourspaceRec1886Rec709DisplayIsCore true
#define kOfxColourspaceRec1886Rec709DisplayIsDisplay true
// rec1886_rec2020_display
// Convert CIE XYZ (D65 white) to Rec.1886/Rec.2020 (UHD video)
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_100nits_dim.a1.0.3
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.Rec2020_100nits_dim.a1.0.3
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_P3D65limited_100nits_dim.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.Rec2020_Rec709limited_100nits_dim.a1.1.0
#define kOfxColourspaceRec1886Rec2020Display "rec1886_rec2020_display"
#define kOfxColourspaceRec1886Rec2020DisplayLabel "Rec.1886 Rec.2020 - Display"
#define kOfxColourspaceRec1886Rec2020DisplayEncoding "sdr-video"
#define kOfxColourspaceRec1886Rec2020DisplayIsData false
#define kOfxColourspaceRec1886Rec2020DisplayIsBasic false
#define kOfxColourspaceRec1886Rec2020DisplayIsCore true
#define kOfxColourspaceRec1886Rec2020DisplayIsDisplay true
// rec2100_hlg_display
// Convert CIE XYZ (D65 white) to Rec.2100-HLG, 1000 nit
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_1000nits_15nits_HLG.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_1000nits_15nits_HLG.a1.1.0
#define kOfxColourspaceRec2100HlgDisplay "rec2100_hlg_display"
#define kOfxColourspaceRec2100HlgDisplayLabel "Rec.2100-HLG - Display"
#define kOfxColourspaceRec2100HlgDisplayEncoding "hdr-video"
#define kOfxColourspaceRec2100HlgDisplayIsData false
#define kOfxColourspaceRec2100HlgDisplayIsBasic false
#define kOfxColourspaceRec2100HlgDisplayIsCore true
#define kOfxColourspaceRec2100HlgDisplayIsDisplay true
// rec2100_pq_display
// Convert CIE XYZ (D65 white) to Rec.2100-PQ
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_1000nits_15nits_ST2084.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_1000nits_15nits_ST2084.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_2000nits_15nits_ST2084.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_2000nits_15nits_ST2084.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.Rec2020_4000nits_15nits_ST2084.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.Rec2020_4000nits_15nits_ST2084.a1.1.0
#define kOfxColourspaceRec2100PqDisplay "rec2100_pq_display"
#define kOfxColourspaceRec2100PqDisplayLabel "Rec.2100-PQ - Display"
#define kOfxColourspaceRec2100PqDisplayEncoding "hdr-video"
#define kOfxColourspaceRec2100PqDisplayIsData false
#define kOfxColourspaceRec2100PqDisplayIsBasic false
#define kOfxColourspaceRec2100PqDisplayIsCore true
#define kOfxColourspaceRec2100PqDisplayIsDisplay true
// st2084_p3d65_display
// Convert CIE XYZ (D65 white) to ST-2084 (PQ), P3-D65 primaries
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_1000nits_15nits_ST2084.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_1000nits_15nits_ST2084.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_2000nits_15nits_ST2084.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_2000nits_15nits_ST2084.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_4000nits_15nits_ST2084.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_4000nits_15nits_ST2084.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:RRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvRRTODT.Academy.P3D65_108nits_7point2nits_ST2084.a1.1.0
#define kOfxColourspaceSt2084P3d65Display "st2084_p3d65_display"
#define kOfxColourspaceSt2084P3d65DisplayLabel "ST2084-P3-D65 - Display"
#define kOfxColourspaceSt2084P3d65DisplayEncoding "hdr-video"
#define kOfxColourspaceSt2084P3d65DisplayIsData false
#define kOfxColourspaceSt2084P3d65DisplayIsBasic false
#define kOfxColourspaceSt2084P3d65DisplayIsCore true
#define kOfxColourspaceSt2084P3d65DisplayIsDisplay true
// p3d65_display
// Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D65
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_48nits.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D65_48nits.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_Rec709limited_48nits.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D65_D60sim_48nits.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D65_D60sim_48nits.a1.1.0
#define kOfxColourspaceP3d65Display "p3d65_display"
#define kOfxColourspaceP3d65DisplayLabel "P3-D65 - Display"
#define kOfxColourspaceP3d65DisplayEncoding "sdr-video"
#define kOfxColourspaceP3d65DisplayIsData false
#define kOfxColourspaceP3d65DisplayIsBasic false
#define kOfxColourspaceP3d65DisplayIsCore true
#define kOfxColourspaceP3d65DisplayIsDisplay true
// ACES2065-1
// The "Academy Color Encoding System" reference colorspace.
#define kOfxColourspaceACES20651 "ACES2065-1"
#define kOfxColourspaceACES20651Label "ACES2065-1"
#define kOfxColourspaceACES20651Encoding "scene-linear"
#define kOfxColourspaceACES20651IsData false
#define kOfxColourspaceACES20651IsBasic false
#define kOfxColourspaceACES20651IsCore true
#define kOfxColourspaceACES20651IsDisplay false
// ACEScc
// Convert ACEScc to ACES2065-1
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScc_to_ACES.a1.0.3
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScc.a1.0.3
#define kOfxColourspaceACEScc "ACEScc"
#define kOfxColourspaceACESccLabel "ACEScc"
#define kOfxColourspaceACESccEncoding "log"
#define kOfxColourspaceACESccIsData false
#define kOfxColourspaceACESccIsBasic false
#define kOfxColourspaceACESccIsCore true
#define kOfxColourspaceACESccIsDisplay false
// ACEScct
// Convert ACEScct to ACES2065-1
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScct_to_ACES.a1.0.3
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScct.a1.0.3
#define kOfxColourspaceACEScct "ACEScct"
#define kOfxColourspaceACEScctLabel "ACEScct"
#define kOfxColourspaceACEScctEncoding "log"
#define kOfxColourspaceACEScctIsData false
#define kOfxColourspaceACEScctIsBasic false
#define kOfxColourspaceACEScctIsCore true
#define kOfxColourspaceACEScctIsDisplay false
// ACEScg
// Convert ACEScg to ACES2065-1
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACEScg_to_ACES.a1.0.3
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_ACEScg.a1.0.3
#define kOfxColourspaceACEScg "ACEScg"
#define kOfxColourspaceACEScgLabel "ACEScg"
#define kOfxColourspaceACEScgEncoding "scene-linear"
#define kOfxColourspaceACEScgIsData false
#define kOfxColourspaceACEScgIsBasic false
#define kOfxColourspaceACEScgIsCore true
#define kOfxColourspaceACEScgIsDisplay false
// lin_p3d65
// Convert ACES2065-1 to linear P3 primaries, D65 white point
// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_P3-D65:1.0
#define kOfxColourspaceLinP3d65 "lin_p3d65"
#define kOfxColourspaceLinP3d65Label "Linear P3-D65"
#define kOfxColourspaceLinP3d65Encoding "scene-linear"
#define kOfxColourspaceLinP3d65IsData false
#define kOfxColourspaceLinP3d65IsBasic false
#define kOfxColourspaceLinP3d65IsCore true
#define kOfxColourspaceLinP3d65IsDisplay false
// lin_rec2020
// Convert ACES2065-1 to linear Rec.2020 primaries, D65 white point
// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec2020:1.0
#define kOfxColourspaceLinRec2020 "lin_rec2020"
#define kOfxColourspaceLinRec2020Label "Linear Rec.2020"
#define kOfxColourspaceLinRec2020Encoding "scene-linear"
#define kOfxColourspaceLinRec2020IsData false
#define kOfxColourspaceLinRec2020IsBasic false
#define kOfxColourspaceLinRec2020IsCore true
#define kOfxColourspaceLinRec2020IsDisplay false
// lin_rec709_srgb
// Convert ACES2065-1 to linear Rec.709 primaries, D65 white point
// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Linear_Rec709:1.0
#define kOfxColourspaceLinRec709Srgb "lin_rec709_srgb"
#define kOfxColourspaceLinRec709SrgbLabel "Linear Rec.709 (sRGB)"
#define kOfxColourspaceLinRec709SrgbEncoding "scene-linear"
#define kOfxColourspaceLinRec709SrgbIsData false
#define kOfxColourspaceLinRec709SrgbIsBasic false
#define kOfxColourspaceLinRec709SrgbIsCore true
#define kOfxColourspaceLinRec709SrgbIsDisplay false
// g18_rec709_tx
// Convert ACES2065-1 to 1.8 gamma-corrected Rec.709 primaries, D65 white point
// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma1.8_Rec709-Texture:1.0
#define kOfxColourspaceG18Rec709Tx "g18_rec709_tx"
#define kOfxColourspaceG18Rec709TxLabel "Gamma 1.8 Rec.709 - Texture"
#define kOfxColourspaceG18Rec709TxEncoding "sdr-video"
#define kOfxColourspaceG18Rec709TxIsData false
#define kOfxColourspaceG18Rec709TxIsBasic false
#define kOfxColourspaceG18Rec709TxIsCore true
#define kOfxColourspaceG18Rec709TxIsDisplay false
// g22_ap1_tx
// Convert ACES2065-1 to 2.2 gamma-corrected AP1 primaries, ACES ~=D60 white point
// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_AP1-Texture:1.0
#define kOfxColourspaceG22Ap1Tx "g22_ap1_tx"
#define kOfxColourspaceG22Ap1TxLabel "Gamma 2.2 AP1 - Texture"
#define kOfxColourspaceG22Ap1TxEncoding "sdr-video"
#define kOfxColourspaceG22Ap1TxIsData false
#define kOfxColourspaceG22Ap1TxIsBasic false
#define kOfxColourspaceG22Ap1TxIsCore true
#define kOfxColourspaceG22Ap1TxIsDisplay false
// g22_rec709_tx
// Convert ACES2065-1 to 2.2 gamma-corrected Rec.709 primaries, D65 white point
// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.2_Rec709-Texture:1.0
#define kOfxColourspaceG22Rec709Tx "g22_rec709_tx"
#define kOfxColourspaceG22Rec709TxLabel "Gamma 2.2 Rec.709 - Texture"
#define kOfxColourspaceG22Rec709TxEncoding "sdr-video"
#define kOfxColourspaceG22Rec709TxIsData false
#define kOfxColourspaceG22Rec709TxIsBasic false
#define kOfxColourspaceG22Rec709TxIsCore true
#define kOfxColourspaceG22Rec709TxIsDisplay false
// g24_rec709_tx
// Convert ACES2065-1 to 2.4 gamma-corrected Rec.709 primaries, D65 white point
// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_Gamma2.4_Rec709-Texture:1.0
#define kOfxColourspaceG24Rec709Tx "g24_rec709_tx"
#define kOfxColourspaceG24Rec709TxLabel "Gamma 2.4 Rec.709 - Texture"
#define kOfxColourspaceG24Rec709TxEncoding "sdr-video"
#define kOfxColourspaceG24Rec709TxIsData false
#define kOfxColourspaceG24Rec709TxIsBasic false
#define kOfxColourspaceG24Rec709TxIsCore true
#define kOfxColourspaceG24Rec709TxIsDisplay false
// srgb_encoded_ap1_tx
// Convert ACES2065-1 to sRGB Encoded AP1 primaries, ACES ~=D60 white point
// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB_Encoded_AP1-Texture:1.0
#define kOfxColourspaceSrgbEncodedAp1Tx "srgb_encoded_ap1_tx"
#define kOfxColourspaceSrgbEncodedAp1TxLabel "sRGB Encoded AP1 - Texture"
#define kOfxColourspaceSrgbEncodedAp1TxEncoding "sdr-video"
#define kOfxColourspaceSrgbEncodedAp1TxIsData false
#define kOfxColourspaceSrgbEncodedAp1TxIsBasic false
#define kOfxColourspaceSrgbEncodedAp1TxIsCore true
#define kOfxColourspaceSrgbEncodedAp1TxIsDisplay false
// srgb_encoded_p3d65_tx
// Convert ACES2065-1 to sRGB Encoded P3-D65 primaries, D65 white point
// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB_Encoded_P3-D65-Texture:1.0
#define kOfxColourspaceSrgbEncodedP3d65Tx "srgb_encoded_p3d65_tx"
#define kOfxColourspaceSrgbEncodedP3d65TxLabel "sRGB Encoded P3-D65 - Texture"
#define kOfxColourspaceSrgbEncodedP3d65TxEncoding "sdr-video"
#define kOfxColourspaceSrgbEncodedP3d65TxIsData false
#define kOfxColourspaceSrgbEncodedP3d65TxIsBasic false
#define kOfxColourspaceSrgbEncodedP3d65TxIsCore true
#define kOfxColourspaceSrgbEncodedP3d65TxIsDisplay false
// srgb_tx
// Convert ACES2065-1 to sRGB
// CLFtransformID: urn:aswf:ocio:transformId:1.0:OCIO:Utility:AP0_to_sRGB-Texture:1.0
#define kOfxColourspaceSrgbTx "srgb_tx"
#define kOfxColourspaceSrgbTxLabel "sRGB - Texture"
#define kOfxColourspaceSrgbTxEncoding "sdr-video"
#define kOfxColourspaceSrgbTxIsData false
#define kOfxColourspaceSrgbTxIsBasic false
#define kOfxColourspaceSrgbTxIsCore true
#define kOfxColourspaceSrgbTxIsDisplay false
// Raw
// The utility "Raw" colorspace.
#define kOfxColourspaceRaw "Raw"
#define kOfxColourspaceRawLabel "Raw"
#define kOfxColourspaceRawEncoding ""
#define kOfxColourspaceRawIsData true
#define kOfxColourspaceRawIsBasic false
#define kOfxColourspaceRawIsCore true
#define kOfxColourspaceRawIsDisplay false
// Non-core Colourspaces
// CIE-XYZ-D65
// The "CIE XYZ (D65)" display connection colorspace.
#define kOfxColourspaceCIEXYZD65 "CIE-XYZ-D65"
#define kOfxColourspaceCIEXYZD65Label "CIE-XYZ-D65"
#define kOfxColourspaceCIEXYZD65Encoding ""
#define kOfxColourspaceCIEXYZD65IsData false
#define kOfxColourspaceCIEXYZD65IsBasic false
#define kOfxColourspaceCIEXYZD65IsCore false
#define kOfxColourspaceCIEXYZD65IsDisplay true
// p3d60_display
// Convert CIE XYZ (D65 white) to Gamma 2.6, P3-D60 (Bradford adaptation)
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3D60_48nits.a1.0.3
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3D60_48nits.a1.0.3
#define kOfxColourspaceP3d60Display "p3d60_display"
#define kOfxColourspaceP3d60DisplayLabel "P3-D60 - Display"
#define kOfxColourspaceP3d60DisplayEncoding "sdr-video"
#define kOfxColourspaceP3d60DisplayIsData false
#define kOfxColourspaceP3d60DisplayIsBasic false
#define kOfxColourspaceP3d60DisplayIsCore false
#define kOfxColourspaceP3d60DisplayIsDisplay true
// p3_dci_display
// Convert CIE XYZ (D65 white) to Gamma 2.6, P3-DCI (DCI white with Bradford adaptation)
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3DCI_48nits.a1.0.3
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3DCI_48nits.a1.0.3
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ODT.Academy.P3DCI_D65sim_48nits.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:InvODT.Academy.P3DCI_D65sim_48nits.a1.1.0
#define kOfxColourspaceP3DciDisplay "p3_dci_display"
#define kOfxColourspaceP3DciDisplayLabel "P3-DCI - Display"
#define kOfxColourspaceP3DciDisplayEncoding "sdr-video"
#define kOfxColourspaceP3DciDisplayIsData false
#define kOfxColourspaceP3DciDisplayIsBasic false
#define kOfxColourspaceP3DciDisplayIsCore false
#define kOfxColourspaceP3DciDisplayIsDisplay true
// ADX10
// Convert ADX10 to ACES2065-1
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ADX10_to_ACES.a1.0.3
#define kOfxColourspaceADX10 "ADX10"
#define kOfxColourspaceADX10Label "ADX10"
#define kOfxColourspaceADX10Encoding "log"
#define kOfxColourspaceADX10IsData false
#define kOfxColourspaceADX10IsBasic false
#define kOfxColourspaceADX10IsCore false
#define kOfxColourspaceADX10IsDisplay false
// ADX16
// Convert ADX16 to ACES2065-1
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ADX16_to_ACES.a1.0.3
#define kOfxColourspaceADX16 "ADX16"
#define kOfxColourspaceADX16Label "ADX16"
#define kOfxColourspaceADX16Encoding "log"
#define kOfxColourspaceADX16IsData false
#define kOfxColourspaceADX16IsBasic false
#define kOfxColourspaceADX16IsCore false
#define kOfxColourspaceADX16IsDisplay false
// lin_arri_wide_gamut_3
// Convert Linear ARRI Wide Gamut 3 to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:Linear_ARRI_Wide_Gamut_3_to_ACES2065-1:1.0
#define kOfxColourspaceLinArriWideGamut3 "lin_arri_wide_gamut_3"
#define kOfxColourspaceLinArriWideGamut3Label "Linear ARRI Wide Gamut 3"
#define kOfxColourspaceLinArriWideGamut3Encoding "scene-linear"
#define kOfxColourspaceLinArriWideGamut3IsData false
#define kOfxColourspaceLinArriWideGamut3IsBasic false
#define kOfxColourspaceLinArriWideGamut3IsCore false
#define kOfxColourspaceLinArriWideGamut3IsDisplay false
// arri_logc3_ei800
// Convert ARRI LogC3 (EI800) to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:ARRI_LogC3_EI800_to_ACES2065-1:1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.ARRI.Alexa-v3-logC-EI800.a1.v2
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_LogC_EI800_AWG.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.LogC_EI800_AWG_to_ACES.a1.1.0
#define kOfxColourspaceArriLogc3Ei800 "arri_logc3_ei800"
#define kOfxColourspaceArriLogc3Ei800Label "ARRI LogC3 (EI800)"
#define kOfxColourspaceArriLogc3Ei800Encoding "log"
#define kOfxColourspaceArriLogc3Ei800IsData false
#define kOfxColourspaceArriLogc3Ei800IsBasic false
#define kOfxColourspaceArriLogc3Ei800IsCore false
#define kOfxColourspaceArriLogc3Ei800IsDisplay false
// lin_arri_wide_gamut_4
// Convert Linear ARRI Wide Gamut 4 to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:Linear_ARRI_Wide_Gamut_4_to_ACES2065-1:1.0
#define kOfxColourspaceLinArriWideGamut4 "lin_arri_wide_gamut_4"
#define kOfxColourspaceLinArriWideGamut4Label "Linear ARRI Wide Gamut 4"
#define kOfxColourspaceLinArriWideGamut4Encoding "scene-linear"
#define kOfxColourspaceLinArriWideGamut4IsData false
#define kOfxColourspaceLinArriWideGamut4IsBasic false
#define kOfxColourspaceLinArriWideGamut4IsCore false
#define kOfxColourspaceLinArriWideGamut4IsDisplay false
// arri_logc4
// Convert ARRI LogC4 to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:ARRI:Input:ARRI_LogC4_to_ACES2065-1:1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.ARRI.ARRI-LogC4.a1.v1
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.LogC4_to_ACES.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_LogC4.a1.1.0
#define kOfxColourspaceArriLogc4 "arri_logc4"
#define kOfxColourspaceArriLogc4Label "ARRI LogC4"
#define kOfxColourspaceArriLogc4Encoding "log"
#define kOfxColourspaceArriLogc4IsData false
#define kOfxColourspaceArriLogc4IsBasic false
#define kOfxColourspaceArriLogc4IsCore false
#define kOfxColourspaceArriLogc4IsDisplay false
// bmdfilm_widegamut_gen5
// Convert Blackmagic Film Wide Gamut (Gen 5) to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:BMDFilm_WideGamut_Gen5_to_ACES2065-1:1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.BlackmagicDesign.BMDFilm_WideGamut_Gen5.a1.v1
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_BMDFilm_WideGamut_Gen5.a1.v1
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.BMDFilm_WideGamut_Gen5_to_ACES.a1.v1
#define kOfxColourspaceBmdfilmWidegamutGen5 "bmdfilm_widegamut_gen5"
#define kOfxColourspaceBmdfilmWidegamutGen5Label "BMDFilm WideGamut Gen5"
#define kOfxColourspaceBmdfilmWidegamutGen5Encoding "log"
#define kOfxColourspaceBmdfilmWidegamutGen5IsData false
#define kOfxColourspaceBmdfilmWidegamutGen5IsBasic false
#define kOfxColourspaceBmdfilmWidegamutGen5IsCore false
#define kOfxColourspaceBmdfilmWidegamutGen5IsDisplay false
// davinci_intermediate_widegamut
// Convert DaVinci Intermediate Wide Gamut to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:DaVinci_Intermediate_WideGamut_to_ACES2065-1:1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.DaVinci_Intermediate_WideGamut_to_ACES.a1.v1
#define kOfxColourspaceDavinciIntermediateWidegamut "davinci_intermediate_widegamut"
#define kOfxColourspaceDavinciIntermediateWidegamutLabel "DaVinci Intermediate WideGamut"
#define kOfxColourspaceDavinciIntermediateWidegamutEncoding "log"
#define kOfxColourspaceDavinciIntermediateWidegamutIsData false
#define kOfxColourspaceDavinciIntermediateWidegamutIsBasic false
#define kOfxColourspaceDavinciIntermediateWidegamutIsCore false
#define kOfxColourspaceDavinciIntermediateWidegamutIsDisplay false
// lin_bmd_widegamut_gen5
// Convert Linear Blackmagic Wide Gamut (Gen 5) to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:Linear_BMD_WideGamut_Gen5_to_ACES2065-1:1.0
#define kOfxColourspaceLinBmdWidegamutGen5 "lin_bmd_widegamut_gen5"
#define kOfxColourspaceLinBmdWidegamutGen5Label "Linear BMD WideGamut Gen5"
#define kOfxColourspaceLinBmdWidegamutGen5Encoding "scene-linear"
#define kOfxColourspaceLinBmdWidegamutGen5IsData false
#define kOfxColourspaceLinBmdWidegamutGen5IsBasic false
#define kOfxColourspaceLinBmdWidegamutGen5IsCore false
#define kOfxColourspaceLinBmdWidegamutGen5IsDisplay false
// lin_davinci_widegamut
// Convert Linear DaVinci Wide Gamut to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:BlackmagicDesign:Input:Linear_DaVinci_WideGamut_to_ACES2065-1:1.0
#define kOfxColourspaceLinDavinciWidegamut "lin_davinci_widegamut"
#define kOfxColourspaceLinDavinciWidegamutLabel "Linear DaVinci WideGamut"
#define kOfxColourspaceLinDavinciWidegamutEncoding "scene-linear"
#define kOfxColourspaceLinDavinciWidegamutIsData false
#define kOfxColourspaceLinDavinciWidegamutIsBasic false
#define kOfxColourspaceLinDavinciWidegamutIsCore false
#define kOfxColourspaceLinDavinciWidegamutIsDisplay false
// canonlog2_cinemagamut_d55
// Convert Canon Log 2 Cinema Gamut (Daylight) to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:CanonLog2_CinemaGamut-D55_to_ACES2065-1:1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.CLog2_CGamut_to_ACES.a1.1.0
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_CLog2_CGamut.a1.1.0
#define kOfxColourspaceCanonlog2CinemagamutD55 "canonlog2_cinemagamut_d55"
#define kOfxColourspaceCanonlog2CinemagamutD55Label "CanonLog2 CinemaGamut D55"
#define kOfxColourspaceCanonlog2CinemagamutD55Encoding "log"
#define kOfxColourspaceCanonlog2CinemagamutD55IsData false
#define kOfxColourspaceCanonlog2CinemagamutD55IsBasic false
#define kOfxColourspaceCanonlog2CinemagamutD55IsCore false
#define kOfxColourspaceCanonlog2CinemagamutD55IsDisplay false
// canonlog3_cinemagamut_d55
// Convert Canon Log 3 Cinema Gamut (Daylight) to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:CanonLog3_CinemaGamut-D55_to_ACES2065-1:1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.CLog3_CGamut_to_ACES.a1.1.0
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_CLog3_CGamut.a1.1.0
#define kOfxColourspaceCanonlog3CinemagamutD55 "canonlog3_cinemagamut_d55"
#define kOfxColourspaceCanonlog3CinemagamutD55Label "CanonLog3 CinemaGamut D55"
#define kOfxColourspaceCanonlog3CinemagamutD55Encoding "log"
#define kOfxColourspaceCanonlog3CinemagamutD55IsData false
#define kOfxColourspaceCanonlog3CinemagamutD55IsBasic false
#define kOfxColourspaceCanonlog3CinemagamutD55IsCore false
#define kOfxColourspaceCanonlog3CinemagamutD55IsDisplay false
// lin_cinemagamut_d55
// Convert Linear Canon Cinema Gamut (Daylight) to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:Canon:Input:Linear-CinemaGamut-D55_to_ACES2065-1:1.0
#define kOfxColourspaceLinCinemagamutD55 "lin_cinemagamut_d55"
#define kOfxColourspaceLinCinemagamutD55Label "Linear CinemaGamut D55"
#define kOfxColourspaceLinCinemagamutD55Encoding "scene-linear"
#define kOfxColourspaceLinCinemagamutD55IsData false
#define kOfxColourspaceLinCinemagamutD55IsBasic false
#define kOfxColourspaceLinCinemagamutD55IsCore false
#define kOfxColourspaceLinCinemagamutD55IsDisplay false
// lin_vgamut
// Convert Linear Panasonic V-Gamut to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:Panasonic:Input:Linear_VGamut_to_ACES2065-1:1.0
#define kOfxColourspaceLinVgamut "lin_vgamut"
#define kOfxColourspaceLinVgamutLabel "Linear V-Gamut"
#define kOfxColourspaceLinVgamutEncoding "scene-linear"
#define kOfxColourspaceLinVgamutIsData false
#define kOfxColourspaceLinVgamutIsBasic false
#define kOfxColourspaceLinVgamutIsCore false
#define kOfxColourspaceLinVgamutIsDisplay false
// vlog_vgamut
// Convert Panasonic V-Log - V-Gamut to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:Panasonic:Input:VLog_VGamut_to_ACES2065-1:1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.VLog_VGamut_to_ACES.a1.1.0
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_VLog_VGamut.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Panasonic.VLog_VGamut.a1.v1
#define kOfxColourspaceVlogVgamut "vlog_vgamut"
#define kOfxColourspaceVlogVgamutLabel "V-Log V-Gamut"
#define kOfxColourspaceVlogVgamutEncoding "log"
#define kOfxColourspaceVlogVgamutIsData false
#define kOfxColourspaceVlogVgamutIsBasic false
#define kOfxColourspaceVlogVgamutIsCore false
#define kOfxColourspaceVlogVgamutIsDisplay false
// lin_redwidegamutrgb
// Convert Linear REDWideGamutRGB to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:RED:Input:Linear_REDWideGamutRGB_to_ACES2065-1:1.0
#define kOfxColourspaceLinRedwidegamutrgb "lin_redwidegamutrgb"
#define kOfxColourspaceLinRedwidegamutrgbLabel "Linear REDWideGamutRGB"
#define kOfxColourspaceLinRedwidegamutrgbEncoding "scene-linear"
#define kOfxColourspaceLinRedwidegamutrgbIsData false
#define kOfxColourspaceLinRedwidegamutrgbIsBasic false
#define kOfxColourspaceLinRedwidegamutrgbIsCore false
#define kOfxColourspaceLinRedwidegamutrgbIsDisplay false
// log3g10_redwidegamutrgb
// Convert RED Log3G10 REDWideGamutRGB to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:RED:Input:Log3G10_REDWideGamutRGB_to_ACES2065-1:1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.RED.Log3G10_REDWideGamutRGB.a1.v1
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_Log3G10_RWG.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.Log3G10_RWG_to_ACES.a1.1.0
#define kOfxColourspaceLog3g10Redwidegamutrgb "log3g10_redwidegamutrgb"
#define kOfxColourspaceLog3g10RedwidegamutrgbLabel "Log3G10 REDWideGamutRGB"
#define kOfxColourspaceLog3g10RedwidegamutrgbEncoding "log"
#define kOfxColourspaceLog3g10RedwidegamutrgbIsData false
#define kOfxColourspaceLog3g10RedwidegamutrgbIsBasic false
#define kOfxColourspaceLog3g10RedwidegamutrgbIsCore false
#define kOfxColourspaceLog3g10RedwidegamutrgbIsDisplay false
// lin_sgamut3
// Convert Linear S-Gamut3 to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_SGamut3_to_ACES2065-1:1.0
#define kOfxColourspaceLinSgamut3 "lin_sgamut3"
#define kOfxColourspaceLinSgamut3Label "Linear S-Gamut3"
#define kOfxColourspaceLinSgamut3Encoding "scene-linear"
#define kOfxColourspaceLinSgamut3IsData false
#define kOfxColourspaceLinSgamut3IsBasic false
#define kOfxColourspaceLinSgamut3IsCore false
#define kOfxColourspaceLinSgamut3IsDisplay false
// lin_sgamut3cine
// Convert Linear S-Gamut3.Cine to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_SGamut3Cine_to_ACES2065-1:1.0
#define kOfxColourspaceLinSgamut3cine "lin_sgamut3cine"
#define kOfxColourspaceLinSgamut3cineLabel "Linear S-Gamut3.Cine"
#define kOfxColourspaceLinSgamut3cineEncoding "scene-linear"
#define kOfxColourspaceLinSgamut3cineIsData false
#define kOfxColourspaceLinSgamut3cineIsBasic false
#define kOfxColourspaceLinSgamut3cineIsCore false
#define kOfxColourspaceLinSgamut3cineIsDisplay false
// lin_venice_sgamut3
// Convert Linear Venice S-Gamut3 to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_Venice_SGamut3_to_ACES2065-1:1.0
#define kOfxColourspaceLinVeniceSgamut3 "lin_venice_sgamut3"
#define kOfxColourspaceLinVeniceSgamut3Label "Linear Venice S-Gamut3"
#define kOfxColourspaceLinVeniceSgamut3Encoding "scene-linear"
#define kOfxColourspaceLinVeniceSgamut3IsData false
#define kOfxColourspaceLinVeniceSgamut3IsBasic false
#define kOfxColourspaceLinVeniceSgamut3IsCore false
#define kOfxColourspaceLinVeniceSgamut3IsDisplay false
// lin_venice_sgamut3cine
// Convert Linear Venice S-Gamut3.Cine to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:Linear_Venice_SGamut3Cine_to_ACES2065-1:1.0
#define kOfxColourspaceLinVeniceSgamut3cine "lin_venice_sgamut3cine"
#define kOfxColourspaceLinVeniceSgamut3cineLabel "Linear Venice S-Gamut3.Cine"
#define kOfxColourspaceLinVeniceSgamut3cineEncoding "scene-linear"
#define kOfxColourspaceLinVeniceSgamut3cineIsData false
#define kOfxColourspaceLinVeniceSgamut3cineIsBasic false
#define kOfxColourspaceLinVeniceSgamut3cineIsCore false
#define kOfxColourspaceLinVeniceSgamut3cineIsDisplay false
// slog3_sgamut3
// Convert Sony S-Log3 S-Gamut3 to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_SGamut3_to_ACES2065-1:1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Sony.SLog3_SGamut3.a1.v1
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_SGamut3.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_SGamut3_to_ACES.a1.1.0
#define kOfxColourspaceSlog3Sgamut3 "slog3_sgamut3"
#define kOfxColourspaceSlog3Sgamut3Label "S-Log3 S-Gamut3"
#define kOfxColourspaceSlog3Sgamut3Encoding "log"
#define kOfxColourspaceSlog3Sgamut3IsData false
#define kOfxColourspaceSlog3Sgamut3IsBasic false
#define kOfxColourspaceSlog3Sgamut3IsCore false
#define kOfxColourspaceSlog3Sgamut3IsDisplay false
// slog3_sgamut3cine
// Convert Sony S-Log3 S-Gamut3.Cine to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_SGamut3Cine_to_ACES2065-1:1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Sony.SLog3_SGamut3Cine.a1.v1
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_SGamut3Cine.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_SGamut3Cine_to_ACES.a1.1.0
#define kOfxColourspaceSlog3Sgamut3cine "slog3_sgamut3cine"
#define kOfxColourspaceSlog3Sgamut3cineLabel "S-Log3 S-Gamut3.Cine"
#define kOfxColourspaceSlog3Sgamut3cineEncoding "log"
#define kOfxColourspaceSlog3Sgamut3cineIsData false
#define kOfxColourspaceSlog3Sgamut3cineIsBasic false
#define kOfxColourspaceSlog3Sgamut3cineIsCore false
#define kOfxColourspaceSlog3Sgamut3cineIsDisplay false
// slog3_venice_sgamut3
// Convert Sony S-Log3 Venice S-Gamut3 to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_Venice_SGamut3_to_ACES2065-1:1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Sony.Venice_SLog3_SGamut3.a1.v1
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_Venice_SGamut3.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_Venice_SGamut3_to_ACES.a1.1.0
#define kOfxColourspaceSlog3VeniceSgamut3 "slog3_venice_sgamut3"
#define kOfxColourspaceSlog3VeniceSgamut3Label "S-Log3 Venice S-Gamut3"
#define kOfxColourspaceSlog3VeniceSgamut3Encoding "log"
#define kOfxColourspaceSlog3VeniceSgamut3IsData false
#define kOfxColourspaceSlog3VeniceSgamut3IsBasic false
#define kOfxColourspaceSlog3VeniceSgamut3IsCore false
#define kOfxColourspaceSlog3VeniceSgamut3IsDisplay false
// slog3_venice_sgamut3cine
// Convert Sony S-Log3 Venice S-Gamut3.Cine to ACES2065-1
// CLFtransformID: urn:aswf:ocio:transformId:1.0:Sony:Input:SLog3_Venice_SGamut3Cine_to_ACES2065-1:1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:IDT.Sony.Venice_SLog3_SGamut3Cine.a1.v1
// AMF Components
// --------------
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.ACES_to_SLog3_Venice_SGamut3Cine.a1.1.0
// ACEStransformID: urn:ampas:aces:transformId:v1.5:ACEScsc.Academy.SLog3_Venice_SGamut3Cine_to_ACES.a1.1.0
#define kOfxColourspaceSlog3VeniceSgamut3cine "slog3_venice_sgamut3cine"
#define kOfxColourspaceSlog3VeniceSgamut3cineLabel "S-Log3 Venice S-Gamut3.Cine"
#define kOfxColourspaceSlog3VeniceSgamut3cineEncoding "log"
#define kOfxColourspaceSlog3VeniceSgamut3cineIsData false
#define kOfxColourspaceSlog3VeniceSgamut3cineIsBasic false
#define kOfxColourspaceSlog3VeniceSgamut3cineIsCore false
#define kOfxColourspaceSlog3VeniceSgamut3cineIsDisplay false
// camera_rec709
// Convert ACES2065-1 to Rec.709 camera OETF Rec.709 primaries, D65 white point
// CLFtransformID: urn:aswf:ocio:transformId:1.0:ITU:Utility:AP0_to_Camera_Rec709:1.0
#define kOfxColourspaceCameraRec709 "camera_rec709"
#define kOfxColourspaceCameraRec709Label "Camera Rec.709"
#define kOfxColourspaceCameraRec709Encoding "sdr-video"
#define kOfxColourspaceCameraRec709IsData false
#define kOfxColourspaceCameraRec709IsBasic false
#define kOfxColourspaceCameraRec709IsCore false
#define kOfxColourspaceCameraRec709IsDisplay false
/** @brief Roles - standard names used for compatibility with common OCIO configs.
*/
/** @brief aces_interchange
Guaranteed to be ACES2065-1.
*/
#define kOfxColourspaceRoleAcesInterchange "aces_interchange"
#define kOfxColourspaceRoleAcesInterchangeIsBasic false
#define kOfxColourspaceRoleAcesInterchangeIsCore true
/** @brief cie_xyz_d65_interchange
CIE XYZ colorimetry with the neutral axis at D65.
*/
#define kOfxColourspaceRoleCieXyzD65Interchange "cie_xyz_d65_interchange"
#define kOfxColourspaceRoleCieXyzD65InterchangeIsBasic false
#define kOfxColourspaceRoleCieXyzD65InterchangeIsCore true
/** @brief color_picking
The colourspace to use for colour pickers, typically a display colourspace.
*/
#define kOfxColourspaceRoleColorPicking "color_picking"
#define kOfxColourspaceRoleColorPickingIsBasic false
#define kOfxColourspaceRoleColorPickingIsCore true
/** @brief color_timing
A colourspace suitable for colour grading, typically a log colourspace.
*/
#define kOfxColourspaceRoleColorTiming "color_timing"
#define kOfxColourspaceRoleColorTimingIsBasic false
#define kOfxColourspaceRoleColorTimingIsCore true
/** @brief compositing_log
Any scene-referred colourspace with a log transfer function.
*/
#define kOfxColourspaceRoleCompositingLog "compositing_log"
#define kOfxColourspaceRoleCompositingLogIsBasic false
#define kOfxColourspaceRoleCompositingLogIsCore true
/** @brief data
Image values should not be treated as colour, e.g. motion vectors or masks. Mapped to the raw colourspace.
*/
#define kOfxColourspaceRoleData "data"
#define kOfxColourspaceRoleDataIsBasic false
#define kOfxColourspaceRoleDataIsCore true
/** @brief matte_paint
A colourspace suitable for matte painting.
*/
#define kOfxColourspaceRoleMattePaint "matte_paint"
#define kOfxColourspaceRoleMattePaintIsBasic false
#define kOfxColourspaceRoleMattePaintIsCore true
/** @brief scene_linear
Any scene-referred linear colourspace.
*/
#define kOfxColourspaceRoleSceneLinear "scene_linear"
#define kOfxColourspaceRoleSceneLinearIsBasic false
#define kOfxColourspaceRoleSceneLinearIsCore true
/** @brief texture_paint
A colourspace suitable for texture painting, typically sRGB.
*/
#define kOfxColourspaceRoleTexturePaint "texture_paint"
#define kOfxColourspaceRoleTexturePaintIsBasic false
#define kOfxColourspaceRoleTexturePaintIsCore true
#ifdef __cplusplus
}
#endif
#endif
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+231
View File
@@ -0,0 +1,231 @@
<!--
- Olive Community Edition - Non-Linear Video Editor
- Copyright (C) 2025 Olive CE Team
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<!--
DTD for the XML resource file of an OFX image effect plugin.
Author Bruno Nicoletti
Each ofx binary may have a single xml file associated with it that is contains resource overrides for various properties of the plugin. This file is the DTD for those resource files. Typically, the properties being changed are to do with user interface labels and layouts, as well as a few other things such as default values for parameters and so on.
If an element in the DTD has an equivilant property in OFX, the element will be the named with the same string that labels the property in the binary. For example the default property is labelled with "OfxParamPropDefault" in both cases.
The only attributes used on any element are there to identify the element, typically to associate it with a named object in the binary. This is the 'name' attribute. The only other attributes are to associate a host and a locale with the resource set.
The root element is 'OfxImageEffectResource'.
As each binary contains one or more plug-ins, the resource file contains overrides for multiple plug-ins. This is the 'OfxPlugin' element. The 'name' attribute of each must correspond to a OfxPlugin::pluginIdentifier string found in the binary.
Each plug-in can have multiple resources respecifications. This is the 'OfxResourceSet'. Each resource set has an 'ofxHost' and 'ofxLocale' attribute. These specify which host application and which locale the resource set applies to. This allows for internationalisation and per host tuning. Either or both of these can be set to the value 'default', which acts as a catch all case. For example to change all the labels to a specific locale, have a resource set with the host set to 'default' and the locale to the given one.
A resource set is made up of one more 'OfxImageEffectContext' elements, as well as the labels for the plug-in itself and message redefinitions. The 'name' attribute of a context corresponds to one of the context that the plugin declared itself valid for, or 'default'. You can thus redefine properties on a per context basis, with a catch all default case.
A message redefinition is associated with the 'messageId' passed into the OfxMessageSuite::message function. The CDATA value is the new value of the message.
A resource set is made up of parameter redefinitions, clip redefinitions, parameter hierarchy redefinitions and parameter page set redefinitions.
Any parameter (except page and hierachy params) in the binary may have certain properties overridden. Each parameter type has a corresponding element, for example the 2D integer parameter is specified via the 'OfxParamTypeInteger2D', the choice parameter by the 'OfxParamTypeChoice' element. There are many different elements, each of which corresponds to an OFX parameter type. The 'name' attribute of a parameter element is used to associate it with a specific parameter in the binary.
Each parameter element has its own specific set of sub elements, as not all parameters support all properties.
An image effect clip may simply have its labels and hints overridden. This is the 'OfxImageClip' element. It is associated with a clip in the binary via its 'name' element.
An 'OfxParamHierarchy' element is used to redefine the hierarchical ordering of parameters. A parameter can only occur once in this hierarchy. If a hierarchy is encountered, then it will completely redefine any hierarchy defined in the binary. It is fairly straight forward. It allows for the definition of new grouping parameters. This must be reflected in the structures created in the plug-in.
The 'OfxParamPageSet' element is used to define paged layouts of parameters. If present, it will completely redefine all paged layouts for the given context. It consists of one or more 'OfxParamPage' elements, which can be labelled. The order of pages in any user interface is the same as encountered in the resource file. As parameters are added to the page, they appear in any interface at the top left and are added top down, left to right. The two dummy position skipping parameters, "OfxParamPageSkipRow" and "OfxParamPageSkipColumn" can be used to control where in the page parameters are added.
Because of the ability to 'default' hosts, locales and contexts, there is potentially ambiguity as to what property applies in which case, as the same property may be set in more that one valid location. In order of precedence, a property has its value set from the resource file if a match is found according to...
- exact locale, exact host, exact context
- exact locale, exact host, default context
- exact locale, default host, exact context
- exact locale, default host, default context
- default locale, exact host, exact context
- default locale, exact host, default context
- default locale, default host, exact context
- default locale, default host, default context
Otherwise its value is that found in the binary.
Parameters and clips can have their properties set in the 'default' context, even if they do not appear in all contexts.
You cannot set the page layout or the parameter hierarchy in the default context.
In summary, a rough hierarchy of elements is below. '+' means one or more, '*' means zero or more, '?' means zero or one.
OfxImageEffectResource
- OfxPlugin+ 'name'
- OfxResourceSet+ 'ofxHost' 'ofxLocale'
- OfxImageEffectContext+ 'name'
- parameter redefinitions*
- clip redefinitions*
- OfxParamHierarchy
- OfxParam*
- OfxParamGroup*
- OfxParam
- OfxParamGroup*
- OfxParamPageSet?
- OfxParamPage+
- OfxParam+
The 'base' level elements used to set property values come in several varieties, bool, int, double and string. These are used in situations where the an element can have more than one 'type' or is not a simple string value. For example the OfxParamPropDefault element for a parameter can be int, double or string, of 1, 2 or 3 dimensions, whilst the OfxPropLabel element is always a string. Int, double and string come in 2 and 3 dimensional varieties.
For the non simple base element, their values can be....
Bool has 'true', 'false', 'TRUE', 'FALSE', '0' and '1' as acceptable values.
Legal values for integers correspond to the standard C library function 'strtol' syntax.
Legal values for doubles are specified by the standard C library function 'strtod' syntax.
String values must be enclosed in double quotes ie, '"'. To use a double quote in a string, escape it with a backslash character.
Multiple dimensional values are simply separated by white space.
Examples...
<bool> FALSE </bool>
<int> 1 </int>
<string3> "tom" "dick" "harry" </string3>
Errors should be handled robustly. If a respecified parameter doesn't exist in the binary, or it doesn't have a certain property, the host should not fail on that XML file.
-->
<!DOCTYPE OfxImageEffectResource [
<!ELEMENT OfxImageEffectResource (OfxPlugin+)>
<!ELEMENT OfxPlugin (OfxResourceSet+)>
<!ATTLIST OfxPlugin name CDATA "">
<!ELEMENT OfxResourceSet (OfxImageEffectContext+, OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxImageEffectPluginPropGrouping?, OfxMessage* ) >
<!ATTLIST OfxResourceSet ofxHost CDATA "default">
<!ATTLIST OfxResourceSet ofxLocale CDATA "default">
<!ELEMENT OfxMessage ( CDATA )>
<!ATTLIST OfxMessage name CDATA "">
<!ELEMENT OfxImageEffectContext (OfxImageClip*, OfxParamPageSet?, OfxParamHierarchy?, OfxParamTypeInteger*, OfxParamTypeDouble*, OfxParamTypeBoolean*, OfxParamTypeChoice*, OfxParamTypeStrChoice*, OfxParamTypeRGBA*, OfxParamTypeRGB*, OfxParamTypeDouble2D*, OfxParamTypeDouble3D*, OfxParamTypeInteger2D*, OfxParamTypeInteger3D*, OfxParamTypeString*, OfxParamTypeCustom*, OfxParamTypePushButton*) >
<!ATTLIST OfxImageEffectContext name CDATA "default">
<!ELEMENT OfxParamHierarchy (OfxParam*, OfxParamGroup*)>
<!ELEMENT OfxParam ( EMPTY )>
<!ATTLIST OfxParam name CDATA "">
<!ELEMENT OfxParamGroup (OfxPropLabel, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropHint?, OfxParamPropEnabled?, OfxParam*, OfxParamGroup*)>
<!ELEMENT OfxImageClip ((OfxPropLabel, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropHint?)>
<!ATTLIST OfxImageClip name CDATA "">
<!ELEMENT OfxParamPageSet (OfxParamPage+)>
<!ELEMENT OfxParamPage (OfxPropLabel, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropHint?, OfxParam+)>
<!ELEMENT OfxParamTypeInteger (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropInteractSizeAspect?, OfxParamPropInteractMinimumSize?, OfxParamPropInteractPreferedSize?, OfxParamPropAnimates?, OfxParamPropEvaluateOnChange?, OfxParamPropPersistant?, OfxParamPropSecret?, OfxParamPropScriptName?, OfxParamPropHint?, OfxParamPropEnabled?, OfxParamPropMin?, OfxParamPropMax?, OfxParamPropDisplayMin?, OfxParamPropDisplayMax?, OfxParamPropDefault?)>
<!ATTLIST OfxParamTypeInteger name CDATA "">
<!-- If you are not redefining the hierarchy, you can relabel a group param -->
<!ELEMENT OfxParamTypeGroup (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?)>
<!ATTLIST OfxParamTypeGroup name CDATA "">
<!-- If you are not redefining the page layout, you can relabel a page param -->
<!ELEMENT OfxParamTypePage (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?)>
<!ATTLIST OfxParamTypePage name CDATA "">
<!ELEMENT OfxParamTypeInteger2D (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropInteractSizeAspect?, OfxParamPropInteractMinimumSize?, OfxParamPropInteractPreferedSize?, OfxParamPropAnimates?, OfxParamPropEvaluateOnChange?, OfxParamPropPersistant?, OfxParamPropSecret?, OfxParamPropScriptName?, OfxParamPropHint?, OfxParamPropEnabled?, OfxParamPropMin?, OfxParamPropMax?, OfxParamPropDisplayMin?, OfxParamPropDisplayMax?, OfxParamPropDefault?, OfxParamPropDimensionLabel?)>
<!ATTLIST OfxParamTypeInteger2D name CDATA "">
<!ELEMENT OfxParamTypeInteger3D (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropInteractSizeAspect?, OfxParamPropInteractMinimumSize?, OfxParamPropInteractPreferedSize?, OfxParamPropAnimates?, OfxParamPropEvaluateOnChange?, OfxParamPropPersistant?, OfxParamPropSecret?, OfxParamPropScriptName?, OfxParamPropHint?, OfxParamPropEnabled?, OfxParamPropMin?, OfxParamPropMax?, OfxParamPropDisplayMin?, OfxParamPropDisplayMax?, OfxParamPropDefault?, OfxParamPropDimensionLabel?)>
<!ATTLIST OfxParamTypeInteger3D name CDATA "">
<!ELEMENT OfxParamTypeDouble (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropInteractSizeAspect?, OfxParamPropInteractMinimumSize?, OfxParamPropInteractPreferedSize?, OfxParamPropAnimates?, OfxParamPropEvaluateOnChange?, OfxParamPropPersistant?, OfxParamPropSecret?, OfxParamPropScriptName?, OfxParamPropHint?, OfxParamPropEnabled?, OfxParamPropMin?, OfxParamPropMax?, OfxParamPropDisplayMin?, OfxParamPropDisplayMax?, OfxParamPropDefault?, kOfxParamPropDoubleType?, OfxParamPropDigits?, OfxParamPropShowTimeMarker?)>
<!ATTLIST OfxParamTypeDouble name CDATA "">
<!ELEMENT OfxParamTypeDouble2D (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropInteractSizeAspect?, OfxParamPropInteractMinimumSize?, OfxParamPropInteractPreferedSize?, OfxParamPropAnimates?, OfxParamPropEvaluateOnChange?, OfxParamPropPersistant?, OfxParamPropSecret?, OfxParamPropScriptName?, OfxParamPropHint?, OfxParamPropEnabled?, OfxParamPropMin?, OfxParamPropMax?, OfxParamPropDisplayMin?, OfxParamPropDisplayMax?, OfxParamPropDefault?, kOfxParamPropDoubleType?, OfxParamPropDigits?, OfxParamPropShowTimeMarker?, OfxParamPropDimensionLabel?)>
<!ATTLIST OfxParamTypeDouble2D name CDATA "">
<!ELEMENT OfxParamTypeDouble3D (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropInteractSizeAspect?, OfxParamPropInteractMinimumSize?, OfxParamPropInteractPreferedSize?, OfxParamPropAnimates?, OfxParamPropEvaluateOnChange?, OfxParamPropPersistant?, OfxParamPropSecret?, OfxParamPropScriptName?, OfxParamPropHint?, OfxParamPropEnabled?, OfxParamPropMin?, OfxParamPropMax?, OfxParamPropDisplayMin?, OfxParamPropDisplayMax?, OfxParamPropDefault?, kOfxParamPropDoubleType?, OfxParamPropDigits?, OfxParamPropShowTimeMarker?, OfxParamPropDimensionLabel?)>
<!ATTLIST OfxParamTypeDouble3D name CDATA "">
<!ELEMENT OfxParamTypeBoolean (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropInteractSizeAspect?, OfxParamPropInteractMinimumSize?, OfxParamPropInteractPreferedSize?, OfxParamPropAnimates?, OfxParamPropEvaluateOnChange?, OfxParamPropPersistant?, OfxParamPropSecret?, OfxParamPropScriptName?, OfxParamPropHint?, OfxParamPropEnabled?, OfxParamPropDefault?)>
<!ATTLIST OfxParamTypeBoolean name CDATA "">
<!ELEMENT OfxParamTypeChoice (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropInteractSizeAspect?, OfxParamPropInteractMinimumSize?, OfxParamPropInteractPreferedSize?, OfxParamPropAnimates?, OfxParamPropEvaluateOnChange?, OfxParamPropPersistant?, OfxParamPropSecret?, OfxParamPropScriptName?, OfxParamPropHint?, OfxParamPropEnabled?, OfxParamPropDefault?, OfxParamPropChoiceOption?)>
<!ATTLIST OfxParamTypeChoice name CDATA "">
<!ELEMENT OfxParamTypeRGB (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropInteractSizeAspect?, OfxParamPropInteractMinimumSize?, OfxParamPropInteractPreferedSize?, OfxParamPropAnimates?, OfxParamPropEvaluateOnChange?, OfxParamPropPersistant?, OfxParamPropSecret?, OfxParamPropScriptName?, OfxParamPropHint?, OfxParamPropEnabled?, OfxParamPropMin?, OfxParamPropMax?, OfxParamPropDisplayMin?, OfxParamPropDisplayMax?, OfxParamPropDefault?)>
<!ATTLIST OfxParamTypeRGB name CDATA "">
<!ELEMENT OfxParamTypeRGBA (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropInteractSizeAspect?, OfxParamPropInteractMinimumSize?, OfxParamPropInteractPreferedSize?, OfxParamPropAnimates?, OfxParamPropEvaluateOnChange?, OfxParamPropPersistant?, OfxParamPropSecret?, OfxParamPropScriptName?, OfxParamPropHint?, OfxParamPropEnabled?, OfxParamPropMin?, OfxParamPropMax?, OfxParamPropDisplayMin?, OfxParamPropDisplayMax?, OfxParamPropDefault?)>
<!ATTLIST OfxParamTypeRGBA name CDATA "">
<!ELEMENT OfxParamTypeString (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropInteractSizeAspect?, OfxParamPropInteractMinimumSize?, OfxParamPropInteractPreferedSize?, OfxParamPropAnimates?, OfxParamPropEvaluateOnChange?, OfxParamPropPersistant?, OfxParamPropSecret?, OfxParamPropScriptName?, OfxParamPropHint?, OfxParamPropEnabled?, OfxParamPropDefault?)>
<!ATTLIST OfxParamTypeString name CDATA "">
<!ELEMENT OfxParamTypeCustom (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropInteractSizeAspect?, OfxParamPropInteractMinimumSize?, OfxParamPropInteractPreferedSize?, OfxParamPropAnimates?, OfxParamPropEvaluateOnChange?, OfxParamPropPersistant?, OfxParamPropSecret?, OfxParamPropScriptName?, OfxParamPropHint?, OfxParamPropEnabled?, OfxParamPropDefault?)>
<!ATTLIST OfxParamTypeCustom name CDATA "">
<!ELEMENT OfxParamTypePushButton (OfxPropLabel?, OfxPropShortLabel?, OfxPropLongLabel?, OfxParamPropInteractSizeAspect?, OfxParamPropInteractMinimumSize?, OfxParamPropInteractPreferedSize?, OfxParamPropSecret?, OfxParamPropHint?, OfxParamPropEnabled?)>
<!ATTLIST OfxParamTypePushButton name CDATA "">
<!ELEMENT OfxPropLabel (CDATA)>
<!ELEMENT OfxPropShortLabel (CDATA)>
<!ELEMENT OfxPropLongLabel (CDATA)>
<!ELEMENT OfxImageEffectPluginPropGrouping (CDATA)>
<!ELEMENT OfxParamPropInteractSizeAspect (double)>
<!ELEMENT OfxParamPropInteractMinimumSize (int2)>
<!ELEMENT OfxParamPropInteractPreferedSize (int2)>
<!ELEMENT OfxParamPropAnimates (bool)>
<!ELEMENT OfxParamPropEvaluateOnChange (bool)>
<!ELEMENT OfxParamPropPersistant (bool)>
<!ELEMENT OfxParamPropSecret (bool)>
<!ELEMENT OfxParamPropScriptName (CDATA)>
<!ELEMENT OfxParamPropHint (CDATA)>
<!ELEMENT OfxParamPropDoubleType (CDATA)>
<!ELEMENT OfxParamPropEnabled (bool)>
<!ELEMENT OfxParamPropChoiceOption (string*)>
<!ELEMENT OfxParamPropShowTimeMarker (bool)>
<!ELEMENT OfxParamPropIncrement (double)>
<!ELEMENT OfxParamPropDigits (int)>
<!ELEMENT OfxParamPropDimensionLabel (string2?, string3?)>
<!ELEMENT OfxParamPropStringMode (CDATA)>
<!ELEMENT OfxParamPropMin (int?, int2?, int3?, double?, double2?, double3?, double4?)>
<!ELEMENT OfxParamPropMax (int?, int2?, int3?, double?, double2?, double3?, double4?)>
<!ELEMENT OfxParamPropDisplayMin (int?, int2?, int3?, double?, double2?, double3?, double4?)>
<!ELEMENT OfxParamPropDisplayMax (int?, int2?, int3?, double?, double2?, double3?, double4?)>
<!ELEMENT OfxParamPropDefault (int?, int2?, int3?, double?, double2?, double3?, double4?, bool?, string?)>
<!ELEMENT bool (CDATA)>
<!ELEMENT int (CDATA)>
<!ELEMENT int2 (CDATA)>
<!ELEMENT int3 (CDATA)>
<!ELEMENT double (CDATA)>
<!ELEMENT double2 (CDATA)>
<!ELEMENT double3 (CDATA)>
<!ELEMENT double4 (CDATA)>
<!ELEMENT string (CDATA)>
<!ELEMENT string2 (CDATA)>
<!ELEMENT string3 (CDATA)>
]
>
+289
View File
@@ -0,0 +1,289 @@
#ifndef _ofxColour_h_
#define _ofxColour_h_
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
/** @file ofxColour.h
Contains the API for colourspace data exchange.
*/
/** Define OFX_NO_DEFAULT_COLORSPACE_HEADER if you want to manage the
colourspace headers yourself. If this is not defined, the latest ofx-native
config will be included.
*/
#ifndef OFX_NO_DEFAULT_COLORSPACE_HEADER
#include "ofx-native-v1.5_aces-v1.3_ocio-v2.3.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/** @brief What style of colour management does the host or plug-in offer?
- Type - string X 1
- Property Set - host descriptor (read only), plugin descriptor (read/write), image effect instance (read only)
- Default - kOfxImageEffectColourManagementStyleNone
- Valid Values - This must be one of
- ::kOfxImageEffectColourManagementNone - no colour management
- ::kOfxImageEffectColourManagementBasic - only basic colourspaces from the config header may be used
- ::kOfxImageEffectColourManagementCore - only core colourspaces from the config header may be used
- ::kOfxImageEffectColourManagementFull - any colourspace from the config header may be used
- ::kOfxImageEffectColourManagementOCIO - any OCIO config may be used (implies use of the OCIO library)
Hosts should set this property if they will provide colourspace information
to plug-ins.
Plug-ins should set this property if they can use host-provided colourspace
information.
Collectively, the full, core and basic styles are referred to as native
colour management. OCIO is used as the reference for the colour management
API, but is not required to implement the native styles.
The colourspace strings used in the native styles are from an OFX-specific
OCIO config which is currently based on the OCIO ACES Studio built-in config,
studio-config-v2.1.0_aces-v1.3_ocio-v2.3, and stored for OFX purposes in
ofx-native-v1.5_aces-v1.3_ocio-v2.3.h (referred to as the config header).
Additionally, there is a scheme for cross-referencing between clips, and a set
of "basic colourspaces", which are designed to be generic names for a family of
colourspaces. When a basic colourspace is used, this means the host is free to
choose any colourspace with the same encoding and reference space (scene vs
display).
The assumption is that OCIO > Full > Core > Basic, so the highest style
supported by both host and plug-in should usually be chosen by the host.
The chosen style must be set by the host using this property on an image
effect instance.
*/
#define kOfxImageEffectPropColourManagementStyle "OfxImageEffectPropColourManagementStyle"
/* String used to indicate that no colour management is available. */
#define kOfxImageEffectColourManagementNone "OfxImageEffectColourManagementNone"
/* String used to indicate that basic colour management is available. */
#define kOfxImageEffectColourManagementBasic "OfxImageEffectColourManagementBasic"
/* String used to indicate that core colour management is available. */
#define kOfxImageEffectColourManagementCore "OfxImageEffectColourManagementCore"
/* String used to indicate that Full colour management is available. */
#define kOfxImageEffectColourManagementFull "OfxImageEffectColourManagementFull"
/* String used to indicate that OCIO colour management is available. */
#define kOfxImageEffectColourManagementOCIO "OfxImageEffectColourManagementOCIO"
/** @brief What native mode configs are supported?
- Type - string X N
- Property Set - host descriptor (read only), plugin descriptor (read/write)
- Valid Values - A list of config identifiers. The only currently supported
value is ofx-native-v1.5_aces-v1.3_ocio-v2.3.
While the API for colour management is expected to be stable, the set of
colourspaces will evolve over time. This property must be set by both plug-ins
and hosts specifying the list of native mode configs that are available on each
side.
*/
#define kOfxImageEffectPropColourManagementAvailableConfigs "OfxImageEffectPropColourManagementAvailableConfigs"
/** @brief The native colour management config to be used for this instance
- Type - string X 1
- Property Set - image effect instance (read only)
- Valid Values - any string provided by the plug-in in
kOfxImageEffectPropColourManagementAvailableConfigs
The host must set this property to indicate the native colour management config
the plug-in should be used to look up colourspace strings. It is important to
set this even in OCIO mode, to define the basic colourspaces.
*/
#define kOfxImageEffectPropColourManagementConfig "OfxImageEffectPropColourManagementConfig"
/** @brief The path to the OCIO config used for this instance
- Type - string X 1
- Property Set - image effect instance (read only)
- Valid Values - Filesystem path to the config or URI starting ocio://
A host must set this property on any effect instances where it has negotiated
OCIO colour management (kOfxImageEffectColourManagementOCIO).
Use of URIs for built-in configs, such as ocio://default is permitted.
*/
#define kOfxImageEffectPropOCIOConfig "OfxImageEffectPropOCIOConfig"
/** @brief The colourspace used for this clip
- Type - string X 1
- Property Set - clip instance (read/write)
- Valid Values - colourspace that is permitted under the style in use.
For OCIO, any string acceptable to Config::getColorSpace()
Hosts should set this property to the colourspace of the input clip. Typically
it will be set to the working colourspace of the host but could be any valid
colourspace.
Both host and plug-in should use the value of
kOfxImageClipPropPreferredColourspace where reasonable.
In OCIO mode, a basic colourspace may have been requested via
kOfxImageClipPropPreferredColourspaces, but the actual colourspace used should
be reported in this property. If an OCIO host has added the basic colourspaces
to its config as roles or aliases, they would be permitted here.
Cross-referencing between clips is possible by setting this property to
"OfxColourspace_<clip>". For example a plug-in may set this property during
kOfxImageEffectActionGetOutputColourspace to "OfxColourspace_Source", telling
he host that the colourspace of the output matches the "Source" input clip.
In the basic style, plug-ins are recommended to use cross-referencing for
their output clip unless kOfxColourspaceRaw is required.
If a clip sets OfxImageClipPropIsMask or it only supports
OfxImageComponentAlpha, colour management is disabled and this property
must be unset.
*/
#define kOfxImageClipPropColourspace "OfxImageClipPropColourspace"
/** @brief The preferred colourspace for this clip
- Type - string X N
- Property Set - clip instance (read only) and ::kOfxImageEffectActionGetClipPreferences action out args property (read/write)
- Valid Values - colourspace that is permitted under the style in use.
For Basic, any colourspace from the config header where IsBasic is true.
For Core, any colourspace from the config header where IsCore is true.
For Full, any colourspace from the config header.
For OCIO, any string acceptable to Config::getColorSpace(), or a basic colourspace.
Plug-ins may set this property during kOfxImageEffectActionGetClipPreferences
to request images in a colourspace which is convenient for them. The
property is an ordered set of colourspace identifiers, which may be any of the
names or aliases supported by the colour management style in use. If plug-ins
prefer more esoteric colourspaces, they are encouraged to also include basic
colourspacesas a fallback. For example a colour grading plug-in which supports
a specific camera and expects a log colourspace might list:
"arri_logc4", "arri_logc3_ei800", "ACEScct", "ofx_scene_log"
The host is free to choose any colourspace from this list, but should favour
the first mutually agreeable colourspace, and set kOfxImageClipPropColourspace
to tell the plug-in which colourspace has been selected. A host does not need
to convert into the first choice just because it can, as this might be
inefficient, and should avoid scene-to-display or display-to-scene conversions
where possible.
In the event that the host cannot supply images in a requested colourspace,
it may supply images in any valid colourspace. Plug-ins must check
kOfxImageClipPropColourspace to see if their request was satisfied.
In both native and OCIO modes, it is recommended to include basic colourspaces
in this list, because this gives the host more flexibility to avoid unnecessary
colourspace conversions.
Hosts can invoke kOfxImageEffectActionGetOutputColourspace to set this on an
output clip, which could be helpful in a generator context, and plug-ins should
follow the same logic as hosts when deciding which colourspace to use.
It might be much less costly for a host to perform a conversion
than a plug-in, so in the example of a plug-in which performs all internal
processing in scene linear, it is sensible for the plug-in to universally
assert that preference by preferring kOfxColourspaceOfxSceneLinear, and for
the host to honour it if possible. However, if a plug-in is capable of
adapting to any input colourspace, it should not set this preference.
Cross-referencing between clips is possible by setting this property to
"OfxColourspace_<clip>". For example, a plug-in in a transition context may set
this property on its "SourceTo" clip to "OfxColourspace_SourceFrom", telling
the host it would like both input clips to be in the same colourspace.
If a plug-in has inputs which expect motion vectors, depth values or other
non-colour channels, it should set the preferred colourspace to
kOfxColourspaceRaw. Similarly, if a host requests outputs in a typical scene
colourspace, but the plug-in is producing motion vectors, it should ignore
the request and set kOfxImageClipPropColourspace to kOfxColourspaceRaw.
*/
#define kOfxImageClipPropPreferredColourspaces "OfxImageClipPropPreferredColourspaces"
/** @brief The display colourspace used in the plug-in's viewport
- Type - string X 1
- Property Set - image effect instance (read only)
- Valid Values - any colourspace from the config header
Used with native colour management styles, this property is relevant
for plug-ins which have their own viewport in a custom window. Plug-ins should
not expect this to be available during a render event.
Hosts should set this property to a display colourspace which matches that
used in its own viewport. For a multi-display system, choose the colourspace
for the display device where a native window would appear by default.
A host which supports OCIO should use the OCIO-specific display and view
properties instead.
*/
#define kOfxImageEffectPropDisplayColourspace "OfxImageEffectPropDisplayColourspace"
/** @brief The OCIO display to be used in the plug-in's viewport
- Type - string X 1
- Property Set - image effect instance (read only)
- Valid Values - OCIO display that is present in the config
This OCIO-specific property allows the host to specify which OCIO display should be used.
If not defined, the default rules for choosing a display will be followed.
*/
#define kOfxImageEffectPropOCIODisplay "OfxImageEffectPropOCIODisplay"
/** @brief The OCIO view to be used in the plug-in's viewport
- Type - string X 1
- Property Set - image effect instance (read only)
- Valid Values - OCIO view for the display specified by kOfxImageEffectPropOCIODisplay
This OCIO-specific property allows the host to specify which OCIO view should be used.
If not defined, the default rules for choosing a view will be followed.
*/
#define kOfxImageEffectPropOCIOView "OfxImageEffectPropOCIOView"
/** @brief
This action allows a host to ask an effect, given a list of preferred
colourspaces, what colourspace will be used for its output clip. This should
be called after first gathering the plug-in's preferred input colourspaces
via OfxImageEffectActionGetClipPreferences.
Cross-references to input clip colourspaces are permitted, for example in a
filter context, the host might request "OfxColourspace_Source".
If a host wants to rely on the output clip colourspace, it must call this
action whenever the effect instance is changed. Do not assume that the output
colourspace will be the same across all instances of an effect, or even for
the lifetime of an effect instance, because a plug-in may change its output
colourspace based on a user changing a parameter. Assume that the plug-in will
check kOfxImageClipPropColourspace on its input clips during this action in
order to decide the output clip colourspace, so the action must be called
again if the host changes any of the other colour properties.
On a successful return from this action, the host must set
kOfxImageClipPropColourspace on the instance's output clip to the value
from outArgs.
@param handle handle to the instance, cast to an \ref OfxImageEffectHandle
@param inArgs a property set containing the property
- \ref kOfxImageClipPropPreferredColourspaces the host's list of preferred colourspaces
@param outArgs a property set containing the property
- \ref kOfxImageClipPropColourspace the colourspace selected by the plug-in,
which may be a cross-reference to an input clip.
@returns
- \ref kOfxStatOK, the action was trapped and the colourspace was set in
the outArgs property set
- \ref kOfxStatReplyDefault, the action was not trapped and the host
should use the colourspace of the first input clip
- \ref kOfxStatErrMemory, in which case the action may be called again after a memory purge
- \ref kOfxStatFailed, something wrong, but no error code appropriate, plugin to post message
- \ref kOfxStatErrFatal
*/
#define kOfxImageEffectActionGetOutputColourspace "OfxImageEffectActionGetOutputColourspace"
#ifdef __cplusplus
}
#endif
#endif
+966
View File
@@ -0,0 +1,966 @@
#ifndef _ofxCore_h_
#define _ofxCore_h_
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
#include "stddef.h" // for size_t
#include <limits.h> // for INT_MIN & INT_MAX
#ifdef __cplusplus
extern "C" {
#endif
/** @file ofxCore.h
Contains the core OFX architectural struct and function definitions. For more details on the basic OFX architecture, see \ref Architecture.
*/
/** @brief Platform independent export macro.
*
* This macro is to be used before any symbol that is to be
* exported from a plug-in. This is OS/compiler dependent.
*/
#if defined(WIN32) || defined(WIN64)
#define OfxExport extern __declspec(dllexport)
#else
#define OfxExport extern
#endif
/** @brief Blind data structure to manipulate sets of properties through */
typedef struct OfxPropertySetStruct *OfxPropertySetHandle;
/** @brief OFX status return type */
typedef int OfxStatus;
/** @brief Generic host structure passed to OfxPlugin::setHost function
This structure contains what is needed by a plug-in to bootstrap its connection
to the host.
*/
typedef struct OfxHost {
/** @brief Global handle to the host. Extract relevant host properties from this.
This pointer will be valid while the binary containing the plug-in is loaded.
*/
OfxPropertySetHandle host;
/** @brief The function which the plug-in uses to fetch suites from the host.
\arg \c host the host the suite is being fetched from this \em must be the \e host member of the OfxHost struct containing fetchSuite.
\arg \c suiteName ASCII string labelling the host supplied API
\arg \c suiteVersion version of that suite to fetch
Any API fetched will be valid while the binary containing the plug-in is loaded.
Repeated calls to fetchSuite with the same parameters will return the same pointer.
It is recommended that hosts should return the same host and suite pointers to all plugins
in the same shared lib or bundle.
returns
- NULL if the API is unknown (either the api or the version requested),
- pointer to the relevant API if it was found
*/
const void *(*fetchSuite)(OfxPropertySetHandle host, const char *suiteName, int suiteVersion);
} OfxHost;
/** @brief Entry point for plug-ins
\arg \c action ASCII c string indicating which action to take
\arg \c instance object to which action should be applied, this will need to be cast to the appropriate blind data type depending on the \e action
\arg \c inData handle that contains action specific properties
\arg \c outData handle where the plug-in should set various action specific properties
This is how the host generally communicates with a plug-in. Entry points are used to pass messages
to various objects used within OFX. The main use is within the OfxPlugin struct.
The exact set of actions is determined by the plug-in API that is being implemented, however all plug-ins
can perform several actions. For the list of actions consult \ref ActionsAll.
*/
typedef OfxStatus (OfxPluginEntryPoint)(const char *action, const void *handle, OfxPropertySetHandle inArgs, OfxPropertySetHandle outArgs);
/** @brief The structure that defines a plug-in to a host.
*
* This structure is the first element in any plug-in structure
* using the OFX plug-in architecture. By examining its members
* a host can determine the API that the plug-in implements,
* the version of that API, its name and version.
*
* For details see \ref Architecture.
*
*/
typedef struct OfxPlugin {
/** Defines the type of the plug-in, this will tell the host what the plug-in does. e.g.: an image
effects plug-in would be a "OfxImageEffectPlugin"
*/
const char *pluginApi;
/** Defines the version of the pluginApi that this plug-in implements */
int apiVersion;
/** String that uniquely labels the plug-in among all plug-ins that implement an API.
It need not necessarily be human sensible, however the preference is to use reverse
internet domain name of the developer, followed by a '.' then by a name that represents
the plug-in.. It must be a legal ASCII string and have no whitespace in the
name and no non printing chars.
For example "uk.co.somesoftwarehouse.myPlugin"
*/
const char *pluginIdentifier;
/** Major version of this plug-in, this gets incremented when backwards compatibility is broken. */
unsigned int pluginVersionMajor;
/** Major version of this plug-in, this gets incremented when software is changed,
but does not break backwards compatibility. */
unsigned int pluginVersionMinor;
/** @brief Function the host uses to connect the plug-in to the host's api fetcher
\arg \c fetchApi pointer to host's API fetcher
Mandatory function.
The very first function called in a plug-in. The plug-in \em must \em not call any OFX functions within this, it must only set its local copy of the host pointer.
\pre
- nothing else has been called
\post
- the pointer suite is valid until the plug-in is unloaded
It is recommended that hosts should return the same host and suite pointers to all plugins
in the same shared lib or bundle.
*/
void (*setHost)(OfxHost *host);
/** @brief Main entry point for plug-ins
Mandatory function.
The exact set of actions is determined by the plug-in API that is being implemented, however all plug-ins
can perform several actions. For the list of actions consult \ref ActionsAll.
Preconditions
- setHost has been called
*/
OfxPluginEntryPoint *mainEntry;
} OfxPlugin;
/**
\defgroup ActionsAll OFX Actions
These are the actions passed to a plug-in's 'main' function
*/
/*@{*/
/** @brief
This action is the first action passed to a plug-in after the
binary containing the plug-in has been loaded. It is there to allow a
plug-in to create any global data structures it may need and is also
when the plug-in should fetch suites from the host.
The \ref handle, \ref inArgs and \ref outArgs arguments to the \ref mainEntry
are redundant and should be set to NULL.
\pre
- The plugin's \ref OfxPlugin::setHost function has been called
\post
This action will not be called again while the binary containing the plug-in remains loaded.
@returns
- \ref kOfxStatOK, the action was trapped and all was well,
- \ref kOfxStatReplyDefault, the action was ignored,
- \ref kOfxStatFailed, the load action failed, no further actions will be passed to the plug-in.
Interpret if possible kOfxStatFailed as plug-in indicating it does not want to load
Do not create an entry in the host's UI for plug-in then.
Plug-in also has the option to return 0 for OfxGetNumberOfPlugins or kOfxStatFailed if host supports OfxSetHost in which case kOfxActionLoad will never be called.
- \ref kOfxStatErrFatal, fatal error in the plug-in.
*/
#define kOfxActionLoad "OfxActionLoad"
/** @brief
The kOfxActionDescribe is the second action passed to a plug-in. It is
where a plugin defines how it behaves and the resources it needs to
function.
Note that the handle passed in acts as a descriptor for, rather than an
instance of the plugin. The handle is global and unique. The plug-in is
at liberty to cache the handle away for future reference until the
plug-in is unloaded.
Most importantly, the effect must set what image effect contexts it is
capable of working in.
This action *must* be trapped, it is not optional.
@param handle handle to the plug-in descriptor, cast to an \ref OfxImageEffectHandle
@param inArgs is redundant and is set to NULL
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionLoad has been called
\post
- \ref kOfxActionDescribe will not be called again, unless it fails and
returns one of the error codes where the host is allowed to attempt
the action again
- the handle argument, being the global plug-in description handle, is
a valid handle from the end of a sucessful describe action until the
end of the \ref kOfxActionUnload action (ie: the plug-in can cache it away
without worrying about it changing between actions).
- \ref kOfxImageEffectActionDescribeInContext
will be called once for each context that the host and plug-in
mutually support. If a plug-in does not report to support any context supported by host,
host should not enable the plug-in.
@returns
- \ref kOfxStatOK, the action was trapped and all was well
- \ref kOfxStatErrMissingHostFeature, in which the plugin will be unloaded
and ignored, plugin may post message
- \ref kOfxStatErrMemory, in which case describe may be called again after a
memory purge
- \ref kOfxStatFailed, something wrong, but no error code appropriate,
plugin to post message
- \ref kOfxStatErrFatal
*/
#define kOfxActionDescribe "OfxActionDescribe"
/** @brief
This action is the last action passed to the plug-in before the
binary containing the plug-in is unloaded. It is there to allow a
plug-in to destroy any global data structures it may have created.
The handle, inArgs and outArgs arguments to the main entry
are redundant and should be set to NULL.
\pre
- the \ref kOfxActionLoad action has been called
- all instances of a plugin have been destroyed
\post
- No other actions will be called.
@returns
- \ref kOfxStatOK, the action was trapped all was well
- \ref kOfxStatReplyDefault, the action was ignored
- \ref kOfxStatErrFatal, in which case we the program will be forced to quit
*/
#define kOfxActionUnload "OfxActionUnload"
/** @brief
This action is an action that may be passed to a plug-in
instance from time to time in low memory situations. Instances recieving
this action should destroy any data structures they may have and release
the associated memory, they can later reconstruct this from the effect's
parameter set and associated information.
For Image Effects, it is generally a bad idea to call this after each
render, but rather it should be called after
\ref kOfxImageEffectActionEndSequenceRender
Some effects, typically those flagged with the
\ref kOfxImageEffectInstancePropSequentialRender
property, may need to cache information from previously rendered frames
to function correctly, or have data structures that are expensive to
reconstruct at each frame (eg: a particle system). Ideally, such effect
should free such structures during the
\ref kOfxImageEffectActionEndSequenceRender action.
@param handle handle to the plug-in instance, cast to an \ref OfxImageEffectHandle
@param inArgs is redundant and is set to NULL
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance has been called on the instance handle,
@returns
- \ref kOfxStatOK, the action was trapped and all was well
- \ref kOfxStatReplyDefault, the action was ignored
- \ref kOfxStatErrFatal,
- \ref kOfxStatFailed, something went wrong, but no error code appropriate,
the plugin should to post a message
*/
#define kOfxActionPurgeCaches "OfxActionPurgeCaches"
/** @brief
This action is called when a plugin should synchronise any private data
structures to its parameter set. This generally occurs when an effect is
about to be saved or copied, but it could occur in other situations as
well.
@param handle handle to the plug-in instance, cast to an \ref OfxImageEffectHandle
@param inArgs is redundant and is set to NULL
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance has been called on the instance handle,
\post
- Any private state data can be reconstructed from the parameter set,
@returns
- \ref kOfxStatOK, the action was trapped and all was well
- \ref kOfxStatReplyDefault, the action was ignored
- \ref kOfxStatErrFatal,
- \ref kOfxStatFailed, something went wrong, but no error code appropriate,
the plugin should to post a message
*/
#define kOfxActionSyncPrivateData "OfxActionSyncPrivateData"
/** @brief
This action is the first action passed to a plug-in's
instance after its creation. It is there to allow a plugin to create any
per-instance data structures it may need.
@param handle handle to the plug-in instance, cast to an \ref OfxImageEffectHandle
@param inArgs is redundant and is set to NULL
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionDescribe has been called
- the instance is fully constructed, with all objects requested in the
describe actions (eg, parameters and clips) have been constructed and
have had their initial values set. This means that if the values are
being loaded from an old setup, that load should have taken place
before the create instance action is called.
\post
- the instance pointer will be valid until the
\ref kOfxActionDestroyInstance
action is passed to the plug-in with the same instance handle
@returns
- \ref kOfxStatOK, the action was trapped and all was well
- \ref kOfxStatReplyDefault, the action was ignored, but all was well anyway
- \ref kOfxStatErrFatal
- \ref kOfxStatErrMemory, in which case this may be called again after a
memory purge
- \ref kOfxStatFailed, something went wrong, but no error code appropriate,
the plugin should to post a message if possible and the host should
destroy the instanace handle and not attempt to proceed further
*/
#define kOfxActionCreateInstance "OfxActionCreateInstance"
/** @brief
This action is the last passed to a plug-in's instance before its
destruction. It is there to allow a plugin to destroy any per-instance
data structures it may have created.
@param handle
handle to the plug-in instance, cast to an \ref OfxImageEffectHandle
@param inArgs is redundant and is set to NULL
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance
has been called on the handle,
- the instance has not had any of its members destroyed yet,
\post
- the instance pointer is no longer valid and any operation on it will
be undefined
@returns
To some extent, what is returned is moot, a bit like throwing an
exception in a C++ destructor, so the host should continue destruction
of the instance regardless.
- \ref kOfxStatOK, the action was trapped and all was well,
- \ref kOfxStatReplyDefault, the action was ignored as the effect had nothing
to do,
- \ref kOfxStatErrFatal,
- \ref kOfxStatFailed, something went wrong, but no error code appropriate,
the plugin should to post a message.
*/
#define kOfxActionDestroyInstance "OfxActionDestroyInstance"
/** @brief
This action signals that something has changed in a plugin's instance,
either by user action, the host or the plugin itself. All change actions
are bracketed by a pair of \ref kOfxActionBeginInstanceChanged and
\ref kOfxActionEndInstanceChanged actions. The ``inArgs`` property set is
used to determine what was the thing inside the instance that was
changed.
@param handle handle to the plug-in instance, cast to an \ref OfxImageEffectHandle
@param inArgs has the following properties
- \ref kOfxPropType The type of the thing that changed which will be one of..
- \ref kOfxTypeParameter Indicating a parameter's value has changed
in some way
- \ref kOfxTypeClip A clip to an image effect has changed in some
way (for Image Effect Plugins only)
- \ref kOfxPropName the name of the thing that was changed in the instance
- \ref kOfxPropChangeReason what triggered the change, which will be one of...
- \ref kOfxChangeUserEdited - the user or host changed the instance
somehow and caused a change to something, this includes
undo/redos, resets and loading values from files or presets,
- \ref kOfxChangePluginEdited - the plugin itself has changed the
value of the instance in some action
- \ref kOfxChangeTime - the time has changed and this has affected the
value of the object because it varies over time
- \ref kOfxPropTime
- the effect time at which the chang occured (for Image Effect Plugins only)
- \ref kOfxImageEffectPropRenderScale
- the render scale currently being applied to any image fetched
from a clip (for Image Effect Plugins only)
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance has been called on the instance handle,
- \ref kOfxActionBeginInstanceChanged has been called on the instance
handle.
\post
- \ref kOfxActionEndInstanceChanged will be called on the instance handle.
@returns
- \ref kOfxStatOK, the action was trapped and all was well
- \ref kOfxStatReplyDefault, the action was ignored
- \ref kOfxStatErrFatal,
- \ref kOfxStatFailed, something went wrong, but no error code appropriate,
the plugin should to post a message
*/
#define kOfxActionInstanceChanged "OfxActionInstanceChanged"
/** @brief
The \ref kOfxActionBeginInstanceChanged and \ref kOfxActionEndInstanceChanged actions
are used to bracket all \ref kOfxActionInstanceChanged actions, whether a
single change or multiple changes. Some changes to a plugin instance can
be grouped logically (eg: a 'reset all' button resetting all the
instance's parameters), the begin/end instance changed actions allow a
plugin to respond appropriately to a large set of changes. For example,
a plugin that maintains a complex internal state can delay any changes
to that state until all parameter changes have completed.
@param handle
handle to the plug-in instance, cast to an \ref OfxImageEffectHandle
@param inArgs has the following properties
- \ref kOfxPropChangeReason what triggered the change, which will be one of...
- \ref kOfxChangeUserEdited - the user or host changed the instance
somehow and caused a change to something, this includes
undo/redos, resets and loading values from files or presets,
- \ref kOfxChangePluginEdited - the plugin itself has changed the
value of the instance in some action
- \ref kOfxChangeTime - the time has changed and this has affected the
value of the object because it varies over time
@param outArgs is redundant and is set to NULL
\post
- For \ref kOfxActionBeginInstanceChanged , \ref kOfxActionCreateInstance has been called on the instance handle.
- For \ref kOfxActionEndInstanceChanged , \ref kOfxActionBeginInstanceChanged has been called on the instance handle.
- \ref kOfxActionCreateInstance has been called on the instance handle.
\post
- For \ref kOfxActionBeginInstanceChanged, \ref kOfxActionInstanceChanged will be called at least once on the instance handle.
- \ref kOfxActionEndInstanceChanged will be called on the instance handle.
@returns
- \ref kOfxStatOK, the action was trapped and all was well
- \ref kOfxStatReplyDefault, the action was ignored
- \ref kOfxStatErrFatal,
- \ref kOfxStatFailed, something went wrong, but no error code appropriate,
the plugin should to post a message
*/
#define kOfxActionBeginInstanceChanged "OfxActionBeginInstanceChanged"
/** @brief Action called after the end of a set of \ref kOfxActionEndInstanceChanged actions, used with ::kOfxActionBeginInstanceChanged to bracket a grouped set of changes, see \ref kOfxActionBeginInstanceChanged*/
#define kOfxActionEndInstanceChanged "OfxActionEndInstanceChanged"
/** @brief
This is called when an instance is *first* actively edited by a user,
ie: and interface is open and parameter values and input clips can be
modified. It is there so that effects can create private user interface
structures when necassary. Note that some hosts can have multiple
editors open on the same effect instance simulateously.
@param handle handle to the plug-in instance, cast to an \ref OfxImageEffectHandle
@param inArgs is redundant and is set to NULL
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance has been called on the instance handle,
\post
- \ref kOfxActionEndInstanceEdit will be called when the last editor is
closed on the instance
@returns
- \ref kOfxStatOK, the action was trapped and all was well
- \ref kOfxStatReplyDefault, the action was ignored
- \ref kOfxStatErrFatal,
- \ref kOfxStatFailed, something went wrong, but no error code appropriate,
the plugin should to post a message
*/
#define kOfxActionBeginInstanceEdit "OfxActionBeginInstanceEdit"
/** @brief
This is called when the *last* user interface on an instance closed. It
is there so that effects can destroy private user interface structures
when necassary. Note that some hosts can have multiple editors open on
the same effect instance simulateously, this will only be called when
the last of those editors are closed.
@param handle handle to the plug-in instance, cast to an \ref OfxImageEffectHandle
@param inArgs is redundant and is set to NULL
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionBeginInstanceEdit has been called on the instance handle,
\post
- no user interface is open on the instance
@returns
- \ref kOfxStatOK, the action was trapped and all was well
- \ref kOfxStatReplyDefault, the action was ignored
- \ref kOfxStatErrFatal,
- \ref kOfxStatFailed, something went wrong, but no error code appropriate,
the plugin should to post a message
*/
#define kOfxActionEndInstanceEdit "OfxActionEndInstanceEdit"
/*@}*/
/** @brief Returns the 'nth' plug-in implemented inside a binary
*
* Returns a pointer to the 'nth' plug-in implemented in the binary. A function of this type
* must be implemented in and exported from each plug-in binary.
*/
OfxExport OfxPlugin *OfxGetPlugin(int nth);
/** @brief Defines the number of plug-ins implemented inside a binary
*
* A host calls this to determine how many plug-ins there are inside
* a binary it has loaded. A function of this type
* must be implemented in and exported from each plug-in binary.
*/
OfxExport int OfxGetNumberOfPlugins(void);
/** @brief First thing host should call
*
* This host call, added in 2020, is not specified in earlier implementation of the API.
* Therefore host must check if the plugin implemented it and not assume symbol exists.
* The order of calls is then: 1) OfxSetHost, 2) OfxGetNumberOfPlugins, 3) OfxGetPlugin
* The host pointer is only assumed valid until OfxGetPlugin where it might get reset.
* Plug-in can return kOfxStatFailed to indicate it has nothing to do here, it's not for this Host and it should be skipped silently.
*/
OfxExport OfxStatus OfxSetHost(const OfxHost *host);
/**
\defgroup PropertiesAll Ofx Properties
These strings are used to identify properties within OFX, they are broken up by the host suite or API they relate to.
*/
/*@{*/
/**
\defgroup PropertiesGeneral General Properties
These properties are general properties and apply to may objects across OFX
*/
/*@{*/
/** @brief Property on the host descriptor, saying what API version of the API is being implemented
- Type - int X N
- Property Set - host descriptor.
This is a version string that will specify which version of the API is being implemented by a host. It
can have multiple values. For example "1.0", "1.2.4" etc.....
If this is not present, it is safe to assume that the version of the API is "1.0".
*/
#define kOfxPropAPIVersion "OfxPropAPIVersion"
/** @brief General property used to get/set the time of something.
- Type - double X 1
- Default - 0, if a setable property
- Property Set - commonly used as an argument to actions, input and output.
*/
#define kOfxPropTime "OfxPropTime"
/** @brief Indicates if a host is actively editing the effect with some GUI.
- Type - int X 1
- Property Set - effect instance (read only)
- Valid Values - 0 or 1
If false the effect currently has no interface, however this may be because the effect is loaded in a background render host, or it may be loaded on an interactive host that has not yet opened an editor for the effect.
The output of an effect should only ever depend on the state of its parameters, not on the interactive flag. The interactive flag is more a courtesy flag to let a plugin know that it has an interace. If a plugin want's to have its behaviour dependant on the interactive flag, it can always make a secret parameter which shadows the state if the flag.
*/
#define kOfxPropIsInteractive "OfxPropIsInteractive"
/** @brief The file path to the plugin.
- Type - C string X 1
- Property Set - effect descriptor (read only)
This is a string that indicates the file path where the plug-in was found by the host. The path is in the native
path format for the host OS (eg: UNIX directory separators are forward slashes, Windows ones are backslashes).
The path is to the bundle location, see \ref InstallationLocation.
eg: '/usr/OFX/Plugins/AcmePlugins/AcmeFantasticPlugin.ofx.bundle'
*/
#define kOfxPluginPropFilePath "OfxPluginPropFilePath"
/** @brief A private data pointer that the plug-in can store its own data behind.
- Type - pointer X 1
- Property Set - plugin instance (read/write),
- Default - NULL
This data pointer is unique to each plug-in instance, so two instances of the same plug-in do not share the same data pointer. Use it to hang any needed private data structures.
*/
#define kOfxPropInstanceData "OfxPropInstanceData"
/** @brief General property, used to identify the kind of an object behind a handle
- Type - ASCII C string X 1
- Property Set - any object handle (read only)
- Valid Values - currently this can be...
- ::kOfxTypeImageEffectHost
- ::kOfxTypeImageEffect
- ::kOfxTypeImageEffectInstance
- ::kOfxTypeParameter
- ::kOfxTypeParameterInstance
- ::kOfxTypeClip
- ::kOfxTypeImage
*/
#define kOfxPropType "OfxPropType"
/** @brief Unique name of an object.
- Type - ASCII C string X 1
- Property Set - on many objects (descriptors and instances), see \ref PropertiesByObject (read only)
This property is used to label objects uniquely amoung objects of that type. It is typically set when a plugin creates a new object with a function that takes a name.
*/
#define kOfxPropName "OfxPropName"
/** @brief Identifies a specific version of a host or plugin.
- Type - int X N
- Property Set - host descriptor (read only), plugin descriptor (read/write)
- Default - "0"
- Valid Values - positive integers
This is a multi dimensional integer property that represents the version of a host (host descriptor), or plugin (plugin descriptor). These represent a version number of the form '1.2.3.4', with each dimension adding another 'dot' on the right.
A version is considered to be more recent than another if its ordered set of values is lexicographically greater than another, reading left to right. (ie: 1.2.4 is smaller than 1.2.6). Also, if the number of dimensions is different, then the values of the missing dimensions are considered to be zero (so 1.2.4 is greater than 1.2).
*/
#define kOfxPropVersion "OfxPropVersion"
/** @brief Unique user readable version string of a plugin or host.
- Type - string X 1
- Property Set - host descriptor (read only), plugin descriptor (read/write)
- Default - none, the host needs to set this
- Valid Values - ASCII string
This is purely for user feedback, a plugin or host should use ::kOfxPropVersion if they need
to check for specific versions.
*/
#define kOfxPropVersionLabel "OfxPropVersionLabel"
/** @brief Description of the plug-in to a user.
- Type - string X 1
- Property Set - plugin descriptor (read/write) and instance (read only)
- Default - ""
- Valid Values - UTF8 string
This is a string giving a potentially verbose description of the effect.
*/
#define kOfxPropPluginDescription "OfxPropPluginDescription"
/** @brief User visible name of an object.
- Type - UTF8 C string X 1
- Property Set - on many objects (descriptors and instances), see \ref PropertiesByObject. Typically readable and writable in most cases.
- Default - the ::kOfxPropName the object was created with.
The label is what a user sees on any interface in place of the object's name.
Note that resetting this will also reset ::kOfxPropShortLabel and ::kOfxPropLongLabel.
*/
#define kOfxPropLabel "OfxPropLabel"
/** @brief If set this tells the host to use an icon instead of a label for some object in the interface.
- Type - string X 2
- Property Set - various descriptors in the API
- Default - ""
- Valid Values - ASCII string
The value is a path is defined relative to the Resource folder that points to an SVG or PNG file containing the icon.
The first dimension, if set, will the name of and SVG file, the second a PNG file.
*/
#define kOfxPropIcon "OfxPropIcon"
/** @brief Short user visible name of an object.
- Type - UTF8 C string X 1
- Property Set - on many objects (descriptors and instances), see \ref PropertiesByObject. Typically readable and writable in most cases.
- Default - initially ::kOfxPropName, but will be reset if ::kOfxPropLabel is changed.
This is a shorter version of the label, typically 13 character glyphs or less. Hosts should use this if they have limitted display space for their object labels.
*/
#define kOfxPropShortLabel "OfxPropShortLabel"
/** @brief Long user visible name of an object.
- Type - UTF8 C string X 1
- Property Set - on many objects (descriptors and instances), see \ref PropertiesByObject. Typically readable and writable in most cases.
- Default - initially ::kOfxPropName, but will be reset if ::kOfxPropLabel is changed.
This is a longer version of the label, typically 32 character glyphs or so. Hosts should use this if they have mucg display space for their object labels.
*/
#define kOfxPropLongLabel "OfxPropLongLabel"
/** @brief Indicates why a plug-in changed.
- Type - ASCII C string X 1
- Property Set - inArgs parameter on the ::kOfxActionInstanceChanged action.
- Valid Values - this can be...
- ::kOfxChangeUserEdited - the user directly edited the instance somehow and caused a change to something, this includes undo/redos and resets
- ::kOfxChangePluginEdited - the plug-in itself has changed the value of the object in some action
- ::kOfxChangeTime - the time has changed and this has affected the value of the object because it varies over time
Argument property for the ::kOfxActionInstanceChanged action.
*/
#define kOfxPropChangeReason "OfxPropChangeReason"
/** @brief A pointer to an effect instance.
- Type - pointer X 1
- Property Set - on an interact instance (read only)
This property is used to link an object to the effect. For example if the plug-in supplies an openGL overlay for an image effect,
the interact instance will have one of these so that the plug-in can connect back to the effect the GUI links to.
*/
#define kOfxPropEffectInstance "OfxPropEffectInstance"
/** @brief A pointer to an operating system specific application handle.
- Type - pointer X 1
- Property Set - host descriptor.
Some plug-in vendor want raw OS specific handles back from the host so they can do interesting things with host OS APIs. Typically this is to control windowing properly on Microsoft Windows. This property returns the appropriate 'root' window handle on the current operating system. So on Windows this would be the hWnd of the application main window.
*/
#define kOfxPropHostOSHandle "OfxPropHostOSHandle"
/*@}*/
/*@}*/
/** @brief String used as a value to ::kOfxPropChangeReason to indicate a user has changed something */
#define kOfxChangeUserEdited "OfxChangeUserEdited"
/** @brief String used as a value to ::kOfxPropChangeReason to indicate the plug-in itself has changed something */
#define kOfxChangePluginEdited "OfxChangePluginEdited"
/** @brief String used as a value to ::kOfxPropChangeReason to a time varying object has changed due to a time change */
#define kOfxChangeTime "OfxChangeTime"
/** @brief How time is specified within the OFX API */
typedef double OfxTime;
/** @brief Defines one dimensional integer bounds */
typedef struct OfxRangeI {
int min, max;
} OfxRangeI;
/** @brief Defines one dimensional double bounds */
typedef struct OfxRangeD {
double min, max;
} OfxRangeD;
/** @brief Defines two dimensional integer point */
typedef struct OfxPointI {
int x, y;
} OfxPointI;
/** @brief Defines two dimensional double point */
typedef struct OfxPointD {
double x, y;
} OfxPointD;
/** @brief Used to flag infinite rects. Set minimums to this to indicate infinite
This is effectively INT_MAX.
*/
#define kOfxFlagInfiniteMax INT_MAX
/** @brief Used to flag infinite rects. Set minimums to this to indicate infinite.
This is effectively INT_MIN
*/
#define kOfxFlagInfiniteMin INT_MIN
/** @brief Defines two dimensional integer region
Regions are x1 <= x < x2
Infinite regions are flagged by setting
- x1 = \ref kOfxFlagInfiniteMin
- y1 = \ref kOfxFlagInfiniteMin
- x2 = \ref kOfxFlagInfiniteMax
- y2 = \ref kOfxFlagInfiniteMax
*/
typedef struct OfxRectI {
int x1, y1, x2, y2;
} OfxRectI;
/** @brief Defines two dimensional double region
Regions are x1 <= x < x2
Infinite regions are flagged by setting
- x1 = \ref kOfxFlagInfiniteMin
- y1 = \ref kOfxFlagInfiniteMin
- x2 = \ref kOfxFlagInfiniteMax
- y2 = \ref kOfxFlagInfiniteMax
*/
typedef struct OfxRectD {
double x1, y1, x2, y2;
} OfxRectD;
/** @brief String used to label unset bitdepths */
#define kOfxBitDepthNone "OfxBitDepthNone"
/** @brief String used to label unsigned 8 bit integer samples */
#define kOfxBitDepthByte "OfxBitDepthByte"
/** @brief String used to label unsigned 16 bit integer samples */
#define kOfxBitDepthShort "OfxBitDepthShort"
/** @brief String used to label half-float (16 bit floating point) samples
* \version Added in Version 1.4. Was in ofxOpenGLRender.h before.
*/
#define kOfxBitDepthHalf "OfxBitDepthHalf"
/** @brief String used to label signed 32 bit floating point samples */
#define kOfxBitDepthFloat "OfxBitDepthFloat"
/**
\defgroup StatusCodes Status Codes
These strings are used to identify error states within ofx, they are returned
by various host suite functions, as well as plug-in functions. The valid return codes
for each function are documented with that function.
*/
/*@{*/
/**
\defgroup StatusCodesGeneral General Status Codes
General status codes start at 1 and continue until 999
*/
/*@{*/
/** @brief Status code indicating all was fine */
#define kOfxStatOK 0
/** @brief Status error code for a failed operation. */
#define kOfxStatFailed ((int)1)
/** @brief Status error code for a fatal error
Only returned in the case where the plug-in or host cannot continue to function and needs to be restarted.
*/
#define kOfxStatErrFatal ((int)2)
/** @brief Status error code for an operation on or request for an unknown object */
#define kOfxStatErrUnknown ((int)3)
/** @brief Status error code returned by plug-ins when they are missing host functionality, either an API or some optional functionality (eg: custom params).
Plug-Ins returning this should post an appropriate error message stating what they are missing.
*/
#define kOfxStatErrMissingHostFeature ((int) 4)
/** @brief Status error code for an unsupported feature/operation */
#define kOfxStatErrUnsupported ((int) 5)
/** @brief Status error code for an operation attempting to create something that exists */
#define kOfxStatErrExists ((int) 6)
/** @brief Status error code for an incorrect format */
#define kOfxStatErrFormat ((int) 7)
/** @brief Status error code indicating that something failed due to memory shortage */
#define kOfxStatErrMemory ((int) 8)
/** @brief Status error code for an operation on a bad handle */
#define kOfxStatErrBadHandle ((int) 9)
/** @brief Status error code indicating that a given index was invalid or unavailable */
#define kOfxStatErrBadIndex ((int)10)
/** @brief Status error code indicating that something failed due an illegal value */
#define kOfxStatErrValue ((int) 11)
/** @brief OfxStatus returned indicating a 'yes' */
#define kOfxStatReplyYes ((int) 12)
/** @brief OfxStatus returned indicating a 'no' */
#define kOfxStatReplyNo ((int) 13)
/** @brief OfxStatus returned indicating that a default action should be performed */
#define kOfxStatReplyDefault ((int) 14)
/*@}*/
/*@}*/
#ifdef __cplusplus
}
#endif
/** @mainpage OFX : Open Plug-Ins For Special Effects
This page represents the automatically extracted HTML documentation of the source headers for the OFX Image Effect API.
The documentation was extracted by doxygen (http://www.doxygen.org).
A more complete reference manual is https://openfx.readthedocs.io .
*/
#endif
+78
View File
@@ -0,0 +1,78 @@
#ifndef _ofxDialog_h_
#define _ofxDialog_h_
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
#include "ofxCore.h"
#include "ofxProperty.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @file ofxDialog.h
This file contains an optional suite which should be used to popup a native OS dialog
from a host parameter changed action.
When a host uses a fullscreen window and is running the OFX plugins in another thread
it can lead to a lot of conflicts if that plugin will try to open its own window.
This suite will provide the functionality for a plugin to request running its dialog
in the UI thread, and informing the host it will do this so it can take the appropriate
actions needed. (Like lowering its priority etc..)
*/
/** @brief The name of the Dialog suite, used to fetch from a host via
OfxHost::fetchSuite
*/
#define kOfxDialogSuite "OfxDialogSuite"
/** @brief Action called after a dialog has requested a 'Dialog'
The arguments to the action are:
\arg \c user_data Pointer which was provided when the plugin requested the Dialog
When the plugin receives this action it is safe to popup a dialog.
It runs in the host's UI thread, which may differ from the main OFX processing thread.
Plugin should return from this action when all Dialog interactions are done.
At that point the host will continue again.
The host will not send any other messages asynchronous to this one.
*/
#define kOfxActionDialog "OfxActionDialog"
typedef struct OfxDialogSuiteV1
{
/** @brief Request the host to send a kOfxActionDialog to the plugin from its UI thread.
\pre
- user_data: A pointer to any user data
\post
@returns
- ::kOfxStatOK - The host has queued the request and will send an 'OfxActionDialog'
- ::kOfxStatFailed - The host has no provisio for this or can not deal with it currently.
*/
OfxStatus (*RequestDialog)( void *user_data );
/** @brief Inform the host of redraw event so it can redraw itself
If the host runs fullscreen in OpenGL, it would otherwise not receive
redraw event when a dialog in front would catch all events.
\pre
\post
@returns
- ::kOfxStatReplyDefault
*/
OfxStatus (*NotifyRedrawPending)( void );
} OfxDialogSuiteV1;
#ifdef __cplusplus
}
#endif
#endif
+185
View File
@@ -0,0 +1,185 @@
#ifndef _ofxDraw_h_
#define _ofxDraw_h_
#include "ofxCore.h"
#include "ofxPixels.h"
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
#ifdef __cplusplus
extern "C" {
#endif
/** @file ofxDrawSuite.h
API for host- and GPU API-independent drawing.
@version Added in OpenFX 1.5
*/
/** @brief the string that names the DrawSuite, passed to OfxHost::fetchSuite */
#define kOfxDrawSuite "OfxDrawSuite"
/** @brief Blind declaration of an OFX drawing context
*/
typedef struct OfxDrawContext *OfxDrawContextHandle;
/** @brief The Draw Context handle
- Type - pointer X 1
- Property Set - read only property on the inArgs of the following actions...
- ::kOfxInteractActionDraw
*/
#define kOfxInteractPropDrawContext "OfxInteractPropDrawContext"
/** @brief Defines valid values for OfxDrawSuiteV1::getColour */
typedef enum OfxStandardColour
{
kOfxStandardColourOverlayBackground,
kOfxStandardColourOverlayActive,
kOfxStandardColourOverlaySelected,
kOfxStandardColourOverlayDeselected,
kOfxStandardColourOverlayMarqueeFG,
kOfxStandardColourOverlayMarqueeBG,
kOfxStandardColourOverlayText
} OfxStandardColour;
/** @brief Defines valid values for OfxDrawSuiteV1::setLineStipple */
typedef enum OfxDrawLineStipplePattern
{
kOfxDrawLineStipplePatternSolid, // -----
kOfxDrawLineStipplePatternDot, // .....
kOfxDrawLineStipplePatternDash, // - - -
kOfxDrawLineStipplePatternAltDash, // - - -
kOfxDrawLineStipplePatternDotDash // .-.-.-
} OfxDrawLineStipplePattern;
/** @brief Defines valid values for OfxDrawSuiteV1::draw */
typedef enum OfxDrawPrimitive
{
kOfxDrawPrimitiveLines,
kOfxDrawPrimitiveLineStrip,
kOfxDrawPrimitiveLineLoop,
kOfxDrawPrimitiveRectangle,
kOfxDrawPrimitivePolygon,
kOfxDrawPrimitiveEllipse
} OfxDrawPrimitive;
/** @brief Defines text alignment values for OfxDrawSuiteV1::drawText */
typedef enum OfxDrawTextAlignment
{
kOfxDrawTextAlignmentLeft = 0x0001,
kOfxDrawTextAlignmentRight = 0x0002,
kOfxDrawTextAlignmentTop = 0x0004,
kOfxDrawTextAlignmentBottom = 0x0008,
kOfxDrawTextAlignmentBaseline = 0x0010,
kOfxDrawTextAlignmentCenterH = (kOfxDrawTextAlignmentLeft | kOfxDrawTextAlignmentRight),
kOfxDrawTextAlignmentCenterV = (kOfxDrawTextAlignmentTop | kOfxDrawTextAlignmentBaseline)
} OfxDrawTextAlignment;
/** @brief OFX suite that allows an effect to draw to a host-defined display context.
*/
typedef struct OfxDrawSuiteV1 {
/** @brief Retrieves the host's desired draw colour for
\arg \c context draw context
\arg \c std_colour desired colour type
\arg \c colour returned RGBA colour
@returns
- ::kOfxStatOK - the colour was returned
- ::kOfxStatErrValue - std_colour was invalid
- ::kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
*/
OfxStatus (*getColour)(OfxDrawContextHandle context, OfxStandardColour std_colour, OfxRGBAColourF *colour);
/** @brief Sets the colour for future drawing operations (lines, filled shapes and text)
\arg \c context draw context
\arg \c colour RGBA colour
The host should use "over" compositing when using a non-opaque colour.
@returns
- ::kOfxStatOK - the colour was changed
- ::kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
*/
OfxStatus (*setColour)(OfxDrawContextHandle context, const OfxRGBAColourF *colour);
/** @brief Sets the line width for future line drawing operations
\arg \c context draw context
\arg \c width line width
Use width 0 for a single pixel line or non-zero for a smooth line of the desired width
The host should adjust for screen density.
@returns
- ::kOfxStatOK - the width was changed
- ::kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
*/
OfxStatus (*setLineWidth)(OfxDrawContextHandle context, float width);
/** @brief Sets the stipple pattern for future line drawing operations
\arg \c context draw context
\arg \c pattern desired stipple pattern
@returns
- ::kOfxStatOK - the pattern was changed
- ::kOfxStatErrValue - pattern was not valid
- ::kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
*/
OfxStatus (*setLineStipple)(OfxDrawContextHandle context, OfxDrawLineStipplePattern pattern);
/** @brief Draws a primitive of the desired type
\arg \c context draw context
\arg \c primitive desired primitive
\arg \c points array of points in the primitive
\arg \c point_count number of points in the array
kOfxDrawPrimitiveLines - like GL_LINES, n points draws n/2 separated lines
kOfxDrawPrimitiveLineStrip - like GL_LINE_STRIP, n points draws n-1 connected lines
kOfxDrawPrimitiveLineLoop - like GL_LINE_LOOP, n points draws n connected lines
kOfxDrawPrimitiveRectangle - draws an axis-aligned filled rectangle defined by 2 opposite corner points
kOfxDrawPrimitivePolygon - like GL_POLYGON, draws a filled n-sided polygon
kOfxDrawPrimitiveEllipse - draws a axis-aligned elliptical line (not filled) within the rectangle defined by 2 opposite corner points
@returns
- ::kOfxStatOK - the draw was completed
- ::kOfxStatErrValue - invalid primitive, or point_count not valid for primitive
- ::kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
*/
OfxStatus (*draw)(OfxDrawContextHandle context, OfxDrawPrimitive primitive, const OfxPointD *points, int point_count);
/** @brief Draws text at the specified position
\arg \c context draw context
\arg \c text text to draw (UTF-8 encoded)
\arg \c pos position at which to align the text
\arg \c alignment text alignment flags (see kOfxDrawTextAlignment*)
The text font face and size are determined by the host.
@returns
- ::kOfxStatOK - the text was drawn
- ::kOfxStatErrValue - text or pos were not defined
- ::kOfxStatFailed - failure, e.g. if function is called outside kOfxInteractActionDraw
*/
OfxStatus (*drawText)(OfxDrawContextHandle context, const char *text, const OfxPointD *pos, int alignment);
} OfxDrawSuiteV1;
#ifdef __cplusplus
}
#endif
#endif
+842
View File
@@ -0,0 +1,842 @@
#pragma once
#ifndef __OFXGPURENDER_H__
#define __OFXGPURENDER_H__
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
/** @file ofxGPURender.h
This file contains an optional suite for performing GPU-accelerated
rendering of OpenFX Image Effect Plug-ins. For details see
\ref ofxGPURender.
It allows hosts and plug-ins to support OpenGL, OpenCL, CUDA, and Metal.
Additional GPU APIs, such a Vulkan, could use similar techniques.
*/
#include "ofxImageEffect.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @defgroup OpenGLRenderSuite OpenGL Render Suite
* @{
*/
/** @brief The name of the OpenGL render suite, used to fetch from a host
via OfxHost::fetchSuite
*/
#define kOfxOpenGLRenderSuite "OfxImageEffectOpenGLRenderSuite"
//#define kOfxOpenGLRenderSuite_ext "OfxImageEffectOpenGLRenderSuite_ext"
#ifndef kOfxBitDepthHalf
/** @brief String used to label the OpenGL half float (16 bit floating
point) sample format */
#define kOfxBitDepthHalf "OfxBitDepthHalf"
#endif
/** @brief Indicates whether a host or plug-in can support OpenGL accelerated
rendering
- Type - C string X 1
- Property Set - plug-in descriptor (read/write), host descriptor (read
only) - plug-in instance change (read/write)
- Default - "false" for a plug-in
- Valid Values - This must be one of
- "false" - in which case the host or plug-in does not support OpenGL
accelerated rendering
- "true" - which means a host or plug-in can support OpenGL accelerated
rendering, in the case of plug-ins this also means that it
is capable of CPU based rendering in the absence of a GPU
- "needed" - only for plug-ins, this means that an plug-in has to have
OpenGL support, without which it cannot work.
V1.4: It is now expected from host reporting v1.4 that the plug-in can during instance change switch from true to false and false to true.
*/
#define kOfxImageEffectPropOpenGLRenderSupported "OfxImageEffectPropOpenGLRenderSupported"
/** @brief Indicates the bit depths supported by a plug-in during OpenGL renders.
This is analogous to ::kOfxImageEffectPropSupportedPixelDepths. When a
plug-in sets this property, the host will try to provide buffers/textures
in one of the supported formats. Additionally, the target buffers where
the plug-in renders to will be set to one of the supported formats.
Unlike ::kOfxImageEffectPropSupportedPixelDepths, this property is
optional. Shader-based effects might not really care about any
format specifics when using OpenGL textures, so they can leave this unset
and allow the host the decide the format.
- Type - string X N
- Property Set - plug-in descriptor (read only)
- Default - none set
- Valid Values - This must be one of
- ::kOfxBitDepthNone (implying a clip is unconnected, not valid for an
image)
- ::kOfxBitDepthByte
- ::kOfxBitDepthShort
- ::kOfxBitDepthHalf
- ::kOfxBitDepthFloat
*/
#define kOfxOpenGLPropPixelDepth "OfxOpenGLPropPixelDepth"
/** @brief Indicates that a plug-in SHOULD use OpenGL acceleration in
the current action
When a plug-in and host have established they can both use OpenGL renders
then when this property has been set the host expects the plug-in to render
its result into the buffer it has setup before calling the render. The
plug-in can then also safely use the 'OfxImageEffectOpenGLRenderSuite'
- Type - int X 1
- Property Set - inArgs property set of the following actions...
- ::kOfxImageEffectActionRender
- ::kOfxImageEffectActionBeginSequenceRender
- ::kOfxImageEffectActionEndSequenceRender
- Valid Values
- 0 indicates that the plug-in cannot use the OpenGL suite
- 1 indicates that the plug-in should render into the texture,
and may use the OpenGL suite functions.
\note Once this property is set, the host and plug-in have agreed to
use OpenGL, so the effect SHOULD access all its images through the
OpenGL suite.
v1.4: kOfxImageEffectPropOpenGLEnabled should probably be checked in Instance Changed prior to try to read image via clipLoadTexture
*/
#define kOfxImageEffectPropOpenGLEnabled "OfxImageEffectPropOpenGLEnabled"
/** @brief Indicates the texture index of an image turned into an OpenGL
texture by the host
- Type - int X 1
- Property Set - texture handle returned by
` OfxImageEffectOpenGLRenderSuiteV1::clipLoadTexture (read only)
This value should be cast to a GLuint and used as the texture index when
performing OpenGL texture operations.
The property set of the following actions should contain this property:
- ::kOfxImageEffectActionRender
- ::kOfxImageEffectActionBeginSequenceRender
- ::kOfxImageEffectActionEndSequenceRender
*/
#define kOfxImageEffectPropOpenGLTextureIndex "OfxImageEffectPropOpenGLTextureIndex"
/** @brief Indicates the texture target enumerator of an image turned into
an OpenGL texture by the host
- Type - int X 1
- Property Set - texture handle returned by
OfxImageEffectOpenGLRenderSuiteV1::clipLoadTexture (read only)
This value should be cast to a GLenum and used as the texture target
when performing OpenGL texture operations.
The property set of the following actions should contain this property:
- ::kOfxImageEffectActionRender
- ::kOfxImageEffectActionBeginSequenceRender
- ::kOfxImageEffectActionEndSequenceRender
*/
#define kOfxImageEffectPropOpenGLTextureTarget "OfxImageEffectPropOpenGLTextureTarget"
/** @name StatusReturnValues
OfxStatus returns indicating that a OpenGL render error has occurred:
- If a plug-in returns ::kOfxStatGLRenderFailed, the host should retry the
render with OpenGL rendering disabled.
- If a plug-in returns ::kOfxStatGLOutOfMemory, the host may choose to free
resources on the GPU and retry the OpenGL render, rather than immediately
falling back to CPU rendering.
*/
/**
* @{
*/
/** @brief GPU render ran out of memory */
#define kOfxStatGPUOutOfMemory ((int) 1001)
/** @brief OpenGL render ran out of memory (same as ``kOfxStatGPUOutOfMemory``) */
#define kOfxStatGLOutOfMemory ((int) 1001)
/** @brief GPU render failed in a non-memory-related way */
#define kOfxStatGPURenderFailed ((int) 1002)
/** @brief OpenGL render failed in a non-memory-related way (same as ``kOfxStatGPURenderFailed``) */
#define kOfxStatGLRenderFailed ((int) 1002) /* for backward compatibility */
/** @} */
/** @brief OFX suite that provides image to texture conversion for OpenGL
processing
*/
typedef struct OfxImageEffectOpenGLRenderSuiteV1
{
/** @brief loads an image from an OFX clip as a texture into OpenGL
\arg \c clip clip to load the image from
\arg \c time effect time to load the image from
\arg \c format requested texture format (As in
none,byte,word,half,float, etc..)
When set to NULL, the host decides the format based on the
plug-in's ::kOfxOpenGLPropPixelDepth setting.
\arg \c region region of the image to load (optional, set to NULL to
get a 'default' region)
this is in the \ref CanonicalCoordinates.
\arg \c textureHandle property set containing information about the
texture
An image is fetched from a clip at the indicated time for the given region
and loaded into an OpenGL texture. When a specific format is requested, the
host ensures it gives the requested format.
When the clip specified is the "Output" clip, the format is ignored and
the host must bind the resulting texture as the current color buffer
(render target). This may also be done prior to calling the
::kOfxImageEffectActionRender action.
If the \em region parameter is set to non-NULL, then it will be clipped to
the clip's Region of Definition for the given time.
The returned image will be \em at \em least as big as this region.
If the region parameter is not set or is NULL, then the region fetched will be at
least the Region of Interest the effect has previously specified, clipped to
the clip's Region of Definition.
Information about the texture, including the texture index, is returned in
the \em textureHandle argument.
The properties on this handle will be...
- ::kOfxImageEffectPropOpenGLTextureIndex
- ::kOfxImageEffectPropOpenGLTextureTarget
- ::kOfxImageEffectPropPixelDepth
- ::kOfxImageEffectPropComponents
- ::kOfxImageEffectPropPreMultiplication
- ::kOfxImageEffectPropRenderScale
- ::kOfxImagePropPixelAspectRatio
- ::kOfxImagePropBounds
- ::kOfxImagePropRegionOfDefinition
- ::kOfxImagePropRowBytes
- ::kOfxImagePropField
- ::kOfxImagePropUniqueIdentifier
With the exception of the OpenGL specifics, these properties are the same
as the properties in an image handle returned by clipGetImage in the image
effect suite.
\pre
- clip was returned by clipGetHandle
- Format property in the texture handle
\post
- texture handle to be disposed of by clipFreeTexture before the action
returns
- when the clip specified is the "Output" clip, the format is ignored and
the host must bind the resulting texture as the current color buffer
(render target).
This may also be done prior to calling the render action.
@returns
- ::kOfxStatOK - the image was successfully fetched and returned
in the handle,
- ::kOfxStatFailed - the image could not be fetched because it does
not exist in the clip at the indicated
time and/or region, the plug-in should continue
operation, but assume the image was black and
transparent.
- ::kOfxStatErrBadHandle - the clip handle was invalid,
- ::kOfxStatErrMemory - not enough OpenGL memory was available for the
effect to load the texture.
The plug-in should abort the GL render and
return ::kOfxStatErrMemory, after which the host can
decide to retry the operation with CPU based processing.
\note
- this is the OpenGL equivalent of clipGetImage from OfxImageEffectSuiteV1
*/
OfxStatus (*clipLoadTexture)(OfxImageClipHandle clip,
OfxTime time,
const char *format,
const OfxRectD *region,
OfxPropertySetHandle *textureHandle);
/** @brief Releases the texture handle previously returned by
clipLoadTexture
For input clips, this also deletes the texture from OpenGL.
This should also be called on the output clip; for the Output
clip, it just releases the handle but does not delete the
texture (since the host will need to read it).
\pre
- textureHandle was returned by clipGetImage
\post
- all operations on textureHandle will be invalid, and the OpenGL texture
it referred to has been deleted (for source clips)
@returns
- ::kOfxStatOK - the image was successfully fetched and returned in the
handle,
- ::kOfxStatFailed - general failure for some reason,
- ::kOfxStatErrBadHandle - the image handle was invalid,
*/
OfxStatus (*clipFreeTexture)(OfxPropertySetHandle textureHandle);
/** @brief Request the host to minimize its GPU resource load
When a plug-in fails to allocate GPU resources, it can call this function to
request the host to flush its GPU resources if it holds any.
After the function the plug-in can try again to allocate resources which then
might succeed if the host actually has released anything.
\pre
\post
- No changes to the plug-in GL state should have been made.
@returns
- ::kOfxStatOK - the host has actually released some
resources,
- ::kOfxStatReplyDefault - nothing the host could do..
*/
OfxStatus (*flushResources)( );
} OfxImageEffectOpenGLRenderSuiteV1;
/** @brief Action called when an effect has just been attached to an OpenGL
context.
The purpose of this action is to allow a plug-in to set up any data it may need
to do OpenGL rendering in an instance. For example...
- allocate a lookup table on a GPU,
- create an OpenCL or CUDA context that is bound to the host's OpenGL
context so it can share buffers.
The plug-in will be responsible for deallocating any such shared resource in the
\ref ::kOfxActionOpenGLContextDetached action.
A host cannot call ::kOfxActionOpenGLContextAttached on the same instance
without an intervening ::kOfxActionOpenGLContextDetached. A host can have a
plug-in swap OpenGL contexts by issuing a attach/detach for the first context
then another attach for the next context.
The arguments to the action are...
\arg \c handle handle to the plug-in instance, cast to an
\ref OfxImageEffectHandle
\arg \c inArgs is redundant and set to NULL
\arg \c outArgs is redundant and set to NULL
A plug-in can return...
- ::kOfxStatOK, the action was trapped and all was well
- ::kOfxStatReplyDefault, the action was ignored, but all was well anyway
- ::kOfxStatErrMemory, in which case this may be called again after a memory
purge
- ::kOfxStatFailed, something went wrong, but no error code appropriate,
the plug-in should to post a message if possible and the host should not
attempt to run the plug-in in OpenGL render mode.
*/
#define kOfxActionOpenGLContextAttached "OfxActionOpenGLContextAttached"
/** @brief Action called when an effect is about to be detached from an
OpenGL context
The purpose of this action is to allow a plug-in to deallocate any resource
allocated in \ref ::kOfxActionOpenGLContextAttached just before the host
decouples a plug-in from an OpenGL context.
The host must call this with the same OpenGL context active as it
called with the corresponding ::kOfxActionOpenGLContextAttached.
The arguments to the action are...
\arg \c handle handle to the plug-in instance, cast to an
\ref OfxImageEffectHandle
\arg \c inArgs is redundant and set to NULL
\arg \c outArgs is redundant and set to NULL
A plug-in can return...
- ::kOfxStatOK, the action was trapped and all was well
- ::kOfxStatReplyDefault, the action was ignored, but all was well anyway
- ::kOfxStatErrMemory, in which case this may be called again after a memory
purge
- ::kOfxStatFailed, something went wrong, but no error code appropriate,
the plug-in should to post a message if possible and the host should not
attempt to run the plug-in in OpenGL render mode.
*/
#define kOfxActionOpenGLContextDetached "kOfxActionOpenGLContextDetached"
/** @page ofxOpenGLRender OpenGL Acceleration of Rendering
@section ofxOpenGLRenderIntro Introduction
The OfxOpenGLRenderSuite allows image effects to use OpenGL commands
(hopefully backed by a GPU) to accelerate rendering
of their outputs. The basic scheme is simple....
- An effect indicates it wants to use OpenGL acceleration by setting the
::kOfxImageEffectPropOpenGLRenderSupported flag on its descriptor
- A host indicates it supports OpenGL acceleration by setting
::kOfxImageEffectPropOpenGLRenderSupported on its descriptor
- In an effect's ::kOfxImageEffectActionGetClipPreferences action, an
effect indicates what clips it will be loading images from onto the GPU's
memory during an effect's ::kOfxImageEffectActionRender action.
@section ofxOpenGLRenderHouseKeeping OpenGL House Keeping
If a host supports OpenGL rendering then it flags this with the string
property ::kOfxImageEffectPropOpenGLRenderSupported on its descriptor property
set. Effects that cannot run without OpenGL support should examine this in
::kOfxActionDescribe action and return a ::kOfxStatErrMissingHostFeature
status flag if it is not set to "true".
Effects flag to a host that they support OpenGL rendering by setting the
string property ::kOfxImageEffectPropOpenGLRenderSupported on their effect
descriptor during the ::kOfxActionDescribe action. Effects can work in three
ways....
- purely on CPUs without any OpenGL support at all, in which case they
should set ::kOfxImageEffectPropOpenGLRenderSupported to be "false" (the
default),
- on CPUs but with optional OpenGL support, in which case they should set
::kOfxImageEffectPropOpenGLRenderSupported to be "true",
- only with OpenGL support, in which case they should set
::kOfxImageEffectPropOpenGLRenderSupported to be "needed".
Hosts can examine this flag and respond to it appropriately.
Effects can use OpenGL accelerated rendering during the following
action...
- ::kOfxImageEffectActionRender
If an effect has indicated that it optionally supports OpenGL acceleration,
it should check the property ::kOfxImageEffectPropOpenGLEnabled
passed as an in argument to the following actions,
- ::kOfxImageEffectActionRender
- ::kOfxImageEffectActionBeginSequenceRender
- ::kOfxImageEffectActionEndSequenceRender
If this property is set to 0, then it should not attempt to use any calls to
the OpenGL suite or OpenGL calls whilst rendering.
@section ofxOpenGLRenderGettingTextures Getting Images as Textures
An effect could fetch an image into memory from a host via the standard
Image Effect suite "clipGetImage" call, then create an OpenGL
texture from that. However as several buffer copies and various other bits
of house keeping may need to happen to do this, it is more
efficient for a host to create the texture directly.
The OfxOpenGLRenderSuiteV1::clipLoadTexture function does this. The
arguments and semantics are similar to the
OfxImageEffectSuiteV2::clipGetImage function, with a few minor changes.
The effect is passed back a property handle describing the texture. Once the
texture is finished with, this should be disposed
of via the OfxOpenGLRenderSuiteV1::clipFreeTexture function, which will also
delete the associated OpenGL texture (for source clips).
The returned handle has a set of properties on it, analogous to the
properties returned on the image handle by
OfxImageEffectSuiteV2::clipGetImage. These are:
- ::kOfxImageEffectPropOpenGLTextureIndex
- ::kOfxImageEffectPropOpenGLTextureTarget
- ::kOfxImageEffectPropPixelDepth
- ::kOfxImageEffectPropComponents
- ::kOfxImageEffectPropPreMultiplication
- ::kOfxImageEffectPropRenderScale
- ::kOfxImagePropPixelAspectRatio
- ::kOfxImagePropBounds
- ::kOfxImagePropRegionOfDefinition
- ::kOfxImagePropRowBytes
- ::kOfxImagePropField
- ::kOfxImagePropUniqueIdentifier
The main difference between this and an image handle is that the
::kOfxImagePropData property is replaced by the
kOfxImageEffectPropOpenGLTextureIndex property.
This integer property should be cast to a GLuint and is the index to use for
the OpenGL texture.
Next to texture handle the texture target enumerator is given in
kOfxImageEffectPropOpenGLTextureTarget
Note, because the image is being directly loaded into a texture by the host
it need not obey the Clip Preferences action to remap the image to the pixel
depth the effect requested.
@section ofxOpenGLRenderOutput Render Output Directly with OpenGL
Effects can use the graphics context as they see fit. They may be doing
several render passes with fetch back from the card to main memory
via 'render to texture' mechanisms interleaved with passes performed on the
CPU. The effect must leave output on the graphics card in the provided output
image texture buffer.
The host will create a default OpenGL viewport that is the size of the
render window passed to the render action. The following
code snippet shows how the viewport should be rooted at the bottom left of
the output texture.
\verbatim
// set up the OpenGL context for the render to texture
...
// figure the size of the render window
int dx = renderWindow.x2 - renderWindow.x1;
int dy = renderWindow.y2 - renderWindow.y2;
// setup the output viewport
glViewport(0, 0, dx, dy);
\endverbatim
Prior to calling the render action the host may also choose to
bind the output texture as the current color buffer (render target), or they
may defer doing this until clipLoadTexture is called for the output clip.
After this, it is completely up to the effect to choose what OpenGL
operations to render with, including projections and so on.
@section ofxOpenGLRenderContext OpenGL Current Context
The host is only required to make the OpenGL context current (e.g.,
using wglMakeCurrent, for Windows) during the following actions:
- ::kOfxImageEffectActionRender
- ::kOfxImageEffectActionBeginSequenceRender
- ::kOfxImageEffectActionEndSequenceRender
- ::kOfxActionOpenGLContextAttached
- ::kOfxActionOpenGLContextDetached
For the first 3 actions, Render through EndSequenceRender, the host is only
required to set the OpenGL context if ::kOfxImageEffectPropOpenGLEnabled is
set. In other words, a plug-in should not expect the OpenGL context to be
current for other OFX calls, such as ::kOfxImageEffectActionDescribeInContext.
*/
/** @}*/ // end of OpenGLRender doc group
/**
* @defgroup CudaRender CUDA Rendering
* @version CUDA rendering was added in version 1.5.
*
* @{
*/
/** @brief Indicates whether a host or plug-in can support CUDA render
- Type - string X 1
- Property Set - plug-in descriptor (read/write), host descriptor (read only)
- Default - "false" for a plug-in
- Valid Values - This must be one of
- "false" - the host or plug-in does not support CUDA render
- "true" - the host or plug-in can support CUDA render
*/
#define kOfxImageEffectPropCudaRenderSupported "OfxImageEffectPropCudaRenderSupported"
/** @brief Indicates that a plug-in SHOULD use CUDA render in
the current action
If a plug-in and host have both set
kOfxImageEffectPropCudaRenderSupported="true" then the host MAY set
this property to indicate that it is passing images as CUDA memory
pointers.
- Type - int X 1
- Property Set - inArgs property set of the following actions...
- ::kOfxImageEffectActionRender
- ::kOfxImageEffectActionBeginSequenceRender
- ::kOfxImageEffectActionEndSequenceRender
- Valid Values
- 0 indicates that the kOfxImagePropData of each image of each clip
is a CPU memory pointer.
- 1 indicates that the kOfxImagePropData of each image of each clip
is a CUDA memory pointer.
*/
#define kOfxImageEffectPropCudaEnabled "OfxImageEffectPropCudaEnabled"
/** @brief Indicates whether a host or plug-in can support CUDA streams
- Type - string X 1
- Property Set - plug-in descriptor (read/write), host descriptor (read only)
- Default - "false" for a plug-in
- Valid Values - This must be one of
- "false" - in which case the host or plug-in does not support CUDA streams
- "true" - which means a host or plug-in can support CUDA streams
*/
#define kOfxImageEffectPropCudaStreamSupported "OfxImageEffectPropCudaStreamSupported"
/** @brief The CUDA stream to be used for rendering
- Type - pointer X 1
- Property Set - inArgs property set of the following actions...
- ::kOfxImageEffectActionRender
- ::kOfxImageEffectActionBeginSequenceRender
- ::kOfxImageEffectActionEndSequenceRender
This property will only be set if the host and plug-in both support CUDA streams.
If set:
- this property contains a pointer to the stream of CUDA render (cudaStream_t).
In order to use it, reinterpret_cast<cudaStream_t>(pointer) is needed.
- the plug-in SHOULD ensure that its render action enqueues any
asynchronous CUDA operations onto the supplied queue.
- the plug-in SHOULD NOT wait for final asynchronous operations to
complete before returning from the render action, and SHOULD NOT
call cudaDeviceSynchronize() at any time.
If not set:
- the plug-in SHOULD ensure that any asynchronous operations it
enqueues have completed before returning from the render action.
*/
#define kOfxImageEffectPropCudaStream "OfxImageEffectPropCudaStream"
/** @}*/ // end CudaRender doc group
/**
* @defgroup MetalRender Apple Metal Rendering
* @version Metal rendering was added in version 1.5.
* @{
*/
/** @brief Indicates whether a host or plug-in can support Metal render
- Type - string X 1
- Property Set - plug-in descriptor (read/write), host descriptor (read only)
- Default - "false" for a plug-in
- Valid Values - This must be one of
- "false" - the host or plug-in does not support Metal render
- "true" - the host or plug-in can support Metal render
*/
#define kOfxImageEffectPropMetalRenderSupported "OfxImageEffectPropMetalRenderSupported"
/** @brief Indicates that a plug-in SHOULD use Metal render in
the current action
If a plug-in and host have both set
kOfxImageEffectPropMetalRenderSupported="true" then the host MAY
set this property to indicate that it is passing images as Metal
buffers.
- Type - int X 1
- Property Set - inArgs property set of the following actions...
- ::kOfxImageEffectActionRender
- ::kOfxImageEffectActionBeginSequenceRender
- ::kOfxImageEffectActionEndSequenceRender
- Valid Values
- 0 indicates that the kOfxImagePropData of each image of each clip
is a CPU memory pointer.
- 1 indicates that the kOfxImagePropData of each image of each clip
is a Metal id<MTLBuffer>.
*/
#define kOfxImageEffectPropMetalEnabled "OfxImageEffectPropMetalEnabled"
/** @brief The command queue of Metal render
- Type - pointer X 1
- Property Set - inArgs property set of the following actions...
- ::kOfxImageEffectActionRender
- ::kOfxImageEffectActionBeginSequenceRender
- ::kOfxImageEffectActionEndSequenceRender
This property contains a pointer to the command queue to be used for
Metal rendering (id<MTLCommandQueue>). In order to use it,
reinterpret_cast<id<MTLCommandQueue>>(pointer) is needed.
The plug-in SHOULD ensure that its render action enqueues any
asynchronous Metal operations onto the supplied queue.
The plug-in SHOULD NOT wait for final asynchronous operations to
complete before returning from the render action.
*/
#define kOfxImageEffectPropMetalCommandQueue "OfxImageEffectPropMetalCommandQueue"
/** @}*/ // end MetalRender doc group
/**
* @defgroup OpenClRender OpenCL Rendering
* @version OpenCL rendering was added in version 1.5.
* @{
*/
/** @brief Indicates whether a host or plug-in can support OpenCL Buffers render
- Type - string X 1
- Property Set - plug-in descriptor (read/write), host descriptor (read only)
- Default - "false" for a plug-in
- Valid Values - This must be one of
- "false" - the host or plug-in does not support OpenCL Buffers render
- "true" - the host or plug-in can support OpenCL Buffers render
*/
#define kOfxImageEffectPropOpenCLRenderSupported "OfxImageEffectPropOpenCLRenderSupported"
/** @brief Indicates whether a host or plug-in can support OpenCL Images render
- Type - string X 1
- Property Set - plug-in descriptor (read/write), host descriptor (read only)
- Default - "false" for a plug-in
- Valid Values - This must be one of
- "false" - in which case the host or plug-in does not support OpenCL Images render
- "true" - which means a host or plug-in can support OpenCL Images render
*/
#define kOfxImageEffectPropOpenCLSupported "OfxImageEffectPropOpenCLSupported"
/** @brief Indicates that a plug-in SHOULD use OpenCL render in
the current action
If a plug-in and host have both set
kOfxImageEffectPropOpenCLRenderSupported="true" or have both
set kOfxImageEffectPropOpenCLSupported="true" then the host MAY
set this property to indicate that it is passing images as OpenCL
Buffers or Images.
When rendering using OpenCL Buffers, the cl_mem of the buffers are retrieved using ::kOfxImagePropData.
When rendering using OpenCL Images, the cl_mem of the images are retrieved using ::kOfxImageEffectPropOpenCLImage.
If both ::kOfxImageEffectPropOpenCLSupported (Buffers) and ::kOfxImageEffectPropOpenCLRenderSupported (Images) are
enabled by the plug-in, it should use ::kOfxImageEffectPropOpenCLImage to determine which is being used by the host.
- Type - int X 1
- Property Set - inArgs property set of the following actions...
- ::kOfxImageEffectActionRender
- ::kOfxImageEffectActionBeginSequenceRender
- ::kOfxImageEffectActionEndSequenceRender
- Valid Values
- 0 indicates that a plug-in SHOULD use OpenCL render in
the render action
- 1 indicates that a plug-in SHOULD NOT use OpenCL render in
the render action
*/
#define kOfxImageEffectPropOpenCLEnabled "OfxImageEffectPropOpenCLEnabled"
/** @brief Indicates the OpenCL command queue that should be used for rendering
- Type - pointer X 1
- Property Set - inArgs property set of the following actions...
- ::kOfxImageEffectActionRender
- ::kOfxImageEffectActionBeginSequenceRender
- ::kOfxImageEffectActionEndSequenceRender
This property contains a pointer to the command queue to be used for
OpenCL rendering (cl_command_queue). In order to use it,
reinterpret_cast<cl_command_queue>(pointer) is needed.
The plug-in SHOULD ensure that its render action enqueues any
asynchronous OpenCL operations onto the supplied queue.
The plug-in SHOULD NOT wait for final asynchronous operations to
complete before returning from the render action.
*/
#define kOfxImageEffectPropOpenCLCommandQueue "OfxImageEffectPropOpenCLCommandQueue"
/** @brief Indicates the image handle of an image supplied as an OpenCL Image by the host
- Type - pointer X 1
- Property Set - image handle returned by clipGetImage
This value should be cast to a cl_mem and used as the image handle when performing
OpenCL Images operations. The property should be used (not ::kOfxImagePropData) when
rendering with OpenCL Images (::kOfxImageEffectPropOpenCLSupported), and should be used
to determine whether Images or Buffers should be used if a plug-in supports both
::kOfxImageEffectPropOpenCLSupported and ::kOfxImageEffectPropOpenCLRenderSupported.
Note: the kOfxImagePropRowBytes property is not required to be set by the host, since
OpenCL Images do not have the concept of row bytes.
*/
#define kOfxImageEffectPropOpenCLImage "OfxImageEffectPropOpenCLImage"
#define kOfxOpenCLProgramSuite "OfxOpenCLProgramSuite"
/** @brief OFX suite that allows a plug-in to get OpenCL programs compiled
This is an optional suite the host can provide for building OpenCL programs for the plug-in,
as an alternative to calling clCreateProgramWithSource / clBuildProgram. There are two advantages to
doing this: The host can add flags (such as -cl-denorms-are-zero) to the build call, and may also
cache program binaries for performance (however, if the source of the program or the OpenCL
environment changes, the host must recompile so some mechanism such as hashing must be used).
*/
typedef struct OfxOpenCLProgramSuiteV1 {
/** @brief Compiles the OpenCL program */
OfxStatus(*compileProgram)(const char *pszProgramSource,
int fOptional, // if non-zero, host may skip compiling on this call
void *pResult); // cast to cl_program*
} OfxOpenCLProgramSuiteV1;
/** @page ofxOpenCLRender OpenCL Acceleration of Rendering
@section ofxOpenCLRenderIntro Introduction
The OpenCL extension enables plug-ins to use OpenCL commands (typically backed by a GPU) to accelerate rendering of their outputs. The basic scheme is simple....
- an plug-in indicates it wants to use OpenCL acceleration by setting the ::kOfxImageEffectPropOpenCLSupported (Images) and/or ::kOfxImageEffectPropOpenCLRenderSupported (Buffers) flags on it's descriptor.
- a host indicates it supports OpenCL acceleration by setting ::kOfxImageEffectPropOpenCLSupported (Images) and/or ::kOfxImageEffectPropOpenCLRenderSupported (Buffers) on it's descriptor.
- the host decides when to use OpenCL, and sets the ::kOfxImageEffectPropOpenCLEnabled property on the BeginRender/Render/EndRender calls to indicate this.
- when OpenCL Images are being used (::kOfxImageEffectPropOpenCLSupported) the clip image property ::kOfxImageEffectPropOpenCLImage will be set and non-null.
- when OpenCL Buffers are being used (::kOfxImageEffectPropOpenCLRenderSupported) the clip image property ::kOfxImagePropData will be set and non-null.
@section ofxOpenCLRenderDiscoveryAndEnabling Discovery and Enabling
If a host supports OpenCL rendering then it flags with the string property ::kOfxImageEffectPropOpenCLSupported (Images) and/or
::kOfxImageEffectPropOpenCLRenderSupported (Buffers) on its descriptor property set. Effects that cannot run without OpenCL support
should examine this in ::kOfxActionDescribe action and return a ::kOfxStatErrMissingHostFeature status flag if it is not set to "true".
Effects flag to a host that they support OpenCL rendering by setting the string property ::kOfxImageEffectPropOpenCLSupported (Images)
and/or ::kOfxImageEffectPropOpenCLRenderSupported (Buffers) on their effect descriptor during the ::kOfxActionDescribe action.
Effects can work in two ways....
- purely on CPUs without any OpenCL support at all, in which case they should set ::kOfxImageEffectPropOpenCLSupported (Images) and ::kOfxImageEffectPropOpenCLRenderSupported (Buffers) to be "false" (the default),
- on CPUs but with optional OpenCL support, in which case they should set ::kOfxImageEffectPropOpenCLSupported (Images) and/or ::kOfxImageEffectPropOpenCLRenderSupported (Buffers) to be "true"
Host may support just OpenCL Images, just OpenCL Buffers, or both, as indicated by which of these two properties they set "true".
Likewise plug-ins may support just OpenCL Images, just OpenCL Buffers, or both, as indicated by which of these two properties they set "true".
If both host and plug-in support both, it is up to the host which it uses. Typically, it will be based on what it uses natively (to avoid an extra copy operation).
If a plug-in supports both, it must use ::kOfxImageEffectPropOpenCLImage to determine if Images or Buffers are being used for a given render action.
Effects can use OpenCL render only during the following action:
- ::kOfxImageEffectActionRender
If a plug-in has indicated that it optionally supports OpenCL acceleration, it should check the property ::kOfxImageEffectPropOpenCLEnabled
passed as an in argument to the following actions,
- ::kOfxImageEffectActionRender
- ::kOfxImageEffectActionBeginSequenceRender
- ::kOfxImageEffectActionEndSequenceRender
If this property is set to 0, then it must not attempt to use OpenCL while rendering.
If this property is set to 1, then it must use OpenCL buffers or images while rendering.
If a call using OpenCL rendering fails, the host may re-attempt using CPU buffers instead, but this is not required, and might not be efficient.
@section ofxOpenCLRenderVersion OpenCL platform and device versions and feature support
Assume an in-order command queue. Do not assume a profiling command queue.
Effects should target OpenCL 1.1 API and OpenCL C kernel language support. Only minimum required features required
in OpenCL 1.1 should be used (for example, see "5.3.2.1 Minimum List of Supported Image Formats" for the list
of image types which can be expected to be supported across all devices). If you have specific requirements
for features beyond these minimums, you will need to check the device (e.g., using clGetDeviceInfo with
CL_DEVICE_EXTENSIONS) to see if your feature is available, and have a fallback if it's not.
Temporary buffers and images should not be kept past the render action. A separate extension for host managed caching is in the works.
Do not retain OpenCL objects without a matching release within the render action.
@section ofxOpenCLRenderMultipleDevices Multiple OpenCL Devices
This is very important: The host may support multiple OpenCL devices. Therefore the plug-in should keep a separate set of kernels per OpenCL content (e.g., using a map).
The OpenCL context can be found from the command queue using clGetCommandQueueInfo with CL_QUEUE_CONTEXT.
Failure to do this will cause crashes or incorrect results when the host switches to another OpenCL device.
*/
/** @}*/ // end OpenCLRender doc group
#ifdef __cplusplus
}
#endif
#endif /*__OFXGPURENDER_H__ */
File diff suppressed because it is too large Load Diff
+550
View File
@@ -0,0 +1,550 @@
#ifndef _ofxInteract_h_
#define _ofxInteract_h_
#include "ofxCore.h"
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
#ifdef __cplusplus
extern "C" {
#endif
/** @file ofxInteract.h
Contains the API for ofx plugin defined GUIs and interaction.
*/
#define kOfxInteractSuite "OfxInteractSuite"
/** @brief Blind declaration of an OFX interactive gui
*/
typedef struct OfxInteract *OfxInteractHandle;
/**
\addtogroup PropertiesAll
*/
/*@{*/
/**
\defgroup PropertiesInteract Interact Property Definitions
These are the list of properties used by the Interact API documented in \ref CustomInteractionPage.
*/
/*@{*/
/** @brief The set of parameters on which a value change will trigger a redraw for an interact.
- Type - string X N
- Property Set - interact instance property (read/write)
- Default - no values set
- Valid Values - the name of any parameter associated with this interact.
If the interact is representing the state of some set of OFX parameters, then is will
need to be redrawn if any of those parameters' values change. This multi-dimensional property
links such parameters to the interact.
The interact can be slaved to multiple parameters (setting index 0, then index 1 etc...)
*/
#define kOfxInteractPropSlaveToParam "OfxInteractPropSlaveToParam"
/** @brief The size of a real screen pixel under the interact's canonical projection.
- Type - double X 2
- Property Set - interact instance and actions (read only)
*/
#define kOfxInteractPropPixelScale "OfxInteractPropPixelScale"
/** @brief The background colour of the application behind an interact instance
- Type - double X 3
- Property Set - read only on the interact instance and in argument to the ::kOfxInteractActionDraw action
- Valid Values - from 0 to 1
The components are in the order red, green then blue.
*/
#define kOfxInteractPropBackgroundColour "OfxInteractPropBackgroundColour"
/** @brief The suggested colour to draw a widget in an interact, typically for overlays.
- Type - double X 3
- Property Set - read only on the interact instance
- Default - 1.0
- Valid Values - greater than or equal to 0.0
Some applications allow the user to specify colours of any overlay via a colour picker, this
property represents the value of that colour. Plugins are at liberty to use this or not when
they draw an overlay.
If a host does not support such a colour, it should return kOfxStatReplyDefault
*/
#define kOfxInteractPropSuggestedColour "OfxInteractPropSuggestedColour"
/** @brief The position of the pen in an interact.
- Type - double X 2
- Property Set - read only in argument to the ::kOfxInteractActionPenMotion, ::kOfxInteractActionPenDown and ::kOfxInteractActionPenUp actions
This value passes the postion of the pen into an interact. This is in the interact's canonical coordinates.
*/
#define kOfxInteractPropPenPosition "OfxInteractPropPenPosition"
/** @brief The position of the pen in an interact in viewport coordinates.
- Type - int X 2
- Property Set - read only in argument to the ::kOfxInteractActionPenMotion, ::kOfxInteractActionPenDown and ::kOfxInteractActionPenUp actions
This value passes the postion of the pen into an interact. This is in the interact's openGL viewport coordinates, with 0,0 being at the bottom left.
*/
#define kOfxInteractPropPenViewportPosition "OfxInteractPropPenViewportPosition"
/** @brief The pressure of the pen in an interact.
- Type - double X 1
- Property Set - read only in argument to the ::kOfxInteractActionPenMotion, ::kOfxInteractActionPenDown and ::kOfxInteractActionPenUp actions
- Valid Values - from 0 (no pressure) to 1 (maximum pressure)
This is used to indicate the status of the 'pen' in an interact. If a pen has only two states (eg: a mouse button), these should map to 0.0 and 1.0.
*/
#define kOfxInteractPropPenPressure "OfxInteractPropPenPressure"
/** @brief Indicates whether the dits per component in the interact's openGL frame buffer
- Type - int X 1
- Property Set - interact instance and descriptor (read only)
*/
#define kOfxInteractPropBitDepth "OfxInteractPropBitDepth"
/** @brief Indicates whether the interact's frame buffer has an alpha component or not
- Type - int X 1
- Property Set - interact instance and descriptor (read only)
- Valid Values - This must be one of
- 0 indicates no alpha component
- 1 indicates an alpha component
*/
#define kOfxInteractPropHasAlpha "OfxInteractPropHasAlpha"
/*@}*/
/*@}*/
/**
\addtogroup ActionsAll
*/
/*@{*/
/**
\defgroup InteractActions Interact Actions
These are the list of actions passed to an interact's entry point function. For more details on how to deal with actions, see \ref InteractActions.
*/
/*@{*/
/** @brief
This action is the first action passed to an interact. It is
where an interact defines how it behaves and the resources it needs to
function.
If not trapped, the default action is for the host to carry on as normal
Note that the handle passed in acts as a descriptor for, rather than an
instance of the interact.
@param handle handle to the interact descriptor, cast to an \ref OfxInteractHandle
@param inArgs is redundant and is set to NULL
@param outArgs is redundant and is set to NULL
\pre
- The plugin has been loaded and the effect described.
@returns
- \ref kOfxStatOK the action was trapped and all was well
- \ref kOfxStatErrMemory in which case describe may be called again after a memory purge
- \ref kOfxStatFailed something was wrong, the host should ignore the interact
- \ref kOfxStatErrFatal
*/
#define kOfxActionDescribeInteract kOfxActionDescribe
/** @brief
This action is the first action passed to an interact instance after its creation.
It is there to allow a plugin to create any per-instance data structures it may need.
@param handle handle to the interact instance, cast to an \ref OfxInteractHandle
@param inArgs is redundant and is set to NULL
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionDescribe has been called on this interact
\post
- the instance pointer will be valid until the \ref kOfxActionDestroyInstance
action is passed to the plug-in with the same instance handle
@returns
- \ref kOfxStatOK the action was trapped and all was well
- \ref kOfxStatReplyDefault the action was ignored, but all was well anyway
- \ref kOfxStatErrFatal
- \ref kOfxStatErrMemory in which case this may be called again after a memory purge
- \ref kOfxStatFailed in which case the host should ignore this interact
*/
#define kOfxActionCreateInstanceInteract kOfxActionCreateInstance
/**@brief
This action is the last passed to an interact's instance before its
destruction. It is there to allow a plugin to destroy any per-instance
data structures it may have created.
@param handle handle to the interact instance, cast to an \ref OfxInteractHandle
@param inArgs is redundant and is set to NULL
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance
has been called on the handle,
- the instance has not had any of its members destroyed yet
\post
- the instance pointer is no longer valid and any operation on it will be undefined
@returns
To some extent, what is returned is moot, a bit like throwing an
exception in a C++ destructor, so the host should continue destruction
of the instance regardless
- \ref kOfxStatOK the action was trapped and all was well
- \ref kOfxStatReplyDefault the action was ignored as the effect had nothing to do
- \ref kOfxStatErrFatal
- \ref kOfxStatFailed something went wrong, but no error code appropriate.
*/
#define kOfxActionDestroyInstanceInteract kOfxActionDestroyInstance
/** @brief
This action is issued to an interact whenever the host needs the plugin
to redraw the given interact.
The interact should either issue OpenGL calls to draw itself, or use DrawSuite calls.
If this is called via kOfxImageEffectPluginPropOverlayInteractV2, drawing MUST use DrawSuite.
If this is called via kOfxImageEffectPluginPropOverlayInteractV1, drawing SHOULD use OpenGL. Some existing plugins may use DrawSuite via kOfxImageEffectPluginPropOverlayInteractV1 if it's supported by the host, but this is discouraged.
Note that the interact may (in the case of custom parameter GUIS) or may
not (in the case of image effect overlays) be required to swap buffers,
that is up to the kind of interact.
@param handle handle to an interact instance, cast to an \ref OfxInteractHandle
@param inArgs has the following properties on an image effect plugin
- \ref kOfxPropEffectInstance a handle to the effect for which the interact has been,
- \ref kOfxInteractPropPixelScale the scale factor to convert cannonical pixels to screen pixels
- \ref kOfxInteractPropBackgroundColour the background colour of the application behind the current view
- \ref kOfxPropTime the effect time at which changed occured
- \ref kOfxImageEffectPropRenderScale the render scale applied to any image fetched
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance has been called on the instance handle
- the openGL context for this interact has been set
- the projection matrix will correspond to the interact's cannonical view
@returns
- \ref kOfxStatOK the action was trapped and all was well
- \ref kOfxStatReplyDefault the action was ignored
- \ref kOfxStatErrFatal
- \ref kOfxStatFailed something went wrong, the host should ignore this interact in future
*/
#define kOfxInteractActionDraw "OfxInteractActionDraw"
/** @brief
This action is issued whenever the pen moves an the interact's has
focus. It should be issued whether the pen is currently up or down.
No openGL calls should be issued by the plug-in during this action.
@param handle handle to an interact instance, cast to an \ref OfxInteractHandle
@param inArgs has the following properties on an image effect plugin
- \ref kOfxPropEffectInstance a handle to the effect for which the interact has been,
- \ref kOfxInteractPropPixelScale the scale factor to convert cannonical pixels to screen pixels
- \ref kOfxInteractPropBackgroundColour the background colour of the application behind the current view
- \ref kOfxPropTime the effect time at which changed occured
- \ref kOfxImageEffectPropRenderScale the render scale applied to any image fetched
- \ref kOfxInteractPropPenPosition postion of the pen in,
- \ref kOfxInteractPropPenViewportPosition position of the pen in,
- \ref kOfxInteractPropPenPressure the pressure of the pen,
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance
has been called on the instance handle
- the current instance handle has had
\ref kOfxInteractActionGainFocus called on it
\post
- if the instance returns \ref kOfxStatOK the host should not
pass the pen motion to any other interactive object it may own that
shares the same view.
@returns
- \ref kOfxStatOK the action was trapped and the host should not pass the event to other objects it may own
- \ref kOfxStatReplyDefault the action was not trapped and the host can deal with it if it wants
*/
#define kOfxInteractActionPenMotion "OfxInteractActionPenMotion"
/**@brief
This action is issued when a pen transitions for the 'up' to the 'down'
state.
No openGL calls should be issued by the plug-in during this action.
@param handle handle to an interact instance, cast to an \ref OfxInteractHandle
@param inArgs has the following properties on an image effect plugin,
- \ref kOfxPropEffectInstance a handle to the effect for which the interact has been,
- \ref kOfxInteractPropPixelScale the scale factor to convert cannonical pixels to screen pixels
- \ref kOfxInteractPropBackgroundColour the background colour of the application behind the current view
- \ref kOfxPropTime the effect time at which changed occured
- \ref kOfxImageEffectPropRenderScale the render scale applied to any image fetched
- \ref kOfxInteractPropPenPosition position of the pen in
- \ref kOfxInteractPropPenViewportPosition position of the pen in
- \ref kOfxInteractPropPenPressure the pressure of the pen
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance
has been called on the instance handle,
- the current instance handle has had
\ref kOfxInteractActionGainFocus
called on it
\post
- if the instance returns \ref kOfxStatOK, the host should not
pass the pen motion to any other interactive object it may own that
shares the same view.
@returns
- \ref kOfxStatOK, the action was trapped and the host should not pass the event to other objects it may own
- \ref kOfxStatReplyDefault , the action was not trapped and the host can deal with it if it wants
*/
#define kOfxInteractActionPenDown "OfxInteractActionPenDown"
/**@brief
This action is issued when a pen transitions for the 'down' to the 'up'
state.
No openGL calls should be issued by the plug-in during this action.
@param handle handle to an interact instance, cast to an \ref OfxInteractHandle
@param inArgs has the following properties on an image effect plugin,
- \ref kOfxPropEffectInstance a handle to the effect for which the interact has been,
- \ref kOfxInteractPropPixelScale the scale factor to convert cannonical pixels to screen pixels
- \ref kOfxInteractPropBackgroundColour the background colour of the application behind the current view
- \ref kOfxPropTime the effect time at which changed occured
- \ref kOfxImageEffectPropRenderScale the render scale applied to any image fetched
- \ref kOfxInteractPropPenPosition position of the pen in
- \ref kOfxInteractPropPenViewportPosition position of the pen in
- \ref kOfxInteractPropPenPressure the pressure of the pen
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance
has been called on the instance handle,
- the current instance handle has had
\ref kOfxInteractActionGainFocus called on it
\post
- if the instance returns \ref kOfxStatOK, the host should not
pass the pen motion to any other interactive object it may own that
shares the same view.
@returns
- \ref kOfxStatOK, the action was trapped and the host should not pass the event to other objects it may own
- \ref kOfxStatReplyDefault , the action was not trapped and the host can deal with it if it wants
*/
#define kOfxInteractActionPenUp "OfxInteractActionPenUp"
/**@brief
This action is issued when a key on the keyboard is depressed.
No openGL calls should be issued by the plug-in during this action.
@param handle handle to an interact instance, cast to an \ref OfxInteractHandle
@param inArgs has the following properties on an image effect plugin
- \ref kOfxPropEffectInstance a handle to the effect for which the interact has been,
- \ref kOfxPropKeySym single integer value representing the key that was manipulated,
this may not have a UTF8 representation (eg: a return key)
- \ref kOfxPropKeyString UTF8 string representing a character key that was pressed, some
keys have no UTF8 encoding, in which case this is ""
- \ref kOfxPropTime the effect time at which changed occured
- \ref kOfxImageEffectPropRenderScale the render scale applied to any image fetched
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance
has been called on the instance handle,
- the current instance handle has had
\ref kOfxInteractActionGainFocus called on it
\post
- if the instance returns \ref kOfxStatOK, the host should not
pass the pen motion to any other interactive object it may own that
shares the same focus.
@returns
- \ref kOfxStatOK , the action was trapped and the host should not pass the event to other objects it may own
- \ref kOfxStatReplyDefault , the action was not trapped and the host can deal with it if it wants
*/
#define kOfxInteractActionKeyDown "OfxInteractActionKeyDown"
/**@brief
This action is issued when a key on the keyboard is released.
No openGL calls should be issued by the plug-in during this action.
@param handle handle to an interact instance, cast to an \ref OfxInteractHandle
@param inArgs has the following properties on an image effect plugin
- \ref kOfxPropEffectInstance a handle to the effect for which the interact has been,
- \ref kOfxPropKeySym single integer value representing the key that was manipulated,
this may not have a UTF8 representation (eg: a return key)
- \ref kOfxPropKeyString UTF8 string representing a character key that was pressed, some
keys have no UTF8 encoding, in which case this is ""
- \ref kOfxPropTime the effect time at which changed occured
- \ref kOfxImageEffectPropRenderScale the render scale applied to any image fetched
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance
has been called on the instance handle,
- the current instance handle has had
\ref kOfxInteractActionGainFocus called on it
\post
- if the instance returns \ref kOfxStatOK, the host should not
pass the pen motion to any other interactive object it may own that
shares the same focus.
@returns
- \ref kOfxStatOK , the action was trapped and the host should not pass the event to other objects it may own
- \ref kOfxStatReplyDefault , the action was not trapped and the host can deal with it if it wants
*/
#define kOfxInteractActionKeyUp "OfxInteractActionKeyUp"
/**@brief
This action is issued when a key on the keyboard is repeated.
No openGL calls should be issued by the plug-in during this action.
@param handle handle to an interact instance, cast to an \ref OfxInteractHandle
@param inArgs has the following properties on an image effect plugin
- \ref kOfxPropEffectInstance a handle to the effect for which the interact has been,
- \ref kOfxPropKeySym single integer value representing the key that was manipulated,
this may not have a UTF8 representation (eg: a return key)
- \ref kOfxPropKeyString UTF8 string representing a character key that was pressed, some
keys have no UTF8 encoding, in which case this is ""
- \ref kOfxPropTime the effect time at which changed occured
- \ref kOfxImageEffectPropRenderScale the render scale applied to any image fetched
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance
has been called on the instance handle,
- the current instance handle has had
\ref kOfxInteractActionGainFocus called on it
\post
- if the instance returns \ref kOfxStatOK, the host should not
pass the pen motion to any other interactive object it may own that
shares the same focus.
@returns
- \ref kOfxStatOK , the action was trapped and the host should not pass the event to other objects it may own
- \ref kOfxStatReplyDefault , the action was not trapped and the host can deal with it if it wants
*/
#define kOfxInteractActionKeyRepeat "OfxInteractActionKeyRepeat"
/**@brief
This action is issued when an interact gains input focus.
No openGL calls should be issued by the plug-in during this action.
@param handle handle to an interact instance, cast to an \ref OfxInteractHandle
@param inArgs has the following properties on an image effect plugin
- \ref kOfxPropEffectInstance a handle to the effect for which the interact is being used on,
- \ref kOfxInteractPropPixelScale the scale factor to convert cannonical pixels to screen pixels,
- \ref kOfxInteractPropBackgroundColour the background colour of the application behind the current view
- \ref kOfxPropTime the effect time at which changed occured
- \ref kOfxImageEffectPropRenderScale the render scale applied to any image fetched
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance
has been called on the instance handle,
@returns
- \ref kOfxStatOK the action was trapped
- \ref kOfxStatReplyDefault the action was not trapped
*/
#define kOfxInteractActionGainFocus "OfxInteractActionGainFocus"
/**@brief
This action is issued when an interact loses input focus.
No openGL calls should be issued by the plug-in during this action.
@param handle handle to an interact instance, cast to an \ref OfxInteractHandle
@param inArgs has the following properties on an image effect plugin
- \ref kOfxPropEffectInstance a handle to the effect for which the interact is being used on,
- \ref kOfxInteractPropPixelScale the scale factor to convert cannonical pixels to screen pixels,
- \ref kOfxInteractPropBackgroundColour the background colour of the application behind the current view
- \ref kOfxPropTime the effect time at which changed occured
- \ref kOfxImageEffectPropRenderScale the render scale applied to any image fetched
@param outArgs is redundant and is set to NULL
\pre
- \ref kOfxActionCreateInstance
has been called on the instance handle,
@returns
- \ref kOfxStatOK the action was trapped
- \ref kOfxStatReplyDefault the action was not trapped
*/
#define kOfxInteractActionLoseFocus "OfxInteractActionLoseFocus"
/*@}*/
/*@}*/
/** @brief OFX suite that allows an effect to interact with an openGL window so as to provide custom interfaces.
*/
typedef struct OfxInteractSuiteV1 {
/** @brief Requests an openGL buffer swap on the interact instance */
OfxStatus (*interactSwapBuffers)(OfxInteractHandle interactInstance);
/** @brief Requests a redraw of the interact instance */
OfxStatus (*interactRedraw)(OfxInteractHandle interactInstance);
/** @brief Gets the property set handle for this interact handle */
OfxStatus (*interactGetPropertySet)(OfxInteractHandle interactInstance,
OfxPropertySetHandle *property);
} OfxInteractSuiteV1;
#ifdef __cplusplus
}
#endif
#endif
+528
View File
@@ -0,0 +1,528 @@
#ifndef _ofxKeySyms_h_
#define _ofxKeySyms_h_
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
/**
\addtogroup PropertiesGeneral
*/
/*@{*/
/** @brief Property used to indicate which a key on the keyboard or a button on a button device has been pressed
- Type - int X 1
- Property Set - an read only in argument for the actions ::kOfxInteractActionKeyDown, ::kOfxInteractActionKeyUp and ::kOfxInteractActionKeyRepeat.
- Valid Values - one of any specified by #defines in the file ofxKeySyms.h.
This property represents a raw key press, it does not represent the 'character value' of the key.
This property is associated with a ::kOfxPropKeyString property, which encodes the UTF8
value for the keypress/button press. Some keys (for example arrow keys) have no UTF8 equivalant.
Some keys, especially on non-english language systems, may have a UTF8 value, but \em not a keysym values, in these
cases, the keysym will have a value of kOfxKey_Unknown, but the ::kOfxPropKeyString property will still be set with
the UTF8 value.
*/
#define kOfxPropKeySym "kOfxPropKeySym"
/** @brief This property encodes a single keypresses that generates a unicode code point. The value is stored as a UTF8 string.
- Type - C string X 1, UTF8
- Property Set - an read only in argument for the actions ::kOfxInteractActionKeyDown, ::kOfxInteractActionKeyUp and ::kOfxInteractActionKeyRepeat.
- Valid Values - a UTF8 string representing a single character, or the empty string.
This property represents the UTF8 encode value of a single key press by a user in an OFX interact.
This property is associated with a ::kOfxPropKeySym which represents an integer value for the key press. Some keys (for example arrow keys) have no UTF8 equivalant,
in which case this is set to the empty string "", and the associate ::kOfxPropKeySym is set to the equivilant raw key press.
Some keys, especially on non-english language systems, may have a UTF8 value, but \em not a keysym values, in these
cases, the keysym will have a value of kOfxKey_Unknown, but the ::kOfxPropKeyString property will still be set with
the UTF8 value.
*/
#define kOfxPropKeyString "kOfxPropKeyString"
/*
The keysyms below have been lifted wholesale out of the X-Windows key symbol header file. Only
the names have been changed to protect the innocent.
*/
/*@}*/
/*
Copyright (c) 1987, 1994 X Consortium
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from the X Consortium.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
**/
/**
\defgroup KeySyms OFX Key symbols
These keysymbols are used as values by the ::kOfxPropKeySym property to indicate the value
of a key that has been pressed. A corresponding ::kOfxPropKeyString property is also set to
contain the unicode value of the key (if it has one).
The special keysym ::kOfxKey_Unknown is used to set the ::kOfxPropKeySym property in cases
where the key has a UTF8 value which is not supported by the symbols below.
*/
/*@{*/
#define kOfxKey_Unknown 0x0
/*
* TTY Functions, cleverly chosen to map to ascii, for convenience of
* programming, but could have been arbitrary (at the cost of lookup
* tables in client code.
*/
#define kOfxKey_BackSpace 0xFF08 /* back space, back char */
#define kOfxKey_Tab 0xFF09
#define kOfxKey_Linefeed 0xFF0A /* Linefeed, LF */
#define kOfxKey_Clear 0xFF0B
#define kOfxKey_Return 0xFF0D /* Return, enter */
#define kOfxKey_Pause 0xFF13 /* Pause, hold */
#define kOfxKey_Scroll_Lock 0xFF14
#define kOfxKey_Sys_Req 0xFF15
#define kOfxKey_Escape 0xFF1B
#define kOfxKey_Delete 0xFFFF /* Delete, rubout */
/* International & multi-key character composition */
#define kOfxKey_Multi_key 0xFF20 /* Multi-key character compose */
#define kOfxKey_SingleCandidate 0xFF3C
#define kOfxKey_MultipleCandidate 0xFF3D
#define kOfxKey_PreviousCandidate 0xFF3E
/* Japanese keyboard support */
#define kOfxKey_Kanji 0xFF21 /* Kanji, Kanji convert */
#define kOfxKey_Muhenkan 0xFF22 /* Cancel Conversion */
#define kOfxKey_Henkan_Mode 0xFF23 /* Start/Stop Conversion */
#define kOfxKey_Henkan 0xFF23 /* Alias for Henkan_Mode */
#define kOfxKey_Romaji 0xFF24 /* to Romaji */
#define kOfxKey_Hiragana 0xFF25 /* to Hiragana */
#define kOfxKey_Katakana 0xFF26 /* to Katakana */
#define kOfxKey_Hiragana_Katakana 0xFF27 /* Hiragana/Katakana toggle */
#define kOfxKey_Zenkaku 0xFF28 /* to Zenkaku */
#define kOfxKey_Hankaku 0xFF29 /* to Hankaku */
#define kOfxKey_Zenkaku_Hankaku 0xFF2A /* Zenkaku/Hankaku toggle */
#define kOfxKey_Touroku 0xFF2B /* Add to Dictionary */
#define kOfxKey_Massyo 0xFF2C /* Delete from Dictionary */
#define kOfxKey_Kana_Lock 0xFF2D /* Kana Lock */
#define kOfxKey_Kana_Shift 0xFF2E /* Kana Shift */
#define kOfxKey_Eisu_Shift 0xFF2F /* Alphanumeric Shift */
#define kOfxKey_Eisu_toggle 0xFF30 /* Alphanumeric toggle */
#define kOfxKey_Zen_Koho 0xFF3D /* Multiple/All Candidate(s) */
#define kOfxKey_Mae_Koho 0xFF3E /* Previous Candidate */
/* Cursor control & motion */
#define kOfxKey_Home 0xFF50
#define kOfxKey_Left 0xFF51 /* Move left, left arrow */
#define kOfxKey_Up 0xFF52 /* Move up, up arrow */
#define kOfxKey_Right 0xFF53 /* Move right, right arrow */
#define kOfxKey_Down 0xFF54 /* Move down, down arrow */
#define kOfxKey_Prior 0xFF55 /* Prior, previous */
#define kOfxKey_Page_Up 0xFF55
#define kOfxKey_Next 0xFF56 /* Next */
#define kOfxKey_Page_Down 0xFF56
#define kOfxKey_End 0xFF57 /* EOL */
#define kOfxKey_Begin 0xFF58 /* BOL */
/* Misc Functions */
#define kOfxKey_Select 0xFF60 /* Select, mark */
#define kOfxKey_Print 0xFF61
#define kOfxKey_Execute 0xFF62 /* Execute, run, do */
#define kOfxKey_Insert 0xFF63 /* Insert, insert here */
#define kOfxKey_Undo 0xFF65 /* Undo, oops */
#define kOfxKey_Redo 0xFF66 /* redo, again */
#define kOfxKey_Menu 0xFF67
#define kOfxKey_Find 0xFF68 /* Find, search */
#define kOfxKey_Cancel 0xFF69 /* Cancel, stop, abort, exit */
#define kOfxKey_Help 0xFF6A /* Help */
#define kOfxKey_Break 0xFF6B
#define kOfxKey_Mode_switch 0xFF7E /* Character set switch */
#define kOfxKey_script_switch 0xFF7E /* Alias for mode_switch */
#define kOfxKey_Num_Lock 0xFF7F
/* Keypad Functions, keypad numbers cleverly chosen to map to ascii */
#define kOfxKey_KP_Space 0xFF80 /* space */
#define kOfxKey_KP_Tab 0xFF89
#define kOfxKey_KP_Enter 0xFF8D /* enter */
#define kOfxKey_KP_F1 0xFF91 /* PF1, KP_A, ... */
#define kOfxKey_KP_F2 0xFF92
#define kOfxKey_KP_F3 0xFF93
#define kOfxKey_KP_F4 0xFF94
#define kOfxKey_KP_Home 0xFF95
#define kOfxKey_KP_Left 0xFF96
#define kOfxKey_KP_Up 0xFF97
#define kOfxKey_KP_Right 0xFF98
#define kOfxKey_KP_Down 0xFF99
#define kOfxKey_KP_Prior 0xFF9A
#define kOfxKey_KP_Page_Up 0xFF9A
#define kOfxKey_KP_Next 0xFF9B
#define kOfxKey_KP_Page_Down 0xFF9B
#define kOfxKey_KP_End 0xFF9C
#define kOfxKey_KP_Begin 0xFF9D
#define kOfxKey_KP_Insert 0xFF9E
#define kOfxKey_KP_Delete 0xFF9F
#define kOfxKey_KP_Equal 0xFFBD /* equals */
#define kOfxKey_KP_Multiply 0xFFAA
#define kOfxKey_KP_Add 0xFFAB
#define kOfxKey_KP_Separator 0xFFAC /* separator, often comma */
#define kOfxKey_KP_Subtract 0xFFAD
#define kOfxKey_KP_Decimal 0xFFAE
#define kOfxKey_KP_Divide 0xFFAF
#define kOfxKey_KP_0 0xFFB0
#define kOfxKey_KP_1 0xFFB1
#define kOfxKey_KP_2 0xFFB2
#define kOfxKey_KP_3 0xFFB3
#define kOfxKey_KP_4 0xFFB4
#define kOfxKey_KP_5 0xFFB5
#define kOfxKey_KP_6 0xFFB6
#define kOfxKey_KP_7 0xFFB7
#define kOfxKey_KP_8 0xFFB8
#define kOfxKey_KP_9 0xFFB9
/*
* Auxilliary Functions; note the duplicate definitions for left and right
* function keys; Sun keyboards and a few other manufactures have such
* function key groups on the left and/or right sides of the keyboard.
* We've not found a keyboard with more than 35 function keys total.
*/
#define kOfxKey_F1 0xFFBE
#define kOfxKey_F2 0xFFBF
#define kOfxKey_F3 0xFFC0
#define kOfxKey_F4 0xFFC1
#define kOfxKey_F5 0xFFC2
#define kOfxKey_F6 0xFFC3
#define kOfxKey_F7 0xFFC4
#define kOfxKey_F8 0xFFC5
#define kOfxKey_F9 0xFFC6
#define kOfxKey_F10 0xFFC7
#define kOfxKey_F11 0xFFC8
#define kOfxKey_L1 0xFFC8
#define kOfxKey_F12 0xFFC9
#define kOfxKey_L2 0xFFC9
#define kOfxKey_F13 0xFFCA
#define kOfxKey_L3 0xFFCA
#define kOfxKey_F14 0xFFCB
#define kOfxKey_L4 0xFFCB
#define kOfxKey_F15 0xFFCC
#define kOfxKey_L5 0xFFCC
#define kOfxKey_F16 0xFFCD
#define kOfxKey_L6 0xFFCD
#define kOfxKey_F17 0xFFCE
#define kOfxKey_L7 0xFFCE
#define kOfxKey_F18 0xFFCF
#define kOfxKey_L8 0xFFCF
#define kOfxKey_F19 0xFFD0
#define kOfxKey_L9 0xFFD0
#define kOfxKey_F20 0xFFD1
#define kOfxKey_L10 0xFFD1
#define kOfxKey_F21 0xFFD2
#define kOfxKey_R1 0xFFD2
#define kOfxKey_F22 0xFFD3
#define kOfxKey_R2 0xFFD3
#define kOfxKey_F23 0xFFD4
#define kOfxKey_R3 0xFFD4
#define kOfxKey_F24 0xFFD5
#define kOfxKey_R4 0xFFD5
#define kOfxKey_F25 0xFFD6
#define kOfxKey_R5 0xFFD6
#define kOfxKey_F26 0xFFD7
#define kOfxKey_R6 0xFFD7
#define kOfxKey_F27 0xFFD8
#define kOfxKey_R7 0xFFD8
#define kOfxKey_F28 0xFFD9
#define kOfxKey_R8 0xFFD9
#define kOfxKey_F29 0xFFDA
#define kOfxKey_R9 0xFFDA
#define kOfxKey_F30 0xFFDB
#define kOfxKey_R10 0xFFDB
#define kOfxKey_F31 0xFFDC
#define kOfxKey_R11 0xFFDC
#define kOfxKey_F32 0xFFDD
#define kOfxKey_R12 0xFFDD
#define kOfxKey_F33 0xFFDE
#define kOfxKey_R13 0xFFDE
#define kOfxKey_F34 0xFFDF
#define kOfxKey_R14 0xFFDF
#define kOfxKey_F35 0xFFE0
#define kOfxKey_R15 0xFFE0
/* Modifiers */
#define kOfxKey_Shift_L 0xFFE1 /* Left shift */
#define kOfxKey_Shift_R 0xFFE2 /* Right shift */
#define kOfxKey_Control_L 0xFFE3 /* Left control */
#define kOfxKey_Control_R 0xFFE4 /* Right control */
#define kOfxKey_Caps_Lock 0xFFE5 /* Caps lock */
#define kOfxKey_Shift_Lock 0xFFE6 /* Shift lock */
#define kOfxKey_Meta_L 0xFFE7 /* Left meta */
#define kOfxKey_Meta_R 0xFFE8 /* Right meta */
#define kOfxKey_Alt_L 0xFFE9 /* Left alt */
#define kOfxKey_Alt_R 0xFFEA /* Right alt */
#define kOfxKey_Super_L 0xFFEB /* Left super */
#define kOfxKey_Super_R 0xFFEC /* Right super */
#define kOfxKey_Hyper_L 0xFFED /* Left hyper */
#define kOfxKey_Hyper_R 0xFFEE /* Right hyper */
#define kOfxKey_space 0x020
#define kOfxKey_exclam 0x021
#define kOfxKey_quotedbl 0x022
#define kOfxKey_numbersign 0x023
#define kOfxKey_dollar 0x024
#define kOfxKey_percent 0x025
#define kOfxKey_ampersand 0x026
#define kOfxKey_apostrophe 0x027
#define kOfxKey_quoteright 0x027 /* deprecated */
#define kOfxKey_parenleft 0x028
#define kOfxKey_parenright 0x029
#define kOfxKey_asterisk 0x02a
#define kOfxKey_plus 0x02b
#define kOfxKey_comma 0x02c
#define kOfxKey_minus 0x02d
#define kOfxKey_period 0x02e
#define kOfxKey_slash 0x02f
#define kOfxKey_0 0x030
#define kOfxKey_1 0x031
#define kOfxKey_2 0x032
#define kOfxKey_3 0x033
#define kOfxKey_4 0x034
#define kOfxKey_5 0x035
#define kOfxKey_6 0x036
#define kOfxKey_7 0x037
#define kOfxKey_8 0x038
#define kOfxKey_9 0x039
#define kOfxKey_colon 0x03a
#define kOfxKey_semicolon 0x03b
#define kOfxKey_less 0x03c
#define kOfxKey_equal 0x03d
#define kOfxKey_greater 0x03e
#define kOfxKey_question 0x03f
#define kOfxKey_at 0x040
#define kOfxKey_A 0x041
#define kOfxKey_B 0x042
#define kOfxKey_C 0x043
#define kOfxKey_D 0x044
#define kOfxKey_E 0x045
#define kOfxKey_F 0x046
#define kOfxKey_G 0x047
#define kOfxKey_H 0x048
#define kOfxKey_I 0x049
#define kOfxKey_J 0x04a
#define kOfxKey_K 0x04b
#define kOfxKey_L 0x04c
#define kOfxKey_M 0x04d
#define kOfxKey_N 0x04e
#define kOfxKey_O 0x04f
#define kOfxKey_P 0x050
#define kOfxKey_Q 0x051
#define kOfxKey_R 0x052
#define kOfxKey_S 0x053
#define kOfxKey_T 0x054
#define kOfxKey_U 0x055
#define kOfxKey_V 0x056
#define kOfxKey_W 0x057
#define kOfxKey_X 0x058
#define kOfxKey_Y 0x059
#define kOfxKey_Z 0x05a
#define kOfxKey_bracketleft 0x05b
#define kOfxKey_backslash 0x05c
#define kOfxKey_bracketright 0x05d
#define kOfxKey_asciicircum 0x05e
#define kOfxKey_underscore 0x05f
#define kOfxKey_grave 0x060
#define kOfxKey_quoteleft 0x060 /* deprecated */
#define kOfxKey_a 0x061
#define kOfxKey_b 0x062
#define kOfxKey_c 0x063
#define kOfxKey_d 0x064
#define kOfxKey_e 0x065
#define kOfxKey_f 0x066
#define kOfxKey_g 0x067
#define kOfxKey_h 0x068
#define kOfxKey_i 0x069
#define kOfxKey_j 0x06a
#define kOfxKey_k 0x06b
#define kOfxKey_l 0x06c
#define kOfxKey_m 0x06d
#define kOfxKey_n 0x06e
#define kOfxKey_o 0x06f
#define kOfxKey_p 0x070
#define kOfxKey_q 0x071
#define kOfxKey_r 0x072
#define kOfxKey_s 0x073
#define kOfxKey_t 0x074
#define kOfxKey_u 0x075
#define kOfxKey_v 0x076
#define kOfxKey_w 0x077
#define kOfxKey_x 0x078
#define kOfxKey_y 0x079
#define kOfxKey_z 0x07a
#define kOfxKey_braceleft 0x07b
#define kOfxKey_bar 0x07c
#define kOfxKey_braceright 0x07d
#define kOfxKey_asciitilde 0x07e
#define kOfxKey_nobreakspace 0x0a0
#define kOfxKey_exclamdown 0x0a1
#define kOfxKey_cent 0x0a2
#define kOfxKey_sterling 0x0a3
#define kOfxKey_currency 0x0a4
#define kOfxKey_yen 0x0a5
#define kOfxKey_brokenbar 0x0a6
#define kOfxKey_section 0x0a7
#define kOfxKey_diaeresis 0x0a8
#define kOfxKey_copyright 0x0a9
#define kOfxKey_ordfeminine 0x0aa
#define kOfxKey_guillemotleft 0x0ab /* left angle quotation mark */
#define kOfxKey_notsign 0x0ac
#define kOfxKey_hyphen 0x0ad
#define kOfxKey_registered 0x0ae
#define kOfxKey_macron 0x0af
#define kOfxKey_degree 0x0b0
#define kOfxKey_plusminus 0x0b1
#define kOfxKey_twosuperior 0x0b2
#define kOfxKey_threesuperior 0x0b3
#define kOfxKey_acute 0x0b4
#define kOfxKey_mu 0x0b5
#define kOfxKey_paragraph 0x0b6
#define kOfxKey_periodcentered 0x0b7
#define kOfxKey_cedilla 0x0b8
#define kOfxKey_onesuperior 0x0b9
#define kOfxKey_masculine 0x0ba
#define kOfxKey_guillemotright 0x0bb /* right angle quotation mark */
#define kOfxKey_onequarter 0x0bc
#define kOfxKey_onehalf 0x0bd
#define kOfxKey_threequarters 0x0be
#define kOfxKey_questiondown 0x0bf
#define kOfxKey_Agrave 0x0c0
#define kOfxKey_Aacute 0x0c1
#define kOfxKey_Acircumflex 0x0c2
#define kOfxKey_Atilde 0x0c3
#define kOfxKey_Adiaeresis 0x0c4
#define kOfxKey_Aring 0x0c5
#define kOfxKey_AE 0x0c6
#define kOfxKey_Ccedilla 0x0c7
#define kOfxKey_Egrave 0x0c8
#define kOfxKey_Eacute 0x0c9
#define kOfxKey_Ecircumflex 0x0ca
#define kOfxKey_Ediaeresis 0x0cb
#define kOfxKey_Igrave 0x0cc
#define kOfxKey_Iacute 0x0cd
#define kOfxKey_Icircumflex 0x0ce
#define kOfxKey_Idiaeresis 0x0cf
#define kOfxKey_ETH 0x0d0
#define kOfxKey_Eth 0x0d0 /* deprecated */
#define kOfxKey_Ntilde 0x0d1
#define kOfxKey_Ograve 0x0d2
#define kOfxKey_Oacute 0x0d3
#define kOfxKey_Ocircumflex 0x0d4
#define kOfxKey_Otilde 0x0d5
#define kOfxKey_Odiaeresis 0x0d6
#define kOfxKey_multiply 0x0d7
#define kOfxKey_Ooblique 0x0d8
#define kOfxKey_Ugrave 0x0d9
#define kOfxKey_Uacute 0x0da
#define kOfxKey_Ucircumflex 0x0db
#define kOfxKey_Udiaeresis 0x0dc
#define kOfxKey_Yacute 0x0dd
#define kOfxKey_THORN 0x0de
#define kOfxKey_ssharp 0x0df
#define kOfxKey_agrave 0x0e0
#define kOfxKey_aacute 0x0e1
#define kOfxKey_acircumflex 0x0e2
#define kOfxKey_atilde 0x0e3
#define kOfxKey_adiaeresis 0x0e4
#define kOfxKey_aring 0x0e5
#define kOfxKey_ae 0x0e6
#define kOfxKey_ccedilla 0x0e7
#define kOfxKey_egrave 0x0e8
#define kOfxKey_eacute 0x0e9
#define kOfxKey_ecircumflex 0x0ea
#define kOfxKey_ediaeresis 0x0eb
#define kOfxKey_igrave 0x0ec
#define kOfxKey_iacute 0x0ed
#define kOfxKey_icircumflex 0x0ee
#define kOfxKey_idiaeresis 0x0ef
#define kOfxKey_eth 0x0f0
#define kOfxKey_ntilde 0x0f1
#define kOfxKey_ograve 0x0f2
#define kOfxKey_oacute 0x0f3
#define kOfxKey_ocircumflex 0x0f4
#define kOfxKey_otilde 0x0f5
#define kOfxKey_odiaeresis 0x0f6
#define kOfxKey_division 0x0f7
#define kOfxKey_oslash 0x0f8
#define kOfxKey_ugrave 0x0f9
#define kOfxKey_uacute 0x0fa
#define kOfxKey_ucircumflex 0x0fb
#define kOfxKey_udiaeresis 0x0fc
#define kOfxKey_yacute 0x0fd
#define kOfxKey_thorn 0x0fe
#define kOfxKey_ydiaeresis 0x0ff
/*@}*/
#endif
+68
View File
@@ -0,0 +1,68 @@
#ifndef _ofxMemory_h_
#define _ofxMemory_h_
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
#ifdef __cplusplus
extern "C" {
#endif
#define kOfxMemorySuite "OfxMemorySuite"
/** @brief The OFX suite that implements general purpose memory management.
Use this suite for ordinary memory management functions, where you would normally use malloc/free or new/delete on ordinary objects.
For images, you should use the memory allocation functions in the image effect suite, as many hosts have specific image memory pools.
\note C++ plugin developers will need to redefine new and delete as skins ontop of this suite.
*/
typedef struct OfxMemorySuiteV1 {
/** @brief Allocate memory.
\arg \c handle - effect instance to assosciate with this memory allocation, or NULL.
\arg \c nBytes number of bytes to allocate
\arg \c allocatedData pointer to the return value. Allocated memory will be alligned for any use.
This function has the host allocate memory using its own memory resources
and returns that to the plugin.
@returns
- ::kOfxStatOK the memory was sucessfully allocated
- ::kOfxStatErrMemory the request could not be met and no memory was allocated
*/
OfxStatus (*memoryAlloc)(void *handle,
size_t nBytes,
void **allocatedData);
/** @brief Frees memory.
\arg \c allocatedData pointer to memory previously returned by OfxMemorySuiteV1::memoryAlloc
This function frees any memory that was previously allocated via OfxMemorySuiteV1::memoryAlloc.
@returns
- ::kOfxStatOK the memory was sucessfully freed
- ::kOfxStatErrBadHandle \e allocatedData was not a valid pointer returned by OfxMemorySuiteV1::memoryAlloc
*/
OfxStatus (*memoryFree)(void *allocatedData);
} OfxMemorySuiteV1;
/** @file ofxMemory.h
This file contains the API for general purpose memory allocation from a host.
*/
#ifdef __cplusplus
}
#endif
#endif
+171
View File
@@ -0,0 +1,171 @@
#ifndef _ofxMessage_h_
#define _ofxMessage_h_
#include "ofxCore.h"
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
#ifdef __cplusplus
extern "C" {
#endif
#define kOfxMessageSuite "OfxMessageSuite"
/** @brief String used to type fatal error messages
Fatal error messages should only be posted by a plugin when it can no longer continue operation.
*/
#define kOfxMessageFatal "OfxMessageFatal"
/** @brief String used to type error messages
Ordinary error messages should be posted when there is an error in operation that is recoverable by
user intervention.
*/
#define kOfxMessageError "OfxMessageError"
/** @brief String used to type warning messages
Warnings indicate states that allow for operations to proceed, but are not necessarily optimal.
*/
#define kOfxMessageWarning "OfxMessageWarning"
/** @brief String used to type simple ordinary messages
Ordinary messages simply convey information from the plugin directly to the user.
*/
#define kOfxMessageMessage "OfxMessageMessage"
/** @brief String used to type log messages
Log messages are written out to a log and not to the end user.
*/
#define kOfxMessageLog "OfxMessageLog"
/** @brief String used to type yes/no messages
The host is to enter a modal state which waits for the user to respond yes or no.
The OfxMessageSuiteV1::message function which posted the message will only return after
the user responds. When asking a question, the OfxStatus code returned by the message function will be,
- kOfxStatReplyYes - if the user replied 'yes' to the question
- kOfxStatReplyNo - if the user replied 'no' to the question
- some error code if an error was encounterred
It is an error to post a question message if the plugin is not in an interactive session.
*/
#define kOfxMessageQuestion "OfxMessageQuestion"
/** @brief The OFX suite that allows a plug-in to pass messages back to a user. The V2 suite extends on this
in a backwards compatible manner.
*/
typedef struct OfxMessageSuiteV1 {
/** @brief Post a message on the host, using printf style varargs
\arg \c handle effect handle (descriptor or instance) the message should be associated with, may be NULL
\arg \c messageType string describing the kind of message to post, one of the kOfxMessageType* constants
\arg \c messageId plugin specified id to associate with this message. If overriding the message in XML resource, the message is identified with this, this may be NULL, or "", in which case no override will occur,
\arg \c format printf style format string
\arg \c ... printf style varargs list to print
\returns
- ::kOfxStatOK - if the message was sucessfully posted
- ::kOfxStatReplyYes - if the message was of type kOfxMessageQuestion and the user reply yes
- ::kOfxStatReplyNo - if the message was of type kOfxMessageQuestion and the user reply no
- ::kOfxStatFailed - if the message could not be posted for some reason
*/
OfxStatus (*message)(void *handle,
const char *messageType,
const char *messageId,
const char *format,
...);
} OfxMessageSuiteV1;
/** @brief The OFX suite that allows a plug-in to pass messages back to a user.
This extends OfxMessageSuiteV1, and should be considered a replacement to version 1.
Note that this suite has been extended in backwards compatible manner, so that a host can return this struct
for both V1 and V2.
*/
typedef struct OfxMessageSuiteV2 {
/** @brief Post a transient message on the host, using printf style varargs. Same as the V1 message suite call.
\arg \c handle effect handle (descriptor or instance) the message should be associated with, may be null
\arg \c messageType string describing the kind of message to post, one of the kOfxMessageType* constants
\arg \c messageId plugin specified id to associate with this message. If overriding the message in XML resource, the message is identified with this, this may be NULL, or "", in which case no override will occur,
\arg \c format printf style format string
\arg \c ... printf style varargs list to print
\returns
- ::kOfxStatOK - if the message was sucessfully posted
- ::kOfxStatReplyYes - if the message was of type kOfxMessageQuestion and the user reply yes
- ::kOfxStatReplyNo - if the message was of type kOfxMessageQuestion and the user reply no
- ::kOfxStatFailed - if the message could not be posted for some reason
*/
OfxStatus (*message)(void *handle,
const char *messageType,
const char *messageId,
const char *format,
...);
/** @brief Post a persistent message on an effect, using printf style varargs, and set error states. New for V2 message suite.
\arg \c handle effect instance handle the message should be associated with, may NOT be null,
\arg \c messageType string describing the kind of message to post, should be one of...
- kOfxMessageError
- kOfxMessageWarning
- kOfxMessageMessage
\arg \c messageId plugin specified id to associate with this message. If overriding the message in XML resource, the message is identified with this, this may be NULL, or "", in which case no override will occur,
\arg \c format printf style format string
\arg \c ... printf style varargs list to print
\returns
- ::kOfxStatOK - if the message was sucessfully posted
- ::kOfxStatErrBadHandle - the handle was rubbish
- ::kOfxStatFailed - if the message could not be posted for some reason
Persistent messages are associated with an effect handle until explicitly cleared by an effect. So if an error message is posted the error state, and associated message will persist and be displayed on the effect appropriately. (eg: draw a node in red on a node based compostor and display the message when clicked on).
If \e messageType is error or warning, associated error states should be flagged on host applications. Posting an error message implies that the host cannot proceeed, a warning allows the host to proceed, whilst a simple message should have no stop anything.
*/
OfxStatus (*setPersistentMessage)(void *handle,
const char *messageType,
const char *messageId,
const char *format,
...);
/** @brief Clears any persistent message on an effect handle that was set by OfxMessageSuiteV2::setPersistentMessage. New for V2 message suite.
\arg \c handle effect instance handle messages should be cleared from.
\arg \c handle effect handle (descriptor or instance)
\returns
- ::kOfxStatOK - if the message was sucessfully cleared
- ::kOfxStatErrBadHandle - the handle was rubbish
- ::kOfxStatFailed - if the message could not be cleared for some reason
Clearing a message will clear any associated error state.
*/
OfxStatus (*clearPersistentMessage)(void *handle);
} OfxMessageSuiteV2;
/** @file ofxMessage.h
This file contains the Host API for end user message communication.
*/
#ifdef __cplusplus
}
#endif
#endif
+168
View File
@@ -0,0 +1,168 @@
#ifndef _ofxMultiThread_h_
#define _ofxMultiThread_h_
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
#include "ofxCore.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @file ofxMultiThread.h
This file contains the Host Suite for threading
*/
#define kOfxMultiThreadSuite "OfxMultiThreadSuite"
/** @brief Mutex blind data handle
*/
typedef struct OfxMutex *OfxMutexHandle;
/** @brief The function type to passed to the multi threading routines
\arg \c threadIndex unique index of this thread, will be between 0 and threadMax
\arg \c threadMax to total number of threads executing this function
\arg \c customArg the argument passed into multiThread
A function of this type is passed to OfxMultiThreadSuiteV1::multiThread to be launched in multiple threads.
*/
typedef void (OfxThreadFunctionV1)(unsigned int threadIndex,
unsigned int threadMax,
void *customArg);
/** @brief OFX suite that provides simple SMP style multi-processing
*/
typedef struct OfxMultiThreadSuiteV1 {
/**@brief Function to spawn SMP threads
\arg \c func function to call in each thread.
\arg \c nThreads number of threads to launch
\arg \c customArg paramter to pass to customArg of func in each thread.
This function will spawn nThreads separate threads of computation (typically one per CPU)
to allow something to perform symmetric multi processing. Each thread will call 'func' passing
in the index of the thread and the number of threads actually launched.
multiThread will not return until all the spawned threads have returned. It is up to the host
how it waits for all the threads to return (busy wait, blocking, whatever).
\e nThreads can be more than the value returned by multiThreadNumCPUs, however the threads will
be limitted to the number of CPUs returned by multiThreadNumCPUs.
This function cannot be called recursively.
@returns
- ::kOfxStatOK, the function func has executed and returned sucessfully
- ::kOfxStatFailed, the threading function failed to launch
- ::kOfxStatErrExists, failed in an attempt to call multiThread recursively,
*/
OfxStatus (*multiThread)(OfxThreadFunctionV1 func,
unsigned int nThreads,
void *customArg);
/**@brief Function which indicates the number of CPUs available for SMP processing
\arg \c nCPUs pointer to an integer where the result is returned
This value may be less than the actual number of CPUs on a machine, as the host may reserve other CPUs for itself.
@returns
- ::kOfxStatOK, all was OK and the maximum number of threads is in nThreads.
- ::kOfxStatFailed, the function failed to get the number of CPUs
*/
OfxStatus (*multiThreadNumCPUs)(unsigned int *nCPUs);
/**@brief Function which indicates the index of the current thread
\arg \c threadIndex pointer to an integer where the result is returned
This function returns the thread index, which is the same as the \e threadIndex argument passed to the ::OfxThreadFunctionV1.
If there are no threads currently spawned, then this function will set threadIndex to 0
@returns
- ::kOfxStatOK, all was OK and the maximum number of threads is in nThreads.
- ::kOfxStatFailed, the function failed to return an index
*/
OfxStatus (*multiThreadIndex)(unsigned int *threadIndex);
/**@brief Function to enquire if the calling thread was spawned by multiThread
@returns
- 0 if the thread is not one spawned by multiThread
- 1 if the thread was spawned by multiThread
*/
int (*multiThreadIsSpawnedThread)(void);
/** @brief Create a mutex
\arg \c mutex where the new handle is returned
\arg \c count initial lock count on the mutex. This can be negative.
Creates a new mutex with lockCount locks on the mutex intially set.
@returns
- kOfxStatOK - mutex is now valid and ready to go
*/
OfxStatus (*mutexCreate)(OfxMutexHandle *mutex, int lockCount);
/** @brief Destroy a mutex
Destroys a mutex intially created by mutexCreate.
@returns
- kOfxStatOK - if it destroyed the mutex
- kOfxStatErrBadHandle - if the handle was bad
*/
OfxStatus (*mutexDestroy)(const OfxMutexHandle mutex);
/** @brief Blocking lock on the mutex
This trys to lock a mutex and blocks the thread it is in until the lock suceeds.
A sucessful lock causes the mutex's lock count to be increased by one and to block any other calls to lock the mutex until it is unlocked.
@returns
- kOfxStatOK - if it got the lock
- kOfxStatErrBadHandle - if the handle was bad
*/
OfxStatus (*mutexLock)(const OfxMutexHandle mutex);
/** @brief Unlock the mutex
This unlocks a mutex. Unlocking a mutex decreases its lock count by one.
@returns
- kOfxStatOK if it released the lock
- kOfxStatErrBadHandle if the handle was bad
*/
OfxStatus (*mutexUnLock)(const OfxMutexHandle mutex);
/** @brief Non blocking attempt to lock the mutex
This attempts to lock a mutex, if it cannot, it returns and says so, rather than blocking.
A sucessful lock causes the mutex's lock count to be increased by one, if the lock did not suceed, the call returns immediately and the lock count remains unchanged.
@returns
- kOfxStatOK - if it got the lock
- kOfxStatFailed - if it did not get the lock
- kOfxStatErrBadHandle - if the handle was bad
*/
OfxStatus (*mutexTryLock)(const OfxMutexHandle mutex);
} OfxMultiThreadSuiteV1;
#ifdef __cplusplus
}
#endif
#endif
+109
View File
@@ -0,0 +1,109 @@
#ifndef _ofxOLD_h_
#define _ofxOLD_h_
/** @brief String to label images with YUVA components
--ofxImageEffects.h
@deprecated - removed in v1.4. Note, this has been deprecated in v1.3
*/
#define kOfxImageComponentYUVA "OfxImageComponentYUVA"
/** @brief Indicates whether an effect is performing an analysis pass.
--ofxImageEffects.h
- Type - int X 1
- Property Set - plugin instance (read/write)
- Default - to 0
- Valid Values - This must be one of 0 or 1
@deprecated - This feature has been deprecated - officially commented out v1.4.
*/
#define kOfxImageEffectPropInAnalysis "OfxImageEffectPropInAnalysis"
/** @brief Defines an 8 bit per component YUVA pixel
-- ofxPixels.h
Deprecated in 1.3, removed in 1.4
*/
typedef struct OfxYUVAColourB {
unsigned char y, u, v, a;
}OfxYUVAColourB;
/** @brief Defines an 16 bit per component YUVA pixel
-- ofxPixels.h
@deprecated - Deprecated in 1.3, removed in 1.4
*/
typedef struct OfxYUVAColourS {
unsigned short y, u, v, a;
}OfxYUVAColourS;
/** @brief Defines an floating point component YUVA pixel
-- ofxPixels.h
@deprecated - Deprecated in 1.3, removed in 1.4
*/
typedef struct OfxYUVAColourF {
float y, u, v, a;
}OfxYUVAColourF;
/** @brief The size of an interact's openGL viewport
-- ofxInteract.h
- Type - int X 2
- Property Set - read only property on the interact instance and in argument to all the interact actions.
@deprecated - V1.3: This property is the redundant and its use will be deprecated in future releases.
V1.4: Removed
*/
#define kOfxInteractPropViewportSize "OfxInteractPropViewport"
/** @brief value for the ::kOfxParamPropDoubleType property, indicating a size normalised to the X dimension. See \ref ::kOfxParamPropDoubleType.
-- ofxParam.h
@deprecated - V1.3: Deprecated in favour of ::OfxParamDoubleTypeX
V1.4: Removed
*/
#define kOfxParamDoubleTypeNormalisedX "OfxParamDoubleTypeNormalisedX"
/** @brief value for the ::kOfxParamPropDoubleType property, indicating a size normalised to the Y dimension. See \ref ::kOfxParamPropDoubleType.
-- ofxParam.h
@deprecated - V1.3: Deprecated in favour of ::OfxParamDoubleTypeY
V1.4: Removed
*/
#define kOfxParamDoubleTypeNormalisedY "OfxParamDoubleTypeNormalisedY"
/** @brief value for the ::kOfxParamPropDoubleType property, indicating an absolute position normalised to the X dimension. See \ref ::kOfxParamPropDoubleType.
-- ofxParam.h
@deprecated - V1.3: Deprecated in favour of ::OfxParamDoubleTypeXAbsolute
V1.4: Removed
*/
#define kOfxParamDoubleTypeNormalisedXAbsolute "OfxParamDoubleTypeNormalisedXAbsolute"
/** @brief value for the ::kOfxParamPropDoubleType property, indicating an absolute position normalised to the Y dimension. See \ref ::kOfxParamPropDoubleType.
-- ofxParam.h
@deprecated - V1.3: Deprecated in favour of ::OfxParamDoubleTypeYAbsolute
V1.4: Removed
*/
#define kOfxParamDoubleTypeNormalisedYAbsolute "OfxParamDoubleTypeNormalisedYAbsolute"
/** @brief value for the ::kOfxParamPropDoubleType property, indicating normalisation to the X and Y dimension for 2D params. See \ref ::kOfxParamPropDoubleType.
-- ofxParam.h
@deprecated - V1.3: Deprecated in favour of ::OfxParamDoubleTypeXY
V1.4: Removed
*/
#define kOfxParamDoubleTypeNormalisedXY "OfxParamDoubleTypeNormalisedXY"
/** @brief value for the ::kOfxParamPropDoubleType property, indicating normalisation to the X and Y dimension for a 2D param that can be interpretted as an absolute spatial position. See \ref ::kOfxParamPropDoubleType.
-- ofxParam.h
@deprecated - V1.3: Deprecated in favour of ::kOfxParamDoubleTypeXYAbsolute
V1.4: Removed
*/
#define kOfxParamDoubleTypeNormalisedXYAbsolute "OfxParamDoubleTypeNormalisedXYAbsolute"
#endif
+10
View File
@@ -0,0 +1,10 @@
#pragma once
#ifndef _ofxOpenGLRender_h_
#define _ofxOpenGLRender_h_
// Copyright OpenFX and Contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
#endif // _ofxOpenGLRender_h_
File diff suppressed because it is too large Load Diff
+286
View File
@@ -0,0 +1,286 @@
#ifndef _ofxParametricParam_h_
#define _ofxParametricParam_h_
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
/** @file ofxParametricParam.h
This header file defines the optional OFX extension to define and manipulate parametric
parameters.
*/
#include "ofxParam.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @brief string value to the ::kOfxPropType property for all parameters */
#define kOfxParametricParameterSuite "OfxParametricParameterSuite"
/**
\defgroup ParamTypeDefines Parameter Type definitions
These strings are used to identify the type of the parameter when it is defined, they are also on the ::kOfxParamPropType in any parameter instance.
*/
/*@{*/
/** @brief String to identify a param as a single valued integer */
#define kOfxParamTypeParametric "OfxParamTypeParametric"
/*@}*/
/**
\addtogroup PropertiesAll
*/
/*@{*/
/**
\defgroup ParamPropDefines Parameter Property Definitions
These are the list of properties used by the parameters suite.
*/
/*@{*/
/** @brief The dimension of a parametric param
- Type - int X 1
- Property Set - parametric param descriptor (read/write) and instance (read only)
- default - 1
- Value Values - greater than 0
This indicates the dimension of the parametric param.
*/
#define kOfxParamPropParametricDimension "OfxParamPropParametricDimension"
/** @brief The colour of parametric param curve interface in any UI.
- Type - double X N
- Property Set - parametric param descriptor (read/write) and instance (read only)
- default - unset,
- Value Values - three values for each dimension (see ::kOfxParamPropParametricDimension)
being interpretted as R, G and B of the colour for each curve drawn in the UI.
This sets the colour of a parametric param curve drawn a host user interface. A colour triple
is needed for each dimension of the oparametric param.
If not set, the host should generally draw these in white.
*/
#define kOfxParamPropParametricUIColour "OfxParamPropParametricUIColour"
/** @brief Interact entry point to draw the background of a parametric parameter.
- Type - pointer X 1
- Property Set - plug-in parametric parameter descriptor (read/write) and instance (read only),
- Default - NULL, which implies the host should draw its default background.
Defines a pointer to an interact which will be used to draw the background of a parametric
parameter's user interface. None of the pen or keyboard actions can ever be called on the interact.
The openGL transform will be set so that it is an orthographic transform that maps directly to the
'parametric' space, so that 'x' represents the parametric position and 'y' represents the evaluated
value.
*/
#define kOfxParamPropParametricInteractBackground "OfxParamPropParametricInteractBackground"
/** @brief Property on the host to indicate support for parametric parameter animation.
- Type - int X 1
- Property Set - host descriptor (read only)
- Valid Values
- 0 indicating the host does not support animation of parmetric params,
- 1 indicating the host does support animation of parmetric params,
*/
#define kOfxParamHostPropSupportsParametricAnimation "OfxParamHostPropSupportsParametricAnimation"
/** @brief Property to indicate the min and max range of the parametric input value.
- Type - double X 2
- Property Set - parameter descriptor (read/write only), and instance (read only)
- Default Value - (0, 1)
- Valid Values - any pair of numbers so that the first is less than the second.
This controls the min and max values that the parameter will be evaluated at.
*/
#define kOfxParamPropParametricRange "OfxParamPropParametricRange"
/*@}*/
/*@}*/
/** @brief The OFX suite used to define and manipulate 'parametric' parameters.
This is an optional suite.
Parametric parameters are in effect 'functions' a plug-in can ask a host to arbitrarily
evaluate for some value 'x'. A classic use case would be for constructing look-up tables,
a plug-in would ask the host to evaluate one at multiple values from 0 to 1 and use that
to fill an array.
A host would probably represent this to a user as a cubic curve in a standard curve editor
interface, or possibly through scripting. The user would then use this to define the 'shape'
of the parameter.
The evaluation of such params is not the same as animation, they are returning values based
on some arbitrary argument orthogonal to time, so to evaluate such a param, you need to pass
a parametric position and time.
Often, you would want such a parametric parameter to be multi-dimensional, for example, a
colour look-up table might want three values, one for red, green and blue. Rather than
declare three separate parametric parameters, it would be better to have one such parameter
with multiple values in it.
The major complication with these parameters is how to allow a plug-in to set values, and
defaults. The default default value of a parametric curve is to be an identity lookup. If
a plugin wishes to set a different default value for a curve, it can use the suite to set
key/value pairs on the \em descriptor of the param. When a new instance is made, it will
have these curve values as a default.
*/
typedef struct OfxParametricParameterSuiteV1 {
/** @brief Evaluates a parametric parameter
\arg \c param handle to the parametric parameter
\arg \c curveIndex which dimension to evaluate
\arg \c time the time to evaluate to the parametric param at
\arg \c parametricPosition the position to evaluate the parametric param at
\arg \c returnValue pointer to a double where a value is returned
@returns
- ::kOfxStatOK - all was fine
- ::kOfxStatErrBadHandle - if the paramter handle was invalid
- ::kOfxStatErrBadIndex - the curve index was invalid
*/
OfxStatus (*parametricParamGetValue)(OfxParamHandle param,
int curveIndex,
OfxTime time,
double parametricPosition,
double *returnValue);
/** @brief Returns the number of control points in the parametric param.
\arg \c param handle to the parametric parameter
\arg \c curveIndex which dimension to check
\arg \c time the time to check
\arg \c returnValue pointer to an integer where the value is returned.
@returns
- ::kOfxStatOK - all was fine
- ::kOfxStatErrBadHandle - if the paramter handle was invalid
- ::kOfxStatErrBadIndex - the curve index was invalid
*/
OfxStatus (*parametricParamGetNControlPoints)(OfxParamHandle param,
int curveIndex,
double time,
int *returnValue);
/** @brief Returns the key/value pair of the nth control point.
\arg \c param handle to the parametric parameter
\arg \c curveIndex which dimension to check
\arg \c time the time to check
\arg \c nthCtl the nth control point to get the value of
\arg \c key pointer to a double where the key will be returned
\arg \c value pointer to a double where the value will be returned
@returns
- ::kOfxStatOK - all was fine
- ::kOfxStatErrBadHandle - if the paramter handle was invalid
- ::kOfxStatErrUnknown - if the type is unknown
*/
OfxStatus (*parametricParamGetNthControlPoint)(OfxParamHandle param,
int curveIndex,
double time,
int nthCtl,
double *key,
double *value);
/** @brief Modifies an existing control point on a curve
\arg \c param handle to the parametric parameter
\arg \c curveIndex which dimension to set
\arg \c time the time to set the value at
\arg \c nthCtl the control point to modify
\arg \c key key of the control point
\arg \c value value of the control point
\arg \c addAnimationKey if the param is an animatable, setting this to true will
force an animation keyframe to be set as well as a curve key,
otherwise if false, a key will only be added if the curve is already
animating.
@returns
- ::kOfxStatOK - all was fine
- ::kOfxStatErrBadHandle - if the paramter handle was invalid
- ::kOfxStatErrUnknown - if the type is unknown
This modifies an existing control point. Note that by changing key, the order of the
control point may be modified (as you may move it before or after anther point). So be
careful when iterating over a curves control points and you change a key.
*/
OfxStatus (*parametricParamSetNthControlPoint)(OfxParamHandle param,
int curveIndex,
double time,
int nthCtl,
double key,
double value,
bool addAnimationKey);
/** @brief Adds a control point to the curve.
\arg \c param handle to the parametric parameter
\arg \c curveIndex which dimension to set
\arg \c time the time to set the value at
\arg \c key key of the control point
\arg \c value value of the control point
\arg \c addAnimationKey if the param is an animatable, setting this to true will
force an animation keyframe to be set as well as a curve key,
otherwise if false, a key will only be added if the curve is already
animating.
@returns
- ::kOfxStatOK - all was fine
- ::kOfxStatErrBadHandle - if the paramter handle was invalid
- ::kOfxStatErrUnknown - if the type is unknown
This will add a new control point to the given dimension of a parametric parameter. If a key exists
sufficiently close to 'key', then it will be set to the indicated control point.
*/
OfxStatus (*parametricParamAddControlPoint)(OfxParamHandle param,
int curveIndex,
double time,
double key,
double value,
bool addAnimationKey);
/** @brief Deletes the nth control point from a parametric param.
\arg \c param handle to the parametric parameter
\arg \c curveIndex which dimension to delete
\arg \c nthCtl the control point to delete
*/
OfxStatus (*parametricParamDeleteControlPoint)(OfxParamHandle param,
int curveIndex,
int nthCtl);
/** @brief Delete all curve control points on the given param.
\arg \c param handle to the parametric parameter
\arg \c curveIndex which dimension to clear
*/
OfxStatus (*parametricParamDeleteAllControlPoints)(OfxParamHandle param,
int curveIndex);
} OfxParametricParameterSuiteV1;
#ifdef __cplusplus
}
#endif
#endif
+64
View File
@@ -0,0 +1,64 @@
#ifndef _ofxPixels_h_
#define _ofxPixels_h_
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
#ifdef __cplusplus
extern "C" {
#endif
/** @file ofxPixels.h
Contains pixel struct definitions
*/
/** @brief Defines an 8 bit per component RGBA pixel */
typedef struct OfxRGBAColourB {
unsigned char r, g, b, a;
}OfxRGBAColourB;
/** @brief Defines a 16 bit per component RGBA pixel */
typedef struct OfxRGBAColourS {
unsigned short r, g, b, a;
}OfxRGBAColourS;
/** @brief Defines a floating point component RGBA pixel */
typedef struct OfxRGBAColourF {
float r, g, b, a;
}OfxRGBAColourF;
/** @brief Defines a double precision floating point component RGBA pixel */
typedef struct OfxRGBAColourD {
double r, g, b, a;
}OfxRGBAColourD;
/** @brief Defines an 8 bit per component RGB pixel */
typedef struct OfxRGBColourB {
unsigned char r, g, b;
}OfxRGBColourB;
/** @brief Defines a 16 bit per component RGB pixel */
typedef struct OfxRGBColourS {
unsigned short r, g, b;
}OfxRGBColourS;
/** @brief Defines a floating point component RGB pixel */
typedef struct OfxRGBColourF {
float r, g, b;
}OfxRGBColourF;
/** @brief Defines a double precision floating point component RGB pixel */
typedef struct OfxRGBColourD {
double r, g, b;
}OfxRGBColourD;
#ifdef __cplusplus
}
#endif
#endif
+150
View File
@@ -0,0 +1,150 @@
#ifndef _ofxProgressSuite_h_
#define _ofxProgressSuite_h_
/** @brief suite for displaying a progress bar */
#define kOfxProgressSuite "OfxProgressSuite"
/** @brief A suite that provides progress feedback from a plugin to an application
A plugin instance can initiate, update and close a progress indicator with
this suite.
This is an optional suite in the Image Effect API.
API V1.4: Amends the documentation of progress suite V1 so that it is
expected that it can be raised in a modal manner and have a "cancel"
button when invoked in instanceChanged. Plugins that perform analysis
post an appropriate message, raise the progress monitor in a modal manner
and should poll to see if processing has been aborted. Any cancellation
should be handled gracefully by the plugin (eg: reset analysis parameters
to default values), clear allocated memory...
Many hosts already operate as described above. kOfxStatReplyNo should be
returned to the plugin during progressUpdate when the user presses
cancel.
Suite V2: Adds an ID that can be looked up for internationalisation and
so on. When a new version is introduced, because plug-ins need to support
old versions, and plug-in's new releases are not necessary in synch with
hosts (or users don't immediately update), best practice is to support
the 2 suite versions. That is, the plugin should check if V2 exists; if
not then check if V1 exists. This way a graceful transition is
guaranteed. So plugin should fetchSuite passing 2,
(OfxProgressSuiteV2*) fetchSuite(mHost->mHost->host, kOfxProgressSuite,2);
and if no success pass (OfxProgressSuiteV1*)
fetchSuite(mHost->mHost->host, kOfxProgressSuite,1);
*/
typedef struct OfxProgressSuiteV1 {
/** @brief Initiate a progress bar display.
Call this to initiate the display of a progress bar.
\arg \c effectInstance the instance of the plugin this progress bar is
associated with. It cannot be NULL.
\arg \c label a text label to display in any message portion of the
progress object's user interface. A UTF8 string.
\pre - There is no currently ongoing progress display for this instance.
\returns
- ::kOfxStatOK - the handle is now valid for use
- ::kOfxStatFailed - the progress object failed for some reason
- ::kOfxStatErrBadHandle - effectInstance was invalid
*/
OfxStatus (*progressStart)(void *effectInstance,
const char *label);
/** @brief Indicate how much of the processing task has been completed and reports on any abort status.
\arg \c effectInstance the instance of the plugin this progress bar is
associated with. It cannot be NULL.
\arg \c progress a number between 0.0 and 1.0 indicating what proportion of the current task has been processed.
\returns
- ::kOfxStatOK - the progress object was successfully updated and the task should continue
- ::kOfxStatReplyNo - the progress object was successfully updated and the task should abort
- ::kOfxStatErrBadHandle - the progress handle was invalid,
*/
OfxStatus (*progressUpdate)(void *effectInstance, double progress);
/** @brief Signal that we are finished with the progress meter.
Call this when you are done with the progress meter and no
longer need it displayed.
\arg \c effectInstance the instance of the plugin this progress bar is
associated with. It cannot be NULL.
\post - you can no longer call progressUpdate on the instance
\returns
- ::kOfxStatOK - the progress object was successfully closed
- ::kOfxStatErrBadHandle - the progress handle was invalid,
*/
OfxStatus (*progressEnd)(void *effectInstance);
} OfxProgressSuiteV1 ;
typedef struct OfxProgressSuiteV2 {
/** @brief Initiate a progress bar display.
Call this to initiate the display of a progress bar.
\arg \c effectInstance the instance of the plugin this progress bar is
associated with. It cannot be NULL.
\arg \c message a text label to display in any message portion of the
progress object's user interface. A UTF8 string.
\arg \c messageId plugin-specified id to associate with this message.
If overriding the message in an XML resource, the message
is identified with this, this may be NULL, or "", in
which case no override will occur.
New in V2 of this suite.
\pre - There is no currently ongoing progress display for this instance.
\returns
- ::kOfxStatOK - the handle is now valid for use
- ::kOfxStatFailed - the progress object failed for some reason
- ::kOfxStatErrBadHandle - effectInstance was invalid
*/
OfxStatus (*progressStart)(void *effectInstance,
const char *message,
const char *messageid);
/** @brief Indicate how much of the processing task has been completed and reports on any abort status.
\arg \c effectInstance the instance of the plugin this progress bar is
associated with. It cannot be NULL.
\arg \c progress a number between 0.0 and 1.0 indicating what proportion of the current task has been processed.
\returns
- ::kOfxStatOK - the progress object was successfully updated and the task should continue
- ::kOfxStatReplyNo - the progress object was successfully updated and the task should abort
- ::kOfxStatErrBadHandle - the progress handle was invalid,
*/
OfxStatus (*progressUpdate)(void *effectInstance, double progress);
/** @brief Signal that we are finished with the progress meter.
Call this when you are done with the progress meter and no
longer need it displayed.
\arg \c effectInstance the instance of the plugin this progress bar is
associated with. It cannot be NULL.
\post - you can no longer call progressUpdate on the instance
\returns
- ::kOfxStatOK - the progress object was successfully closed
- ::kOfxStatErrBadHandle - the progress handle was invalid,
*/
OfxStatus (*progressEnd)(void *effectInstance);
} OfxProgressSuiteV2 ;
#endif
+321
View File
@@ -0,0 +1,321 @@
#ifndef _ofxPropertyHost_h_
#define _ofxPropertyHost_h_
// Copyright OpenFX and contributors to the OpenFX project.
// SPDX-License-Identifier: BSD-3-Clause
#include "ofxCore.h"
#ifdef __cplusplus
extern "C" {
#endif
/** @file ofxProperty.h
Contains the API for manipulating generic properties. For more details see \ref PropertiesPage.
*/
#define kOfxPropertySuite "OfxPropertySuite"
/** @brief The OFX suite used to access properties on OFX objects.
*/
typedef struct OfxPropertySuiteV1 {
/** @brief Set a single value in a pointer property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c index for multidimenstional properties and is dimension of the one we are setting
\arg \c value value of the property we are setting
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
- ::kOfxStatErrValue
*/
OfxStatus (*propSetPointer)(OfxPropertySetHandle properties, const char *property, int index, void *value);
/** @brief Set a single value in a string property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c index for multidimenstional properties and is dimension of the one we are setting
\arg \c value value of the property we are setting
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
- ::kOfxStatErrValue
*/
OfxStatus (*propSetString) (OfxPropertySetHandle properties, const char *property, int index, const char *value);
/** @brief Set a single value in a double property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c index for multidimenstional properties and is dimension of the one we are setting
\arg \c value value of the property we are setting
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
- ::kOfxStatErrValue
*/
OfxStatus (*propSetDouble) (OfxPropertySetHandle properties, const char *property, int index, double value);
/** @brief Set a single value in an int property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c index for multidimenstional properties and is dimension of the one we are setting
\arg \c value value of the property we are setting
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
- ::kOfxStatErrValue
*/
OfxStatus (*propSetInt) (OfxPropertySetHandle properties, const char *property, int index, int value);
/** @brief Set multiple values of the pointer property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c count number of values we are setting in that property (ie: indicies 0..count-1)
\arg \c value pointer to an array of property values
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
- ::kOfxStatErrValue
*/
OfxStatus (*propSetPointerN)(OfxPropertySetHandle properties, const char *property, int count, void *const*value);
/** @brief Set multiple values of a string property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c count number of values we are setting in that property (ie: indicies 0..count-1)
\arg \c value pointer to an array of property values
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
- ::kOfxStatErrValue
*/
OfxStatus (*propSetStringN) (OfxPropertySetHandle properties, const char *property, int count, const char *const*value);
/** @brief Set multiple values of a double property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c count number of values we are setting in that property (ie: indicies 0..count-1)
\arg \c value pointer to an array of property values
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
- ::kOfxStatErrValue
*/
OfxStatus (*propSetDoubleN) (OfxPropertySetHandle properties, const char *property, int count, const double *value);
/** @brief Set multiple values of an int property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c count number of values we are setting in that property (ie: indicies 0..count-1)
\arg \c value pointer to an array of property values
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
- ::kOfxStatErrValue
*/
OfxStatus (*propSetIntN) (OfxPropertySetHandle properties, const char *property, int count, const int *value);
/** @brief Get a single value from a pointer property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c index refers to the index of a multi-dimensional property
\arg \c value pointer the return location
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
*/
OfxStatus (*propGetPointer)(OfxPropertySetHandle properties, const char *property, int index, void **value);
/** @brief Get a single value of a string property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c index refers to the index of a multi-dimensional property
\arg \c value pointer the return location
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
*/
OfxStatus (*propGetString) (OfxPropertySetHandle properties, const char *property, int index, char **value);
/** @brief Get a single value of a double property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c index refers to the index of a multi-dimensional property
\arg \c value pointer the return location
See the note \ref ArchitectureStrings for how to deal with strings.
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
*/
OfxStatus (*propGetDouble) (OfxPropertySetHandle properties, const char *property, int index, double *value);
/** @brief Get a single value of an int property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c index refers to the index of a multi-dimensional property
\arg \c value pointer the return location
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
*/
OfxStatus (*propGetInt) (OfxPropertySetHandle properties, const char *property, int index, int *value);
/** @brief Get multiple values of a pointer property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c count number of values we are getting of that property (ie: indicies 0..count-1)
\arg \c value pointer to an array of where we will return the property values
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
*/
OfxStatus (*propGetPointerN)(OfxPropertySetHandle properties, const char *property, int count, void **value);
/** @brief Get multiple values of a string property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c count number of values we are getting of that property (ie: indicies 0..count-1)
\arg \c value pointer to an array of where we will return the property values
See the note \ref ArchitectureStrings for how to deal with strings.
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
*/
OfxStatus (*propGetStringN) (OfxPropertySetHandle properties, const char *property, int count, char **value);
/** @brief Get multiple values of a double property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c count number of values we are getting of that property (ie: indicies 0..count-1)
\arg \c value pointer to an array of where we will return the property values
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
*/
OfxStatus (*propGetDoubleN) (OfxPropertySetHandle properties, const char *property, int count, double *value);
/** @brief Get multiple values of an int property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property
\arg \c count number of values we are getting of that property (ie: indicies 0..count-1)
\arg \c value pointer to an array of where we will return the property values
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
- ::kOfxStatErrBadIndex
*/
OfxStatus (*propGetIntN) (OfxPropertySetHandle properties, const char *property, int count, int *value);
/** @brief Resets all dimensions of a property to its default value
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property we are resetting
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
*/
OfxStatus (*propReset) (OfxPropertySetHandle properties, const char *property);
/** @brief Gets the dimension of the property
\arg \c properties handle of the thing holding the property
\arg \c property string labelling the property we are resetting
\arg \c count pointer to an integer where the value is returned
@returns
- ::kOfxStatOK
- ::kOfxStatErrBadHandle
- ::kOfxStatErrUnknown
*/
OfxStatus (*propGetDimension) (OfxPropertySetHandle properties, const char *property, int *count);
} OfxPropertySuiteV1;
/**
\addtogroup ErrorCodes
*/
/*@{*/
/*@}*/
#ifdef __cplusplus
}
#endif
#endif
+63
View File
@@ -0,0 +1,63 @@
#ifndef _ofxTimeLine_h_
#define _ofxTimeLine_h_
#include "ofxCore.h"
/** @brief Name of the time line suite */
#define kOfxTimeLineSuite "OfxTimeLineSuite"
/** @brief Suite to control timelines
This suite is used to enquire and control a timeline associated with a plug-in
instance.
This is an optional suite in the Image Effect API.
*/
typedef struct OfxTimeLineSuiteV1 {
/** @brief Get the time value of the timeline that is controlling to the indicated effect.
\arg \c instance is the instance of the effect changing the timeline, cast to a void *
\arg \c time pointer through which the timeline value should be returned
This function returns the current time value of the timeline associated with the effect instance.
@returns
- ::kOfxStatOK - the time enquiry was sucessful
- ::kOfxStatFailed - the enquiry failed for some host specific reason
- ::kOfxStatErrBadHandle - the effect handle was invalid
*/
OfxStatus (*getTime)(void *instance, double *time);
/** @brief Move the timeline control to the indicated time.
\arg \c instance is the instance of the effect changing the timeline, cast to a void *
\arg \c time is the time to change the timeline to. This is in the temporal coordinate system of the effect.
This function moves the timeline to the indicated frame and returns. Any side effects of the timeline
change are also triggered and completed before this returns (for example instance changed actions and renders
if the output of the effect is being viewed).
@returns
- ::kOfxStatOK - the time was changed sucessfully, will all side effects if the change completed
- ::kOfxStatFailed - the change failed for some host specific reason
- ::kOfxStatErrBadHandle - the effect handle was invalid
- ::kOfxStatErrValue - the time was an illegal value
*/
OfxStatus (*gotoTime)(void *instance, double time);
/** @brief Get the current bounds on a timeline
\arg \c instance is the instance of the effect changing the timeline, cast to a void *
\arg \c firstTime is the first time on the timeline. This is in the temporal coordinate system of the effect.
\arg \c lastTime is last time on the timeline. This is in the temporal coordinate system of the effect.
This function
@returns
- ::kOfxStatOK - the time enquiry was sucessful
- ::kOfxStatFailed - the enquiry failed for some host specific reason
- ::kOfxStatErrBadHandle - the effect handle was invalid
*/
OfxStatus (*getTimeBounds)(void *instance, double *firstTime, double *lastTime);
} OfxTimeLineSuiteV1;
#endif