Plugin Behavior Guidelines

From K-3D

Jump to: navigation, search

Overview

In the past we've had a lot of suboptimal, conflicting, arbitrary, and generally-not-well-thought-out behavior from plugins, especially (but not exclusively) mesh modifiers. This makes it necessary to provide newer versions of existing plugins that provide similar-but-not-identical behavior, which can lead to user confusion, backwards-compatibility problems, and maintenance issues. This page attempts to capture some general "best practices" on how different classes of plugins should operate, so that we minimize these sorts of changes in the future. Note that these are just guidelines, plugin authors can deviate from these guidelines when there are compelling reasons to do so - just don't be surprised if we ask!

If possible, ask artists how they are likely to use any in development plugin. The common context and uses for plugins usually makes certain behaviors desirable, often small details can have major impacts on the usability of a plugin.

Mesh Modifiers

  • Modifiers that operate on specific geometric primitives (e.g: polyhedra) should "pass through" any other primitives that are present in their input.
    • Rationale: A K-3D mesh can contain an arbitrary combination of geometric primitives (e.g: points, lines, curves, patches, polyhedra, blobbies).
  • Modifiers should create useful output selections
    • Often modifiers that create geometric primitives should select new new primitives in their output.
      • Rationale: More-likely-than-not, the next operation to be performed will be on the newly-created primitives.
    • Consider what the most likely next operation will be after using the modifier. Output a default selection useful for that likely action.
      • Rationale: Artists can save a lot of time if they don't have to manually select things between finishing with one modifier and adding another, and often there is a known workflow that an artist uses the modifier for. For example, after subdividing edges, the most likely operator is adding a connect vertices modifier to connect the newly created vertices, thus it stands to reason that the vertices should be selected. However, after extruding, the most likely operation an artist will perform will be to move, scale, or rotate the end face, so it makes sense to select only the end face by default. (A select side faces options is very useful as well, it just shouldn't be on by default!)
    • Consider properties that control what the output selection will be.
      • Rationale: Sometimes there is more than one useful output selection. This is the case with extrude, so it has a "select side faces" option.
    • Consider referring to Wings3D if the modifier performs a similar operation to something done in Wings3D.
      • Rationale: Wings3D output selections are generally very good, and well liked by users.