Use extensions to define plug-in behaviors

Extensions define the points of integration between your plug-in and the 3ds Max Interactive environment: that is, the things that your plug-in changes or adds to the editor when it's loaded.

You can set up several different kinds of extensions in your .stingray_plugin descriptor file:

Every plug-in needs to have at least one of these extensions. There is no limit to the number of extensions that a plug-in can have.

Configuring extensions

You set up extensions in your .stingray_plugin resource file, in the extensions object:

extensions = {
    actions = [
        {
            ...
        }
    ]
    menus = [
        {
            ...
        }
        {
            ...
        }
    ]
    asset_types = [
        {
            ...
        }
    ]
}

Each type of extension has its own named list inside the extensions object -- like menus and actions above. Each of these lists can have any number of objects inside it, each of which configures a single instance of that type of extension. So, for example, the configuration above registers one new action, two new menu items, and one new asset type.

Each type of extension has its own set of configuration parameters too, which you need to set up. See the other pages in this guide for details on the parameters required for each different extension type.

String variables in extension data

Most of the configuration parameters you set for the extensions in your plug-in are string values. In these values, you can use some special placeholder values that the editor automatically replaces.

Currently, you can use the following variables:

Some extensions also add more of these dynamic strings. See the pages in this section for details.