Attr Tools

Status: Alpha release - Spring 2017

Last Updated: 09.12.2017

Overview

cgmAttrTools are a collection of tools for making working with attributes in maya a little less opaque.

Note

Still refining value pushing copying workflow

What can I do with it?

  • Easy attribute adding, setting and editing
  • Succinct, sortable display of node attributes and data about them
  • Value pushing - current data, next/previous frame, forward/back on timeline and all.
  • Multi setting and more

Accessing

  1. UI - Top cgm menu - CGM > TD > Attributes > cgmAttrTools
  2. Toolbox - TD Tab> Rigging > AttrRow > cgmAttrTools
  3. MarkingMenu - TD Mode > Utils (NW) > Attr (SW) > attrTools 2.0 (SW)
  4. Python
import cgm.core.tools.attrTools as ATTRTOOLS
ATTRTOOLS.ui()

If you open the ui, you should see something like this:

_images/attrtools_base.png

The UI has two main parts. The top menu and body.

Body

_images/attrtools_base.png

Objects

At the top of the body is a mel label which will update to let us know information about what we're working with. This is where you load objects which will be used to load our attribute data.

  • Load selected - Loads selected objects to the ui. First object is the 'prime' object.
  • Report - May get rid of, just playing with if necessity
  • Clear - Clear selected objects

When you load mulple objects...

_images/attrtools_objects_multi.png

The prime node is the first in the selection and represented by the <nurbsSphere1>.

Sort Row

  • Sort - Sorts loaded attributes alphabetically
  • Shared - if more than one object is loaded, ONLY loads attributes shared by loaded objects.
  • Default- Designed to quickly get the most useful attributes
  • On - Only loads 'normal' attributes which are keyable and or user defined
  • Off - every settable attribute loads
  • User - load user defined attributes or not
  • Others - Every attribute on the object

Attribute List

This may seem overwhelming at first but it's not too bad once we break it down. Each line is an attribute. You can select more than one attribute at once.

  • Double clicking a row will bring up an uiPrompt to set the value.
  • With message attributes any objects selected will be stored if you double click a message attrtribute. If more than one item is selected, the attribute will be converted to multimessage if it is single.

Here's a loaded list:

_images/attrtools_loaded.png

To get a better idea of what we're looking at let's look at a couple examples:

Example 1:

_images/attrtools_attrrow_ex1.png
  • settings - Attribute long name
  • enum - Attr type
  • u - User defined
  • v - Visible in channel box
  • k - Keyable
  • [off],on - With an enum, options displayed with the current option wrapped in [].

Example 2:

_images/attrtools_attrrow_ex2.png
  • rotateX - The attribute long name
  • alias(hi) - This attribute it aliased with a name of hi
  • da - doubleAngle attr type
  • v - Visible in channel box
  • k - Keyable
  • <anim - Animation curve input (it's keyed)
  • >>> - Outbound connection on this attribute
  • 19.679... - Current Value

Move Row

_images/attrtools_moverow.png

Move buttons only show up when user defined attributes are visible. The let you move attributes in the channel box that are visible.

  • Move Up - Move selected attributes up in the channel box
  • Move Down - ...down...

Push Values

Values are pushed on nodes by their context, values and key options in the menu at the top of the ui.

_images/attrtools_pushrow.png
  • Current - Push the current values to contextual nodes. If only one node is loaded if you're not in primeAttr or primeAttr per node, it's not gonna do anything.
  • <<Back -Push to all previous keys from the current time
  • <Prev - Push to the first previous key from the current time
  • All - Push to all contextual keys
  • Next> - Push to the next key from the current time
  • Fwd>> - Push to all keys after the current time