MPlugs: Compound Plugs

Compound plugs are useful for organizing a bunch of MPlugs into a single group. I like to use them in tools that need to store persistent data in Maya scene files. To create a compound plug we use MFnCompoundAttribute. The actually creation process is similar to my previous example on creating...

Read more


MPlugs: Array Plug

An array MPlug consists of a list of plugs, each with its own data value. The catch is that all the plugs in the list have the same data type. This is unlike compound plugs, which can have a mix of data types for its children. You can read...

Read more


MPlugs: Connecting Plugs

Connecting two MPlugs together is fairly simple and is accomplished with MDGModifier.connect(). Lets connect two polygon spheres together such that translating one on X will translate the other on Y. First create the spheres and get them as MObjects. [crayon-62ff0fe421c4e283546873/] Now we can write a function that makes use...

Read more

1 2 3 4 5 9