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).

Note 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 OperatorsCustom Properties


Syntax

public class <plugin-item_name>

{

	public bool Define( Context in_context )

	{

		...

	}

}
CStatus <plugin-item_name>_Define( CRef& in_context ) 

{ 

	... 

}
function <plugin-item_name>_Define( in_context ) 

{ 

	... 

}
def <plugin-item_name>_Define( in_context ):

	...
Function <plugin-item_name>_Define( in_context )

	...

End Function
sub <plugin-item_name>_Define 

{ 

	my $in_context = shift; 

}

<plugin-item-name> is the name specified in the call to PluginRegistrar.RegisterProperty or PluginRegistrar.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 CustomOperator.
C++ CRef& A reference to the CustomProperty or CustomOperator.


See Also