SDK Guide for Newbies

From The Foundry MODO SDK wiki
Revision as of 06:26, 16 May 2016 by Ivo.grigull (Talk | contribs) (Fixed more typps)

Jump to: navigation, search

Introduction

This guide intends to introduce Modo users to the SDK.
Specifically to the Python API (but many of the concepts explained here are applicable to the C++ SDK).

It will try to avoid as many technical terms as possible, plus there will be links to the proper sections on this Wiki when need or deemed necessary.

What's Modo?

Modo is a 3D Application for modelling,sculpting, painting, rigging, animation and rendering.

You can find more info in the Wikipedia (English) and in it's own web page Modo at The Foundry web page

What's an SDK?

An SDK is a set of files written in any programming language that give access to control the host application, Modo in this case.

Note:

Modo understands different languages.
New languages can be added by users with enough knowledge as described in the F.A.Q. questions:
1.20 Is it possible to create SDK wrappers for other languages?

SDK History

Modo SDK was introduced in stages starting in 301. And continued its expansion on the latests versions. And it will continue doing it so.

Scripting instead was introduced in Modo 101. In 701 a new Python API was introduced that allowed a deeper access to the SDK similar to the C++ one.

In Modo 901, a new TD SDK (an SDK for technical directors) was introduced allowing a more easy access to the [API] introduced in 701.

Modo Speaks Many Languages

Modo can be accessed and controlled with several programming languages, each one offering different levels of access to modo internal mechanisms:

  • C++ is the language that offers the deepest access to Modo.
  • Perl, Lua and Python are scripting languages.
    Easier to learn and test that C++ specially for someone starting it's journey to learn how to program for Modo.
  • Python is the language that provide better access to Modo after C++.

Modo access is really split in two: Fire and Forget Scripts and Plug-ins.

Note:

The new TD SDK is a set of classes written in Python and sit on top of the Python API. Don't worry doesn't hurt a bit! ;)

Fire And Forget Scripts

If you followed the previous link you know what they are.

The important thing to remember about them is:

  • They run once, they do their job and exit. That means you can't control Modo interactively this way. Still allows for a lot of cool things.
  • There are three languages to write those: Perl, Lua and Python. Pick your choice.
  • They executed slowly than a proper plug-in.
  • Only allows a limited access to Modo capabilities.
  • They are the easiest way to start programming in Modo.

Plug-ins API (C++ and Python)

This is what we will be talking in this guide.

The important thing to remember about them is:

  • There are two languages to write those: C++ and Python. Pick your choice, but remember both use a common API but are different programming languages.
  • They executed faster than a fire and forget script or macro.
  • Allows almost full access to Modo capabilities. C++ access is superior.
  • They are the intermediate to advanced way to start programming in Modo.

TD SDK (901 and up)

This new TD SDK introduced for Technical Directors are a set of new classes that allows almost the same access than the Python API, but on an easier way.
Think of it as a new grammar for the existing Python API.

Being introduced on 901 is still new, it has a very nice documentation and is being expanded as this guide is written.

What Can I Control In Modo?

Many things, but depends which route you try, either the fire and forget or the full API.

There is a nice description here: Information for MODO developers.

Where I Can Find Samples?

In a few places.

I'm still lost, Where Can I Ask For Help

Fire and Forget scripts and questions can be found in the Scripting & Macros section of the forums.

Plug-ins (either in C++ or Python) examples and questions can be found in SDK & Plug-in Development section of the forums.

Where Can I Ask For Help From A Human Being?

There is a forum post: SDK Developers Channel [aka live Skype chat] explaining how to access to the Skype channel for modo development.

Note:

Be aware that we can not be sure the members of that chat are even human at all or connected 24h/365d! :P

What's Next?

Now is time to start getting your hands dirty with Modo SDK and the Python API on the guide's Python in Modo.