Define

Description

Defines the property set (either standalone or associated with a self-installed custom operator), including all parameters that underlie the controls on the property page. Use this callback to build a set of parameters that will appear in the property page. This is where you define the number of parameters, their type, any defaults, value limitations, and so on.

This callback is fired when you instantiate the property on a scene item (for example, using SceneItem.AddProperty on the scene root or a cube in the scene).

 

For parameters defined on custom operators, this is only called for new operators, not operators being loaded out of a scene file. This behavior differs from that of the Init (Operator) callback.

Applies To

Custom Operators

Custom Properties

Syntax

// C#
public class <plugin-item_name>
{
   public bool Define( Context in_ctxt )
   {
       ...
   }
}

 

// C++
CStatus <plugin-item_name>_Define( CRef& in_context )
{
   ...
}

// JScript
function <plugin-item_name>_Define( in_context )
{
   ...
}

# Python
def <plugin-item_name>_Define( in_context ):
   ...

' VBScript
Function <plugin-item_name>_Define( in_context )
   ...
End Function

<plugin-item_name> is the name specified in the call to RegisterProperty or RegisterOperator, with any spaces converted to underscores. For example, if you register a property with the name "My Property", the callback function names start with "My_Property".

Parameters

Parameter

Language

Type

Description

in_context

Scripting and C#

Context

Context.Source returns the CustomProperty or a CustomOperator.

There are no context attributes for this callback.

C++

CRef &

A reference to the CustomProperty or a CustomOperator.

See Also

RegisterProperty

RegisterOperator

DefineLayout

AddParameter

AddFCurveParameter

AddGridParameter

AddProxyParameter

AddParameterFromDef

Property Callbacks

Operator Callbacks



Autodesk Softimage 2011