Skip to content

Plugin Structure

tobspr edited this page Apr 15, 2016 · 7 revisions

Plugin Structure

Plugin files

Every plugin should be located in rpplugins/<plugin_name>/ whereas <plugin_name> denotes the identifier of the plugin. The identifier may consist only out of lowercase letters, the numbers 0-9, and underscores.

There are certain files which are required for every plugin:

plugins/<plugin_name>/
        +  __init__.py
        +  plugin.py
        +  config.yaml

The __init__.py file should just be empty. It serves for the only reason to be able to import the plugin. The config.yaml file should contain your [Plugin Configuration](Plugin Configuration). The plugin.py should contain your plugin base class, see [Plugin API](Plugin API).

Directory Structure

Additionally to the required files, there exists a proposed directory structure, where the pipeline expects your plugin files (you can also find this structure in the PluginPrefab):

plugins/<plugin_name>/
        + resources
            + some_resource.png
        + shader
            + some_include_file.inc.glsl
            + stage1.frag.glsl
            + stage2.frag.glsl

You should place required textures (and models) in resources. Your shader include files and stage shaders should be stored in shader/.