Gaffer newbie plugin development questions

181 views
Skip to first unread message

Nicholas Yue

unread,
Jun 5, 2021, 8:54:36 PM6/5/21
to gaffer-dev
Hi,

  Gaffer newbie diving into it on the Windows platform.

  I have follow the following example and install the plugin


  I see that it loads the actual node detail from another file

        $GAFFER_ROOT/resources/examples/references/macbethTexture.grf

  I also looked around and found another example

$GAFFER_ROOT/resources/examples/boxBasics.gfr

  Question 1 : Looking at the above *.grf files, are the file generated via another (UI) tool or manually written ?

  Question 2 : Am I correct to understand that the plugin mechanism performs the loading and registration, the plugin details e.g. input/output/parameters, those are all defined in *.grf files ?

Cheers

John Haddon

unread,
Jun 8, 2021, 6:18:15 AM6/8/21
to gaffe...@googlegroups.com
On Sun, Jun 6, 2021 at 1:54 AM Nicholas Yue <yue.ni...@gmail.com> wrote:
  Question 1 : Looking at the above *.grf files, are the file generated via another (UI) tool or manually written ?

A `.grf` file is authored via the Gaffer UI, by creating a Box and then exporting it as a reference. Typically this is intended for end users rather than developers, and typically a user would load a `.grf` file manually using a Reference node. Everything loaded this way appears as a Reference node, so each `.grf` is not strictly speaking a new type of node, and isn't really something we'd consider to be a plugin.
 
  Question 2 : Am I correct to understand that the plugin mechanism performs the loading and registration, the plugin details e.g. input/output/parameters, those are all defined in *.grf files ?

Correct. The startup file is simply adding a menu item that will load that `.grf` file into a new Reference node. It can be useful for users to integrate their creations a bit more tightly this way, but for a developer I would tend to recommend using one of our more advanced plugin mechanisms - writing your own nodes using Python or C++.

Cheers...
John

Carlo Giesa

unread,
Jun 8, 2021, 10:04:53 AM6/8/21
to gaffe...@googlegroups.com
Hi John!

I just bump in here out of curiosity. Although I'm not planning to do any C++ node development on Gaffer soon, I'm still curious to know if there is a way to write a C++ plugin node (as you would for Nuke or Maya) without the need to compile the entire application? If so, are there any examples to check out?

Greets,
Carlo

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/CAB8pVgKCYdnWtp9btEvKWMX%3DLKPN4k7yC1ekTymxQkHp2MyZNA%40mail.gmail.com.

eric...@gmail.com

unread,
Jun 8, 2021, 10:36:37 AM6/8/21
to gaffer-dev
I can chime in on that one Carlo, as I've created a number of nodes without building the whole Gaffer application. I use Scons and Gaffer's SConstruct file as a starting point for getting the build set up, but I'm sure any build system can work and might be simpler if you're only building a node here and there.

The main things you need to supply to the build system is the header files location which are in the "include" directory of your Gaffer installation and the library files location in the "lib" directory. 

Alex Fuller's GafferCycles project is an example of new nodes (and a whole renderer integration!) that builds independently from the Gaffer build: boberfly/GafferCycles: Cycles for Gaffer (github.com)

- Eric

Carlo Giesa

unread,
Jun 8, 2021, 11:25:28 AM6/8/21
to gaffe...@googlegroups.com
Hey Eric!

Thanks a lot! I will check that out.

Greets,
Carlo

John Haddon

unread,
Jun 9, 2021, 6:00:08 AM6/9/21
to gaffe...@googlegroups.com
Here are a couple of other public examples of compiled Gaffer extensions that might be useful for reference :
Cheers...
John


Carlo Giesa

unread,
Jun 10, 2021, 11:03:27 AM6/10/21
to gaffe...@googlegroups.com
Hey John!

Thanks a lot for those hints. I will check them out.

Greets,
Carlo

Reply all
Reply to author
Forward
0 new messages