
def process( node_name, handle ):

    handle.editorTemplate( beginScrollLayout=True )

    handle.editorTemplate( beginLayout="Float Attributes" )
    handle.editorTemplate( "floatAttr", addControl=True )
    handle.editorTemplate( endLayout=True )

    handle.editorTemplate( addExtraControls=True )

    handle.editorTemplate( endScrollLayout=True )

    handle.editorTemplate( suppress="caching" )
    handle.editorTemplate( suppress="nodeState" )


def ae_template( node_name ):

    from maya import cmds
    maya_handle = MayaHandle( cmds )
    process( node_name, maya_handle )



string_attr_help = """
This is the *annotation* for the stringAttr attribute
"""

def process( node_name, handle ):

    handle.editorTemplate( beginScrollLayout=True )

    handle.editorTemplate( beginLayout="Float Attributes" )
    handle.editorTemplate( "floatAttr", addControl=True, annotation=float_attr_help )
    handle.editorTemplate( endLayout=True )

    handle.editorTemplate( beginLayout="String Attributes" )
    handle.editorTemplate( "stringAttr", addControl=True, annotation=string_attr_help )
    handle.editorTemplate( endLayout=True )

    handle.editorTemplate( addExtraControls=True )

    handle.editorTemplate( endScrollLayout=True )

    handle.editorTemplate( suppress="caching" )
    handle.editorTemplate( suppress="nodeState" )


def ae_template( node_name ):

    from maya import cmds
    maya_handle = MayaHandle( cmds )
    process( node_name, maya_handle )


Add another attribute and some annotations
Add another attribute and some annotations

We write the annotations in rst for the moment.

+ 
+ string_attr_help = """
+ This is the *annotation* for the stringAttr attribute
+ """
  
  def process( node_name, handle ):
  
      handle.editorTemplate( beginScrollLayout=True )
  
      handle.editorTemplate( beginLayout="Float Attributes" )
-     handle.editorTemplate( "floatAttr", addControl=True )
+     handle.editorTemplate( "floatAttr", addControl=True, annotation=float_attr_help )
+     handle.editorTemplate( endLayout=True )
+ 
+     handle.editorTemplate( beginLayout="String Attributes" )
+     handle.editorTemplate( "stringAttr", addControl=True, annotation=string_attr_help )
      handle.editorTemplate( endLayout=True )
  
      handle.editorTemplate( addExtraControls=True )
  
      handle.editorTemplate( endScrollLayout=True )
  
      handle.editorTemplate( suppress="caching" )
      handle.editorTemplate( suppress="nodeState" )
  
  
  def ae_template( node_name ):
  
      from maya import cmds
      maya_handle = MayaHandle( cmds )
      process( node_name, maya_handle )
  
  
Add another attribute and some annotations
## Code Before:

def process( node_name, handle ):

    handle.editorTemplate( beginScrollLayout=True )

    handle.editorTemplate( beginLayout="Float Attributes" )
    handle.editorTemplate( "floatAttr", addControl=True )
    handle.editorTemplate( endLayout=True )

    handle.editorTemplate( addExtraControls=True )

    handle.editorTemplate( endScrollLayout=True )

    handle.editorTemplate( suppress="caching" )
    handle.editorTemplate( suppress="nodeState" )


def ae_template( node_name ):

    from maya import cmds
    maya_handle = MayaHandle( cmds )
    process( node_name, maya_handle )


## Instruction:
Add another attribute and some annotations
## Code After:

string_attr_help = """
This is the *annotation* for the stringAttr attribute
"""

def process( node_name, handle ):

    handle.editorTemplate( beginScrollLayout=True )

    handle.editorTemplate( beginLayout="Float Attributes" )
    handle.editorTemplate( "floatAttr", addControl=True, annotation=float_attr_help )
    handle.editorTemplate( endLayout=True )

    handle.editorTemplate( beginLayout="String Attributes" )
    handle.editorTemplate( "stringAttr", addControl=True, annotation=string_attr_help )
    handle.editorTemplate( endLayout=True )

    handle.editorTemplate( addExtraControls=True )

    handle.editorTemplate( endScrollLayout=True )

    handle.editorTemplate( suppress="caching" )
    handle.editorTemplate( suppress="nodeState" )


def ae_template( node_name ):

    from maya import cmds
    maya_handle = MayaHandle( cmds )
    process( node_name, maya_handle )

