Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Documentation/sources/Guide/ofxExample1_Basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ with a host application, and goes into the fundamentals of the API.

An example plugin will be used to illustrate how all the machinery
works, and its source can be found in the C++ file
`there <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Guide/Code/Example1/basics.cpp>`__.
`there <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example1/basics.cpp>`__.
This plugin is a *no-op* image
effect and does absolutely nothing to images, it is there purely to show
you the basics of how a host and plugin work together. I’ll embed
Expand Down Expand Up @@ -84,7 +84,7 @@ wants to keep them.

From our example, we have the following…

`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example1/basics.cpp#L343>`__
`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example1/basics.cpp#L343>`__

.. code:: c++

Expand Down Expand Up @@ -135,7 +135,7 @@ identify the plugin, what it does, and what version it is. These are:

Our example plugin’s ``OfxPlugin`` struct looks like…

`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example1/basics.cpp#L326>`__
`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example1/basics.cpp#L326>`__

.. code:: c++

Expand Down Expand Up @@ -221,7 +221,7 @@ called, but notice what it does…

.. _LoadActionExample:

`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example1/basics.cpp#L99>`__
`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example1/basics.cpp#L99>`__

.. code:: c++

Expand Down Expand Up @@ -281,7 +281,7 @@ Properties can be of the following fundamental types…

So for in our example we have….

`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example1/basics.cpp#L160>`__
`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example1/basics.cpp#L160>`__

.. code:: c++

Expand Down Expand Up @@ -353,7 +353,7 @@ well defined default for that action.

So looking at our example we can see its main entry point:

`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example1/basics.cpp#L259>`__
`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example1/basics.cpp#L259>`__

.. code:: c++

Expand Down Expand Up @@ -469,7 +469,7 @@ describe itself. This is done with the :c:macro:`kOfxActionDescribe` action. Fro
our example plugin, here is the function called by our main entry point
in response to the describe action.

`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example1/basics.cpp#L149>`__
`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example1/basics.cpp#L149>`__

.. code:: c++

Expand Down Expand Up @@ -535,7 +535,7 @@ in context action…
them to show up in the same plugin group [4]_ in the user
interface.

`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example1/basics.cpp#L171>`__
`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example1/basics.cpp#L171>`__

.. code:: c++

Expand Down Expand Up @@ -623,7 +623,7 @@ typically a hook to deeper plugin side data structures.
that wants to write to the instance data after instance creation do
so in a safe manner (e.g. by semaphore lock).

`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example1/basics.cpp#L202>`__
`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example1/basics.cpp#L202>`__

.. code:: c++

Expand Down Expand Up @@ -683,7 +683,7 @@ to its inputs, for example a blur effect with the blur size of zero. In
such a case the host can simply ignore the plugin and use its source
images directly. And here is the code that does that:

`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example1/basics.cpp#L238>`__
`basics.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example1/basics.cpp#L238>`__

.. code:: c++

Expand Down
28 changes: 14 additions & 14 deletions Documentation/sources/Guide/ofxExample2_Invert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This guide will take you through the fundamentals of processing images
in OFX. An example plugin will be used to illustrate how it all works
and its source can be found in the C++ file
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Guide/Code/Example2/invert.cpp>`_.
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp>`_.
This plugin takes an image and
inverts it (or rather calculates the complement of each component).
Ideally you should have read the guide to the :ref:`basic machinery of an OFX
Expand All @@ -21,7 +21,7 @@ total [1]_ and set very few switches.
From the source, here is the main entry routine that traps those
actions...

`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example2/invert.cpp#L416>`__
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp#L416>`__

.. code:: c++

Expand Down Expand Up @@ -70,7 +70,7 @@ Describing Our Plugin

We have the standard two step description process for this plugin.

`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example2/invert.cpp#L117>`__
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp#L117>`__

.. code:: c++

Expand Down Expand Up @@ -172,7 +172,7 @@ output image. If not set, it is up to the plugin to launch the
appropriate number of threads and divide the processing appropriately
across them.

`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example2/invert.cpp#L171>`__
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp#L171>`__

.. code:: c++

Expand Down Expand Up @@ -361,7 +361,7 @@ address of a pixel in the image? Well you use the following information:
The code snippet below shows you how to use all that to find the address
of a pixel whose coordinates are on the image plane.

`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example2/invert.cpp#L216>`__
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp#L216>`__

.. code:: c++

Expand Down Expand Up @@ -430,7 +430,7 @@ hosts and plugins.
Anyway, here is code from our example using the property mechanism to
get the required data from an image…

`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example2/invert.cpp#L242>`__
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp#L242>`__

.. code:: c++

Expand Down Expand Up @@ -483,7 +483,7 @@ As stated above, the render action is the one used to get a plugin to
actually process images. I’ll go through it in stages rather than have
one big listing.

`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example2/invert.cpp#L310>`__
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp#L310>`__

.. code:: c++

Expand Down Expand Up @@ -528,7 +528,7 @@ render window to fill in of the larger output image.
that the plugin does not rely on any implicit state, such as time,
everything is explicit.

`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example2/invert.cpp#L323>`__
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp#L323>`__

.. code:: c++

Expand All @@ -543,7 +543,7 @@ render window to fill in of the larger output image.
This next snippet fetches two clip handles by name from the instance,
using the image effect suite. [2]_

`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example2/invert.cpp#L331>`__
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp#L331>`__

.. code:: c++

Expand Down Expand Up @@ -571,7 +571,7 @@ We will be given back two property set handles which represent our
images. If the call failed (which could be for a variety of good
reasons) we give up with a ``throw``.

