Templates

The following guide provides patterns for interface elements and directories.

Operator Menus

Each operator should receive its own heading or page based on the length of the content. At the start should be a reference admonition documenting the context of the operator:

  1. .. admonition:: Reference
  2. :class: refbox
  3. :Mode: Edit Mode
  4. :Menu: :menuselection:`Curve --> Snap`
  5. :Shortcut: :kbd:`Shift-S`

Panels

Panels should be documented by their own heading, nested panels should use decreasing heading levels. Each panel could have its own page based on the length of documentation and/or the amount of panels. Expanded menus that toggle what properties are presented to the user should be treated like subpanels:

  1. Panel Title
  2. ===========
  3. Nested Panel Title
  4. ------------------

Properties

Properties should be documented using definition lists. Properties that are hidden based on other properties should used nested definitions:

  1. Property
  2. Property description.
  3. Hidden Property
  4. Hidden property description.

Select menus should be documented using the following syntax:

  1. Menu Label
  2. General description of the menu.
  3. :Menu Item: Menu Item Definition.
  4. :Menu Item: Menu Item Definition.
  5. :Menu Item: Menu Item Definition.

Nodes

Nodes should always have three headings inputs, properties and outputs with a note of absence if the node has none. At the end of the page can be an optional example(s) section:

  1. **********
  2. World Node
  3. **********
  4. .. figure:: /images/render_shader-nodes_output_world_node.png
  5. :align: right
  6. The World node.
  7. Introduction and general use case(s).
  8. Inputs
  9. ======
  10. This node has no inputs.
  11. Properties
  12. ==========
  13. This node has no properties.
  14. Outputs
  15. =======
  16. This node has no outputs.
  17. Example
  18. =======

Directory Layout

Sections should be generally structured as follows:

  • directory_name/

    • index.rst (contains links to internal files)

    • introduction.rst

    • section_1.rst

    • section_2.rst

For example:

  • rendering/

    • index.rst

    • cycles/

      • index.rst

      • introduction.rst

      • materials/

        • index.rst

        • introduction.rst

        • volumes.rst

The idea is to enclose all the content of a section inside of a folder. Ideally every section should have an index.rst (containing the TOC for that section) and an introduction.rst (introducing) to the contents of the section.

Table of Contents

By default, a table of contents should show two levels of depth:

  1. .. toctree::
  2. :maxdepth: 2
  3. introduction.rst
  4. perspective.rst
  5. depth_of_field.rst