44This guide will take you through the basics of creating and using
55parameters in OFX. An example plugin will be used to illustrate how it
66all works and its source can be found in the C++ file
7- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Guide/Code/Example3/gain.cpp >`_.
7+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/ Guide/Code/Example3/gain.cpp >`_.
88This plugin takes an image and
99multiplies the pixel by the value held in a user visible parameter.
1010Ideally you should have read the guide to the :ref: `basic image
@@ -82,7 +82,7 @@ Now seeing as we are going to be playing with parameters, our plugin
8282will need a new suite, the parameters suite, and our load action now
8383looks like:
8484
85- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc /Documentation/sources/Guide/Code/Example3/gain.cpp#L101 >`__
85+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main /Documentation/sources/Guide/Code/Example3/gain.cpp#L101 >`__
8686
8787.. code :: c++
8888
@@ -136,7 +136,7 @@ is exactly the same as in the last example. What’s new is the bit where
136136we describe parameters. I’ll show the describe in context action in
137137several small chunks to take you through it.
138138
139- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc /Documentation/sources/Guide/Code/Example3/gain.cpp#L228 >`__
139+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main /Documentation/sources/Guide/Code/Example3/gain.cpp#L228 >`__
140140
141141.. code :: c++
142142
@@ -179,7 +179,7 @@ new parameter’s property set handle. Each parameter has a set of
179179properties we use to refine its behaviour, most of which have sensible
180180defaults.
181181
182- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc /Documentation/sources/Guide/Code/Example3/gain.cpp#L278 >`__
182+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main /Documentation/sources/Guide/Code/Example3/gain.cpp#L278 >`__
183183
184184.. code :: c++
185185
@@ -197,7 +197,7 @@ hairs over the image and so on. In this case we are saying that our
197197double parameter represents a scaling value. OFX has more kinds of
198198double parameter which you can use to best for your effect.
199199
200- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc /Documentation/sources/Guide/Code/Example3/gain.cpp#L282 >`__
200+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main /Documentation/sources/Guide/Code/Example3/gain.cpp#L282 >`__
201201
202202.. code :: c++
203203
@@ -214,7 +214,7 @@ This section sets a default value for our parameter and a logical a
214214minimum value below which it cannot go. Note it does not set a maximum
215215value, so the parameter should not be clamped to any upper value ever.
216216
217- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc /Documentation/sources/Guide/Code/Example3/gain.cpp#L290 >`__
217+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main /Documentation/sources/Guide/Code/Example3/gain.cpp#L290 >`__
218218
219219.. code :: c++
220220
@@ -236,7 +236,7 @@ values between 0.0 and 10.0 for our gain param, but the parameter could
236236be set to a million via other means, eg: typing in a UI number box,
237237animation, scripting whatever.
238238
239- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc /Documentation/sources/Guide/Code/Example3/gain.cpp#L298 >`__
239+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main /Documentation/sources/Guide/Code/Example3/gain.cpp#L298 >`__
240240
241241.. code :: c++
242242
@@ -255,7 +255,7 @@ the parameter. It defaults to the name of the param, but it can be
255255entirely different. Finally we set a hint string to be used for the
256256parameter.
257257
258- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc /Documentation/sources/Guide/Code/Example3/gain.cpp#L308 >`__
258+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main /Documentation/sources/Guide/Code/Example3/gain.cpp#L308 >`__
259259
260260.. code :: c++
261261
@@ -312,7 +312,7 @@ you can always grab parameters from an instance by name at any time. But
312312to make our code a bit cleaner and to show an example of instance data
313313being used, we are going to trap create instance.
314314
315- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc /Documentation/sources/Guide/Code/Example3/gain.cpp#L111 >`__
315+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main /Documentation/sources/Guide/Code/Example3/gain.cpp#L111 >`__
316316
317317.. code :: c++
318318
@@ -333,7 +333,7 @@ handles, we are going to cache away handles to our clips and parameters
333333in a simple struct. Note that these handles are valid for the duration
334334of the instance.
335335
336- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc /Documentation/sources/Guide/Code/Example3/gain.cpp#L330 >`__
336+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main /Documentation/sources/Guide/Code/Example3/gain.cpp#L330 >`__
337337
338338.. code :: c++
339339
@@ -378,7 +378,7 @@ in the instance’s property set.
378378It then fetches handles to the two clips and two parameters by name and
379379caches those into the newly created struct.
380380
381- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc /Documentation/sources/Guide/Code/Example3/gain.cpp#L123 >`__
381+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main /Documentation/sources/Guide/Code/Example3/gain.cpp#L123 >`__
382382
383383.. code :: c++
384384
@@ -401,7 +401,7 @@ overloaded and there is another version that take an
401401Of course we now need to trap the destroy instance action to delete our
402402instance data, otherwise we will get memory leaks.
403403
404- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc /Documentation/sources/Guide/Code/Example3/gain.cpp#L364 >`__
404+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main /Documentation/sources/Guide/Code/Example3/gain.cpp#L364 >`__
405405
406406.. code :: c++
407407
@@ -425,7 +425,7 @@ So we’ve define our parameters, we’ve got handles to the instance of
425425them, but we will want to grab the value of the parameters to actually
426426use them at render time.
427427
428- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc /Documentation/sources/Guide/Code/Example3/gain.cpp#L490 >`__
428+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main /Documentation/sources/Guide/Code/Example3/gain.cpp#L490 >`__
429429
430430.. code :: c++
431431
@@ -465,7 +465,7 @@ similar to a C scanf function.
465465And finally here is a snippet of the templated pixel pushing code where
466466we do the actual processing using our parameter values;
467467
468- `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc /Documentation/sources/Guide/Code/Example3/gain.cpp#L437 >`__
468+ `gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main /Documentation/sources/Guide/Code/Example3/gain.cpp#L437 >`__
469469
470470.. code :: c++
471471
0 commit comments