`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example2/invert.cpp#L345>`__
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp#L345>`__

.. code:: c++

Expand Down Expand Up @@ -602,7 +602,7 @@ and output images will always have the same number of components and the
same data types. Which is why we aren’t checking for the source for its
pixel information.

`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example2/invert.cpp#L365>`__
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp#L365>`__

.. code:: c++

Expand Down Expand Up @@ -630,7 +630,7 @@ correctly instantiate our templated function which will do the grunt
work of iterating over pixels. Note also that it is passing the nominal
maximum value of the data type as a template argument.

`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example2/invert.cpp#L383>`__
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp#L383>`__

.. code:: c++

Expand Down Expand Up @@ -676,7 +676,7 @@ status.

Now for our pixel pushing code. [3]_

`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example2/invert.cpp#L242>`__
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp#L242>`__

.. code:: c++

Expand Down Expand Up @@ -721,7 +721,7 @@ The first thing it does is to pull out the bounds, rowbytes and
destination pointer of our two images. We can now iterate over the
render window and set pixels in the output image.

`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example2/invert.cpp#L273>`__
`invert.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example2/invert.cpp#L273>`__

.. code:: c++

Expand Down
28 changes: 14 additions & 14 deletions Documentation/sources/Guide/ofxExample3_Gain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
This guide will take you through the basics of creating and using
parameters in OFX. An example plugin will be used to illustrate how it
all works and its source can be found in the C++ file
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Guide/Code/Example3/gain.cpp>`_.
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp>`_.
This plugin takes an image and
multiplies the pixel by the value held in a user visible parameter.
Ideally you should have read the guide to the :ref:`basic image
Expand Down Expand Up @@ -82,7 +82,7 @@ Now seeing as we are going to be playing with parameters, our plugin
will need a new suite, the parameters suite, and our load action now
looks like:

`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example3/gain.cpp#L101>`__
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp#L101>`__

.. code:: c++

Expand Down Expand Up @@ -136,7 +136,7 @@ is exactly the same as in the last example. What’s new is the bit where
we describe parameters. I’ll show the describe in context action in
several small chunks to take you through it.

`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example3/gain.cpp#L228>`__
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp#L228>`__

.. code:: c++

Expand Down Expand Up @@ -179,7 +179,7 @@ new parameter’s property set handle. Each parameter has a set of
properties we use to refine its behaviour, most of which have sensible
defaults.

`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example3/gain.cpp#L278>`__
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp#L278>`__

.. code:: c++

Expand All @@ -197,7 +197,7 @@ hairs over the image and so on. In this case we are saying that our
double parameter represents a scaling value. OFX has more kinds of
double parameter which you can use to best for your effect.

`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example3/gain.cpp#L282>`__
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp#L282>`__

.. code:: c++

Expand All @@ -214,7 +214,7 @@ This section sets a default value for our parameter and a logical a
minimum value below which it cannot go. Note it does not set a maximum
value, so the parameter should not be clamped to any upper value ever.

`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example3/gain.cpp#L290>`__
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp#L290>`__

.. code:: c++

Expand All @@ -236,7 +236,7 @@ values between 0.0 and 10.0 for our gain param, but the parameter could
be set to a million via other means, eg: typing in a UI number box,
animation, scripting whatever.

`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example3/gain.cpp#L298>`__
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp#L298>`__

.. code:: c++

Expand All @@ -255,7 +255,7 @@ the parameter. It defaults to the name of the param, but it can be
entirely different. Finally we set a hint string to be used for the
parameter.

`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example3/gain.cpp#L308>`__
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp#L308>`__

.. code:: c++

Expand Down Expand Up @@ -312,7 +312,7 @@ you can always grab parameters from an instance by name at any time. But
to make our code a bit cleaner and to show an example of instance data
being used, we are going to trap create instance.

`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example3/gain.cpp#L111>`__
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp#L111>`__

.. code:: c++

Expand All @@ -333,7 +333,7 @@ handles, we are going to cache away handles to our clips and parameters
in a simple struct. Note that these handles are valid for the duration
of the instance.

`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example3/gain.cpp#L330>`__
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp#L330>`__

.. code:: c++

Expand Down Expand Up @@ -378,7 +378,7 @@ in the instance’s property set.
It then fetches handles to the two clips and two parameters by name and
caches those into the newly created struct.

`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example3/gain.cpp#L123>`__
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp#L123>`__

.. code:: c++

Expand All @@ -401,7 +401,7 @@ overloaded and there is another version that take an
Of course we now need to trap the destroy instance action to delete our
instance data, otherwise we will get memory leaks.

`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example3/gain.cpp#L364>`__
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp#L364>`__

.. code:: c++

Expand All @@ -425,7 +425,7 @@ So we’ve define our parameters, we’ve got handles to the instance of
them, but we will want to grab the value of the parameters to actually
use them at render time.

`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example3/gain.cpp#L490>`__
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp#L490>`__

.. code:: c++

Expand Down Expand Up @@ -465,7 +465,7 @@ similar to a C scanf function.
And finally here is a snippet of the templated pixel pushing code where
we do the actual processing using our parameter values;

`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/doc/Documentation/sources/Guide/Code/Example3/gain.cpp#L437>`__
`gain.cpp <https://github.com/AcademySoftwareFoundation/openfx/blob/main/Documentation/sources/Guide/Code/Example3/gain.cpp#L437>`__

.. code:: c++

Expand Down
Loading
Loading