Command

BasicCommand

class lxu.command.BasicCommand
arg_DisableMsg(index, message)

Return true if the argument is disabled, and set the message if any.

arg_UIHints(index, hints)

Set hints for the argument.

arg_UIValueHints(index)

Return a UIValueHints object for the argument.

atrui_DisableMsg(index, message)
atrui_UIHints(index, hints)
atrui_UIValueHints(index)
attr_Count()

Returns number of attributes.

attr_GetFlt(index)
attr_GetInt(index)
attr_GetString(index)
attr_Hints(index)

Returns hint vector for an attribute by index.

attr_Lookup(name)

Returns the index of an attribute given the name.

attr_Name(index)

Returns name of an attribute by index.

attr_SetFlt(index, val)
attr_SetInt(index, val)
attr_SetString(index, val)
attr_Type(index)

Returns basic type of an attribute by index.

attr_TypeName(index)

Returns value type string of an attribute by index.

attr_Value(index, writeOK)

Get value object for an attribute. If writeOK is true the value will be created if it doesn’t exist.

basic_ArgType(index)

Dynamic argument types can be supported with this method.

basic_ButtonName()

Button name override.

basic_Enable(msg)

basic_Enable() gives the enable state (true/false) and reason. It can also return None if the command is not available at all.

basic_Execute(msg, flags)

Execution: failure is trapped by the message object.

basic_Icon()

Icon name override.

basic_PreExecute(msg)

Pre-Execution: failure is trapped by the message object.

basic_SetFlags(index, flags)

Flags can be set by the client during initialization.

cmd_ArgClear(index)

Clearing arguments has to deal with the vararg flags on all arguments.

cmd_ArgDesc(index)
cmd_ArgEnable(arg)
cmd_ArgExample(index)
cmd_ArgFlags(index)

Get the flags, getting value_set from the dyna attrs.

cmd_ArgOptionDesc(index, optIndex)
cmd_ArgOptionUserName(index, optIndex)
cmd_ArgParseString(argIndex, argString)
cmd_ArgResetAll()
cmd_ArgSetDatatypes()
cmd_ArgType(index)

The default retuns None, which means the argument type will be taken from it’s definition.

cmd_ArgTypeDesc(index)
cmd_ArgTypeUserName(index)
cmd_ArgUserName(index)
cmd_ButtonName()
cmd_ContainedEnable()
cmd_Copy(sourceCommand)
cmd_Desc()
cmd_DialogArgChange(arg)
cmd_DialogFormatting()
cmd_DialogInit()
cmd_Enable(msg)
cmd_Example()
cmd_Execute(flags)
cmd_Flags()

Required method, but should be overridden by the client. The default retuns zero, which means this is a side-effect command.

cmd_Help()
cmd_Icon()
cmd_IconImage(w, h)
cmd_Interact()
cmd_Message()

Returns our message object.

cmd_Name()
cmd_NotifyAddClient(argument, object)
cmd_NotifyRemoveClient(object)
cmd_PostExecBehaviorFlags()
cmd_PostExecFlags()
cmd_PostExecHints()
cmd_PreExecute()
cmd_Query(index, vaQuery)
cmd_SandboxGUID()
cmd_Tag()
cmd_ToggleArg()
cmd_Tooltip()
cmd_UserName()
dyna_Add(name, type)

We override dyna_Add() to expand our flags array.

dyna_Bool(index, value)
dyna_Float(index, value)
dyna_GetFlags(index)

Returns flags for an attribute by index.

dyna_Int(index, value)
dyna_IsSet(index)

Returns true if the attribute value is set.

dyna_SetFlags(index, flags)

Set the optional flags int for an attribute.

dyna_SetHint(index, hint)

Set the optional hint vector for an attribute.

dyna_SetType(index, type)

Change the value type for an attribute by index. Setting it to None clears the stored value without changing the type.

dyna_String(index, value)

BasicHints

class lxu.command.BasicHints
uiv_ColorPickerCommands(rgb, alpha, rgbAlt, alphaAlt, useAlt, bufLens)
uiv_CueText()
uiv_Flags()
uiv_FormCommandListByIndex(index)
uiv_FormCommandListCount()
uiv_ItemTest(item)
uiv_NotifierByIndex(index)
uiv_NotifierCount()
uiv_PopCategory()
uiv_PopCount()
uiv_PopFlags(index)
uiv_PopIconImage(index)
uiv_PopIconResource(index)
uiv_PopIconSize()
uiv_PopInternalName(index)
uiv_PopToolTip(index)
uiv_PopUserName(index)
uiv_TextValidate(value)

NotifierHost

class lxu.command.NotifierHost

Utility class for managing notifiers on a command.

add(name, args)

Add a notifier by name and args. It’s spawned and appended to the list, but only if there are no clients yet.

add_client(object)

Add a client to all notifiers. It’s placed into a dictionary to prevent adding more than once.

rem_client(object)

Remove a client from all notifiers.

set_arg(dyna, index)

Add the notifiers associated with an argument of the command. This can only be done before clients are added, and only once.