       $(e.target).toggleClass('selected')
       @updateColorGroup()
     @$el.find('#shape-buttons').replaceWith(buttons)
-    console.log 'making buttons'
     @buttons = buttons
 
   tryToBuild: ->

    @stage.removeChild(@movieClip) if @movieClip
    options = {colorConfig: {}}
    options.colorConfig[@currentColorGroupTreema.keyForParent] = @colorConfig
    console.log 'options are', options
    @spriteBuilder.setOptions options
    @spriteBuilder.buildColorMaps()
    @movieClip = @spriteBuilder.buildMovieClip animation

    @colorGroups.build()
    @colorGroups.open()
    keys = Object.keys @colorGroups.childrenTreemas
    @colorGroups.childrenTreemas[keys[0]]?.$el.click() if keys[0]

  onColorGroupsChanged: =>
    @thangType.set('colorGroups', @colorGroups.data)

  onColorGroupSelected: (e, selected) =>
    @$el.find('#color-group-settings').toggleClass('hide', not selected.length)
    treema = @colorGroups.getLastSelectedTreema()
    return unless treema
