Go to: Synopsis. Return value. Flags. MEL examples.

Synopsis

editorTemplate [-addAdskAssetControls] [-addComponents] [-addControl string script] [-addDynamicControl string script] [-addExtraControls] [-addSeparator] [-annotateFieldOnly] [-annotation string] [-beginLayout string] [-beginNoOptimize] [-beginScrollLayout] [-callCustom script script] [-collapse boolean] [-debugMode boolean] [-dimControl string string boolean] [-endLayout] [-endNoOptimize] [-endScrollLayout] [-extraControlsLabel string] [-forceRebuild boolean] [-interruptOptimize] [-label string] [-listExtraAttributes string] [-preventOverride boolean] [-queryControl string string] [-queryLabel string string] [-queryName string string] [-suppress string]

editorTemplate is undoable, NOT queryable, and NOT editable.

The editorTemplate command allows the user to specify the conceptual layout of an attribute editor and leave the details of exactly which UI elements are used in the final result to the automatic dialog generation mechanism.

Return value

stringFor queryControl, the appropriate attribute type will be returned. string array For listExtraAttributes, extra attributes will be returned.

Flags

addAdskAssetControls, addComponents, addControl, addDynamicControl, addExtraControls, addSeparator, annotateFieldOnly, annotation, beginLayout, beginNoOptimize, beginScrollLayout, callCustom, collapse, debugMode, dimControl, endLayout, endNoOptimize, endScrollLayout, extraControlsLabel, forceRebuild, interruptOptimize, label, listExtraAttributes, preventOverride, queryControl, queryLabel, queryName, suppress
Long name (short name) Argument types Properties
-addAdskAssetControls(-aac) create
Adds controls for dynamic attributes of adskMaterial nodes and organizes them in a layout according to the XML ui description specified in the asset library.
-addComponents(-acp) create
This flag will add a frameLayout with a channel box which will display any selected components for the object.
-addControl(-ac) string script create
The first argument is the name of the attribute for which you wish to add a control. You can assume that when the editor is created from the template, an appropriate type of control will be used. The second string argument is optional, and can be used to specify a command (or script) to be executed when the attribute is changed.
-addDynamicControl(-adc) string script create
As -addControl with the exception that the attribute for which the control is to be created/attached is dynamic. [Note: -addControl will also work for dynamic attributes, but will not preserve their order in the attribute editor].
-addExtraControls(-aec) create
By default, if there are attributes of a node which you do not -addControl or -suppress, then controls will be created automatically and appended to the end of editor created from the template. This flag allows you to specify a particular place in the template for such controls to be automatically inserted. If dynamic attributes have not already been addressed with -addControl, they will also be placed here. A frameLayout will automatically be generated for you when you use this flag.
-addSeparator(-as) create
Adds a separator to the template.
-annotateFieldOnly(-afo) create
This flag can only be used with the -annotation flag. By default, for any Attribute Editor controlGroups created by the -addControl flag, the -annotation flag displays its annotation string when the mouse hovers over any control that is part (the label, the value field, etc.) of the group. Use this flag to limit display of the annotation to only the value field of the controlGroup. This flag is ignored if the controlGroup has no value field (e.g., checkBoxGrp)
-annotation(-ann) string create
This flag can only be used with the -addControl or the -addDynamicControl flags. The string will be used as an annotation on the controls created in the attribute editor.
-beginLayout(-bl) string create
Begins a layout in the template with the title specified by the string argument. Items between this flag and its corresponding -endLayout flag will be contained within the layout. You can assume that when the editor is created from the template, an appropriate type of layout will be used. (frameLayout).
-beginNoOptimize(-bn) create
Specifies that the layout of items between this flag and its corresponding -endNoOptimize flag is not to be optimized to minimize space.
-beginScrollLayout(-bsl) create
Begins a scrollLayout. Items between this flag and its corresponding -endScrollLayout flag will be contained within the layout.
-callCustom(-ccu) script script create
Specifies that at this point in the template when building the dialog, the procedure specified by the first argument is to be called to create some UI objects when a new node type is edited. The procedure specified by the second argument is to be called if an attribute editor already exists and another node of the same type is now to be edited. The replacing procedure should connect any controls created by the creating procedure to the equivalent attributes in the new node. A list of zero or more attributes specifies the attributes which the two procedures will involve. The procedures should have the signature:
proc AEcustomNew(string attributeName1, string attributeName2)
The number of attributes specified in the call should correspond to the number of attributes in the procedure signature.
-collapse(-cl) boolean create
This flag is only valid when used in conjunction with a -bl/beginLayout flag. It is used to specify the initial expand/collapse state of the layout. A true value will cause the layout to be collapsed upon creation, while a false value will expand the layout. The default is true (ie. collapsed).
-debugMode(-dbm) boolean create
Set debugging mode for the template
-dimControl(-dc) string string boolean create
This flag is only useful AFTER a control has already been created (using the -addControl flag). The first argument is the node name and the second is the attribute whose control you wish to affect. The third argument is a boolean which specifies whether to dim (true) or undim (false) the associated control.
-endLayout(-el) create
Ends a layout in the template started by -beginLayout.
-endNoOptimize(-en) create
Ends a set of non-optimized items.
-endScrollLayout(-esl) create
Ends a scrollLayout.
-extraControlsLabel(-ecl) string create
By default the label is "Extra Attributes". Specify an alternate label or an empty string to hide the label. This flag must be used in conjuction with the -aec/addExtraControls flag.
-forceRebuild(-fr)
2023
boolean create
Force a template to always destroy/create itself rather than use the replace feature. Both the default replace behavior and force rebuild preserve the collapse/expand status of all the layout sections.
-interruptOptimize(-io) create
Enforces a division between two sets of items whose layouts may be optimized.
-label(-l) string create
This flag can only be used with the -addControl or the -addDynamicControl flags. And it must be specified FIRST. The string will override the name of the attribute that will be displayed in the attribute editor.
-listExtraAttributes(-lea) string create
List extra attributes.This flag is only useful AFTER a control has already been created (using the -addControl flag). The first argument is the node name.
-preventOverride(-po) boolean create
If true, this flag disallows overriding the control's attribute via the control's right mouse button menu.
-queryControl(-qc) string string create
This flag is only useful AFTER a control has already been created (using the -addControl flag). The first argument is the node name and the second is the attribute whose control you wish to query. Note that in most cases, using this flag is identical to issuing a getAttr command, however, in the case of textFields (e.g. for message attributes), the text value currently being displayed will be returned, NOT the actual attribute value.
-queryLabel(-ql) string string create
This flag is only useful AFTER a control has already been created (using the -addControl flag). The first argument is the node name and the second is the attribute whose control label you wish to query. In most cases this flag returns the same value as the attribute's nice name, but when a -label flag was present on the -addControl command that created the control, -queryLabel will return that value instead
-queryName(-qn) string string create
This flag is only useful AFTER a control has already been created (using the -addControl flag). The first argument is the node name and the second is the attribute whose control name you wish to query.
-suppress(-s) string create
Prevent a control for the attribute specified by the string argument from appearing in the editor created from the template.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

// You will most likely want to use this command when defining the controls
// that appear in the Attribute Editor for a custom node created in a plugin.

// To see how this is done compile and load the transCircleNode plugin. Then
// create a node of type "transCircle" and show the Attribute Editor.

// Now look at the AEtransCircleTemplate.mel script to see how the
// editorTemplate command is used to define the controls that appear in
// the Attribute Editor.

// As you may have noticed the name of the template script must match the
// node type you create, ie. AEnodeTypeTemplate.mel.