So got a couple of queries on how you actually add attributes to sets in practice.

When cgm.setTools creates a set with selected channel box attributes on the fly, there are a couple of processes going on.

A set is created

The channel boxes are queried for selection via the function cgm.lib.search.returnSelectedAttributesFromChannelBox

There’s an active selection query for regular objects

Objects and selected attributes are added to that set

Sometimes you just wanna do stuff yourself so here’s a few examples. Here’s an example of adding an attribute to an existing set. So in this case, the existing set is ‘point_lightSet’ and the attribute is ‘nurbsSphere1.translateX’:

So, I learned I’d been going in the wrong direction for a couple of weeks on the buffer front. A bit frustrating? Yes. However, plenty of stuff learned. Failure is learning. And the faster you admit it, the faster you can start a new path. Hopefully the right one!

The main reasons I’d thought we needed a custom buffers turned out to not be true, it just so happens that Maya’s documentation is about as clear as mud on that front.

Here’s some useful tidbits:

A quick select set is just a regular maya set that has it’s ‘text’ tag set to be ‘gCharacterSet’. As far as I can tell that is the only difference at all.

You can indeed add attributes to a set. I’d thought for ages you could only do objects and components. If Only I’d known…

Anim curves can be added as well

Sets can be flagged to only accept certain component types. However, the list is rather limited (verts, edges, faces, editPoints)

If you add a set to another set, it’s like parenting them. Removing is like unparenting.

Regardless, been reworking the tools and the base functions are pretty much there. Just working through the GUI stuff. Hoping to have cgm.setTools up in the release later this week for testers.

So at least to me, the maya.env setup has perpetually been an exercise in frustration. For years, it seemed it would remain shrouded in mystery. Recently as I’ve been making tools and learning I took some time to do some googling and I have a much better understanding of how to make it work well so you don’t have to!

The first thing we wanna add is an inline variable we can call. This doesn’t have to be done but with multiple repositories, I found it easier. We’ll add this to the topREPOSPATH = X:/repos/

Then if you already have some paths on Maya_Script_Path or PythonPath, you can amend them by putting the following at the end of each one followed by a ‘;’%REPOSPATH%/cgmtools/mayaTools;
%REPOSPATH%/cgmtools/mayaTools;

So, setting up an IDE for doing coding is a pretty good idea if you’re gonna be doing a lot of it. My IDE of choice is Wing and it can be a little tricky getting things setup right for auto-completion. If you wanna get going with it, you can…