Misfit Code MM3D small logo Misfit Model 3D






SourceForge.net Logo

Get Firefox!

Donate towards my web hosting bill!

Anonymous Subversion Repository

There is an anonymous SVN repository at http://svn.misfitcode.com/misfitcode/mm3d. The trunk directory contains the most recent development code.

To get the most recent code, run the following command at a shell prompt. It will get the mode recent source code and put it in a directory named mm3d.

svn co http://svn.misfitcode.com/misfitcode/mm3d/trunk mm3d

You can then use svn update in the mm3d directory to get the latest development code at any time. To build the code, be sure to read README.SVN. This file contains instructions for building and list of additional dependencies that you will need if you're working with the SVN code repository.

To create a patch for submission, capture the output of svn diff and send it to me.

For general information on using Subversion, see Version Control with Subversion.

Writing Plugins

Note: The plugin system currently does not work on Microsoft Windows operating systems.

Plugins can be created to add new tools, commands, texture filters and model filters. Currently Misfit development is done in C++. If you have a compelling reason to implement a plugin in another language, contact me and I may be able to arrange C bidings which can be extended to support other languages.

The details of the plugin system may change. The discussion below details the plugin system as of 1.0, but the development source code is always the most up-to-date source of documentation. Check the plugins directory in the misfit model distribution for an example. The ImLib2 Texture plugin contains a documented, non-trivial example.

A Misfit plugin is a dynamic library which contains three required functions and two optional functions, declared as extern "C". Functions marked with a * are optional.

  • plugin_init - Initialize the plugin
  • plugin_uninit - Uninitialize the plugin
  • plugin_mm3d_version - Provide Misfit Model 3D version string the plugin was compiled for
  • plugin_version * - Provide plugin version string
  • plugin_desc * - Provide plugin description string

The contents of the init and uninit functions will depend on what the purpose of the plugin is. In most cases it will register a new tool, command, or filter through the appropriate manager singleton. The version and description functions are optional, but are useful in providing information to the end user about the version and purpose of the plugin. These details can be viewed from the Plugins Window.

The plugin_mm3d_version function should return the VERSION_STRING constant that is defined in version.h.

See the ImLib2 Texture plugin for an introduction to writing a plugin. The example also contains pointers to other files in the codebase which contain classes to derive from and documentation on how to use the manager singletons. The source code for the latest stable or development release is always the authoritative reference. I try to keep documentation in the relevant header files current.

Contributing Code

Source code contributions for the main distribution are encouraged, whether they are bug fixes or new features. To make the integration process smoother, please follow the guidelines below.

  • Contact me before starting a complex feature. I may be close to finishing a similar feature or the feature you wish to add may conflict with Misfit Model 3D's design goals.
  • Follow the coding style in the rest of the project. The coding style guidelines are listed below.
  • Make a patch (unified diff [diff -Nurp]) against the latest version. If your patch is a bug fix, make it against the latest stable release. If your patch is a new feature, make it against the SVN repository or the latest development release. See the SVN section on submitting a patch, or read the FAQ for details on creating a patch from a source tarball release.

Coding Style Guidelines

When contributing to Misfit Model 3D, try to conform to the following guidelines unless you have a good reason to do otherwise.

  • 3-space indentation, no tabs
  • Opening and closing braces are on their own line
  • Blocks should almost always have braces (an occasional bare if/else is acceptable)
  • Use whitespace around keywords and operators
  • Be liberal with parenthesis in complex expressions
  • Break long lines before operators and line up operators vertically
  • Class and struct names begin with an upper-case letter
  • Member function names are camelback style
  • Constants are always upper-case
  • Member variables begin with "m_" (except in very simple structs)
  • Static class variables begin with "s_"

[ Main | Download | Online Help | Development | Contact ]
Last updated: Sat Aug 1 08:56:59 PDT 2009
Copyright © 2004-2009, Kevin Worcester -- email kevin at the misfitcode.com domain.